StaticnullReturns the instance of the currently active main scene.
StaticsceneReturns all active scene instances.
StaticgetGet all the scene objects from the current scene.
Optionalfilter: ((object: SceneObject) => boolean)OptionalincludeInternal: booleanAn array containing all the scene objects.
StaticgetGet all the scene objects from the given scene object root.
The root object to get the Scene Objects from.
Optionalfilter: ((object: SceneObject) => boolean)OptionalincludeInternal: booleanWhether we should include internal Scene Objects.
An array containing all the scene objects.
StaticgetSearches for all components of a specific type.
Type of the component to search for. Includes any components derived from the type.
The component type to search for.
The scene instance to search in.
OptionalactiveOnly: booleanIf true, only active components are returned. Defaults to true.
All components matching the specified type.
StaticgetGets the ScenePlayData for the specified SceneInstance.
The scene instance.
ScenePlayData
StatictransitionTransitions from one scene to another. The transition will be executed once all updates (such as Component updates) for all scenes have finished processing. Transitions will be executed in the order they were requested.
During the transition, all scene objects listed in persistentObjects will be moved from the fromScene
and parented to the root of the toScene. All other objects in the fromScene will be destroyed when
the transition is complete.
The render target currently assigned to the main camera of the fromScene will be unassigned during the transition
and reassigned to the main camera of the toScene after the transition is complete.
Before the transition starts, the willTransitionScene event is triggered. After the transition is complete,
the didTransitionScene event is triggered and the fromScene is immediately destroyed.
The scene to transition from.
The scene to transition to.
List of scene objects that should be kept persistent during the transition
True if the transition was successful, false otherwise.
Static ReadonlyonEvent that triggers right after a scene object gets destroyed.
Parameters passed are sceneRuntimeID:number, sceneObjectUUID:UUID.
Static ReadonlydidEvent that triggers right after a scene transition occurred upon calling transitionScene.
The SceneManager provides an API to all currently loaded and active SceneInstance and their associated ScenePlayData.