Search Unity

Newbie trying to set up an external dependency

Discussion in 'Linux' started by wlfgang, Oct 22, 2017.

  1. wlfgang

    wlfgang

    Joined:
    Oct 21, 2017
    Posts:
    1
    Hello all,

    I am new to Unity and .NET, so this may be an easy one. I am using Unity 2017.2.0f3 on Ubuntu 16.04 (actually Linux Mint 18.2), and JetBrains Rider 2017.2 as my IDE.

    I've got a toy project set up, and the "game" runs just fine, until I try and add an external dependency. In this case I am trying to use Newtonsoft.Json. Without going into too much detail, I tried using NuGet from within Rider to install it. When I do that, it seems like Rider is happy, but Unity isn't- I get the following error in Unity when I put a 'using Newtonsoft.Json;' in one of my .cs scripts.

    error CS0246: The type or namespace name 'Newtonsoft' could not be found. Are you missing an assembly reference?

    I am just trying to understand where Unity/Rider expect external dependencies like this to live. Rider apparently put the Newtonsoft.Json package under a folder called 'packages'. I have tried moving those files around a little, to no avail.

    Any help would be greatly appreciated! :)
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Unity wants precompiled assemblies somewhere inside Assets.