EditorSceneclass

objectEditorScene
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public static abstract sealed class Editor.EditorScene

Methods26

Showing 26 methods

public static void Copy()PUBLICSTATIC

Returns:void

public static void Cut()PUBLICSTATIC

Returns:void

public static void Discard()PUBLICSTATIC

Returns:void

public static void LoadFromResource(Sandbox.GameResource resource)PUBLICSTATIC

ParameterTypeDescription
resourceGameResource
Returns:void

public static void NewScene()PUBLICSTATIC

Returns:void

public static void Open()PUBLICSTATIC

Returns:void

public static void OpenPrefab(Sandbox.PrefabFile resource)PUBLICSTATIC

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

ParameterTypeDescription
resourcePrefabFile
Returns:void

public static void OpenScene(Sandbox.SceneFile resource)PUBLICSTATIC

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

ParameterTypeDescription
resourceSceneFile
Returns:void

public static void Paste()PUBLICSTATIC

Returns:void

public static void PasteAsChild()PUBLICSTATIC

Returns:void

public static void PasteSpecial()PUBLICSTATIC

Returns:void

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

ParameterTypeDescription
gosIEnumerable<GameObject>
positionVector3
normalVector3
Returns:void

public static void PlayMap(Editor.Asset asset)PUBLICSTATIC

ParameterTypeDescription
assetAsset
Returns:void

public static void RestoreState()PUBLICSTATIC

Returns:void

public static void SaveAllSessions()PUBLICSTATIC

Returns:void

public static void SaveSession()PUBLICSTATIC

Returns:void

public static void SaveSessionAs()PUBLICSTATIC

Returns:void

public static void SceneEditorTick()PUBLICSTATIC

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

Returns:void

public static void SelectAll()PUBLICSTATIC

Returns:void

public static void Stop()PUBLICSTATIC

Returns:void

public static void TakeHighResScreenshot(int width, int height)PUBLICSTATIC

Capture a high resolution screenshot using the active scene camera.

ParameterTypeDescription
widthint
heightint
Returns:void

public static void TogglePlay()PUBLICSTATIC

Toggles play mode.

Returns:void

public static void UpdatePrefabInstances(Sandbox.PrefabFile prefab)PUBLICSTATICPER-FRAME

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).

ParameterTypeDescription
prefabPrefabFile
Returns:void

Properties3

Showing 3 properties

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

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

Returns:bool

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