原因:Newtonsoft是一个C#中使用Json来进行数据的交互的程序集。
1.与Unity自带的插件版本有关系,不能识别到包中的Newtonsoft。
2.未导入Newtonsoft.dll程序集
//提醒你的代码路径/ error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
解决方案1:
出现这个提示是插件管理器中的Version Control . 版本出现问题。
笔者亲测:1.15.4-1.15.9 就没有问题,一旦更新到1.15.12以上就会出现错误

解决方案:更新插件管理器中的Version Control .到1.15.12 以下


当Unity3D提示‘Newtonsoft’无法找到时,可能由于Unity自带插件版本问题或未导入Newtonsoft.dll。解决方案包括:将Version Control .版本降至1.15.12以下,下载并导入JsonNet-Lite.9.0.1.unitypackage,或者检查项目中是否正确引用Newtonsoft程序集。
订阅专栏 解锁全文
1万+





