I am trying to change my Cinemachine custom blend time programmatically at runtime. I have looked at this thread and did something similar: Changing Cinemachine default blend time at runtime
However, it does not seem to take effect. My guess is because I am changing the blend time in the same frame that I am then activating the blend (enabling the vcam). I tried calling “ManualUpdate” on the CM Brain, but that did not seem to do anything either. How would I go about getting this to work as desired?
This is what I have tried:
var blend = cmBrain.m_CustomBlends.GetBlendForVirtualCameras(vcam1.Name, vcam2.Name, defaultBlend);
blend.m_Time = 1.0f;
cmBrain.ManualUpdate();
vcam2.gameObject.SetActive(true);
I have confirmed that the names of the vcams are correct, and the m_Time
is changed to the new value. Yet when the blend actually runs, it is the original time I set in the editor.