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

Does unity support c# 5.0?

Discussion in 'Scripting' started by leegod, Sep 26, 2014.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,321
    as title.
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  3. BmxGrilled

    BmxGrilled

    Joined:
    Jan 27, 2014
    Posts:
    238
    Unity only supports a Mono version of C# for compatibility across different platforms and OS. The highest "equivelant" version to C# mono currently supports inside unity is 2.0. I hope this makes sense! :)
     
  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Auntie google knows the exact answer :)

    http://lmgtfy.com/?q=unity .net version
    http://lmgtfy.com/?q=unity c# version

    I am consciously not giving detailed information when using google for one minute would already give the correct answer.
     
  5. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,321
    then how about .net 4.5?
     
  6. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    No
     
  7. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    Mono 2.0, from what I understand, is the equivalent of .NET 3.5, and are fully compatible with each other. For example, Linq is a 3.5 features and works fine in Unity.
     
  8. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
  9. BmxGrilled

    BmxGrilled

    Joined:
    Jan 27, 2014
    Posts:
    238
    I stand corrected, I assumed mono 2.0 = dotNet 2.0, I don't really delve that deep into multi platform specifics since I mostly develop for windows desktops. Useful to know I've been holding back performance optimisations -_- lol
     
  10. Rangoric

    Rangoric

    Joined:
    Aug 17, 2014
    Posts:
    12
    ".Net 3.5" actually runs on 2.0, it's mostly compiler/language improvements and extensions, not real .Net changes.

    .Net 3.5 basically just installs some libraries. .Net 4 is actually the next new version of .Net, and 4.5 has breaking changes so is also a new version.