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(); }
// Use this for initialization void Start() { MonoHookNativePlugin.Init(); }