Time for action – setting up two additional cameras in the scene
We'll have three cameras, but only one will be active at a time. Their names are:
- Main Camera
- LookAt Camera
- Following Camera
Do the following steps with Scene0 loaded to add two cameras:
- Add a Camera GameObject and name it
LookAt Camera
. - Set its Transform Position to
50
,7
,50
. - Uncheck its Active checkbox.
- Add a Camera GameObject and name it
Following Camera
. - Uncheck its Active checkbox.
- Drag both of these cameras onto GameManager to make them children.
Look in the Scripting Reference for GameObject.SetActive. It's a method to set whether a GameObject is active or not. However, Unity can't find ...
Get Learning C# by Developing Games with Unity 3D Beginner's Guide 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.