Search Unity

Help with conflict between Cinemachine and my defined assembly.

Discussion in 'Editor & General Support' started by SleepyWolfie, Aug 24, 2021.

  1. SleepyWolfie

    SleepyWolfie

    Joined:
    Jun 8, 2020
    Posts:
    37
    This is a very specific problem. I come from a different thread where I was trying to use Cinemachine through C# code. For some reason, my code couldn't recognize the "using Cinemachine" directive.

    After trying many many things I found the culprit: my Game Assembly.

    Im testing my game, to test my game I had to make a GameAssembly.asmdef to reference in my EditMode and PlayMode tests.

    This is the weird thing: If I remove GameAssembly.asmdef (and therefore my tests as well), the Cinemachine reference works in my code! Does anyone have any idea of whats happening? Is it possible to keep my tests and be able to use Cinemachine?

    Edit: typo
     
    Last edited: Aug 24, 2021
  2. SleepyWolfie

    SleepyWolfie

    Joined:
    Jun 8, 2020
    Posts:
    37
    Ok I found the solution:
    upload_2021-8-24_12-41-51.png

    I used to have Auto-Referenced assemblies, and I thought that was enough to derive the references of all package manager dependencies... But It seems thats not the case...

    So instead I had to reference cinemachine by hand (all of them, missing one of these references would not work). Hope this helps someone.
     
    jobsUK, ClassicCoder and rayming_smt like this.
  3. vahidsn

    vahidsn

    Joined:
    Aug 8, 2015
    Posts:
    2
    It's working for me too.
    Thank you.
     
  4. Oknaa_Acrab

    Oknaa_Acrab

    Joined:
    Dec 29, 2022
    Posts:
    2
    Works !! thanks mate
     
  5. jobsUK

    jobsUK

    Joined:
    Jun 3, 2020
    Posts:
    2
    -----------------
    Thank You got this to work :) (Just make sure you click apply hahah)