Search Unity

Bug all compiler errors have to be fixed you can enter playmode

Discussion in 'Editor & General Support' started by unity_353C5107696B8A68D4B4, Jun 25, 2022.

  1. unity_353C5107696B8A68D4B4

    unity_353C5107696B8A68D4B4

    Joined:
    Jun 25, 2022
    Posts:
    1
    hello, I encounter such a problem when I want to try the game, what exactly is the solution?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,990
    What exactly is the error?
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,930
    The solution is to fix all your compiler errors.
     
  4. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    65
    double click on the error to take you to the error in the code and then you can fix it
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Make sure your log console selector buttons are enabled. See this graphic:

    https://forum.unity.com/threads/cant-add-script-component.632746/#post-4239121

    https://forum.unity.com/threads/update-function-not-working.953477/#post-6215873

    Remember: NOBODY here memorizes error codes. That's not a thing. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.

    The complete error message contains everything you need to know to fix the error yourself.

    The important parts of the error message are:

    - the description of the error itself (google this; you are NEVER the first one!)
    - the file it occurred in (critical!)
    - the line number and character position (the two numbers in parentheses)
    - also possibly useful is the stack trace (all the lines of text in the lower console window)

    Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.

    All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don't have to stop your progress and fiddle around with the forum.