unity 打包忽略脚本
2024-12-15 本文已影响0人
Rayson
在打包时报错显示,可能是某个脚本不能被打包
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
将脚本囊括进去。