Version: Unity 6.1 Alpha (6000.1)
Language : English
Create a Render Texture
Drawing to textures with shaders via Custom Render Textures

Render a camera view to a Render Texture

To create a live sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
in your game, follow these steps:

  1. Create a Render TextureA special type of Texture that is created and updated at runtime. To use them, first create a new Render Texture and designate one of your Cameras to render into it. Then you can use the Render Texture in a Material just like a regular Texture. More info
    See in Glossary
    .
  2. Select GameObject > Camera to create a second camera.
  3. Assign the Render Texture to the Target Texture property in the second camera’s InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    window.
  4. Select GameObject > 3D Object > Quad to create a quad.
  5. Drag the Render Texture onto the quadA primitive object that resembles a plane but its edges are only one unit long, it uses only 4 vertices, and the surface is oriented in the XY plane of the local coordinate space. More info
    See in Glossary
    . 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.

The result of the previous steps. The quad in the sky displays the view from the Secondary Camera.
The result of the previous steps. The quad in the sky displays the live view from the Secondary Camera.

Additional resources

Create a Render Texture
Drawing to textures with shaders via Custom Render Textures