static SceneViewEventHandler() { if (editor != null) { editor.Shutdown(); editor = null; } editor = new SceneViewEventHandler(); editor.Initialize(); }
void OnSceneUnloaded() { if (this.initialized) { this.Shutdown(); } MeshInstanceManager.Shutdown(); InternalCSGModelManager.Shutdown(); editor = new SceneViewEventHandler(); editor.Initialize(); }
/* * static IEnumerator OnEditorUpdate() * { * while (true) * { * RunEditorUpdate(); * yield return null; * } * } */ public static void ResetUpdateRoutine() { if (editor != null && !editor.initialized) { editor = null; } if (editor == null) { editor = new SceneViewEventHandler(); editor.Initialize(); } //CoroutineExecuter.StartCoroutine(OnEditorUpdate()); EditorApplication.update -= RunEditorUpdate; EditorApplication.update += RunEditorUpdate; InternalCSGModelManager.skipRefresh = false; }