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(); }