LensStudio:HierarchyUtils.js.getOrCreateScreenRegion
FunctionRetrieves or creates a ScreenRegionComponent for a given camera object and scene.
getOrCreateScreenRegion(
cameraObject,scene):ScreenRegionComponent
Retrieves or creates a ScreenRegionComponent for a given camera object and scene.
Parameters
| Parameter | Type | Description |
|---|---|---|
cameraObject | SceneObject | The camera object to search for a ScreenRegionComponent. |
scene | Scene | The scene in which to create the ScreenRegionComponent if it doesn't exist. |
Returns
The ScreenRegionComponent associated with the camera object, or a newly created one.