在Unity项目添加Newtonsoft.Json(Json.NET)错误及解决办法
通过VS的包管理器添加了Newtonsoft.Json到项目里面。虽然在VS里面可以正确引用命名空间 Newtonsoft.Json,但是Unity报错:the type or namespace name ‘newtonsoft’ could not be found (are you missing a using directive or an assembly reference?)看来是
文章共204字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
通过VS的包管理器添加了Newtonsoft.Json到项目里面。
虽然在VS里面可以正确引用命名空间 Newtonsoft.Json,
但是Unity报错:
the type or namespace name ‘newtonsoft’ could not be found (are you missing a using directive or an assembly reference?)
看来是Unity找不到程序集,这是因为Json.NET官方没有直接支持Unity。
解决办法:GitHub上有大佬开发了正确在Unity配置Json.NET的工具
只需要下载一个Unity包然后导入到Unity中就行了
更多推荐
已为社区贡献1条内容
所有评论(0)