Search Unity

Cinemachine reference missing in Visual Studio for Mac?

Discussion in 'Cinemachine' started by peterahou, Apr 30, 2018.

  1. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    53
    Hi

    I just tried using the Package Manager in Unity 2018.1.0b13 to install Cinemachine, but when I create a new C# script, I'm not able to access the Cinemachine namespace. I'm using Visual Studio Community for Mac. Interestingly, I don't get any errors in Unity and all the scripts and components are showing up – it's only Visual Studio that isn't able to find Cinemachine.

    Has anyone else experienced this and possibly found a solution?
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Normally this should work fine. Try closing Visual Studio and Unity, and re-opening. If that fails, you can try re-importing the project.
     
  3. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    53
    No luck, unfortunately :(
    I tried rebooting my machine, creating a new project in the latest Unity 2018.1.0f1 release candidate, imported Cinemachine via the package manager, created a new C# script, and finally typed the using statement at the top. Cinemachine is still not found.

    I'll see if I can reinstall Visual Studio next...
     
  4. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    556
    Hi peterahou,

    It seems like the VS projects are not being generated properly by Unity. I don't think reinstalling Visual Studio would change much. Could you please share the .csproj file that is generated for your Assets directory? (Either Assembly-CSharp.csproj, or [your project].csproj)? You don't need to post the whole file, it's sufficient to post a snippet containing all
    <Reference Include="...">
    nodes. If it's simpler, just upload the whole file.
     
  5. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    53
    Actually, reinstalling Visual Studio worked! I didn't change anything in the project files, just removed Visual Studio and reinstalled it using Unity Hub. Now, Cinemachine is referenced correctly when I open the C# script.
    Regarding the references in Assembly-CSharp.csproj, Cinemachine was already included here. In fact, I had another team member install and commit Cinemachine from a Windows machine to our repository to test if that would make it show up, but it didn't. It worked fine on Windows, but on Mac I had to reinstall Visual Studio.

    Thanks for helping out :)
     
  6. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    556
    Glad it worked out! Thanks for keeping us posted.