Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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

Discussion in 'Cinemachine' started by dgoyette, Jan 28, 2022.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,203
    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?
     
  2. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    196
    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?
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,203
    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.
     
    antoinecharton likes this.
  4. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    196
    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.
     
    dgoyette likes this.
  5. Miguel1213

    Miguel1213

    Joined:
    Jul 19, 2020
    Posts:
    1
    Has the error been fixed?
     
  6. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    196
    We have the fix in 2.8.5. It's in the process of being released.