- Home /
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.
Answer by Ejlersen · Sep 17, 2013 at 03:43 PM
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.
@Ejlersen: Your "shouldn't have" should be a "can't have" since you can't build your game with scripts that uses the UnityEditor namespace.
Anyway +1
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Unity 2017.1 Mac builds not opening 0 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
CommandInvokationFailure: Gradle build failed 2020 0 Answers
Allocation Already Register 1 Answer