2016-06-28 158 views
1

我用的NuGet来Json.NET安装到我的团结项目,但问题是,当我启动它抛出 The type or namespace 'Newtonsoft' could not be found. Are you missing a using directive or an assembly reference
然而,这是在我的参考文献中,我有using Newtonsoft.Json;
我已经看过其他问题,但我无法找到一个有效的答案。我使用Unity 5和Json.NETJson.NET在Unity抛“类型或命名空间`Newtonsoft`找不到”

回答

2

。在统一的最新版本中,Newtonsoft.Json.dll文件放入文件夹Assets/Plugins

。在Visual Studio中,突出显示AnalyzersSolution Explorer窗口。

。去Project- >Add Reference和选择之后Assets/Plugin项目目录。而已。

可选

在Unity 5.3,统一添加Json系列化native support。您可以简单地使用它来转换为Json并返回到class

+1

谢谢,这工作。我觉得不要公平。再次感谢。 – bwfcwalshy

相关问题