Getting the current scene
Access the active scene from anyGameObject, Component, or Panel using the Scene accessor. You can also use the static Game.ActiveScene from anywhere:
Loading a new scene
To replace the current scene with a different one, callScene.Load:
SceneLoadOptions:
Additive loading keeps the existing scene’s GameObjects alive and layers the new scene on top. Use this for things like loading a persistent UI or shared manager scene.
The scene directory
Every scene has aDirectory that indexes all GameObjects by their GUID. Use it for fast lookups when you already know a specific object’s GUID:
Querying all components in a scene
The scene maintains a fast component index so you don’t have to traverse the entire hierarchy yourself. UseScene.GetAll<T>() to iterate over every component of a type, or Scene.Get<T>() to grab a single instance (useful for singletons):
Scene systems
Beyond GameObjects and components, a scene can also contain GameObjectSystems — classes that do work at specific points in the frame update cycle. For example, the built-inSceneAnimationSystem resolves all skeletal animations in parallel at a single, well-defined moment each frame.
To create your own system, derive from GameObjectSystem and call Listen in the constructor to register work at a specific stage:
GameObjectSystem when a scene is created — you do not need to add it manually.
If you want to access your system from other code, derive from GameObjectSystem<T> instead. This adds a static T Current property:
Stages and order
Stages correspond to specific moments in the frame — for example,Stage.PhysicsStep fires during FixedUpdate. The order value controls where within that stage your callback runs: negative values run before the default, positive values run after.
Configuring systems
Mark properties on yourGameObjectSystem with [Property] to make them configurable in Project Settings > Systems. Settings are saved per-project and can also be overridden per-scene.