public AssetTreeView(Project project, TreeViewState state) : base(state) { m_Project = project; showAlternatingRowBackgrounds = true; m_ChangeManager = project.Session.GetManager <IChangeManager>(); m_ChangeManager.RegisterChangeCallback(OnChangeDetected); }
public override void Load() { m_WorldManager = Session.GetManager <IWorldManager>(); m_ChangeManager = Session.GetManager <IChangeManager>(); m_ChangeManager.RegisterChangeCallback(HandleChanges, int.MinValue); m_Undo = Session.GetManager <IEditorUndoManager>(); m_Undo.UndoRedoBatchStarted += HandleUndoRedoStarted; m_Undo.UndoRedoBatchEnded += HandleUndoRedoEnded; }
public override void Load() { m_WorldManager = Session.GetManager <IWorldManager>(); m_ChangeManager = Session.GetManager <IChangeManager>(); if (null == m_WorldManager) { throw new ArgumentNullException(nameof(m_WorldManager)); } m_ChangeManager.RegisterChangeCallback(HandleChanges); }
public override void Load() { LoadUnityScratchPadScene(); m_WorldManager = Session.GetManager <IWorldManager>(); m_EntityManager = m_WorldManager.EntityManager; m_SceneManager = Session.GetManager <IEditorSceneManagerInternal>(); m_ChangeManager = Session.GetManager <IChangeManager>(); m_ChangeManager.RegisterChangeCallback(HandleChanges, int.MinValue); m_Undo = Session.GetManager <IEditorUndoManager>(); m_Undo.UndoRedoBatchEnded += HandleUndoEnded; UnityEditor.SceneManagement.EditorSceneManager.sceneOpening += HandleUnitySceneOpening; }
public BuildManifestView(TreeViewState state) : base(state, new MultiColumnHeader(CreateMultiColumnHeaderState())) { var session = Application.AuthoringProject.Session; m_PersistenceManager = session.GetManager <IPersistenceManager>(); m_ChangeManager = session.GetManager <IChangeManager>(); m_ChangeManager.RegisterChangeCallback(HandleChanges); AssetPostprocessorCallbacks.RegisterAssetMovedHandlerForType <SceneAsset>(HandleMovedAsset); multiColumnHeader.sortingChanged += OnSortingChanged; showAlternatingRowBackgrounds = true; Reload(); }