Creating an in-game surveillance Camera
In the previous recipe, we rendered the output from our minimap Camera to a Render Texture, and displayed the contents of that image in a UI Raw Image. Another example of when we may wish to capture and output the view of a Camera at runtime is to simulate an in-game surveillance Camera, such as a Closed-Circuit Television (CCTV) system. In this recipe, we will make use of aRender Textureto create an in-game surveillance camera that transmits its video to a 3D monitor elsewhere in the Scene:

Getting ready
This recipe adds to the scene created in the first recipe of this chapter, so make a copy of that project folder and do your work for this recipe with that copy.
For this recipe, we have also prepared two 3D models (FBX files) needed for the monitor and cctv-camera
objects. These 3D model files can be found in the 06_07
folder.
How to do it...
To create an in-game surveillance Camera, just follow these steps:
- Import the monitor and
cctv-camera
models into...