BepInEx / HarmonyX

Harmony built on top of MonoMod.RuntimeDetours with additional features
MIT License
329 stars 42 forks source link

Usage with unity #94

Open alexhaffner opened 7 months ago

alexhaffner commented 7 months ago

Hey,

I'm using HarmonyX in unity (editor) do to some tracking on native calls for debugging purposes. It works fine in editor (besides https://github.com/BepInEx/HarmonyX/issues/92 which I hacked quickly), but in build it doesn't work at all.

I either end up:

  1. not being able to build at all if I don't add mono cecil dlls besides harmonyx
  2. or if I add mono cecil, it builds, but at runtime when patching, some harmonyx code fail at some point with an error about a bleeding edge DLL (with a random name, that doesn't exist on disk), cannot be loaded

Any idea or guidance to a fix?

Best,