Unity 3d Compiler Errors and fixes

 

When I import my FBX file into Unity the files seem invisible or empty.

Possible Solution:  

  1.  Try dragging the prefab (file) onto the scene.
  2.  Press F to frame the file. Your prefab may be really, really small or really really big.  
  3. If you still don’t see anything, but you do see the translate tool, zoom out a lot and look for the file.  What happens is that the translate tool is not at center pivot.  So you may be moving something, but not seeing the something because is if way off to the left or right and zoomed out.
  4. If you do find the obect you’re importing, GameObject – Empty Object and drag your object into the empty game object so your pivot is centered. Then rename the empty game object.

 

Answers: How to Fix Compiling Errors in Unity 3D

NOTE FOR BEGINNERS:  Test your programs often as you begin to move forward.  Complete a small portion of your project, save and then test.  If it works without errors, do a little more, test again, then again and again.  This way of working will allow you to find the errors as they might occur.

  1. Find the Console location here:  WINDOW – CONSOLE (at the bottom of the list)
  2. Double click on the first line that has a red ! mark.  This will highlight the line that has the error and you should see a small clue as to what you have to fix.  It is not always clear.
  3. Read the numbers.  The first number in the error is the line number that the error occurs on.  The second number is the number of characters over the error is.  So (14, 20) is line 14 and 20 characters across.
  4. Assets/ is the folder it’s in.
  • Assets/scriptname.cs(14,20): error CS1525: Unexpected symbol `[‘, expecting `(‘
    ANSWER: Change the type of bracket you’re using.
  • Assets/scriptname.cs(19,1): error CS8025: Parsing error
    ANSWER: You are missing a bracket { or (
  • Expecting EOF Found }  (EOF -End of Function)
    ANSWER: You have unbalanced brackets. You have an opening bracket and no closing bracket to match or you have a closing bracket and no opening bracket. Move your cursor over each bracket and your editor should show you the closing bracket for that pair.
  • BCE0044 Error.  Expecting __, Found “___
    ANSWER: the computer is expecting a curly bracket but found nothing. Found ___ is expecting a curly bracket. Fix the error by adding a bracket.
  • unity3d unassigned reference exception