Can't build Game (Windows)

I keep getting these errors in the console when I try to build, one person in a forum said that “you have to put the script in the assets folder”, I have no idea what scripts he’s talking about, if someone could explain it to me like I’m 5 with steps, I find on these forums that people are very vague about their answers so please be very descriptive, if possible.

Here are my errors, I don’t know what they mean.

Please help. Thanks.

Well, when your script uses UnityEditor, then you should do the following:

  • Create a folder called “Editor”.
  • Place the scripts mentioned in the Editor folder.

Basically, you shouldn’t have scripts that uses UnityEditor in a build. It is used for editor things, e.g. EditorWindow, Inspector and so on.

So, placing it in an Editor folder will tell Unity that its editor-only scripts. That they aren’t used in your game, except for helping you when developing the game.