Unity打包项目报错 error CS0234:The type or namespace name“**“does not exist in the namespace“**“

  • Post author:
  • Post category:其他



1.打包项目时,报错:error CS0234:The type or namespace name”UI”does not exist in the namespace”UnityEngine””


或是”Text”could not be found.Are you missing an assembly reference?


2.解决方法:

方法1:File →Build Settings→Player Settings→如下图所示

修改 Api Compatibility Level*和原来不一样,保存再重新打开项目。

方法2:关闭Unity,打开项目所在的文件夹,删除Library文件夹,然后再重新打开项目,Unity会自动重新搭建相关的 .dll文件,就可以打包项目发布了!



版权声明:本文为weixin_52536221原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。