Cinemachine not work in build

Hi!
I’m using Cinemachine with new input system.

I added CinemachineInputProvider to my vCam and it works fine in editor.
However, when I build my game, my camera doesn’t received any input. I have no errors in console during game and no errors in game log.

I tried to add some logs to GetAxisValue method, but it seems that this method doesn’t called in the build.

For now I have no idea what I can do to figure out what is going on. Any thoughts?

Hello,

I tested with 2021.2 Cinemachine 2.8.4 and it’s working on build. I am guessing it’s specific to a version or a config issue. What version of unity and Cinemachine are you using? Did you change anything on the player settings?

Let us know :slight_smile:

In my current project I’m using Cinemachine 2.6.11, Input System 1.2.0 and Unity 2020.3.26
Yesterday I tried to make a copy of my project and build it in Unity 2021.2.11 with Input System 1.3.0 and Cinemachine 2.8.4. The result was the same - everything works in editor, but not in build.

In my project settings I’m using IL2CPP, .NET 4.x and new Input System as a default input system.

Well, I figured out what was wrong.
I have two virtual cameras in my project, one is dynamic, and one is static. But I forgot to change priority at startup and they have same priority. And as I understand, Cinemachine randomly choose between those virtual cameras. In editor it choose my dynamic camera, but in build it choose my static camera.

That was the reason of “bug”.

1 Like