Get virtual camera status in code?

Hello all. I’m creating a simple script that intended to adjust X axis value and Follow offset values of a Virtual Camera in order to get nice automatic orbiting to record videos for a game trailer. I have to make this script working only when the Virtual Camera is actively controlling the main camera of my scene. Documentation of
CinemachineVirtualCamera clearly states:

And these statuses are visible in UI of Virtual Camras:
6945065--816653--VirtualCameraState.png
But how can I get it in my C# code? May be I’m a bit dumb or inattentive but I can’t find it in the documentation.
Thanks in advance.

Try CinemachineCore.Instance.IsLive(vcam)

4 Likes

Yes, it’s working. Thank you very much!

1 Like