Easily Switch Between Cameras In Cinemachine
Let’s explore how easy it is to switch between cameras using Cinemachine. We’ll start with a simple scene that includes a Virtual Camera, an animated cube and a sphere hovering above a plane:

We want a script that switches the camera from the animated cube to the sphere. So to do that, let’s use GetComponent<CinemachineVirtualCamera>().LookAt which we can access by ‘using Cinemachine’. We’ll create variables that hold a references to the Virtual Camera and the target objects:

And now we can add a Method called from Update that will assign the target transforms to the LookAt values of the Virtual Camera:

So now when we call our Method, we get this result, switching the Virtual Camera from the Cube to the Sphere:
