Hi,
I found nothing on the forum about this issue thus i’m reporting it here.
When i play an animation from an animator binded to a CinemachineStateDrivenCamera to make trasition between cameras, everything works fine in editor and when i build in Mono. But nothing append when i build for WebGL.
The web browser console doesn’t display anything.
The bug seems to be appeared after Unity 2020.1.x
The correct behavior works with: Unity 2020.1.x and with Cinemachine 2.6.x or 2.7.x
No animations are launch with: Unity 2020.2.x, 2020.3.x and with Cinemachine 2.6.x or 2.7.x
Dev environment: windows 10 x64
Some screenshots to reproduce:
Clicking on the buttons will change the camera. Everything works fine in editor, but not in WebGL after building with Unity version above 2020.1.x
Best regards

Can you make an experiment to narrow it down? What happens if you remove the buttons and instead make the states just rotate automatically? Do the correct vcams then activate?
If i do a cycle in the animator (cf screenshot), everything works fine. Camera is transiting between vcam1 and vcam2 indefinitly.

Good. So then the problem is not with the StateDrivenCamera, it’s more likely with the buttons-animator interaction in WebGL. Maybe you can try making a small sample project with some buttons and an animator and see if it works in WebGL.
You might try asking on the WebGL forum: Unity Engine - Unity Discussions
All the other animations from my projects works fine with the buttons and the animator. Only the Cinemachine siwtching fail.
I will take a look at the WebGL forum.
Hello
i have same problem with cinemashine and webGL build.
did you find the solution?
I didn’t want to spend too much time being sent between all unity team services. Thus i waited until a new unity version patch this issue.
Problem is gone in Unity v 2021.1.9f1
1 Like