public class Editor.SceneEditorSession
A SceneEditorSession holds a Scene that is open in the editor. It creates a widget, has a selection and undo system.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
protected SceneEditorSession(Sandbox.Scene scene)
No results match this filter.
Methods
Showing 29 methods
public virtual sealed void AddUndo(string name, System.Action undo, System.Action redo)
public void BringToFront()
Bring this scene tab to the front
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
public void DeserializeSelection(string selection)
Take a json string created by SerializeSelection and turn it into a selection
public virtual void Destroy()
public virtual void FrameTo(BBox& modreq(System.Runtime.InteropServices.InAttribute) box)
public void FullUndoSnapshot(string title)Obsolete
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
public virtual sealed Editor.SceneFolder GetSceneFolder()
public virtual sealed System.Collections.Generic.IEnumerable`1<object> GetSelection()
public void MakeActive(bool bringToFront = True)
Makes this scene active and brings it to the front
Parameters
bringToFront: Default: True
protected virtual void OnEdited()
public void PushUndoSelection()Obsolete
Push the current selection into the undo system
Obsolete: Manual selections snapshots are no longer working use UndoScope or AddUndo
public virtual sealed void RecordChange(Sandbox.SerializedProperty property)Obsolete
Obsolete: This API member is obsolete.
public void Reload()
public virtual sealed void Save(bool saveAs)
public static System.IDisposable Scope()
Pushes the active scene to the current scope
public string SerializeSelection()
Serlialize the current selection to a json string. The aim here is to make something we can transfer back to objects.
public void SetPlaying(Sandbox.Scene scene)
public virtual void StopPlaying()
public System.IDisposable SuppressUndoSounds()
Temporarily disables undo/redo sounds.
public void Tick()
public virtual sealed ISceneUndoScope UndoScope(string name)
No results match this filter.
Properties
Showing 11 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; }
public virtual bool Editor.SceneEditorSession.IsPlaying { get; set; }
public bool Editor.SceneEditorSession.IsPrefabSession { get; set; }
Returns true if this session is editing a prefab
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?
public Sandbox.Helpers.UndoSystem Editor.SceneEditorSession.UndoSystem { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.SceneEditorSession |