s&box docs

public static abstract sealed class Editor.EditorScene

Broader workflow and conceptual references connected to this API.

Methods

Showing 26 methods

public static void Copy()

public static void Cut()

public static void Discard()

public static void LoadFromResource(Sandbox.GameResource resource)

public static void NewScene()

public static void Open()

public static void OpenPrefab(Sandbox.PrefabFile resource)

Opens the given prefab file for editing, if it's not already open.

public static void OpenScene(Sandbox.SceneFile resource)

Opens the given scene file for editing, if it's not already open.

public static void Paste()

public static void PasteAsChild()

public static void PasteSpecial()

public static void PlaceBoundsOnSurface(System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> gos, Vector3 position, Vector3 normal)

public static void PlayMap(Editor.Asset asset)

public static void RestoreState()

public static void SaveAllSessions()

public static void SaveSession()

public static void SaveSessionAs()

public static void SceneEditorTick()

Called once a frame to keep the game camera in sync with the main camera in the editor scene

public static void SelectAll()

public static void Stop()

public static void TakeHighResScreenshot(int width, int height)

Capture a high resolution screenshot using the active scene camera.

public static void TogglePlay()

Toggles play mode.

public static void UpdatePrefabInstances(Sandbox.PrefabFile prefab)

Update any/all instances of a prefab in any open sessions. Two passes are needed so that changes propagate through prefab dependency chains regardless of iteration order (e.g. PrefabA → PrefabC → PrefabB).

Properties

Showing 3 properties

public static bool Editor.EditorScene.PlayMode { get; set; }

Should the game start in play mode when hitting play, instead of playing the active scene.

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.EditorScene

On this page

Methodspublic static System.Void Copy()public static System.Void Cut()public static System.Void Discard()public static System.Void LoadFromResource(Sandbox.GameResource resource)public static System.Void NewScene()public static System.Void Open()public static System.Void OpenPrefab(Sandbox.PrefabFile resource)public static System.Void OpenScene(Sandbox.SceneFile resource)public static System.Void Paste()public static System.Void PasteAsChild()public static System.Void PasteAt(Sandbox.SceneTraceResult tr)public static System.Void PasteSpecial()public static System.Void PlaceBoundsOnSurface(System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> gos, Vector3 position, Vector3 normal)public static System.Void Play(Editor.SceneEditorSession session = null)public static System.Void Play(System.Boolean playMode, Editor.SceneEditorSession playableSession = null)public static System.Void PlayMap(Editor.Asset asset)public static System.Void RestoreState()public static System.Void SaveAllSessions()public static System.Void SaveSession()public static System.Void SaveSessionAs()public static System.Void SceneEditorTick()public static System.Void SelectAll()public static System.Void Stop()public static System.Void TakeHighResScreenshot(System.Int32 width, System.Int32 height)public static System.Void TogglePlay()public static System.Void UpdatePrefabInstances(Sandbox.PrefabFile prefab)Propertiespublic static Sandbox.Gizmo.SceneSettings Editor.EditorScene.GizmoSettings { get; set; }public static System.Boolean Editor.EditorScene.PlayMode { get; set; }public static Sandbox.SelectionSystem Editor.EditorScene.Selection { get; set; }Metadata