Sceneclass
Constructors2
Showing 2 constructors
No results match this filter.
Methods34
Showing 34 methods
public System.IDisposable AddHook(Sandbox.GameObjectSystem.Stage stage, int order, System.Action action, string className, string description)
Call this method on this stage. This returns a disposable that will remove the hook when disposed.
| Parameter | Type | Description |
|---|---|---|
| stage | Stage | — |
| order | int | — |
| action | Action | — |
| className | string | — |
| description | string | — |
IDisposable—public System.IDisposable BatchGroup()
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.
IDisposable—public void ClearUnsavedChanges()
Obsolete: This API member is obsolete.
void—public Sandbox.GameObject CreateObject(bool enabled = True)
Create a GameObject on this scene. This doesn't require the scene to be the active scene.
| Parameter | Type | Description |
|---|---|---|
| enabled = True | bool | — |
public virtual void Deserialize(System.Text.Json.Nodes.JsonObject node, Sandbox.GameObject.DeserializeOptions option)
| Parameter | Type | Description |
|---|---|---|
| node | JsonObject | — |
| option | DeserializeOptions | — |
void—public virtual void Destroy()
Destroy this scene. After this you should never use it again.
void—public void EditorDraw()
void—public void EditorTick(float timeNow, float timeDelta)
| Parameter | Type | Description |
|---|---|---|
| timeNow | float | — |
| timeDelta | float | — |
void—protected virtual override void Finalize()
void—public System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> FindAllWithTag(string tag)
Find objects with tag
| Parameter | Type | Description |
|---|---|---|
| tag | string | — |
public System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> FindAllWithTags(System.Collections.Generic.IEnumerable`1<string> tags)
| Parameter | Type | Description |
|---|---|---|
| tags | IEnumerable<string> | — |
public void GameTick(double timeDelta = 0.1)
| Parameter | Type | Description |
|---|---|---|
| timeDelta = 0.1 | double | — |
void—public T Get()
Gets the first object found of this type. This could be a component or a GameObjectSystem, or other stuff in the future.
T—public bool IsBBoxVisibleToConnection(Sandbox.Connection target, BBox box)
Are these bounds visible to the specified `Sandbox.Connection`?
| Parameter | Type | Description |
|---|---|---|
| target | Connection | — |
| box | BBox | — |
bool—public bool IsPointVisibleToConnection(Sandbox.Connection target, Vector3 position)
Is a position visible to the specified `Sandbox.Connection`?
| Parameter | Type | Description |
|---|---|---|
| target | Connection | — |
| position | Vector3 | — |
bool—public bool LoadFromFile(string filename)
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.
| Parameter | Type | Description |
|---|---|---|
| filename | string | — |
bool—public void ProcessDeletes()
Delete any GameObjects waiting to be deleted
void—public System.IDisposable Push()
Push this scene as the active scene, for a scope
IDisposable—public virtual void RunEvent(System.Action`1<T> action, Sandbox.FindMode find = 69)
| Parameter | Type | Description |
|---|---|---|
| action | Action<T> | — |
| find = 69 | FindMode | — |
void—public virtual System.Text.Json.Nodes.JsonObject Serialize(Sandbox.GameObject.SerializeOptions options = null)
| Parameter | Type | Description |
|---|---|---|
| options = null | SerializeOptions | — |
JsonObject—public System.Text.Json.Nodes.JsonObject SerializeProperties()
JsonObject—public void StartLoading()
void—No results match this filter.
Properties29
Showing 29 properties
public static System.Collections.Generic.IEnumerable`1<Sandbox.Scene> Sandbox.Scene.All { get; set; }
All active non-editor scenes.
public Sandbox.CameraComponent Sandbox.Scene.Camera { get; set; }
public Sandbox.SceneWorld Sandbox.Scene.DebugSceneWorld { get; set; }
public string Sandbox.Scene.Description { get; set; }
Obsolete: please use the SceneInformation component
string—public Sandbox.GameObjectDirectory Sandbox.Scene.Directory { get; set; }
public Sandbox.Scene.ISceneEditorSession Sandbox.Scene.Editor { get; set; }
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.
public float Sandbox.Scene.FixedDelta { get; set; }
float—public float Sandbox.Scene.FixedUpdateFrequency { get; set; }
Obsolete: Moved to Sandbox.ProjectSettings.PhysicsSettings
float—public bool Sandbox.Scene.HasUnsavedChanges { get; set; }
Obsolete: Use Scene.Editor.HasUnsavedChanges
bool—public bool Sandbox.Scene.IsEditor { get; set; }
bool—public bool Sandbox.Scene.IsFixedUpdate { get; set; }
bool—public bool Sandbox.Scene.IsLoading { get; set; }
Return true if we're in an initial loading phase
bool—public virtual bool Sandbox.Scene.IsValid { get; set; }
Returns true if this scene has not been destroyed
bool—public int Sandbox.Scene.MaxFixedUpdates { get; set; }
Obsolete: Moved to Sandbox.ProjectSettings.PhysicsSettings
int—public float Sandbox.Scene.NetworkFrequency { get; set; }
Obsolete: Moved to ProjectSettings.Networking.UpdateRate
float—public float Sandbox.Scene.NetworkRate { get; set; }
One divided by ProjectSettings.Networking.UpdateRate.
float—public int Sandbox.Scene.PhysicsSubSteps { get; set; }
Obsolete: Moved to Sandbox.ProjectSettings.PhysicsSettings
int—public Sandbox.PhysicsWorld Sandbox.Scene.PhysicsWorld { get; set; }
public Sandbox.RenderAttributes Sandbox.Scene.RenderAttributes { get; set; }
Global render attributes accessible on any renderable in this Scene.
public Sandbox.SceneWorld Sandbox.Scene.SceneWorld { get; set; }
The scene world, holding this scene's renderables. Created on first access, so scenes that never render anything (like prefab caches or tests) never create one.
public Sandbox.GameResource Sandbox.Scene.Source { get; set; }
public bool Sandbox.Scene.ThreadedAnimation { get; set; }
Obsolete: Unused. Animation is always threaded.
bool—public float Sandbox.Scene.TimeScale { get; set; }
float—public string Sandbox.Scene.Title { get; set; }
Obsolete: please use the SceneInformation component
string—public Sandbox.SceneTrace Sandbox.Scene.Trace { get; set; }
public bool Sandbox.Scene.UseFixedUpdate { get; set; }
Obsolete: Moved to Sandbox.ProjectSettings.PhysicsSettings
bool—public Sandbox.Volumes.VolumeSystem Sandbox.Scene.Volumes { get; set; }
Allows quickly finding components that have a volume
public bool Sandbox.Scene.WantsSystemScene { get; set; }
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.
bool—No results match this filter.