public interface IProjectSessionDoc 50 § D2's Project service: which project is open, what is on disk, and which opens next.
Remarks
The project's use cases as methods, published to plugins. Rescanning the asset database and asking for another project used to be done by whoever needed it — the content browser scanned and saved the database itself, and the disk watcher did the same three calls again when the browser was closed. One object does it now, and a module reaches it with Require<IProjectSession>().
⚠ Opening is a request and not a call. The editor is rebuilt over the new root by the host — the reopen loop is the composition root's job (doc 50 § D2) — so RequestProject sets PendingProject and asks to close, through the same unsaved-work prompt the window's close button uses.
Fields and properties (5)
EditorProject ProjectThe open project.
string? PendingProjectWhere the editor should reopen, or to stay where it is.
IReadOnlyList<RecentProject> RecentThe projects this user has opened, newest first — what File ▸ Open Recent and the startup browser list.
bool IsWatchingWhether something is watching the project's assets for changes made outside the editor.
IProjectCode CodeThe project's own code: which .csproj builds it and the assembly loaded from it.
Events (3)
Action<ScanReport>? RescannedRaised after every Rescan, with what it found.
Action<IReadOnlyList<FileChange>, bool>? ChangedOnDiskRaised once for each burst of changes made to the assets outside the editor, after the rescan they caused — with what changed and whether the watcher lost events.
Action? CodeBuiltRaised after BuildCode loaded the project's code and put the authored behaviours back — after a failed build too, when the last build that worked was loaded again.
Methods (4)
void RequestProject(string root)Closes this project and reopens the editor over another, asking about unsaved work first.
void CreateProject(string root)Writes the game template into a directory and asks to reopen the editor over it.
ScanReport Rescan()Rescans the asset database, saves its index and rebuilds the reference index.
bool BuildCode()Builds the project's own code and loads it, keeping every open scene's authored behaviours across the reload.
Used by (18)
- ContentBrowsingVixen.Editor.App
- EditorApplicationVixen.Editor.App
- EditorSessionVixen.Editor.Testing
- FixtureVixen.Editor.App.Tests
- InspectorPanelsVixen.Editor.App
- LibraryModuleTestsVixen.Editor.App.Tests
- PlayModuleVixen.Editor.App
- PlayerDeliveryVixen.Editor.App
- ProjectAssemblyTestsVixen.Editor.App.Tests
- ProjectBrowserVixen.Editor.App
- ProjectChooserVixen.Editor.App
- ProjectSessionVixen.Editor.App
- ProjectSessionTestsVixen.Editor.App.Tests
- ProjectSourceControlVixen.Editor.App
- SceneModuleVixen.Editor.App
- ServiceReachTestsVixen.Editor.App.Tests
- SourceControlModuleTestsVixen.Editor.App.Tests
- WorkspaceModuleVixen.Editor.App