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

Upgrade to 5.6 and enable c# version 6 language

Discussion in 'Getting Started' started by L_tD, Apr 2, 2017.

  1. L_tD

    L_tD

    Joined:
    Mar 8, 2017
    Posts:
    39
    Hi,

    I'm new here and using unity just a couple of weeks. I have two stupid questions, but hopefully someone can answere these.

    1) How can I upgrade fomr my UNity 5.5.2f1 to Unity 5.6? Do I have to deinstall and install? If I hit the "Check for updates" button in Unity it says everything is up-to-date.

    2) I'm trying to work with default values for properties in my c# scripts. And my VS 2015 says that I have to switch to language version 6, but I'm using version 4. If I now take a look at unity -> edit -> project settings ->player, I can only choose .net 2.0 but not .net 4.6. How can I make this available? Did not find anything about this in the forum or just was blind.

    Hopefully someone can help me.

    Thanks a lot.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    1) Just install the new version of Unity. You don't have to deinstall the previous version; you can rename it and keep it around if you like.

    2) You can't use .net 4.6 (or language version 6). Unity is stuck with an older version of Mono.
     
  3. L_tD

    L_tD

    Joined:
    Mar 8, 2017
    Posts:
    39
    Hi,

    thanks a lot. I try it. That with .net 4.6 is sad, newer c# language versions has so nice features.

    Have anice day

    best regards
     
  4. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    They are working on support for the new .NET, so it should be coming relatively soon hopefully.
     
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Unity utilizes the Mono framework to implement .NET. It's actually based on .NET 3.5 if I'm not mistaken, which is sort of a superset of .NET 2.0 with some 4.0 features.

    So you can actually use LINQ (a feature added in .NET 3.5) and build your game using the 2.0 subset setting just fine.
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,952
    Kiwasi and Dave-Carlile like this.