I added the Json.Net library to Visual Studio 2013 via NuGetpackage and installed it for NetFramework 4.5. I don't get an error in Visual Studio when I add
using Newtonsoft.Json;
but in Unity3D 5.0 I get the error:
Assets/RobotController.cs(5,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing a using directive or an assembly reference?
I looked up in my packages folders for this project and the dll file is there, so I don't understand the problem. Thx for help.
NET ecosystem. But it doesn't support Unity3D, so it's a little bit hard to use JSON.NET just after getting Json.NET package. This package is for Unity3D programmers that need to use latest Json.NET in Unity3D. Just import the unity package and you are good to go.
If you want the newtonsoft package that Unity is using you can simply go into the package manager click the + then from git url and fill in "com. unity. nuget.
This is a package intended for internal Unity Development Projects and as such this package is not supported.
I had just the same problem in Visual Studio 2015. But Utamaru's solution worked for me.
Make a folder: Assets/Plugins where you put the *.dll file and add it as a reference.
To add a reference you highlight the Analyzers in the Solution Explorer in Visual Studio and under Project > Add Reference you can find your *.dll file located in Assets/Plugin by browsing to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With