Skip to main content

LensStudio:HierarchyUtils.js.findInAncestorsByName

Function

Finds a scene object with the specified name in the ancestors of the given base scene object.

findInAncestorsByName(base, name, options?): SceneObject[]

Finds a scene object with the specified name in the ancestors of the given base scene object.

Parameters

ParameterTypeDescription
baseSceneObjectThe base scene object from which to start the search.
namestringThe name of the scene object to find. Only exact matches are considered.
options?SearchOptionsThe search options.

Returns

SceneObject[]

The found scene object if findAll is false, an array of found scene objects if findAll is true, or null if no scene object is found.