The type or namespace name ‘MenuItemAttribute‘ could not be found类似报错处理方法

类似报错主要是使用了UnityEditor相关的API,解决方法的话,只要将相关脚本放进Asset下的Editor文件夹之中即可(并不涉及其他的逻辑,只与UnityEditor相关)
否则在打包的时候还可能会发生类似的报错
The type or namespace name ‘MenuItemAttribute‘ could not be found类似报错处理方法