Skip to content

Function: CameraForLayer() ​

ts
function CameraForLayer(scene, layer): Entity | null;

Pointer ↔ UI-local conversions for the UI controls (Slider, InputField). They go through the camera that actually draws the entity — the topmost enabled screen camera whose culling mask holds its layer — not the main camera, which may be a world camera under a UI one.

Parameters ​

ParameterType
sceneScene
layernumber

Returns ​

Entity | null

© 2026 PlayAdGentic