Lens Scripting API
    Preparing search index...
    • Searches for the first component of a specific type in the parent hierarchy of the given SceneObject.

      Type Parameters

      Parameters

      • sceneObject: SceneObject

        The SceneObject whose parents to search.

      • componentType: keyof ComponentNameMap

        The type of component to search for.

      • maxLevels: number = DEFAULT_MAX_PARENT_SEARCH_LEVELS

        Maximum number of parent levels to search.

      Returns T

      The first component found, or null if none exists.