Knowledge IL2CPP EN - Drova-Modding/Drova-Modding-API GitHub Wiki

Failure During invoking native->managed trampoline

It means that something did not go well! You may ask what now, but often there is no solution to it. Sometimes you get a pointer in <xAddress> which you can lookup, but if nothing comes, than its most likely a null pointer you are using somewhere. Best to check Methods like GetComponent<>or UnityEngine.Object.Find.

Caveats

see best here Unhollower, they are not activly using it anymore but since its based on it, all of the caveats should still apply

Don't`s

  • Generics are not allowed on custom MonoBehaviours
  • You can't override virtual Methods, but you can patch them
  • You can't inherit abstract classes

Actions/Delegates

  • Objects which inherits ValueType like AsyncHandle from Addressables are not supported

Async

  • IL2CPP Task types currently missing the INoficiation Interface, which means that awaits are not possible. You also can't cast the Awaiter or Task to a System one.

Scriptable Objects

  • Scriptable Objects are getting destroyed when they are only exist in the manged space, to counter that private readonly Il2CppReferenceField<YourScriptableObject> _scriptableObject; add this to your registered Il2CppType

Components

  • Some Components even when they seem available aren't. Like the LineRenderer
⚠️ **GitHub.com Fallback** ⚠️