Vixen
02b45cc4
csharp
public sealed class EditorProject

An open project: its assets, its documents, its selection, and its global undo history.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Constructing one is cheap and touches no disk — it names the directories and builds the empty models. Open is what reads the project, so a shell can put a window on screen and then load into it rather than the other way round.

The global stack is for what is not inside any one document. Renaming an asset, moving a file, deleting a folder: operations whose effects land in documents that may not even be open. Its interaction with the per-document stacks is documented on CommandStack and enforced by Touch.

Fields and properties (11)

  • public ProjectPaths Paths

    Where the project's directories are.

  • public string Name

    What the project is called: the name of its root directory.

  • public AssetDatabase Assets

    Every asset, by GUID and by path.

  • public ReferenceIndex References

    Who refers to what.

  • public ProjectSettingsStore Settings

    The settings assets under ProjectSettings/.

  • public Selection<AssetId> Selection

    What is selected in the project browser.

  • public EditorContext Context

    What commands on the global stack are handed.

  • public CommandStack GlobalStack

    The undo history for operations that are not inside one document.

  • public IReadOnlyList<EditorDocument> Documents

    What is open, in the order it was opened.

  • public IReadOnlySignal<EditorDocument?> ActiveDocument

    Which document has focus, or if none.

  • public IReadOnlySignal<bool> HasUnsavedChanges

    Whether any open document differs from disk.

Methods (6)

  • public EditorProject(ProjectPaths paths)

    Names a project's directories and builds the empty models over them.

  • public ScanReport Open(ScanOptions? options = null)

    Reads the project: the GUID index, repaired if it needs it, and the reference index.

  • public bool TryGetDocument(AssetId asset, out EditorDocument document)

    Finds an open document by the asset it edits.

  • public void Activate(EditorDocument? document)

    Gives a document focus.

  • public bool Close(EditorDocument document)

    Closes a document.

  • public int SaveAll()

    Saves every open document that differs from disk.

Used by (107, showing 40)

  • AddressableGroupDocumentVixen.Editor.AssetEditors
  • AddressableGroupEditorFactoryVixen.Editor.AssetEditors
  • AddressableGroupsViewVixen.Editor.AssetEditors
  • AnimationBinderVixen.Editor.AssetEditors
  • AnimationClipDocumentVixen.Editor.AssetEditors
  • AnimationGraphDocumentVixen.Editor.AssetEditors
  • AnimationWiringTestsVixen.Editor.App.Tests
  • AssetEditorRegistryVixen.Editor.AssetEditors
  • AssetEditorRegistryTestsVixen.Editor.AssetEditors.Tests
  • AssetEditorRequestVixen.Editor.AssetEditors
  • AssetEditorsModuleVixen.Editor.AssetEditors
  • AssetOperationTestsVixen.Editor.Core.Tests
  • AssetOperationsVixen.Editor.Core
  • AssetPickerVixen.Editor.App
  • AssetPickerTestsVixen.Editor.App.Tests
  • AssetSearchSourceVixen.Editor.App
  • AssetWatchTestsVixen.Editor.App.Tests
  • AudioMixerDocumentVixen.Editor.AssetEditors
  • BehaviorSceneTestsVixen.Editor.SceneView.Tests
  • BlockoutBooleanTestsVixen.Editor.Blockout.Tests
  • BlockoutCreateTestsVixen.Editor.Blockout.Tests
  • BlockoutGeometryTestsVixen.Editor.Blockout.Tests
  • BlockoutHistoryTestsVixen.Editor.Blockout.Tests
  • BlockoutSelectionTestsVixen.Editor.Blockout.Tests
  • BlockoutSurfaceTestsVixen.Editor.Blockout.Tests
  • BuildSettingsTestsVixen.Editor.App.Tests
  • CodeDocumentVixen.Editor.AssetEditors
  • CommandStackTestsVixen.Editor.Core.Tests
  • CommandTestsVixen.Editor.NodeGraph.Tests
  • ComponentGizmoTestsVixen.Editor.SceneView.Tests
  • CompositorDocumentVixen.Editor.AssetEditors
  • ContentTasksVixen.Editor.App
  • CreateMenuTestsVixen.Editor.App.Tests
  • DiagnosticsModuleVixen.Editor.Diagnostics
  • DropIntoFieldTestsVixen.Editor.App.Tests
  • DropIntoSceneTestsVixen.Editor.App.Tests
  • EditMeshSceneTestsVixen.Editor.SceneView.Tests
  • EditingTestsVixen.Editor.Inspector.Tests
  • EditorApplicationVixen.Editor.App
  • EditorContentVixen.Editor.App