I am designing an FPS on Unity using a tutorial that I downloaded on the Unity website, and the tutorial tells me to hit “play” after placing the First person Controller and deleting the main camera. It says that I should be able to move around the map with the WASD keys. I did everything the tutorial told me to do, but for some reason when I hit “play”, it says “All compiler errors have to be fixed before you can enter play mode!”. I have no idea what to do about this and I NEED HELP.
It’s too bad that Unity does not update their tutorials. They worked ok in the version they were released for.
So what happened is Unity put stricter coding standards into the compiler so it complains about things more. Basically to prevent sloppy coding. What you are finding is evidence of that.
That said, unless you can get a copy of a fixed project, you’ll need to fix these problems. Look at it as a learning opportunity. You will get your feet wet with coding quicker.
So yes, you have to look at the console to see what the errors are. Double-click one, it should open the text editor right to the offending line. They use the error message as a clue. Does it say ‘protected or private member inaccessible due to permissions’ or something like that? That means you need to find the component (script) that declares that variable or function, and add ‘public’ or remove ‘private’ from it.
Google is your best friend here. We’ve all done this: copy from the console, paste into google, hit search. I don’t think I’ve ever come up empty that way.
It simply means that there’s an error in the script, so you need to fix it before running the game.
Isn’t there any other error message above this one? If yes, click over it and Unity will take you exactly to the line where the error occurs in the script.