美文网首页
unity 打包忽略脚本

unity 打包忽略脚本

作者: Rayson | 来源:发表于2024-12-15 09:27 被阅读0次

在打包时报错显示,可能是某个脚本不能被打包
The type or namespace name 'MenuItem' could not be found (are you missing a using directive or an assembly reference?)
找不到类型或命名空间名称“MenuItem”(您是否缺少using指令或程序集引用?)

在打包发某个脚本报错的时候,需要给脚本上下文中添加 只有在编辑器下运行的指令,

if UNITY_EDITOR

···

endif

将脚本囊括进去。

相关文章

网友评论

      本文标题:unity 打包忽略脚本

      本文链接:https://www.haomeiwen.com/subject/lppcejtx.html