private void OnDisable() { //Use mono hook to detach rendering thread from mono. CommandBuffer cb = new CommandBuffer(); cb.IssuePluginEvent(MonoHookNativeInterop.GetRenderEventFunc(RenderEventFuncID.RenderThreadDetachEvent), 0); Graphics.ExecuteCommandBuffer(cb); MonoHookNativePlugin.Shutdown(); }
protected IntPtr RegisterRenderCallback(RenderEventDelegate callback) { RenderEventFuncPtr = Marshal.GetFunctionPointerForDelegate(callback); MonoHookNativeInterop.SetRenderEventCallback(RenderEventFuncPtr); return(MonoHookNativeInterop.GetRenderEventFunc(RenderEventFuncID.ManagedCodeRenderEvent)); }
public static void Shutdown() { MonoHookNativeInterop.Shutdown(); }
public static void Init() { MonoHookNativeInterop.LinkDebug(functionPointer); }