Error building Player because scripts have compile errors in the editor

This error shows when I try to build in the standalone player. When I try to build on WebGl, it doesn’t show. Sometimes, this error is by itself. Sometimes, it is accompanied by 600 other errors, all seeming to come from the Standard Assets package. I have looked online for hours for the solution and saw other websites with the “Error building Player because scripts have compile errors in the editor”. I saw that scripts that use the Using UnityEngine.Editor thing should be in the Editor folder. However, I believe that Unity has already put scripts that that use the Editor class under the Editor folder in the Standard Assets package. Sometimes, my game works perfectly fine when I test it in the editor, and other times, I am not allowed to play as the “Error building Player because scripts have compile errors in the editor” pops up. Therefore, I have to close Unity and reopen it for it to work. I am getting very confused and tired of this error. Though, I know that there are many forums with this error, none of them seems to be giving the right answer to me. I need help.


These are the 600 other errors.


Error building Player because scripts had compiler errors

Game not working when testing


Game working perfectly fine in Unity.

Try deleting your library and then open the project, it should reimport stuff. That sometimes will fix it.

You mean deleting the library in my file explorer, right?

Nope, it does not work.

3040709--227721--upload_2017-4-20_16-26-48.png

3040709--227723--upload_2017-4-20_16-27-10.png

3040709--227722--upload_2017-4-20_16-27-1.png
3040709--227723--upload_2017-4-20_16-27-10.png