Skip to main content

Camera

Camera is used to display the objects in your scene.

properties

Add a Camera Component

To add a Camera component:

  1. Go to the Inspector panel
  2. Click the + Add Component button
  3. Go to Scene
  4. Select Camera

Properties

PropertyDescription
LayersRender all scene objects that are set to the selected layers. You can select multiple layers for one camera. Select Default Layer, or from Layer 1 to Layer 63.
Render TextureSet the render output of the camera to a render texture. You can use the default render texture, Final Render Output. This render texture uses the webcam video frame by default so it shows what the webcam or phone camera is viewing. Alternatively, you can create a new render texture and assign it to this property.
Enable MaskEnables or disables the Mask Texture property.
Mask TextureSets the target mask texture for the Camera component. You can import a texture directly in the Inspector panel.
Render OrderA camera with a higher render order will render in front of camera with a lower render order (or the higher the render order, the later it will render).
ViewportIndicate where on the screen the camera is viewing. See the demonstration below.
  • X: The beginning horizontal position of the camera view.
  • Y: The beginning vertical position of the camera view.
  • W: The width of the camera output on the screen.
  • H: The height of the camera output on the screen.
Camera TypeHow the camera projects the scene objects onto the screen.
  • Perspective: Simulate how perspective and depth-perception work in the real world. Everything looks smaller in the distance and larger when they are closer to the camera.
  • Orthographic: This does not represent the object as it would be recorded photographically or perceived by a viewer observing it directly. It is a parallel projection where the lines will stay parallel in every circumstance.
FOV (Field of view)The view angle of the camera. Only applies to a perspective camera.
Ortho HeightThe height of the camera clip plane. Only applies to an orthographic camera. The max value is 99.
NearThe closest distance the camera can render.
FarThe furthest distance the camera can render.
Clear Color TypeDefines what to use to fill the previous render texture:
  • None: No fill is applied to the render texture
  • Color: Fills the render texture with the selected solid color
  • Texture: Fills the render texture with the selected texture
Clear ColorIf Clear Color Type is set to Color, the render texture of the camera will be filled with the selected solid color
TextureIf Clear Color Type is set to Texture, the render texture of the camera will be filled with the selected texture
Clear DepthWhen checked, clears the depth buffer from the previous render texture. It redetermines the depth when drawing the new render texture.
tip

When there are multiple cameras in the scene, you need to change layers as well as the render order. If camera A’s render order is 3, in order to make camera B be rendered on top of camera A’s rendering result, you should set camera B’s render order to be greater than 3.

Demonstrations

Viewport

viewport
view 1   view 2   view 3
view 4   view 5   view 6