class SceneEditorSession

book_4_sparkGenerated
code_blocksInput

Description

The SceneEditorSession class in the Editor namespace is responsible for managing an open scene and its editing state within the s&box environment. It provides various methods and properties to interact with the scene, manage its state, and handle undo/redo operations.

Members

Static Members

Member NameSummary
AllGets a list of all scene editor sessions.
ActiveGets the currently active scene editor session.
ScopePushes the active editor scene to the current scope.
ShowCloseDialogDisplays a dialog to confirm closing the session.
ResolveResolves a scene, scene file, prefab file, or source location to a session.

Instance Members

Member NameSummary
DestroyDestroys the current session.
MakeActiveMakes this session active, optionally bringing it to the front.
BringToFrontBring this scene tab to the front.
TickUpdates the session state.
FrameToFrames the view to a specified bounding box.
ReloadReloads the current scene.
SaveSaves the current session, with an option to save as a new file.
GetParentSessionReturns the parent editor session if this is a game session.
RecordChangeRecords a change to a serialized property. Obsolete.
SerializeSelectionSerializes the current selection to a JSON string.
DeserializeSelectionDeserializes a selection from a JSON string.
FullUndoSnapshotCreates a full undo snapshot. Obsolete.
PushUndoSelectionPushes the current selection into the undo system. Obsolete.
AddUndoAdds an undo action with a specified name, undo, and redo actions.
UndoScopeCreates an undo scope with a specified name.
IsGameSessionReturns true if this session is the running game.
IsPrefabSessionReturns true if this session is editing a prefab.
SceneGets the scene associated with this session.
OnFrameToEvent triggered when framing to a bounding box.
HasUnsavedChangesIndicates if there are unsaved changes in the session.
SelectionGets the selection system for this session.
UndoSystemGets the undo system for this session.