unity build 报错 The name ‘XXX’ does not exist in the current context The type or namespace name ‘XXX’ could not be found (are you missing a using directive or an assembly reference?) 当我们引用了某个dll里面的命名空间和类 运行的时候很正常 在打包的时候 报了如上错误
那是因为 dll的选项没有 向打包的平台兼容 选中dll然后查看inspector 选中要build的平台 点击apply
如果这个dll在editor文件夹内 还需要将其 移出文件夹