When I get on unity and try to play the fps prefab it says all compiler errors must be fixed first, but I don't know what a compiler error is and don't know how to fix them. I can't find where the errors are either. Please Help
In the bottom-left corner of Unity, you will see some bright red text-That's a collapsed version of the console and the red text is the error message. If double click on that or you go to Window/Console (or Ctrl+Shift+C in Windows) the full console should be visible. If you cannot find it, you may need to reset your layout first with Window/Layouts.
Compiler errors are generated by a script that has erroneous code. By double clicking on the error message or opening the script directly, you must open the script in a text editor and fix the error described. If you double clicked on the error in the console (maybe twice) it should even take you to the line where the error was generated. Errors which indicate a script will also indicate the (line, column) of the error. I don't know what your error is so that is all the help that I can provide for that. Once you have fixed the error, save the script and click on Unity. Unity will compile it and write any errors to the console. Continue to fix errors until there are none.
I downloaded Unity yesterday, so after messing about a bit, I thought I’d run through a couple of tutorials. The Lerpz Console Game seemed like a good place to start, but the game won’t run - right out of the box! It’s probably safe to assume that anyone else who has this problem is also running the tutorial because they want to learn Unity and have no idea what’s going on yet either. Anyway, blind leading blind here, but this is what I tried, and it seemed to help:
-
At the top of the main window, select Window->Console. A new window will open in the middle of your screen.
-
Drag the tab at the top of the inner window until its ghost appears next to the tab on the bottom left that says “Heirarchy” and drop it there. You should have 2 tabs at the bottom left now. Now you can see errors - very helpful!
-
Click the “Console” tab to make it active. You should see that there is an error on line 125 of the script “FadeoutLineOfSight”.
-
Click on the script called (Scripts->Camera) “FadeoutLineOfSight” in the “Project” tab in the window to the right of the one with the “Heirarchy” and “Console” tabs.
-
The script will open in the “Inspector” tab on the top right of your screen. As far as I can tell you can’t edit the script there, so click the “Open” button at the top right of the “Inspector” tab. This will open the script in a new program called “MonoDevelop - Unity”.
-
I have no experience with this language, but it looks like the variable “newMaterial” - which already exists - is being redeclared here. I’m just guessing, but the script seems to want to modify the original variable, so it should be safe to delete the declaration “var”. I could be wrong, but at least the game will compile now, and if we broke the script we can fix it later - once we know what we’re doing!
Original line: for (var newMaterial in fade.alphaMaterials)
New line: for (newMaterial in fade.alphaMaterials)
- Save the script. The error will magically disappear in the Unity IDE, and the game should compile. GL!
Wow you must be new but thats fine all those long answers people put might be confusing ok so i want you to look at the bottom of unity you should see red text right ok so you first click on the error or red text it will open the cosole tab click on a error and it will or should high light a object you can click the object an just delete it or read the error and see what it is saiding ok you still have a problem you can email me back at maxkoke24@yahoo.com or you could look on youtube. How to fix complier errors in unity. Ok good luck bud