Skip to content

Fixes for headless#17

Merged
hazre merged 9 commits intoResoniteModding:masterfrom
Nytra:master
Jan 20, 2026
Merged

Fixes for headless#17
hazre merged 9 commits intoResoniteModding:masterfrom
Nytra:master

Conversation

@Nytra
Copy link
Contributor

@Nytra Nytra commented Nov 10, 2025

On headless you have to use HarmonyInstance.PatchAll(type); because if you cause Harmony to attempt to process a type that references Renderite.Host you get a crash.

also LogAlerter patch runs too early on headless so I made it wait until the logStream actually exists

Copy link
Member

@hazre hazre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing is HeadlessType spits out [Warning: HarmonyX] AccessTools.TypeByName: Could not find type named FrooxEngine.Headless.Program" on graphical client, but that's like whatever

Edit: nvm I AccessTools.TypeByName way of doing it doesn't seem to work, imma look for a better alternative.

@Nytra
Copy link
Contributor Author

Nytra commented Jan 20, 2026

Wha how did you commit to my repo?

@art0007i
Copy link
Contributor

its bcs u have allow maintainers to commit to my repo (enabled by default) when submitting the pr

@hazre hazre self-requested a review January 20, 2026 19:40
@hazre
Copy link
Member

hazre commented Jan 20, 2026

I ended up just simplifying everything and just made a safe PatchAll method and got rid of Headless check and patch categories. I tested this on Headless in WSL. You just get debug logs now that says it has skipped loading any patch that didn't work:

[Info   :   BepInEx] Loading [BepInEx Resonite Shim 0.9.2]
[Debug  :BepInEx Resonite Shim] Skipped patching GraphicalClientPatch: Could not load file or assembly 'Renderite.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

[Debug  :BepInEx Resonite Shim] Patched CachePath
[Debug  :BepInEx Resonite Shim] Patched CachePath
[Debug  :BepInEx Resonite Shim] Patched AsmLoc
[Debug  :BepInEx Resonite Shim] Skipped patching RenderiteHostPathFixes: Could not load file or assembly 'Renderite.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

[Message:   BepInEx] Chainloader startup complete
[Debug  :BepInEx Resonite Shim] Bypassing LoadFrom: ./ProtoFluxBindings.dll
[Debug  :BepInEx Resonite Shim] Bypassing LoadFrom: ./ProtoFlux.Nodes.FrooxEngine.dll

@hazre hazre requested a review from art0007i January 20, 2026 21:17
Move patch logic from HarmonyExtensions class into the main
BepInExResoniteShim class to avoid confusion with HarmonyLib methods.
@hazre hazre requested a review from art0007i January 20, 2026 21:57
Copy link
Contributor

@art0007i art0007i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hazre
Copy link
Member

hazre commented Jan 20, 2026

@Nytra sorry for hijacking your PR btw :/

@hazre hazre merged commit 5a04bf6 into ResoniteModding:master Jan 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments