void OnDestroy() { ms_instance = null; EditorApplication.playmodeStateChanged -= OnPlayModeChanged; SceneView.onSceneGUIDelegate -= this.OnSceneGUI; //Dbg.Log("CCEditor Closed..."); }
public static void OpenWindow() { if (ms_instance == null) { CCEditor inst = (CCEditor)GetWindow(typeof(CCEditor)); inst.m_evtGORefDict = new EvtGORefDict(); //inst.m_curTime = EditorApplication.timeSinceStartup; EditorApplication.playmodeStateChanged += OnPlayModeChanged; SceneView.onSceneGUIDelegate += inst.OnSceneGUI; ms_instance = inst; //Dbg.Log("CCEditor Created..."); } }