All of the following criteria must be met
All of the following are optional to answer
Describe the issue.
When the game thies to invoke patched method, it fails with "Object reference not set to an instance of an object" error, even if patch body is empty.
Example:
[HarmonyPatch(typeof(ShieldUnitsManager), nameof(ShieldUnitsManager.DealDamageToShields))] class ShieldUnitsManagerPatch1 { static bool Prefix() { return true; } }
leads to error in logs:
[20:26:33.311] [ERROR] [Il2CppInterop] During invoking native->managed trampoline System.NullReferenceException: Object reference not set to an instance of an object. at (il2cpp -> managed) DealDamageToShields(IntPtr , Single , IntPtr , Single& , Il2CppMethodInfo* )
This error remains the same with any type of patch - Prefix, Postfix, Transplier.
I'm using current nightly build of MelonLoader, Unity version 6000.3.9f1
Full log included
Latest.log
Did you attach your log file?
Yes, I attached my log file to the text box above.
All of the following criteria must be met
All of the following are optional to answer
Describe the issue.
When the game thies to invoke patched method, it fails with "Object reference not set to an instance of an object" error, even if patch body is empty.
Example:
[HarmonyPatch(typeof(ShieldUnitsManager), nameof(ShieldUnitsManager.DealDamageToShields))] class ShieldUnitsManagerPatch1 { static bool Prefix() { return true; } }leads to error in logs:
[20:26:33.311] [ERROR] [Il2CppInterop] During invoking native->managed trampoline System.NullReferenceException: Object reference not set to an instance of an object. at (il2cpp -> managed) DealDamageToShields(IntPtr , Single , IntPtr , Single& , Il2CppMethodInfo* )This error remains the same with any type of patch - Prefix, Postfix, Transplier.
I'm using current nightly build of MelonLoader, Unity version 6000.3.9f1
Full log included
Latest.log
Did you attach your log file?
Yes, I attached my log file to the text box above.