Search Unity

Unity scripts and external dependencies

Discussion in 'Scripting' started by DoomDude99, Jul 5, 2019.

  1. DoomDude99

    DoomDude99

    Joined:
    May 11, 2019
    Posts:
    87
    This may be redundant, but can you use a package installed with NuGet inside unity? Unity can't find

    LINQ (in my case).
     
  2. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    Umm... sort of. My understanding is that it's possible to create a separate Visual Studio project, target Standard 2.0, download the package via nuget, then manually copy over the 2.0 Standard version of the DLL into your Unity project and use it like any other library. I don't believe there was a way to do it in any more automatic a fashion than that, the last time I checked- downloading via nuget directly into a Unity solution probably won't work.
     
    DoomDude99 likes this.
  3. DoomDude99

    DoomDude99

    Joined:
    May 11, 2019
    Posts:
    87
    Thanks. I managed to find a workaround using SimpleJSON.cs:

    http://wiki.unity3d.com/index.php/SimpleJSON

    (I just add it to my project).
     
  4. doctorpangloss

    doctorpangloss

    Joined:
    Feb 20, 2013
    Posts:
    270
    You probably want to use JSONUtility
     
    DoomDude99 likes this.