How it works...

This recipe has a few important elements:

  • Cameras as children: All cameras are children of the CameraChanger game object. This way, we can add the Animator component to the CameraChanger and animate all its children cameras using one Animation Clip.
  • Camera's Depth: The depth parameter describes the "layer" of the camera. Cameras with greater Depth are rendered on top of cameras with lesser Depth. This way, we can change the cameras without the need to worry about not rendering anything.
  • Enabling/disabling game objects: We can enable or disable game objects using animation. All we need to do is to click on the enable checkbox, as shown in the following screenshot. As always, parameters that are animated (have keys in the animation) are marked in red:
Enable / disable game object checkbox with a key frame
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.93.236