cinemachineBrain.IsBlending not working for state driven camera

If I have 2 normal virtual cameras I can detect whether or not they’re blending with the IsBlending property on the Cinemachine Brain. However if I have virtual cameras as part of a state driven camera, IsBlending never returns true. It seems as though it’s still using theCinemachine Brain, so is there another way to detect this or is just a bug?

Cheers.

This is normal behaviour. StateDrivenCamera manages its own blends internally, and is exposed to the brain as a single vcam. In this way, the brain can elegantly handle the situation of blending to/from an SDC while the SDC is in mid-blend.

Thanks for the fast reply. I think understand why it’s set up like that now. But when you say “manages its own blends internally” does this mean there is no way to detect when the SDC has finished blending? I can’t find anything.

I’m using the SDC to make a simple menu system which blends cameras between the different ui screens. I’ve got a workaround anyway, but detecting when the SDC stops blending would be better for me.

Thanks again.

Currently, no API has been exposed in SDC for detecting whether a blend is in progress. Thanks for pointing out the hole. We will add it to the next release.

In the meantime, you can add it yourself if you like, as follows:

        /// <summary>Is there a blend in progress?</summary>
        public bool IsBlending { get { return mActiveBlend != null; } }
1 Like

Thanks, I’ll give it a try.