Lens Scripting API
    Preparing search index...
    • Searches for the first script component on the SceneObject itself, then in its parent hierarchy.

      Type Parameters

      Parameters

      • sceneObject: SceneObject

        The SceneObject to start the search from.

      • scriptClass: new (...args: any[]) => T

        The constructor/class of the script component to search for.

      • maxLevels: number = DEFAULT_MAX_PARENT_SEARCH_LEVELS

        Maximum number of parent levels to search.

      Returns T

      The first script component found, or null if none exists.