LensStudio:HierarchyUtils.js.findInAncestorsByType
FunctionFinds a scene object or an array of scene objects in the ancestors of a given base scene object by the specified component type.
findInAncestorsByType(
base,componentType,options?):SceneObject[]
Finds a scene object or an array of scene objects in the ancestors of a given base scene object by the specified component type.
Parameters
| Parameter | Type | Description |
|---|---|---|
base | SceneObject | The base scene object from which to start the search. |
componentType | keyof ComponentNameMap | The type of component to search for. |
options? | SearchOptions | Optional search options. |
Returns
An array of found scene objects, or null if not found.