public abstract class Sandbox.GameObjectSystem
Allows creation of a system that always exists in every scene, is hooked into the scene's lifecycle, and is disposed when the scene is disposed.
Related Guides
Broader workflow and conceptual references connected to this API.
A game project is the base level of project. It contains a game.
A scene can contain systems that need to do work in specific places during the frame.
This event interface allows you to listen to Scene startup events. These events are run in three places:
You should not rely on the order in which the same callback methods get invoked for different GameObjects, it is not predictable. If you need more control, you should use a GameObjectSystem.
S&box uses a scene system, similar to Godot and Unity. Scenes are JSON files on disk that are fast to load and switch between.
Constructors
Showing 1 constructors
public GameObjectSystem(Sandbox.Scene scene)
No results match this filter.
Methods
Showing 6 methods
protected T __sync_GetValue(Sandbox.WrappedPropertyGet`1<T> p)
protected void __sync_SetValue(Sandbox.WrappedPropertySet`1<T> p)
public virtual void Dispose()
protected void Listen(Sandbox.GameObjectSystem.Stage stage, int order, System.Action function, string debugName)
Listen to a frame stage. Order is used to determine the order in which listeners are called, the default action always happens at 0, so if you want it to happen before you should go to -1, if you want it to happen after go to 1 etc.
No results match this filter.
Properties
Showing 2 properties
public virtual sealed System.Guid Sandbox.GameObjectSystem.Id { get; set; }
public Sandbox.Scene Sandbox.GameObjectSystem.Scene { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.GameObjectSystem |