How to Make a Interactive Camera using Cinemachine and C#
Here’s an easy way to add an interactive zoom to your Virtual Camera in Unity by ‘using Cinemachine’ GetComponent<CinemachineVirtualCamera>().m_Lens.FieldOfView.
Here we have a simple scene that includes a Virtual Camera, a Plane, an animated Cube and a Sphere:

Adding this script will allow us to update the Field Of View on the Virtual Camera:

And here is the result:
