Custom blend for a VCam that is inside a Prefab

Maybe there’s a way to do it, but the documentation hasn’t caught up.

Most of the world is fine with the Cinemachine Brain and its default blend time and ease-in-ease-out mode.

Some special VCams that are in a Prefab (say, inside an armored tank) need to have a special blend mode. Since the tanks are instantiated at runtime, and there may be any number of them, it seems very cumbersome to write a script that goes and finds the Brain and adds a custom blend time and mode to the Brain’s list. And potentially having to clean up after themselves when the tank is no longer relevant.

The custom blend asset’s vcam references are not actual reference, they are names. So, you can put in there the name of your special vcam that isn’t yet instantiated, and when the time comes to do the blend, it will be found. To get the name in there, temporarily drag the prefab into your scene, add the name to the asset, then remove the prefab.

You’re right that the docs aren’t too clear about this. It’s mentioned here, but I agree that it could be elaborated a little more.
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineBlending.html

Okay, will check. Sounds like if I have several instances of the prefab, then the VCam named “SLOW” in each instance would get the special “SLOW” blend treatment. Guess that works.

1 Like

FYI there is also CinemachineCore.GetBlendOverride, which allows you to dynamically override blends.
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.9/api/Cinemachine.CinemachineCore.html#Cinemachine_CinemachineCore_GetBlendOverride