Error building Player because scripts had compiler errors

报错信息如下:

Error building Player because scripts had compiler errors
 Build completed with a result of 'Failed'
 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts had compiler errors
   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181 
   at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88 
 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

没有其他的,也没有定位到,报错的文件。

需要查看C:\Users\XXXX\AppData\Local\Unity\Editor文件下的Editor.log文件。

有详细的报错信息。

我这里的原因是无用的头文件。如下图,删除掉,就可以打出android包来了。

 

posted @ 2020-10-27 22:05  东羽白帝  阅读(3220)  评论(0编辑  收藏  举报