Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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:
    22
    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:
    22
    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.
     
    ClassicCoder and rayming_smt like this.
  3. vahidsn

    vahidsn

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