Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Unity Annoying slow "Reload script assemblies" every single time

Discussion in 'Editor & General Support' started by marcelolecram, Jul 10, 2022.

  1. marcelolecram

    marcelolecram

    Joined:
    Jan 22, 2016
    Posts:
    4
    Ok, i'm getting tired of this issue. Every single change made into any project (even a new one), the simplest one as adding a new script prompts this window "Hold on - Reload Script Assemblies" from several seconds to minutes.

    It only seems to happen on unity 2021 and onwards no matter the version. It happens on NEW EMPTY PROJECTS ffs. The moment i add a new script, the moment i save changes on a script, the moment i press Play button, etc that windows interrupts the workflow.

    I have to make sure i have the Project Settings > Editor > Enter Play Mode Settings options, Reload Domain and Reload Scene disabled just to be able to play a empty scene instantly.

    In contrast a medium size project (couple of GB) i have been working on Unity 2020 LTS doesnt have any of this issues, the project opens, runs smoothly.

    I doubt it has to do with my PC specs, since my (any) projects prior Unity 2021 run perfectly.
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    Is the reason I've abandoned unity. Tried for months to figure out what is going on. had bunch of theories, some may even make sense but in the end is a lost cause. Unity is fundamentally broken. Maybe now that unity team is building an actual game they will get this issue and they will finally fix it. Maybe.

    Meanwhile I've figured out that instead of being an unpaid unity beta tester maybe I should spend my time learning a different engine and actually manage to build a game finally.

    Get out while you can. I've lost one year of invested development time. It hurts like hell. But if I would not got away at some point I would still be here complaining about the editor not working to absolutely no one that listen. Count your loses and get out of the table while you still have some resources and time to move to something else.
     
  3. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    just wanted to add that the team that was building a game was fired so that track of using unity to do stuff and find out the issues options is out of the window. meh.

    unity invest billions of dollars to purchase outdated tech then fires its workers. this explains everything.
     
    a17714375388 and OZAV like this.
  4. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    Unity always reloaded scripts and made the editor unresponsive on any scripting change until it checks and compiles all the code. It just started to show what process is making unity unresponsive with a notification box. Is it bad that unity compiles slowly? Yea. Is it bad, that we now have an indication why editor hangs? It's not. Editor can hang for a bunch of reasons. Showing this on reload and compile is just a side effect of that.

    @dorusoftware if you are done with unity why are you here?
     
    AGregori, CloudyVR and pubatlast like this.
  5. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    I've lost two years of my life behind this piece of software and that hurts. I would like to prevent other people like me getting trough the same process.

    If the engine works for you that is fine, I don't question why you are here. Why are you bothering about me pointing problems that I've had with the editor?

    What should I do? Not pointing the problems? If someone arrives that have same issues like me, then what do i have to do? Say that he is stupid and invents problems?

    I really don't get why are you bother by me being here? Please explain.
     
  6. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,129
    Because a lot of folks complain about domain reload/reload script assemblies without very much understanding what it does and why it's there. Most don't realise it's always been there and Unity now shows a pop-up at the request of user feedback. There are also options to modify the period before it shows up.

    Yes there has been notable degradation in some versions of 2021, but most of the newest versions have improved this. A lot of folks don't exactly state the hardware they're using too, and they could be running on potato's for all we know.

    Meanwhile when people ask for help, it's not productive to come in and tell them to 'get out while you can'.
     
  7. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    nope, because you didn't read the OP post. he said that a particular editor version doesn't work while other do. so is not a matter of potato computer. don't switch the blame on the user that complains. why you feel the need to do this. protect unity and any feedback is user fault?
     
  8. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,129
    :/

    I never said it was their fault. None of what I said was directed at the OP.
     
  9. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    this, here you have switched the blame on the user. but please, stop a moment and understand that things change, if the editor was great 5 years ago doesn't mean it is now. And doesn't mean it will be bad in the future. same for unreal. I'm not defending them or promoting them.

    the OP goal, my goal, your goal is to make OUR dream game. In this moment is a lost of time trying to use unity. Even unity itself abandoned making a game because it didn't work for them. more clear than this
     
    AGregori and Ruslank100 like this.
  10. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    I was just wondering what's the justification for wasting time here, if you cherish it so much. If it's about someone else's time, I don't really think 2 years is enough experience to give life-changing advices. Especially if you've spent months to figure out what happens, when you change your source code and how reload works.

    I use unity professionally for 7 years and as an enthusiast for 10. Every software has it's quirks. Pick our poison. If you are not ready to be constantly dealing with it, maybe this job is not for you.
     
    Trae_1P and elZach like this.
  11. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    why you are wasting your time with my posts?
     
  12. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,129
    Because you're wasting everyone else's time with your endless whining and conspiracies.
     
    Lee7, Trae_1P and squigglebucket like this.
  13. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    wait, are you the same guy?
     
  14. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,129
    Same guy as who/what?
     
  15. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    Look I don't want to make a scene about this, you should respect the forum rules, attack my argument in a civil manner, don't insult me. both of you.
     
    Kragh likes this.
  16. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    743

    I'm on 2022.1 and some times when i press play i'm waiting 16+ seconds. They definitely have not solved anything when it comes to load times - and i have a very small project with hardly any packages installed. Its no wonder no one makes a huge AAA title in Unity - not even Unreal is this slow at compiling for such a small project that I currently have and i my editor installed on an SSD. They have regressed massively on load times - with no end in sight on solving the problem. Not even sure they know why it regressed so much.
     
    andreiagmu and Ruslank100 like this.
  17. Mplode

    Mplode

    Joined:
    Feb 5, 2019
    Posts:
    10
    Disable Plastic if you are using it. See if that improves the times at all. If you have a project attached to Plastic, it can really mess things up if your internet is struggling.

    Also, check your Task Manager. Windows Data Execution Prevention likes to run quite often every time Unity is doing its thing. No clue how to fix it personally, I just notice it from time to time.

    Overall, I have not had any of your issues except for when my internet has gone to S*** or Plastic servers are acting up. Could be something completely unrelated.
    For my anecdotal evidence, I have 2021.3 latest LTS on three machines:
    -8 core/16thread i7-11800h with 16gb of ram
    -4core/8thread i5-10300h with 8gb of ram
    -4 core really old AMD A6 with 4gb of ram
    Top two are on NVME the bottom is on an older SSD.

    To your credit as well, 2020 was MUCH more stable.
     
  18. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    743
    No idea what this Plastic thing is that you mention.

    Though we should not have to fiddle with stuff to sort it since the engine has clearly regressed in reload times. Though i don't know how they could realistically fix it either.
     
  19. Mplode

    Mplode

    Joined:
    Feb 5, 2019
    Posts:
    10
    Plastic has been a "required upgrade" for almost six months now. It controls how your projects are managed in the cloud. Anytime you back up your projects/sync changes, it should be using Plastic which is a source control manager like Git. So, everytime you change anything, Plastic looks over your entire project structure to see if anything needs to be pushed to the cloud as a change.

    Unity migrated all projects quite a while back to Plastic.
     
  20. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    I'm quite sure you need to set this plastic thing on your side first before it works. Is this got mandatory? I don't recall. is a paid product so is opt in, not mandatory requirement

    i may be wrong, I didn't create a project in unity I think in the past two months. so maybe it is mandatory now. lol

    here is the page for more info.

    https://unity.com/products/plastic-scm

    while maybe this can be the reason if one have it installed and bad internet, all the time I've got my project messed up I never had this plastic set up. so possibility that this is the issue are low for most users.

    i really feel the pain of all the people tricked in using this engine and then hitting this bug that had been around for the past two years.

    not even unity managed to build a game because of this bug.
     
    V5Studio likes this.
  21. DifinityRelin

    DifinityRelin

    Joined:
    Aug 9, 2021
    Posts:
    6
    Despite the overwhelming amount of salt and tears in this thread, I figured I'd share what I've learned about this issue in my experimentation.

    Using 2021.3.2f1 & 2020.3.40f1 I am seeing 40+ second wait times and over a minute about 20% of the time. I tried restarting Unity, restarting the IDE, restarting Windows, adding folders to Win Defender exclusions; nothing changed anything.

    What did change something was when I disconnected the debugger. I consistently see less than 10 second wait times when the debugger isn't attached, and 30+ seconds when it's attached. I use Rider, but I am seeing this with VS as well.

    Additionally, I noticed that I am NOT seeing these wait times with a new project using the same packages and imports, but has only 1 scene and very few scripts.

    My guess is that there is some sort of syncing, indexing or extraneous evaluation going on between Unity and the debugger that's causing this wait time; but I don't really have a way to find out what, yet. I will post again if I discover the culprit.
     
    socialtrens likes this.
  22. fahall

    fahall

    Joined:
    May 19, 2019
    Posts:
    3
    Could you elaborate on what you mean by "Disconnected the debugger"?
     
    trombonaut and lattedicoco like this.
  23. fahall

    fahall

    Joined:
    May 19, 2019
    Posts:
    3
    I am not 100% certain that I've solved this issue, but I have seen some significant improvements by disabling "Reload Domain" when entering play mode. Here's a brief writeup of what I did.
     
  24. Zoser

    Zoser

    Joined:
    Oct 2, 2015
    Posts:
    3
    I used unity since 4.6 and stoped using it in unity 2018. After that I worked mostly in Unreal for work reasons. I hated the slow iteration time on Unreal. I was happy to return to work on Unity after that. But now even in empty projects it took too much time to reload the domain. Even with saves that does not change anything. The last time I used unity in 2018 or 2019 it was working really fine in that regard.
     
  25. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    I use Unity 2019 but recently started using 2021. The time it takes me to go from a change in code to playing the game in 2019 editor is maybe 15 seconds, but in Unity 2021 it takes about 35 seconds. Definitely going to stick with 2019 as much as possible ;)

    [EDIT]
    Just after posting this I noticed a very helpful post:
    After reading this now the editor enters playmode in less than one second!!

    I don't understand why does Unity add default options to make the editor hang for 20 seconds?
    I think this buggy acting options almost made me never want to use 2020 editors again.

    If I hadn't seen the post from @fahall I probably would have considered using Unreal.
     
    Last edited: Jan 17, 2023
    pstpetrov likes this.
  26. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    850
    I couldn't ever see how disabling a domain reload would not horribly break even a small project during editing, but even during the build if you have a complex enough project. For me, turning that option on is inconceivable.
    It seems it's just a feature Unity brags about, but its utility fades off once you've been using it for a while and experienced really weird things happening, "at random" you'd say.

    "Don't use static vars" - not practical, and you might still use plugins that'll break.

    If the domain reload suddenly became slow, fix it or give us the option to disable the parts that you've added which make it slow.
    We need a banana, not a gorilla holding a banana.

    If there's already a solution I'm not seeing, maybe someone can shed some light.
     
    andreiagmu likes this.
  27. eelbee

    eelbee

    Joined:
    Jun 17, 2022
    Posts:
    2
    On Unity 2021.3.21f1 - Entering playmode WITHOUT changing a single script results in a 40s wait while doing the Script Assemblies thing. This is ridiculous.

    Edit: Spoke too soon. Leaving playmode resulted in a 34s wait doing another round of Script Assemblies. While leaving playmode... With absolutely no changes happening between pressing play and stopping again. What the actual F.
     
    xucian and JasonDaze like this.
  28. benruiwang

    benruiwang

    Joined:
    Apr 4, 2017
    Posts:
    7
    Unity 2021 becoming ridicules a joke. Entering playmode WITHOUT changing anything, just hit Stop button, then hit Play button again. It needs more than 1 mintutes. event much slower than close unity then reopen it, then hit the Play button for the 1st time.
     
  29. icauroboros

    icauroboros

    Joined:
    Apr 30, 2021
    Posts:
    174
    There is no need to wait for between plays, unless there is no script change. Just enable fast play mode setting on player settings/Editor.
     
  30. benruiwang

    benruiwang

    Joined:
    Apr 4, 2017
    Posts:
    7
    The Unity Engine has a .meta file, so it knows every single file change for any files changed via the editor, but it can't determine when to recompile or reload the domains. It would NOT be helpful to have a configurable setting that allows users to manually decide when to reload by clicking the refresh button. Even if the project file was modified outside the Unity Editor, the Editor is installed on the system and therefore authorized to be informed or fetch the status of the file. The file management part of the Unity Editor has been a disaster since 2018. It's time to switch to another real Game Engine that doesn't have such basic flaws.

    Consider hiring a new CTO who has a better understanding of computer and software systems.
     
  31. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Virtually everything posted is lacking a ton info that would make it useful to anyone. Please file support tickets and make sure to provide an example. Posting practical details in this thread might help. But make sure you file tickets, that is the solution process not the forums. Also, don't pointlessly bump.
     
  32. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    ... currently, Unity's 2021+ they all hang on almost every task now, such as simple deleting of a few files from any folder. "Waiting for Unity's code to finish executing", and, at least 15 min of awaiting than, always the same. From Unity, the last stable (and indeed productive one) 2017 4+ versions - everything went sideways, and they only pretend to care, and that's it. For our vote, hoping it helps, and hoping that can be reverted to it's normal functionality AND IDENTITY as it was at the last usable version: Unity's 2017 - 4+. The point of current Unity state is obviously de-railing community form the productivity (and usability) path, as far as possible, and as someone above have said correctly - from Unity engine in general, and from what Unity used to be: useful :).
     
  33. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,123
    there is an ancient open thread (that got nowhere) for this issue.

    https://forum.unity.com/threads/editor-progress-bar-stalls-request-for-bug-reports.1137817/

    no need to post here details.
     
  34. NieTrawisz

    NieTrawisz

    Joined:
    Jan 21, 2016
    Posts:
    1
    I found a solution that in my case speeded up reload assemblies 5x. I enabled parallel import and set the import worker count to 50%. The second thing I did was to reduce the number of .csproj files by going to Preferences->External Tools and selecting only the top 2 options. unity external tools.png
     
    xucian and andreiagmu like this.