// Here we implement ILoadPipeline

        // This executes when the client begins to load a new IL2CPP application
        // Place initialization code here
        public void LoadPipelineStarting(PluginLoadPipelineStartingEventInfo info)
        {
            // Try to load UnityPlayer.dll
            hModule = LoadLibrary(unityPath.Value);

            if (hModule == IntPtr.Zero)
            {
                throw new FileLoadException("Could not load UnityPlayer DLL", unityPath.Value);
            }

            // Get the base address of the loaded DLL in memory
            ModuleBase = Process.GetCurrentProcess().Modules.Cast <ProcessModule>().First(m => m.ModuleName == Path.GetFileName(unityPath.Value)).BaseAddress;
        }
示例#2
0
 public void LoadPipelineStarting(PluginLoadPipelineStartingEventInfo info)
 {
     // Perform per load initialization here
 }