Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Render a camera view to a Render Texture

Create a texture that displays what a camera sees, for example to create a live arena camera in your game.
Read time 1 minuteLast updated 21 days ago

A
Render Texture

?

is a type of Texture that Unity creates and updates at run time. To use a Render Texture, create a new Render Texture using Assets > Create > Render Texture and assign it to Target Texture in your Camera component. Then you can use the Render Texture in a Material just like a regular Texture.
To create a live scene camera in your game, follow these steps:
  1. To create a Render Texture, go to Assets > Create > Rendering > Render Texture.
  2. Select
    GameObject

    ?

    >
    Camera

    ?

    to create a second camera.
  3. Assign the Render Texture to the Target Texture property in the second camera's
    Inspector

    ?

    window.
  4. Select GameObject >
    3D Object

    ?

    >
    Quad

    ?

    to create a quad.
  5. Drag the Render Texture onto the quad. Unity automatically creates and assigns a material that uses the Render Texture.
  6. Enter Play mode. The quad displays the camera view, which updates in real time.

Render Textures are set up as demonstrated above

Additional resources