Cameras, lighting and environment
Prerequisites: a writable project with visible geometry. Stop Play while preparing the scene.
Add a Camera or Light from Scene Explorer.
Prepare the game camera
- Position the editor view using the viewport controls.
- In Project → Scene → + Add, choose Camera. New cameras use the editor-view placement.
- Select the camera, choose Align to editor view if needed, then inspect its Transform. Game cameras look along local +Z.
- In Camera, enable Active, set Priority, Zoom, projection and clipping planes. The highest active priority determines the game camera.
- Save and press Play to inspect the runtime view.
Expected result: Play uses the active scene camera rather than the authoring camera. Optical zoom above 1 magnifies; values below 1 zoom out. Use the current-camera API for scripted selection rather than assuming editor selection changes the runtime camera.
Perspective camera settings in Properties. The full capture also shows its cyan editor-only frustum.
Add a light
- Choose + Add → Light, then select it.
- In Inspector's Light section, choose Directional, Point or Spot.
- Set Light color and Intensity; adjust Range for point/spot lights and Cone half-angle (degrees) for spot lights.
- Position/rotate the entity. Directional and spot lights shine along local +Z. Save and inspect Play.
Expected result: geometry responds to the light configuration. Intensity 0 turns a light off. The current renderer supports up to 32 scene lights and does not implement shadow casting yet.
Set sky and atmosphere
- Select Environment in Scene Explorer and turn on Enable custom environment in Properties.
- For an image sky, first copy a 2:1 panorama into the project. Select Sky under Environment and use Choose image… for HDR, PNG, JPEG or TGA.
- Adjust rotation and exposure in Sky, ambient light and sun in Environment, and color, density and start distance in Fog.
- Use Clear image for a solid sky or Reset environment in Environment to restore defaults, then save.
Expected result: preview and Play use the scene environment. Environment sun settings and scene light entities are separate controls; a panorama does not imply full image-based lighting or a browser UI renderer.
Related: sky and atmosphere guides, environment API, cameras and lights reference.
