Пример #1
0
 void OnDestroy()
 {
     Save();
     s_window = null;
     SceneView.onSceneGUIDelegate -= s_OnSceneGUI;
     EditorApplication.update     -= s_OnEditorWindowUpdate;
     s_OnSceneGUI           = null;
     s_OnEditorWindowUpdate = null;
 }
Пример #2
0
 static void Init()
 {
     if (s_window == null)
     {
         s_window = ScriptableObject.CreateInstance <MenuShortcutsWindow>();
         s_window.titleContent = new GUIContent("Shortcuts");
         CheckInitAllMenuItems();
     }
     if (s_shortcuts.Count == 0)
     {
         s_page = Page.All;
     }
     else
     {
         s_page = Page.Shortcuts;
     }
     s_window.Show();
     s_OnSceneGUI                  = OnSceneGUI;
     s_OnEditorWindowUpdate        = OnEditorWindowUpdate;
     EditorApplication.update     += s_OnEditorWindowUpdate;
     SceneView.onSceneGUIDelegate += s_OnSceneGUI;
 }