// See: IL2CPP/Il2CppInspector.cs public void LoadPipelineEnding(List <Il2CppInspector.Il2CppInspector> packages, PluginLoadPipelineEndingEventInfo info) { // Perform per load finalization and teardown here // The 'packages' argument contains every Il2CppInspector metadata+binary package generated from the input files // eg. a Fat MachO with 32-bit and 64-bit images will generate two Il2CppInspectors // If you want to load additional IL2CPP applications for comparative analysis, this is a good place to do it // Example (store these in your plugin class; we use [0] to select the first image): // (Note: this will cause your load pipeline functions to execute again except for the one it is called from; // be sure to check for this and ignore load tasks you're not interested in. If you want the calling function // to be executed recursively, add the [Reentrant] attribute to the method declaration) try { var anotherIl2cpp = Il2CppInspector.Il2CppInspector.LoadFromFile("some-libil2cpp.so", "some-global-metadata.dat")[0]; var anotherTypeModel = new TypeModel(anotherIl2cpp); } catch { } }
// This executes when the client finishes loading an IL2CPP application // Place teardown code here public void LoadPipelineEnding(List <Il2CppInspector.Il2CppInspector> packages, PluginLoadPipelineEndingEventInfo info) { // Release memory lock on UnityPlayer.dll FreeLibrary(hModule); }