Triggering camera blends through scripts

Hi there,

I feel a bit silly asking this but surprisingly I couldn’t find a solution elsewhere.


I’ve set up some custom blends, just wondering how I actually trigger them through scripts. The manual just says to use custom blends. Blending between Virtual Cameras | Package Manager UI website

I’m pretty new to Cinemachine so I might be getting something fundamentally wrong here.
Any help would be much appreciated,
Pete

1 Like

A blend specifies what happens when the active camera changes from camera A to camera B. To see the blend in action, make a new camera active. There are a few ways to do this:

  • Activate incoming vcam’s game object and deactivate outgoing vcam’s game object. You can to this at the same time from a script
  • Or, set the incoming vcam’s priority to something higher than the outgoing one
  • Or, give the incoming a higher priority and activate its game object, leaving the other one alone. To transition back, deactivate it.

Note that if no custom blend settings exist for a specific vcam pair, the default blend setting will be used. I mention this because you have set both settings to the same thing.

1 Like

Okay great thanks @Gregoryl !