s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
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
Scene System
Scene
chevron_left
Scene System
class
Scene
search
Constructors
lock
Scene
Properties
data_object
Camera
data_object
DebugSceneWorld
remove_circle
Description
data_object
Directory
data_object
Editor
data_object
FixedDelta
remove_circle
FixedUpdateFrequency
remove_circle
HasUnsavedChanges
data_object
IsEditor
data_object
IsFixedUpdate
data_object
IsLoading
data_object
IsValid
remove_circle
MaxFixedUpdates
data_object
NavMesh
remove_circle
NetworkFrequency
data_object
NetworkRate
remove_circle
PhysicsSubSteps
data_object
PhysicsWorld
data_object
RenderAttributes
data_object
SceneWorld
data_object
Source
remove_circle
ThreadedAnimation
data_object
TimeScale
remove_circle
Title
data_object
Trace
remove_circle
UseFixedUpdate
data_object
Volumes
data_object
WantsSystemScene
Methods
functions
AddHook
functions
BatchGroup
remove_circle
ClearUnsavedChanges
functions
CreateObject
functions
Deserialize
functions
Destroy
functions
EditorDraw
functions
EditorTick
lock
Finalize
functions
FindAllWithTag
functions
FindAllWithTags
functions
FindInPhysics
functions
GameTick
functions
Get
functions
GetAll
functions
GetAllComponents
functions
GetSystem
functions
IsBBoxVisibleToConnection
functions
IsPointVisibleToConnection
functions
Load
functions
LoadFromFile
functions
ProcessDeletes
functions
Push
functions
RunEvent
functions
Serialize
functions
SerializeProperties
functions
StartLoading
Static Properties
data_object
All
Static Methods
functions
CreateContextMenu
functions
CreateEditorScene
functions
DisableEditorRigidBodies
functions
EnableEditorPhysics
functions
EnableEditorRigidBody
functions
GetSourceLocation
functions
RenderToPixmap
Scene
class
Sandbox
.
account_tree
extends
GameObject
Sandbox.Engine
build
Constructors
1
Scene
(
isEditor
)
data_object
Properties
28
Camera
CameraComponent
DebugSceneWorld
SceneWorld
Description
obsolete
string
Directory
GameObjectDirectory
Editor
ISceneEditorSession
Allows access to the scene's editor session from the game. This will be null if there is no editor session active on this scene.
FixedDelta
float
FixedUpdateFrequency
obsolete
float
HasUnsavedChanges
obsolete
bool
IsEditor
bool
IsFixedUpdate
bool
IsLoading
bool
Return true if we're in an initial loading phase
IsValid
bool
Returns true if this scene has not been destroyed
MaxFixedUpdates
obsolete
int
NavMesh
NavMesh
NetworkFrequency
obsolete
float
NetworkRate
float
One divided by ProjectSettings.Networking.UpdateRate.
PhysicsSubSteps
obsolete
int
PhysicsWorld
PhysicsWorld
RenderAttributes
RenderAttributes
Global render attributes accessible on any renderable in this Scene.
SceneWorld
SceneWorld
Source
GameResource
ThreadedAnimation
obsolete
bool
TimeScale
float
Title
obsolete
string
Trace
SceneTrace
UseFixedUpdate
obsolete
bool
Volumes
VolumeSystem
Allows quickly finding components that have a volume
WantsSystemScene
bool
If true we'll additive load the system scene when this scene is loaded. Defaults to true. You might want to disable this for specific scenes, like menu scenes etc.
functions
Methods
27
AddHook
(
stage
,
order
,
action
,
className
,
description
)
IDisposable
Call this method on this stage. This returns a disposable that will remove the hook when disposed.
BatchGroup
(
)
IDisposable
Collects anything inside into a batch group. A batchgroup is used with GameObject and Components to make sure that their OnEnable/OnDisable and other callbacks are called in a deterministic order, and that they can find each other during creation. Sandbox.GameObject.NetworkSpawn calls will also be batched.
ClearUnsavedChanges
(
)
obsolete
CreateObject
(
enabled
)
GameObject
Create a GameObject on this scene. This doesn't require the scene to be the active scene.
Deserialize
(
node
,
option
)
Destroy
(
)
Destroy this scene. After this you should never use it again.
EditorDraw
(
)
EditorTick
(
timeNow
,
timeDelta
)
Finalize
(
)
FindAllWithTag
(
tag
)
IEnumerable`1
Find objects with tag
FindAllWithTags
(
tags
)
IEnumerable`1
FindInPhysics
(
sphere
)
IEnumerable`1
Find game objects in a sphere using physics.
GameTick
(
timeDelta
)
Get
(
)
T
Gets the first object found of this type. This could be a component or a GameObjectSystem, or other stuff in the future.
GetAll
(
)
IEnumerable`1
Get all objects of this type. This could be a component or a GameObjectSystem, or other stuff in the future.
GetAllComponents
(
)
IEnumerable`1
Get all components of type. This can include interfaces. This function can only find enabled/active components.
GetSystem
(
)
T
Get a specific system by type.
IsBBoxVisibleToConnection
(
target
,
box
)
bool
Are these bounds visible to the specified Sandbox.Connection?
IsPointVisibleToConnection
(
target
,
position
)
bool
Is a position visible to the specified Sandbox.Connection?
Load
(
resource
)
bool
Load from the provided Sandbox.SceneFile. This will not load the scene for other clients in a multiplayer session, you should instead use Sandbox.Game.ChangeScene(Sandbox.SceneLoadOptions) if you want to bring other clients.
LoadFromFile
(
filename
)
bool
Load from the provided file name. This will not load the scene for other clients in a multiplayer session, you should instead use Sandbox.Game.ChangeScene(Sandbox.SceneLoadOptions) if you want to bring other clients.
ProcessDeletes
(
)
Delete any GameObjects waiting to be deleted
Push
(
)
IDisposable
Push this scene as the active scene, for a scope
RunEvent
(
action
,
find
)
Serialize
(
options
)
JsonObject
SerializeProperties
(
)
JsonObject
StartLoading
(
)
data_object
Static Properties
1
All
IEnumerable`1
All active non-editor scenes.
functions
Static Methods
7
CreateContextMenu
(
scene
,
parent
)
Menu
We should make this globally reachanle at some point. Should be able to draw icons using bitmaps etc too.
CreateEditorScene
(
)
Scene
DisableEditorRigidBodies
(
scene
)
EnableEditorPhysics
(
scene
,
enabled
)
EnableEditorRigidBody
(
scene
,
body
,
enabled
)
GetSourceLocation
(
scene
)
ISourceLocation
Gets the source location for the given scene, used by action graph stack traces, and so the action graph editor knows which asset to save when editing a graph.
RenderToPixmap
(
scene
,
targetPixmap
,
async
)
bool
Render this camera to the target widget. Once you do this the target widget becomes "externally painted", so you won't be able to paint on it anymore with Qt's Paint stuff.
Inheritance
GameObject
Scene
PrefabScene
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.