private static FolderManagerEditorWindow OpenEditor() { _editor = GetWindow <FolderManagerEditorWindow>(); _editor.minSize = new Vector2(800, 400); _editor.titleContent = new GUIContent("FolderManager", "Make your life suck a little less!"); _editor.Focus(); _editor.Repaint(); FolderManager.ReInit(); return(_editor); }
private void OnEnable() { _editor = this; FolderManager.Initialize(); FolderManager.ClientRepaints -= Repaint; FolderManager.ClientRepaints += Repaint; SceneView.onSceneGUIDelegate -= OnSceneGUI; SceneView.onSceneGUIDelegate += OnSceneGUI; FolderManagerCallbacks.OnAddElement -= ElementAdded; FolderManagerCallbacks.OnAddElement += ElementAdded; FolderManagerCallbacks.OnDeleteElement -= ElementAdded; FolderManagerCallbacks.OnDeleteElement += ElementAdded; Cache = new FolderTreeCache(DirectoryUtility.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this)))); Cache.SetupCacheEvents(); }