Summary

This chapter concentrated on many common tasks expected or needed of cameras. Cameras are essential in Unity and in any game engine, because they represent the perspective from which the scene is rendered to the screen. Most of the camera functionality is commonly taken for granted in Unity, and as a result, much of the flexibility and control that cameras offer us is lost and not discussed. Specifically, here, we first considered gizmo rendering, that is, how to permanently render the camera gizmo in the scene viewport even when the camera is deselected. Second, we saw how to determine which objects are visible to the camera and which are not. This included several kinds of important tests such as frustum presence and occlusion testing. ...

Get Mastering Unity Scripting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.