Manages scene loading, transitions and lifecycle. Provides methods to register scenes, load scenes by name, and handles the opening scene. Ensures proper cleanup between scene transitions and maintains scene state.
this.sceneManager.loadScene("MainScene"); Copy
this.sceneManager.loadScene("MainScene");
Returns true if the scene is loading
Returns true if the scene was loaded this frame
Adds a scene to the SceneManager
The scene class
The name of the scene
Whether the scene is the opening scene
Loads the opening scene
Loads a scene
Optional
Optional component type to preserve entities that have this component
Manages scene loading, transitions and lifecycle.
Provides methods to register scenes, load scenes by name, and handles the opening scene.
Ensures proper cleanup between scene transitions and maintains scene state.
Example