Skip to main content

LensStudio:HierarchyUtils.js.createOrthoCameraOnObject

Function

Creates an orthographic camera component on a scene object.

createOrthoCameraOnObject(scene, sceneObject, unitType?, renderLayer?): SceneObject

Creates an orthographic camera component on a scene object.

Parameters

ParameterTypeDescription
sceneSceneThe scene in which the camera will be created.
sceneObjectSceneObjectThe scene object on which the camera component will be added.
unitType?UnitTypeThe unit type for the canvas component (optional, default is Editor.Components.UnitType.Points).
renderLayer?LayerId-

Returns

SceneObject

The modified scene object with the added camera and canvas components.