O'Reilly logo

Unity 5.x Cookbook by Chico Queiroz, Matt Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Creating an in-game surveillance camera

In-game surveillance cameras

Getting ready

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 1362_05_06 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required