Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

2D Game kit_Compile errors_Please help Newbie

Discussion in 'Getting Started' started by elouw659, Jun 7, 2019.

  1. elouw659

    elouw659

    Joined:
    Jun 7, 2019
    Posts:
    2
    Just started Unity, attempting 2D Game Kit, downloaded the "stuff" into the latest unity 2019. Did not work as had compile errors. On Unity Learn site it states 2D Game kit will run on 2017.3.0 and higher. As 2019 did not work, I downloaded the closest one that is higher than requirements, got 2017.4.28fl.
    Still cant run game due to compile errors.

    Its very disheartening for a newbie to try this and not been able to get the UNITY tutorials to work ??

    Please HELP

    The error message in the Console window;

    There are inconsistent line endings in the 'Assets/2DGamekit/Scripts/UI/InputDisplayUI.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

    There are inconsistent line endings in the 'Assets/2DGamekit/Scripts/UI/KeyUI.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

    Assets/2DGamekit/Scripts/Editor/CheckForError.cs(13,13): error CS0103: The name `File' does not exist in the current context

    Assets/2DGamekit/Scripts/Editor/CheckForError.cs(41,9): error CS0103: The name `File' does not exist in the current context

    All compiler errors have to be fixed before you can enter playmode!
    UnityEditor.SceneView:ShowCompileErrorNotification()
     
  2. elouw659

    elouw659

    Joined:
    Jun 7, 2019
    Posts:
    2
    Running on Windows 10
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,833
    These are not actual error messages. They're just warnings/suggestions. You can do what it suggests, or ignore it.

    These two are indeed error messages and actually have to be fixed. I've never used this kit though so I don't know exactly what's expected here. I would guess that it's trying to access the standard C# File class, so you just need to add

    Code (CSharp):
    1. using System.IO;
    to the top of the script.
     
    henriettagrubb3 and Joe-Censored like this.