Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Unity C# 8 support

Discussion in 'Experimental Scripting Previews' started by Jes28, Apr 18, 2019.

  1. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    420
    Simple question is: Do Unity have plans to support C# 8. If they Do - When? :)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,136
    Yes, we do plan to support C# 8. We don't have a release date yet, although I expect our support for it will lag a bit behind Microsoft's.
     
  3. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,408
    I doubt C# 8 itself has a release date yet.
     
  4. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    420
    Ok it is good thanks :)

    Really I have just looking for undated roslyn compiler with support of C#8 so we can enable C#8 through csc.rsp and have benefits of NullableReference warnings in our project :)
     
  5. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,408
    You can play with the project I uploaded a while ago: Would the Roslyn Compiler compile C# 8.0 preview?

    It has Roslyn C# 8.0 Preview compiler integrated. If there is a version of Roslyn newer than 2.11.0.63519, I believe, you can just replace the whole Roslyn folder there with the new version.
     
    SugoiDev likes this.
  6. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    420
  7. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    Any update on the release date for C# 8 support?
     
  8. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    251
    Likely sometime in the 2020 release cycle.
     
  9. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    920
  10. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    420
    Cool.
    Waiting for Nullables support :)
    I have event prepare command to make nullables warnings to be errors :)
     
  11. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    53
    How's it looking with C# 8 in Unity, any chance it will come with 2019.3?
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,136
    No, as mentioned above, it will be in the 2020 release cycle at the earliest. We don't currently have an ETA, so it might be later.
     
    TextusGames and jGate99 like this.
  13. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    420
    May be you have plans to update C# compiler to latest released so we can adlast turn on some syntactic sugar without true support of new features?
     
    holojotto, alexzzzz, Ramobo and 2 others like this.
  14. Jorhoto

    Jorhoto

    Joined:
    May 7, 2019
    Posts:
    21
    vlads777 and OndrejP like this.
  15. Just_Max_

    Just_Max_

    Joined:
    Nov 13, 2019
    Posts:
    3
    +1, static extensions and default interface implementations are sweet ^_^
     
    OndrejP likes this.
  16. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    53
    +1
    I don't think static extensions are part of C# 8.
    But I'm waiting for default interface implementation and some minor things like readonly members and unmanaged constructed types might fit very well into DOTS.