After working on my first game for more than 30 hours I decided to try and build to see what it’ll look like. Unfortunately, I am getting 2 critical errors and Unity cannot build the game.
Here’s an image of the two errors I’m getting.
Link in case you cannot see it full-size: Imgur: The magic of the Internet
I fixed it. I don’t know how. I tried to re-build it, and another error came up, about a line inside the Script of an object I have. So I just went and commented out the whole Method, tried to build the project and it worked.
1 Like
FYI, there are certain Unity classes that will work when running the game in the Editor, but which won’t work if you try to include that code in a build. Basically, anything in the `UnityEditor’ will work just fine in Play mode within Unity, but will result in build errors when trying to build your game. Maybe you commented out some code that use UnityEditor?