error CS0246: The type or namespace name ‘InitializeOnLoadAttribute‘ could not be found

unity 构建APK时报错内容:error CS0246: The type or namespace name ‘InitializeOnLoadAttribute’ could not be found (are you missing a using directive or an assembly reference?)

发现报错内容是UnityEditor下的类型
将此类文件迁移至Editor目录下
重新build 此时发现报错内容被解决

猜你喜欢

转载自blog.csdn.net/u014481027/article/details/129282476