导入Unity时遇到了Goolgle.Protobuf.dll的错误。(unity导入项目怎么没有变化)(vuforia在unity导入出错)

访客 170 0

报错信息

描述:在直接导入Google.Protobuf.dll时会出现以下两个报错信息
1.Assembly ‘Library/ScriptAssemblies/Assembly-CSharp.dll’ will not be loaded due to errors:
Reference has errors ‘Google.Protobuf’.
2.Assembly ‘Assets/Plugins/Google.Protobuf.dll’ will not be loaded due to errors:
Unable to resolve reference ‘System.Runtime.CompilerServices.Unsafe’. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
导入Unity时遇到了Goolgle.Protobuf.dll的错误。(unity导入项目怎么没有变化)(vuforia在unity导入出错)-第1张图片-谷歌商店上架

报错原因

由于Google.Protobuf.dll中的某些依赖项与UnityEditor中的版本不匹配,因此可能会导致Unity报错。然而,在VS2022内部却没有出现错误的情况。

解决方法

下载Google Protobuf 的开源代码使用VS2022生成解决方案,再把bin>Debug>net45文件夹内容全部一起导入unity即可
下载地址:https://github.com/protocolbuffers/protobuf/releases
导入Unity时遇到了Goolgle.Protobuf.dll的错误。(unity导入项目怎么没有变化)(vuforia在unity导入出错)-第2张图片-谷歌商店上架

问题解决

导入Unity时遇到了Goolgle.Protobuf.dll的错误。(unity导入项目怎么没有变化)(vuforia在unity导入出错)-第3张图片-谷歌商店上架

标签: 谷歌商店上架 错误 项目

发表评论 (已有0条评论)

还木有评论哦,快来抢沙发吧~