Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

The Future of Scripting in Unity

Discussion in 'Scripting' started by Qbit86, May 20, 2016.

  1. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    “The Future of Scripting in Unity” promises a lot of wonderful things, we were so long waiting for. “.NET Upgrade”, they said. “Feature development and bug fixing proceed much faster”, “will keep on leveraging the wonderful Mono Project”, they said.

    Today is precisely two years since this article was posted: May 20, 2014.
     
    rakkarage and Kiwasi like this.
  2. Schnelle

    Schnelle

    Joined:
    Jan 17, 2011
    Posts:
    89
    The biggest issue I have with il2cpp is that the editor is using Mono. So now, when I deploy to iOS and use il2cpp, I get bugs I never encountered in the editor.
     
  3. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    Uhh yeah...that year of introducing 64bit support through il2cpp was a lost year... =O
     
    Schnelle likes this.
  4. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    The biggest issue I have with il2cpp is that it prevents “.net profile upgrade”. So we cannot use up-to-date class libraries, compiler, runtime, and language syntax.
     
  5. Schnelle

    Schnelle

    Joined:
    Jan 17, 2011
    Posts:
    89
    You can actually update the compiler to use C# 6 features, but the CLR is still 2.0 so you will not get async/await type features. This also apparently fixes the foreach memory leak. https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/src

    I want to reiterate that I think it's silly that we don't have an updated runtime. I hope it actually happens now that the license restriction on Mono has been removed.
     
  6. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Schnelle likes this.
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We are actively working on integrating an updated Mono runtime. We can't say yet when it will be available, but it is in development now.

    I know it has been a long time coming (trust me, we want to use C# 6 and .NET 4.5 features in managed code running in Unity as well!), due to factor both within and outside of our control. But it will happen, thanks four your patience!
     
  8. Schnelle

    Schnelle

    Joined:
    Jan 17, 2011
    Posts:
    89
    I believe you, Josh!
     
  9. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Any news?
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @Qbit86

    Yes, actually! The updated C# compiler has just landed internally, and should be in the next 5.5 alpha build (which is currently available to a closed alpha group).

    We're going full speed ahead on the Mono runtime upgrade, both with Mono and IL2CPP. We don't have anything to release there yet, but things are starting to work internally.
     
    Qbit86 and Dave-Carlile like this.
  11. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,039
    I just noticed this. A little slip that indicates the REAL timeline? ;)
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Hah! No, just one of my normal typos.
     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,340
    Wait, so there's a chance we won't have to work around bugs that were fixed in 2009 this year?

    Woo hoo, I guess?
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @Baste

    I can't make any promises about a timeline, as we're still working on this internally, but yeah, hopefully soon.
     
  15. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Well, now in updated roadmap for 5.5: “Upgrade Mono C# compiler against our current .Net 2.0 and 2.0 Subset profiles. Note that this is an upgrade of the C# compiler only, not the full Mono runtime”

    What about async/await and it's library support (`Task` and other classes from TPL)?
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We're not planning to expose any C# features yet. Although the new compiler does support them, some other parts of the ecosystem (e.g. script updater, debugger) are not ready for C# 6 yet. We're working on updating those other tools now, but so far the plan is to ship Unity 5.5 with the existing C# 4 language support. but C# 6 and .NET 4 support is still in the works.

    If you are interested in trying the new compiler in a test build of Unity 5.3, check out this section of the forums: http://forum.unity3d.com/forums/experimental-scripting-previews.107/
     
  17. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Any ETA for 5.5? At least new compiler is still better than nothing, even if no upgrade for language/libraries/runtime. Looks like these new features will not be available this year :(
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    No we don't have an ETA for 5.5 yet. I suspect it will be out by the end of 2016, but that is just my guess, and I have no control over when it is ready.
     
  19. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    “Give us your feedback!”, says amazing video clip in recent exciting blog post.

    Unfortunately, my English vocabulary is very poor, not enough to express my emotions, when you are waiting for upgrade to modern C#/.NET for years, and official blog after all EXCITED TO ANNOUNCE NEW UBER FEATURE MEGA COOL SPLASH SCREEN!
     
    Last edited: Sep 13, 2016
  20. Trexug

    Trexug

    Joined:
    Dec 2, 2013
    Posts:
    88
    Totally agree. Unity shouldn't be fixing bugs or developing new features until they are completely done with [some particular feature I want]. I have been waiting for [amount of hours/months/years] for [some particular feature I want]! I refuse to believe that some features requires more development time than others or that the priorities of other developers are different from mine!

    Also, considering that Unity only employs one programmer and can therefore only work on one thing at a time, I can't believe they are wasting time not working on [some particular feature I want]!
     
  21. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    I didn't mention other developers, just described my frustration: the difference between expected kind of news and actual blog post. They explicitly asked for my feedback in video, so here it is. Just to prevent UniDevs being deluded that all developers share their enormous enthusiasm about delivering such “features”.
     
    alexzzzz likes this.
  22. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    There is a proverb in russian: “обещанного три года ждут”. That means literally: you have to wait for three years for what was promised. Let's check: https://unity3d.com/unity/roadmap

    2014-05-20 Announce in blog: https://blogs.unity3d.com/2014/05/20/the-future-of-scripting-in-unity/
    2016-11-30 Upgrade Mono C# compiler against our current .Net 2.0 and 2.0 Subset profiles. Note that this is an upgrade of the C# compiler only, not the full Mono runtime [and not the language]
    2017-03-?? Nothing in Unity 5.6 in roadmap
    2017-??-?? Upgrade Mono Runtime against our current .Net 2.0 and 2.0 Subset profiles. This includes many fixes and improvements, but does not include an upgrade to the .Net 4.6 profile.
    ????-??-?? Upgrade .Net profile to 4.6 enabling access to the latest .Net functionality and APIs.
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Qbit86 likes this.
  24. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    It would be great to try it on actual devices (Android, iOS), not only in Editor. I'm worrying that — despite you're saying it's almost ready to market — it is still not even in roadmap: «2017-??-?? does not include an upgrade to the .Net 4.6 profile.»

    Our company cannot afford using previews and betas for production :(
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We're hoping to ship in 2017 with a new Mono runtime and .NET 4.6 profile support, but we don't have an official announcement yet. Note that this won't make the 5.6 release of Unity, we know that. It should be ready sometime afterwards though.
     
    yasirkula likes this.
  26. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
    @JoshPeterson

    In the current runtime upgrade preview builds there is a notice:
    so I haven't even bothered checking the performance. Will the next build be different?
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @alexzzzz

    Yes, in the next preview build we'll be switch from this SGen debug mode back to Boehm, although it will be a newer Boehm than we currently ship with Mono. We're working to get everything in Unity ready for incremental, generational GC, but we're not there yet for this preview build.
     
  28. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    What about .NET Standard? Will your Mono version implement `.netstandard1.6`?
    https://forum.unity3d.com/threads/net-standard.451314/

    Offtopic: Not sure if you are already aware of authentication/session issues in forums. But it is EXTREMELY hard to post message in thread. Site constantly redirects to “You must be signed in to do that” message.
     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Yes, we're planning to support netstandard 1.6 with the initial release of Unity with .NET 4.6 support. I'm not sure that we will have a netstandard 1.6 profile selection option, but since netstandard is a proper subset of the .NET 4.6 profile, we will support it.

    I expect we will have netstandard 2.0 support as well when that is ready from the .NET Foundation side.

    Yes, I face this problem every day, and I agree, it is really annoying. I'm not sure how to handle/correct it though.
     
    TaleOf4Gamers and Qbit86 like this.
  30. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Three years, guys...
     
  31. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We're working on it still. There is a lot to do!
     
  32. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    No problem, I'm rescheduling bumping this thread at May, 20, 2018 then.

    (Well, I'd rather schedule repeating notification for every year until my retirement...)
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I'm not sure when you plan to retire, but I hope it doesn't take us that long. :)
     
    Qbit86 likes this.