void OnEnable() { m_SynthesizerProvider = null; LoadTemplate(); EditorApplication.playModeStateChanged += OnPlayModeStateChanged; //For regular RP Camera.onPostRender -= OnRender; Camera.onPostRender += OnRender; //For HDRP RenderPipelineManager.endCameraRendering -= OnRenderRP; RenderPipelineManager.endCameraRendering += OnRenderRP; UpdateSystem.Listen <PreLateUpdate>(OnPreLateUpdate); m_ExitingPlayMode = false; }