/** * On deserialization, need to re-register sceneview and undo delegates. */ public void OnAfterDeserialize() { singleton = this; SceneView.onSceneGUIDelegate += OnSceneGUI; Undo.undoRedoPerformed += UndoRedoPerformed; SceneView.RepaintAll(); }
static void Init() { if (singleton != null) { return; } singleton = ScriptableObject.CreateInstance <qe_Editor>(); singleton.hideFlags = HideFlags.DontSave; EditorApplication.delayCall += singleton.Initialize; }