Class SceneManager

The SceneManager provides an API to all currently loaded and active SceneInstance and their associated ScenePlayData.

Constructors

Accessors

Methods

  • Get all the scene objects from the current scene.

    Parameters

    Returns SceneObject[]

    An array containing all the scene objects.

  • Get all the scene objects from the given scene object root.

    Parameters

    • root: SceneObject

      The root object to get the Scene Objects from.

    • Optionalfilter: ((object: SceneObject) => boolean)
        • (object): boolean
        • Parameters

          Returns boolean

    • OptionalincludeInternal: boolean

      Whether we should include internal Scene Objects.

    Returns SceneObject[]

    An array containing all the scene objects.

  • Searches for all components of a specific type.

    Type Parameters

    • T extends Component

      Type of the component to search for. Includes any components derived from the type.

    Parameters

    Returns T[]

    All components matching the specified type.

Events

onSceneObjectDestroyed: Event<[number, UUID], void>

Event that triggers right after a scene object gets destroyed. Parameters passed are sceneRuntimeID:number, sceneObjectUUID:UUID.