Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

All compilers error have to be fixed before you can enter playmode

Discussion in 'Getting Started' started by KenzoY, Jan 24, 2020.

  1. KenzoY

    KenzoY

    Joined:
    Jan 24, 2020
    Posts:
    2
    Hey!

    I'm trying to create a simple 2D game, but when I want to script (C#) a player and enter playmode, I always get this message: "all compilers error have to be fixed before you can enter playmode"
    I have .NET Framework 4.8 installed and have tried set Api Compatibility Level to .NET 4.x in Edit - Project Settings - Player - Other Settings.
    Any advise would be greatly appreciated.

    Thanks!
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    In the console it should be pointing out some actual compiler errors. Those are what the message is telling you to fix. Always start with the one at the top of the list, as later errors can be caused by earlier errors.

    https://docs.unity3d.com/Manual/Console.html

    If you don't see the errors because you've already cleared the console, just close and reopen Unity. It will attempt to recompile, and include the specific errors in the console again.

    If you're having trouble fixing the errors, post the full text or a screen shot of the specific errors, include the script and line number it is saying the error is at, and also post the script itself with CODE tags (see the sticky at the top of the Scripting forum). If posting the script to the forum changes the line numbers, tell us what is the actual line in your script that corresponds to the line numbers in the errors.
     
    JoeStrout and Bill_Martini like this.
  3. KenzoY

    KenzoY

    Joined:
    Jan 24, 2020
    Posts:
    2
    This is what it returns, which is rather strange to me: