s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
live now
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
The jam is running. Build something, or play the entries.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Editor Classes
SceneEditorSession
chevron_left
Editor Classes
class
SceneEditorSession
Constructors
lock
SceneEditorSession
Properties
data_object
GameSession
data_object
HasUnsavedChanges
data_object
IsMounted
data_object
IsPlaying
data_object
IsPrefabSession
data_object
OnFrameTo
data_object
Scene
data_object
Selection
data_object
ShouldUpdate
data_object
UndoSystem
Methods
functions
AddUndo
functions
BringToFront
functions
CancelUndoScope
functions
DeserializeSelection
functions
Destroy
functions
FrameTo
remove_circle
FullUndoSnapshot
functions
GetSceneFolder
functions
GetSelection
functions
MakeActive
lock
OnEdited
remove_circle
PushUndoSelection
remove_circle
RecordChange
functions
Reload
functions
Save
functions
SerializeSelection
functions
SetPlaying
functions
StopPlaying
functions
SuppressUndoSounds
functions
Tick
functions
UndoScope
Static Properties
data_object
Active
data_object
All
Static Methods
functions
CreateDefault
functions
CreateFromPath
functions
Resolve
functions
Scope
SceneEditorSession
A SceneEditorSession holds a Scene that is open in the editor. It creates a widget, has a selection and undo system.
class
Editor
.
Sandbox.Tools
build
Constructors
1
SceneEditorSession
(
scene
)
data_object
Properties
10
GameSession
GameEditorSession
The game session of this editor session, if playing.
HasUnsavedChanges
bool
IsMounted
bool
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
bool
IsPrefabSession
bool
Returns true if this session is editing a prefab
OnFrameTo
Action`1
Scene
Scene
Selection
SelectionSystem
ShouldUpdate
bool
Should we call Sandbox.Scene.EditorTick(System.Single,System.Single) while this session is visible?
UndoSystem
UndoSystem
functions
Methods
21
AddUndo
(
name
,
undo
,
redo
)
BringToFront
(
)
Bring this scene tab to the front
CancelUndoScope
(
)
Cancels any open undo scopes, because we don't want the most recent change to appear in the undo stack.
DeserializeSelection
(
selection
)
Take a json string created by SerializeSelection and turn it into a selection
Destroy
(
)
FrameTo
(
box
)
FullUndoSnapshot
(
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.
GetSceneFolder
(
)
SceneFolder
GetSelection
(
)
IEnumerable`1
MakeActive
(
bringToFront
)
Makes this scene active and brings it to the front
OnEdited
(
)
PushUndoSelection
(
)
obsolete
Push the current selection into the undo system
RecordChange
(
property
)
obsolete
Reload
(
)
Save
(
saveAs
)
SerializeSelection
(
)
string
Serlialize the current selection to a json string. The aim here is to make something we can transfer back to objects.
SetPlaying
(
scene
)
StopPlaying
(
)
SuppressUndoSounds
(
)
IDisposable
Temporarily disables undo/redo sounds.
Tick
(
)
UndoScope
(
name
)
ISceneUndoScope
data_object
Static Properties
2
Active
SceneEditorSession
The editor session that is currently active
All
List`1
All open editor sessions
functions
Static Methods
4
CreateDefault
(
)
SceneEditorSession
Make a new SceneEditorSession with a default scene
CreateFromPath
(
path
)
SceneEditorSession
Opens an editor session from an existing scene or prefab
Resolve
(
scene
)
SceneEditorSession
Resolve a scene to an editor session. If it's a game scene, resolves the parent editor session.
Scope
(
)
IDisposable
Pushes the active scene to the current scope
Inheritance
SceneEditorSession
GameEditorSession
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.