SceneEditorSessionclass
A SceneEditorSession holds a Scene that is open in the editor. It creates a widget, has a selection and undo system.
Constructors1
Showing 1 constructors
protected SceneEditorSession(Sandbox.Scene scene)
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
No results match this filter.
Methods29
Showing 29 methods
public virtual sealed void AddUndo(string name, System.Action undo, System.Action redo)
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| undo | Action | — |
| redo | Action | — |
void—public void BringToFront()
Bring this scene tab to the front
void—public static Editor.SceneEditorSession CreateDefault()
Make a new SceneEditorSession with a default scene
public static Editor.SceneEditorSession CreateFromPath(string path)
Opens an editor session from an existing scene or prefab
| Parameter | Type | Description |
|---|---|---|
| path | string | — |
public void DeserializeSelection(string selection)
Take a json string created by SerializeSelection and turn it into a selection
| Parameter | Type | Description |
|---|---|---|
| selection | string | — |
void—public virtual void Destroy()
void—public virtual void FrameTo(BBox& modreq(System.Runtime.InteropServices.InAttribute) box)
| Parameter | Type | Description |
|---|---|---|
| box | BBox& modreq(InAttribute) | — |
void—public void FullUndoSnapshot(string title)
Take a full scene snapshot for the undo system. This is usually a last resort, if you can't do anything more incremental.
Obsolete: Manual full scene undo snapshots are no longer working use UndoScope or AddUndo
| Parameter | Type | Description |
|---|---|---|
| title | string | — |
void—public virtual sealed Editor.SceneFolder GetSceneFolder()
public virtual sealed System.Collections.Generic.IEnumerable`1<object> GetSelection()
IEnumerable<object>—public void MakeActive(bool bringToFront = True)
Makes this scene active and brings it to the front
| Parameter | Type | Description |
|---|---|---|
| bringToFront = True | bool | — |
void—protected virtual void OnEdited()
void—public void PushUndoSelection()
Push the current selection into the undo system
Obsolete: Manual selections snapshots are no longer working use UndoScope or AddUndo
void—public virtual sealed void RecordChange(Sandbox.SerializedProperty property)
Obsolete: This API member is obsolete.
| Parameter | Type | Description |
|---|---|---|
| property | SerializedProperty | — |
void—public void Reload()
void—public virtual sealed void Save(bool saveAs)
| Parameter | Type | Description |
|---|---|---|
| saveAs | bool | — |
void—public static System.IDisposable Scope()
Pushes the active scene to the current scope
IDisposable—public string SerializeSelection()
Serlialize the current selection to a json string. The aim here is to make something we can transfer back to objects.
string—public virtual void StopPlaying()
void—public System.IDisposable SuppressUndoSounds()
Temporarily disables undo/redo sounds.
IDisposable—public void Tick()
void—public virtual sealed ISceneUndoScope UndoScope(string name)
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
No results match this filter.
Properties12
Showing 12 properties
public static Editor.SceneEditorSession Editor.SceneEditorSession.Active { get; set; }
The editor session that is currently active
public static System.Collections.Generic.List`1<Editor.SceneEditorSession> Editor.SceneEditorSession.All { get; set; }
All open editor sessions
public Editor.GameEditorSession Editor.SceneEditorSession.GameSession { get; set; }
The game session of this editor session, if playing.
public virtual sealed bool Editor.SceneEditorSession.HasUnsavedChanges { get; set; }
bool—public bool Editor.SceneEditorSession.IsMounted { get; set; }
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.
bool—public virtual bool Editor.SceneEditorSession.IsPlaying { get; set; }
bool—public bool Editor.SceneEditorSession.IsPrefabSession { get; set; }
Returns true if this session is editing a prefab
bool—public System.Action`1<BBox> Editor.SceneEditorSession.OnFrameTo { get; set; }
public virtual sealed Sandbox.Scene Editor.SceneEditorSession.Scene { get; set; }
public virtual sealed Sandbox.SelectionSystem Editor.SceneEditorSession.Selection { get; set; }
public bool Editor.SceneEditorSession.ShouldUpdate { get; set; }
Should we call `Sandbox.Scene.EditorTick(System.Single,System.Single)` while this session is visible?
bool—public Sandbox.Helpers.UndoSystem Editor.SceneEditorSession.UndoSystem { get; set; }
No results match this filter.