To change how much of the screen a camera renders to, simply perform the following steps:
- Either work from the copy of the first recipe in this chapter or create a new 3D project, import the BasicScene_completed.unitypackage package, and, finally, add the ProBuilder package to your project.
- Open the BasicScene scene.
- First, let's reduce the amount of the screen that the Main Camera renders to. In the Hierarchy panel, select the Main Camera, which is a child of the ThirdPersonController GameObject. Then, in the Inspector panel for the Camera component, set the H (Height) value for the camera's Viewport Rect to 0.85:
Figure 11.8 – Changing the Viewport Rect of the Main Camera
- Let's now create a second Camera in the scene to display a rectangle in the top 15% of the screen. In the Hierarchy panel, create a new Camera called Camera 2 - timer. You can do this by navigating to GameObject | Camera...