Bug #1399071: Cinemachine 2.8.4 appears to be incomptable with Input System package.

After updating from 2.8.3 to 2.8.4, I’m getting errors any time I try to reference the ‘Cinemachine’ namespace.

The type or namespace name ‘Cinemachine’ could not be found.

There’s also one compiler error in the console:

Library\PackageCache\com.unity.cinemachine@2.8.4\Runtime\Helpers\CinemachineInputProvider.cs(99,13): error CS0106: The modifier ‘static’ is not valid for this item

This compiler error sees very closely tied to a changelog entry: “BugFix: InputProvider no longer causes a tiny gc alloc every frame.”, since the comment above this line states: “// local static function to wrap the lambda which otherwise causes a tiny gc”

Is this kind of expression only valid in certain versions of c#, which I might not be using in my project? Or any thoughts on what would cause this?

Hello dgoyette,

What version of unity are you using and do you have the input system package installed and which version?

Do you have an example script you could share that’s causing that?

This is under 2019.4.35, and yes, I’m using the input system package.

I just started a new project, and it appears the issue occurs as a combination of Cinemachine 2.8.4 and pretty much any version of the Input System package. If I remove Input System from the project, and just have Cinemachine 2.8.4, it works fine. But upon adding the Input System package (whether it’s version 1.0.2, 1.2.0, 1.3.0, it doesn’t matter) the error occurs.

So I’d say it’s say to say that 2.8.4 is not compatible with the Input System package. Perhaps only in 2019.4, but I don’t know. I’ve only tested on 2019.4.

I’ve opened bug #1399071 tracking this.

1 Like

Hello again,

Yes looks like you found a regressions here. We are supposed to support 2019.4+ it will be fixed.

This line requires C# 8 which is supported only with 2020.x + versions of unity.

One way would be to use 2020 or 2021 if this is an option for you. Otherwise the only solution is to stay on 2.8.3 until we fix it.

Sorry about that but thank you for reporting it :). Let us know if you have any other issues/question.

1 Like

Has the error been fixed?

We have the fix in 2.8.5. It’s in the process of being released.