Skip to main content

LensStudio:HierarchyUtils.js.findOrCreateOrthoCameraForObject

Function

Finds or creates an orthographic camera for a given scene object.

findOrCreateOrthoCameraForObject(scene, sceneObject, canvasUnitType?): object

Finds or creates an orthographic camera for a given scene object.

Parameters

ParameterTypeDescription
sceneSceneThe scene in which the camera will be created or searched.
sceneObjectSceneObjectThe scene object for which the camera will be created or searched.
canvasUnitType?UnitTypeThe unit type for the canvas component of the camera. Defaults to Editor.Components.UnitType.Points.

Returns

object

An object containing the camera object, screen region component, and canvas component.

NameType
cameraObjectSceneObject
canvasComponentCanvas
screenRegionComponentScreenRegionComponent