Closed Panthr75 closed 2 years ago
That way we can remove all of our types we've injected in BasePlugin.Unload().
Example:
[BepInPlugin(INFO.GUID, INFO.NAME, INFO.VERSION)] class Plugin : BasePlugin { public override void Load() { PatchManager.PatchAll(); ClassInjector.RegisterTypeInIL2CPP<MyType>(); // other init stuff } public override bool Unload() { PatchManager.UnpatchAll(); ClassInjector.DeregisterTypeInIL2CPP<MyType>(); // other uninit stuff return base.Unload(); } }
BepInEx's mono runtime does not support unloading plugins from memory so this serves close to no purpose.
Move this issue to either unhollower or my unhollower rewrite when I make it public
That way we can remove all of our types we've injected in BasePlugin.Unload().
Example: