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.
  2. Dismiss Notice

Why isnt Monodevlop supporting var

Discussion in 'Scripting' started by Kevin_OBrien, Feb 18, 2015.

  1. Kevin_OBrien

    Kevin_OBrien

    Joined:
    Feb 18, 2015
    Posts:
    14
    Whenever i type var into the code it doesn't turn blue it stays grey.There's no completions for var when i search for it .Sorry if this is a stupid question but on all the videos I've watched it turned blue.Does it even matter if it turns blue or am i just missing something.Whenever i press f8 nothing happens in unity.Again I'm sorry if this is a stupid question I'm only been coding for a few hours so I'm an absolute beginner.I included a screenshot of my code please explain to me where I'm going wrong.
     

    Attached Files:

  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    You're writing UnityScript in a C# file (note the .cs extension)
     
    AlucardJay and Dantus like this.
  3. Kevin_OBrien

    Kevin_OBrien

    Joined:
    Feb 18, 2015
    Posts:
    14
    Thanks a million Tutorial i was watching never told me to create a Javascript file.