Follow

Why do I get a "All compiler errors have to be fixed before you can enter playmode!" error?

Symptoms

When trying to enter play mode, I am receiving the error below:

All compiler errors have to be fixed before entering playmode

Cause

If any of the scripts in your Unity project have errors that do not allow Unity to compile the scripts, then this error will be displayed. You will not be able to enter play mode if this error is present.

Resolution

You will need to look at all errors that are being flagged in the console and fix them. 

Note: If you cannot see any errors in the console but the message still appears it may be an issue with a script using the namespace UnityEngine.Networking;

If the script is not being used then comment out the sections where the errors appear. 

Once all scripts are free of errors, Unity can compile the scripts and you can enter play mode.

More Information

Was this article helpful?
5 out of 53 found this helpful
Have more questions? Submit a request

42 Comments

  • 0
    Avatar
    Benchyy

    all of my code is correct but it still keeps coming up with compiler errors but it doesnt flag any. does anyone know ho to fix this becuase my code is correct and ive been trying to figure out what is wrong with it for over a month.

     

  • 0
    Avatar
    No Name

    Im having exactly the same problem as Kyle Katarn (Ive the 19.3.9f1 edition)

    Edited by No Name
  • 0
    Avatar
    Trincom

    It can happened that you get your Unity Project into a corrupted state. This can happen for instance if you rename files without waiting for Unity to complete compiling, changing namespace names or having different file and class names.

    If no errors show up in your console you can always try to build your project in Visual Studios under Build > Build Solution.

    This helped me to find out why Unity was not compiling and allowed me to get back into play mode.

    Edited by Trincom
  • 1
    Avatar
    Rob Milligan

    Same exact error. This worked for me:

    In Unity, go to Window > Package Manager > Universal RP and update to 7.3.1

    I found this solution because someone else did the opposite and downgraded from 7.3.1 to 7.1.8. So mileage may vary. For me, upgrading worked.

  • 0
    Avatar
    No Name

    Yo that worked for me man thx

  • 0
    Avatar
    Sanjay Purswani

    Rob's answer above does not work for me. The problem is with Unity 2019, install 2018 and use that instead.

  • 0
    Avatar
    Daniel Tunc

    Rob's answer worked for me, upgrading fixed it! 

  • 0
    Avatar
    Knives

    Thanks Dorin....

    Link needs to be updated, though.

  • 0
    Avatar
    Aeron James Salvatierra

    Is there a way to prevent the compiler from compiling if there are compiler errors? Its annoying that I'm allowed to compile but not allowed to test anyways

  • 0
    Avatar
    agustina iriyanti

    Hi

    how to overcome this? when I import standard assets and when playing an error occurs

  • 0
    Avatar
    Dakota Frye

    I just loaded up the fps microgame and i have 125 errors why did this happen

    Edited by Dakota Frye
  • 1
    Avatar
    SharkTheShark

    I have done completely nothing on my project and when i try and run it says all compiler errors have to be fixed error code cs 1056 Unexpected character '
    I haven't written any script yet so please can someone help? 

Please sign in to leave a comment.