Creating an in-game surveillance camera
Although using a second viewport can be useful in many situations, there will be times when you need to output the image rendered from a camera to a texture at runtime. To illustrate this point, in this recipe, we will make use of Render Texture to create an in-game surveillance camera that transmits its video to a monitor.
For this recipe, we have prepared the
BasicScene Unity package, containing a scene named
BasicScene, and also two FBX 3D models for the monitor and camera objects. The package is in the
1362_05_codes folder, and the 3D models are in the