Search Unity

What is happening with this alpha...

Discussion in '2022.1 Alpha' started by KamilDA, Sep 7, 2021.

  1. KamilDA

    KamilDA

    Joined:
    May 21, 2020
    Posts:
    183
    Edit: Domain reload is always disabled. False alarm everyone, the editor performance boost is a 'bug'.

    I just tested the latest alpha...
    • Instant enter play-mode, exit play-mode
    • Code compiles 2x faster
    • All my 2021.2 breaking issues have been fixed
    • Editor install is 1GB smaller
    • My project builds are now 10% smaller
     
    Last edited: Sep 14, 2021
    Thygrrr, phobos2077, Grizmu and 22 others like this.
  2. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    657
    I was actually gonna say the same thing...how did this happen!
     
  3. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    391
    Smells like the 2021.2 is ripe for release
     
    newguy123, GliderGuy, KamilDA and 3 others like this.
  4. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    368
    At first I thought that they simply disabled the domain reload options by default for new projects, but nope, entering the play mode actually got significantly faster.

    Ahh, the memories of using 4.6 so many years ago...
     
    Last edited: Sep 7, 2021
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,087
    I hope he has not downgraded accidentally.
     
    starikcetin and Ruchir like this.
  6. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    705
    Finally it feels like I am focusing on making my prototype instead of debugging to report bugs slowing down iteration :)

    With domain reload disabled, play-mode is almost instantaneous now :eek:
     
  7. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    1,089
    Amazing! The only breaking change for me was for local testing only, the "Allow downloads over HTTP" in Player Settings->Other, which is set to "Not allowed" by default. A good addition though - and easily overcome in your build process by adding something akin to this (where "local" would be however you're defining that):
    Code (CSharp):
    1. #if UNITY_2022_1_OR_NEWER
    2.   PlayerSettings.insecureHttpOption = local ? InsecureHttpOption.AlwaysAllowed : InsecureHttpOption.NotAllowed;
    3. #endif
    ..and this was only necessary for me because I don't have SSL set up for my local web server :D
     
  8. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    560
    Is domain reload just disabled now per default?
    Are statics variables correctly initialized?
     
  9. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    368
    Nothing has changed about default domain options. Like with the previous versions of Unity, the options are not used by default, meaning that domain and scene reloads are performed when entering and exiting the play mode.
     
  10. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    1,089
    Another upgrade issue that I faced (now solved) was related to optimizations that were made to the physics system. Anywhere that I was setting an object's transform.position or .rotation where it had a Rigidbody component attached had to be changed to be moved or rotated [properly] by using rb.MovePosition and rb.MoveRotation.

    The glass is half full of doing things the right way :D
     
    gasppol and Ruchir like this.
  11. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    106
    Is it april again already? plz don't make me reimport my project just for the fun of it :p
     
  12. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    201


    Please if Unity fixes the Editor bottlenecks that are since 2020.X, it will be a dream
     
  13. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    422
    Certainly just a bug o_O
     
  14. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    187
    I mean, there is that one ticket in the issuetracker relating to domain reload times, so theyre certainly keeping and eye out for this issue since the 2020.x versions. As for how this version is quicker despite the ticket still being active, no idea. But props to the hardworking folks there improving the iteration times!
     
    Kolyasisan and Ruchir like this.
  15. MasoInar

    MasoInar

    Joined:
    Feb 20, 2014
    Posts:
    121
    I tested it too and yes, code compilation is very fast and editor feels very snappy. Unfortunately play mode is very glitchy. Even moving just 2d sprite has problems. I'm using Apple Silicon preview editor version though. I also tried to set vsync on in game view, but it doesn't seem to do anything.
    unity-alpha-glitchy-movement.gif
     
    Lars-Steenhoff and GliderGuy like this.
  16. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    705
    Even I noticed this when using an HDRP project (on windows though)
     
  17. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    292
    What is roadmap and goals for HDRP 13 in 2022.1?
     
  18. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,283
    1 second slower than 2020.1.17 on a fat old project. not bad.
     
  19. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    717
    Ill make a guess: try to disable incremental GC.
     
  20. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    705
    My project startup time decreased from 40 sec to under 15 sec somehow :eek:
     
    phobos2077 and richardkettlewell like this.
  21. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    136
    Something is definitely broken for me. My game loads incredibly fast, but doesn't initialize correctly. Domain reload was off when I checked. Enabling it doesn't change any behavior. I guess it's simply always disabled.
     
  22. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    657
    My 300gb project used to freeze for no real reason (nothing on the profiler, or logs) just random freeze. But now, it is gone...like magic...

    I have to agree that this has to be a bug...like broken clocks being correct twice a day.
    I mean...how did this happen? hahahahaha!
     
  23. EagleG

    EagleG

    Joined:
    Mar 17, 2018
    Posts:
    105
    The last few 2021.2 beta and 2022.1 alpha versions have lots of performance improvements in the release notes... May be that's the reason for this?!!
     
  24. KamilDA

    KamilDA

    Joined:
    May 21, 2020
    Posts:
    183
    My experience is coming from 2021.1 -> 2021.2 -> 2022.1. This alpha is the first time I felt confortable using a version to finish my project. Which is very scary (& ironic) considering it's an alpha.

    FYI; Using WebGL + UI Toolkit a lot.
     
    phobos2077 likes this.
  25. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    187
    The best part of using alphas and betas is that if a bug does arise, the fix time is within weeks rather than months or never with LTS. I'd recommend you to use these versions anyways as theyre a lot stabler than past ones anyways.
     
    Last edited: Sep 11, 2021
    mishakozlov74, phobos2077 and KamilDA like this.
  26. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    1,089
    Yeah, 2022 is definitely looking good. In my case also based on WebGL, coming up through most alphas and betas (and having started at 2019.something). I have a few minor issues in my project but they're unrelated to the editor upgrades. I believe it was @hippocoder that said it best - the problem is between chair and keyboard :p
     
    phobos2077 and Ruchir like this.
  27. gasppol

    gasppol

    Joined:
    Feb 16, 2020
    Posts:
    26
    So far, it is a great update! Still no thumbnails on the Project View, but it is an open issue, so ok with that.

    Also, about moving Kinematic Rigidbodies:

    I think, it only applies to Kinematic RB with Interpolation other than None (ie: inter and extrapolate). Now, in order to handle right interpolations, we must use the Rigidbody method .MovePosition instead of changing transform properties. Seems very logical to me.
     
  28. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,989
    That's usually my own problem to be fair! Unity does have their own issues with stability but ultimately the good god of compromise can steer most if not all projects to completion.
     
    phobos2077 and polemical like this.
  29. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    136
    I tested it again and domain reload is simply always disabled (even if I enable it).
    First time my game starts fine, but on subsequent starts it doesn't (due to stuff not being cleared). I have to restart the editor to clear stuff.
     
  30. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,989
    An improvement would be.... perhaps it's time we just enhanced the disabled option? - all Unity really needs to do is track what's not reset as a bunch of optional warnings. Then we can address it and have zippy play modes, right? Win-win.

    Is this not possible?
     
  31. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    106
    For a at least some of us, nope, not possible since some libraries (grpc for example) seem to have static initializations or something that depend on a full domain reload to work between play sessions.
     
    Prodigga and phobos2077 like this.
  32. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    187
    Then we could mark assemblies based on asmdefs as requiring a full domain reload.
     
  33. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    368
    Way to ruin the hope, I suppose. Guess we'll see some familiar slowdown once this'll get fixed.
     
  34. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,283
    They're getting sneakier every year :D
     
  35. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    705
    It's working for me though :D
     
    Last edited: Sep 11, 2021
  36. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    201
    So, You are telling me snappy fast Editor is a bug ?
     
  37. KamilDA

    KamilDA

    Joined:
    May 21, 2020
    Posts:
    183
    Edited the original post to include that so not to confuse people and make them switch with high hopes.
     
  38. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,569
    Is that confirmed?

    If you put this script in a scene:

    Code (csharp):
    1. private static int reloads;
    2.  
    3. void Awake() {
    4.     Debug.Log($"There have been {reloads++} reloads!");
    5. }
    Does that increment for each enter play mode even with fast enter play mode off?
     
  39. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    705
    For me it's always 1 (or zero depending on whether I do reloads++ or ++reloads), although it doesn't get reset when exiting the play mode. (I don't remember if domain was reloaded on exiting play mode as well in older version)
     
  40. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    290
    Just tried it, yes it increments regardless of any settings.
     
  41. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,749
    We'd really appreciate a bug report(s) with a reproducible for this if possible. Our test projects don't show this issue so this seems to be something project specific.
     
    stuksgens and Andresmonte like this.
  42. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    106

    Its happening for me too now (not before) on old and new projects.
    Really really weird, seems like something triggers something else at system level and makes domains not reload anymore. I'll check if a reboot does something and update this post.

    Update: noup, a system reboot changes nothing. (Which is a good sign actually)


    Maybe it was always happening in my active project but I didn't notice because code changes do trigger a reload.

    Meanwhile, I reported it as (Case 1365789) Domain fails to reload.

    Video in case no one is able to reproduce it. (I'm not crazy, yet)


     
    Last edited: Sep 16, 2021
    LeonhardP and Prodigga like this.
  43. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    297
    The problem with these things is, they're reproducible in all my machines (very different ones! All four of them) but I submit a project and the bug report is discarded with "cannot reproduce". (I have a bug with favourites disappearing after left click and this has persisted since Unity 2020.1 alpha and I intend to file another bug report for 2022 alpha but I'm really tired at this point.)

    Maybe the sandboxes you run these repros in aren't close enough to what's actually on users' desktops.
     
    Last edited: Sep 16, 2021
  44. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    422
    Do you use tools/programs/plugins that are installed on all 4 machines? If that is the case and one of these programs is the trigger of the errors, then it is difficult to reproduce something like that.
    I've had something like this with a customer where I couldn't reproduce the problems, and in the end it was due to a problem in the customer's network.
     
  45. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    187
    This is the one bug id be happy to live with, its a nice bug. Perhaps fix the bug but have a checkbox to enable this amazing bug? (as a programmer I have no issue with managing the variables between domain reloads)

    On a serious note, this is probably a taste of what would need be done when Unity starts supporting NET 5/6 due how assembly reloads work there.
     
  46. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    106
    That option exists since, well almost a couple years ago. U can see it the videos I posted above.
     
    Thygrrr likes this.
  47. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    297
    Yes I suspect it but the machines are really different - work laptops, gaming rig, living room PC... I'll try to find the common elements again.
     
  48. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    136
    Just tested that and it increments every time I enter play mode. I even tried every option and turning it on and off again, but same result. Nothing gets reloaded.

    I then made a fresh project with v8 and the script from above. Same result.

    Reported as a bug.
     
    LeonhardP likes this.
  49. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,749
    Thanks, could you please share the issue ID here?
     
  50. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    187
    Im not referring to the enter on play mode, im referring to the iteration times during play.
     
unityunity