Skip to main content

LensStudio:HierarchyUtils.js.findInRootObjectsByName

Function

Finds a scene object or an array of scene objects in the root objects of a scene by name.

findInRootObjectsByName(scene, name, options?): SceneObject[]

Finds a scene object or an array of scene objects in the root objects of a scene by name.

Parameters

ParameterTypeDescription
sceneSceneThe scene to search in.
namestringThe name of the scene object(s) to find. Only exact matches are considered.
options?SearchOptionsThe search options.

Returns

SceneObject[]

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