Hello,
Lately I’ve been building a lot of standalones for testing. This has been returning many different errors, but none of them seem to be mine. I was hoping someone could tell me why standard Unity assets are failing to build all of a sudden? This has only been occurring over the last few months, but with increasing frequency.
Exception: Error building Player because scripts had compiler errors
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:367)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:972)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:953)
UnityEditor.BuildPlayerWindow.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:726)
It’s worth mentioning that sometimes this error appears, and sometimes it doesn’t. It’s seemingly random and can be fixed with an editor restart, but I want to put it to bed once and for all.