How to switch between cameras in Cinemachine

Now that we’ve learned how to , let’s take a look at how you can switch your view between them.

Objective: Learn about Virtual Camera Priority in Cinemachine, and how to switch between camera views by using the Inspector.

Switching Between Cameras in the Inspector

Switching your view is possible by using the Solo selector in the Inspector. This gives you an isolated view of your camera.

An example of Solo in action:

That’s great for testing out your different views, but the property we really want to look at for more dynamic changes is the Priority.

Priority

This property is how Unity measures the priority in which to display your cameras. That means that cameras with a higher priority number will be displayed before ones with a lower number.

A good way to visualize this is by Activating and Deactivating the Virtual Cameras. When you Deactivate the camera with the highest priority number, the next camera to be displayed will always be the one with the highest priority number after it.

Let’s see this in action!

This scene has four virtual cameras, their priorities go as follows:

  • CM vcam1 = 20
  • CM vcam2 = 7
  • CM vcam3 = 9
  • CM vcam4 = 15

When I Deactivate CM vcam1 from the Inspector, you can see that the camera view automatically changes. It goes from CM vcam1 to CM vcam4, it ignores any other cameras in between because it’s moving in priority order.

Now, if I deactivate both of the bigger priority cameras, the view should go to CM vcam3, which has the highest priority number among the two remaining cams.

Another way to do this is by actually scripting this behavior using C#, we’ll take a look at making interactable cameras in the next article!

I hope you have found this information valuable! Follow me for more Unity Development articles! :) I am a video game narrative designer on a journey to learn more about Unity Development and Software Engineering.

Check out my and !

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dennisse Pagán Dávila

An ambitious Writer and Unity Developer on a journey to join the video game industry. I publish articles documenting my learning on the go.