LensStudio:HierarchyUtils.js.getOrCreateCanvas
FunctionRetrieves or creates a canvas component for a given camera object.
getOrCreateCanvas(
cameraObject,unitType):Canvas
Retrieves or creates a canvas component for a given camera object.
Parameters
| Parameter | Type | Description |
|---|---|---|
cameraObject | SceneObject | The camera object to retrieve or create the canvas component for. |
unitType | UnitType | The unit type for the canvas component. |
Returns
The canvas component associated with the camera object.