private static void OnProjectClosed(UTinyProject project) { EditorApplication.hierarchyChanged -= HierarchyChanged; Registry = null; EntityGroupManager = null; TinyUndo.OnRedoPerformed -= HierarchyChanged; TinyUndo = null; }
private static void OnProjectLoaded(UTinyProject project) { EditorApplication.hierarchyChanged += HierarchyChanged; Registry = UTinyEditorApplication.Registry; EntityGroupManager = UTinyEditorApplication.EntityGroupManager; TinyUndo = UTinyEditorApplication.Undo; TinyUndo.OnRedoPerformed += HierarchyChanged; }
public UTinyEditorContext(UTinyProject.Reference project, EditorContextType type, UTinyContext context, UTinyEditorWorkspace workspace) { m_Project = project; ContextType = type; Context = context ?? new UTinyContext(); Workspace = workspace ?? new UTinyEditorWorkspace(); Undo = new UTinyUndo(Registry, Caretaker); EntityGroupManager = new UTinyEntityGroupManager(this); }