Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

.Net 5 Preview announced.

Discussion in '2020.1 Beta' started by chrisk, Mar 17, 2020.

Thread Status:
Not open for further replies.
  1. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Hi, guys, As of yesterday, MS announced the .Net 5 previews, the singe unified version of all .Net framework, including, Mono, .NetCore, .Net framework, Xamarin and etc. It is going to be THE framework from now on and it will run everywhere.
    https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-1/

    Besides the unification, the best feature of .Net 5 is that it improves runtime performance by several factors and you can manage dlls individually. No more stupid AppDomain.Read that you have to unload/reload all dlls every time you change something.

    This is really good news for Unity as it can enable very fast compile turn-around (possibly hot-reloading as well) and it will make Unity Editor faster by few factors by simply porting it.

    I strongly believe .Net 5 is the future and Mono has served its purpose and it has to go. The faster we port, the more we save griefs.

    One of the biggest problems in Unity is that Unity Editor does not scale up to large projects and it's a constant struggle fighting with the Editor itself rather than making the game. I didn't know until starting a large scale project and I want to kill myself every day.

    Every time you compile a single line of the code, you have to unload and reload all DLLs. This can take about 30s to a minute. However, it can be avoided on the new .Net framework. Knowing this makes me really miserable. And clicking something on the Editor, you often have to have lots of patience.

    Generally, you schedule things by priority. A priority is set by two factors; how urgent and how important. I'm not sure why the porting doesn't get the highest priority. Spending 1/10 of time on DOTs, we probably have the .Net version of Editor already.

    Please don't get me wrong. I love DOTs and it's important but it's not as urgent as fixing the clunky Editor. "Performance by Default" does not apply here. And DOTS can help only the few who adopt and many projects don't even need the DOTs blessing. Worst, it won't even be PRODUCTION ready for another a couple of years, I mean the real production. Yet, it seems like Unity puts every effort on DOTS only even after 2 years of no fruition. It seems like it's holding everything down while everyone waits for it, even for Unity's internal projects. I really think Unity should put their priority straight.

    To make it short, if there is one thing I like to see in 2020 is that Unity seriously working hard to move to the new .Net framework.

    Luckily, MS is making good progress and I was very surprised that the first preview is available now.

    Here is a quote from MS.

    .Net Core 3.1 is already very capable and there is no reason to wait for the port. We can start porting to 3.1 now and by the time we complete the port, .Net 5 will be fully ready, assuming that Unity works at non-Unity pace.

    Please save yourself to help all of us by putting the porting the highest priority. If you don't agree, let us know why.

    Honestly, 2019 has been a mess, and I'm starting to think 2020 is going to be the continuation of the mess.
    You could have avoided the fiasco by putting DOTs on a separate branch. It will make us unaffected by DOTs and you can also save lots of time dealing with regression bugs.
    I don't think it's too late. Please DOTs on a separate branch so that it doesn't drag everyone down. You know we all paying for the drag unnecessarily.

    And of course, you can put .Net port on a separate branch so that it won't cause any conflicts. Only those who are on a fast track will adopt it.

    Well, I was hoping to see the .Net port announcement on this year's GDC roadmap, however, GDC has been postponed but it doesn't mean that there is no roadmap, right?

    Please share the 2020 roadmap as if you would have during GDC. I'll be looking forward to the good news.

    Thanks.
     
    Vincenzo likes this.
  2. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    835
  3. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
     
    chrisk likes this.
  4. Ramobo

    Ramobo

    Joined:
    Dec 26, 2018
    Posts:
    212
    Sure, .NET 5 is in preview, so it's understandable to not switch to it. The same can't be said for .NET Core. In any case, they should really switch to .NET Core 3.1 and .NET Standard 2.1 in 2020.2 (too late for 2020.1) and .NET 5 in 2021.1.

    Of course, they also need to deal with the stability. I wonder what's less stable, Windows 10 (not for me) or current Unity...
     
  5. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    964
    Lol.
     
  6. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    @Ramobo, Yeah, exactly. Like I said, .NetCore 3.1 is LTS and it's very capable. I'll be very happy to see .NetCore 3.1 first.
     
  7. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    I don't mean to say it's simple to port. It means "by porting alone".
     
  8. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    964
    Yes, Unity is a C++ engine that is heavily tied into the way the Mono runtime interfaces with native code. Porting to a new runtime is a very involved job. @xoofx already has prototyped a port to .NET CORE but there's a huge difference between a prototype and a runtime integrated enough to run the Unity Editor, let alone having GC that functions as intended. You know all the problems Unity has been having migrating to a new GC for years now? That will have to be fully resolved for the port you are talking about, objects referenced by native code cannot just be moved around in memory by a compacting generational GC and just pinning them wouldn't exactly be great for performance either.

    In other words, they are obviously looking at it, it's *very* difficult.
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi, due to reports we have to act on inappropriate language, please stick to facts. The topic is net 5, nothing more.
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Probably the best time to NOT make sweeping changes. Everyone is hunting stability at this point. Unity has said previously they will keep up with Net but at a slower pace. They are able to keep up now, but this is not a race. It's about stability.

    So while you can expect Unity to eventually get up to current, you should not expect it to ever be premature, slightly lagging behind is a reasonable and desired expectation with so much riding on it (everyone's projects in the Unity world right now).

    As a thoughtful user posted the link above, I will repeat it here too: https://forum.unity.com/threads/net-5-support.839890/#post-5548063

    As this is not a feature of 2020.1 Beta I am locking this thread.
     
    brunocoimbra and TJHeuvel-net like this.
Thread Status:
Not open for further replies.