# Editor.SceneEditorSession

A SceneEditorSession holds a Scene that is open in the editor.
It creates a widget, has a selection and undo system.

- Kind: class
- Namespace: `Editor`
- Assembly: `Sandbox.Tools`

## Properties

- [`Active`](/api/Editor.SceneEditorSession/Active): The editor session that is currently active
- [`All`](/api/Editor.SceneEditorSession/All): All open editor sessions
- [`GameSession`](/api/Editor.SceneEditorSession/GameSession): The game session of this editor session, if playing.
- [`HasUnsavedChanges`](/api/Editor.SceneEditorSession/HasUnsavedChanges)
- [`IsMounted`](/api/Editor.SceneEditorSession/IsMounted): True if this session is editing a scene opened from a mount. Mounted scenes live at a read-only mount:// path, so they can't be saved and never report unsaved changes.
- [`IsPlaying`](/api/Editor.SceneEditorSession/IsPlaying)
- [`IsPrefabSession`](/api/Editor.SceneEditorSession/IsPrefabSession): Returns true if this session is editing a prefab
- [`OnFrameTo`](/api/Editor.SceneEditorSession/OnFrameTo)
- [`Scene`](/api/Editor.SceneEditorSession/Scene)
- [`Selection`](/api/Editor.SceneEditorSession/Selection)
- [`ShouldUpdate`](/api/Editor.SceneEditorSession/ShouldUpdate): Should we call [Sandbox.Scene.EditorTick](/api/Sandbox.Scene/EditorTick) while this session is visible?
- [`UndoSystem`](/api/Editor.SceneEditorSession/UndoSystem)

## Methods

- [`AddUndo`](/api/Editor.SceneEditorSession/AddUndo)
- [`BringToFront`](/api/Editor.SceneEditorSession/BringToFront): Bring this scene tab to the front
- [`CancelUndoScope`](/api/Editor.SceneEditorSession/CancelUndoScope): Cancels any open undo scopes, because we don't want the most recent change to appear in the undo stack.
- [`CreateDefault`](/api/Editor.SceneEditorSession/CreateDefault): Make a new SceneEditorSession with a default scene
- [`CreateFromPath`](/api/Editor.SceneEditorSession/CreateFromPath): Opens an editor session from an existing scene or prefab
- [`DeserializeSelection`](/api/Editor.SceneEditorSession/DeserializeSelection): Take a json string created by SerializeSelection and turn it into a selection
- [`Destroy`](/api/Editor.SceneEditorSession/Destroy)
- [`FrameTo`](/api/Editor.SceneEditorSession/FrameTo)
- [`FullUndoSnapshot`](/api/Editor.SceneEditorSession/FullUndoSnapshot): Take a full scene snapshot for the undo system. This is usually a last resort, if you can't do anything more incremental.
- [`GetSceneFolder`](/api/Editor.SceneEditorSession/GetSceneFolder)
- [`GetSelection`](/api/Editor.SceneEditorSession/GetSelection)
- [`MakeActive`](/api/Editor.SceneEditorSession/MakeActive): Makes this scene active and brings it to the front
- [`PushUndoSelection`](/api/Editor.SceneEditorSession/PushUndoSelection): Push the current selection into the undo system
- [`RecordChange`](/api/Editor.SceneEditorSession/RecordChange)
- [`Reload`](/api/Editor.SceneEditorSession/Reload)
- [`Resolve`](/api/Editor.SceneEditorSession/Resolve): Resolve a scene to an editor session. If it's a game scene, resolves the parent editor session.
- [`Save`](/api/Editor.SceneEditorSession/Save)
- [`Scope`](/api/Editor.SceneEditorSession/Scope): Pushes the active scene to the current scope
- [`SerializeSelection`](/api/Editor.SceneEditorSession/SerializeSelection): Serlialize the current selection to a json string. The aim here is to make something we can transfer back to objects.
- [`SetPlaying`](/api/Editor.SceneEditorSession/SetPlaying)
- [`StopPlaying`](/api/Editor.SceneEditorSession/StopPlaying)
- [`SuppressUndoSounds`](/api/Editor.SceneEditorSession/SuppressUndoSounds): Temporarily disables undo/redo sounds.
- [`Tick`](/api/Editor.SceneEditorSession/Tick)
- [`UndoScope`](/api/Editor.SceneEditorSession/UndoScope)
