LensStudio:HierarchyUtils.js.findOrCreateOrthoCameraForObject
FunctionFinds 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
| Parameter | Type | Description |
|---|---|---|
scene | Scene | The scene in which the camera will be created or searched. |
sceneObject | SceneObject | The scene object for which the camera will be created or searched. |
canvasUnitType? | UnitType | The 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.
| Name | Type |
|---|---|
cameraObject | SceneObject |
canvasComponent | Canvas |
screenRegionComponent | ScreenRegionComponent |