Lens Scripting API
    Preparing search index...
    • Finds all script components of a specific class type in the parent hierarchy of the given SceneObject.

      Type Parameters

      Parameters

      • sceneObject: SceneObject

        The SceneObject whose parents to search.

      • 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[]

      An array of all matching script components found.