Skip to main content

LensStudio:HierarchyUtils.js.findInDescendantsByType

Function

Finds a scene object or an array of scene objects within the descendants of a base scene object, based on the specified component type.

findInDescendantsByType(base, componentType, options?): SceneObject[]

Finds a scene object or an array of scene objects within the descendants of a base scene object, based on the specified component type.

Parameters

ParameterTypeDescription
baseScene | SceneObjectThe base scene object or scene to search within.
componentTypestringThe type of component to search for.
options?SearchOptionsOptional search options.

Returns

SceneObject[]

an array of found scene objects, or null if not found.