Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Reloading Script Assemblies takes a long time, and keeps getting slower

Discussion in 'Scripting' started by ge01f, Jan 22, 2022.

  1. ChrisHandzlik

    ChrisHandzlik

    Joined:
    Dec 2, 2016
    Posts:
    198
    Cool, let me see what I can do there!
     
  2. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    159
    Any fix now? working on 2021.3 and it ltierally takes 15-20 secs to reload 5 miserable short scripts in a new project... whats going on?
     
  3. ChrisHandzlik

    ChrisHandzlik

    Joined:
    Dec 2, 2016
    Posts:
    198
    @ge01f Fast Script Reload 1.3 is out. Now includes support for newly added fields at runtime.

     
  4. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    I'll take a look in a couple weeks. Got a busy schedule at the moment. I'm hoping it can provide a good workflow though! I dont think this is a priority for Unity, so it's going to have to be fixed in a sideways manner probably.

    I went ahead and bought it now, since it's on the 50% sale. So good timing! :)
     
    Last edited: Feb 12, 2023
    ChrisHandzlik likes this.
  5. Bmco

    Bmco

    Joined:
    Mar 11, 2020
    Posts:
    36
    Using 2021.3.6f1. This worked for me. I was at 20-60 and am now back down 3-8ish. I believe it's due to the Auto-Refresh (when you click on the Editor Window). Instead, you can manually reload them (Ctlr+R).
     
    Hoorza likes this.
  6. NACER-GT

    NACER-GT

    Joined:
    Aug 10, 2021
    Posts:
    1
    I solved mine with that :
    1. Go to Project Settings > Editor.
    2. Make sure "Enter Play Mode Options is enabled".
    3. Disable Reload Domain .
     
    angelonit likes this.
  7. UNITYx21

    UNITYx21

    Joined:
    Dec 31, 2021
    Posts:
    2
    Deleting the library folder and starting the project solved the problem.
     
  8. Beshi38

    Beshi38

    Joined:
    Feb 7, 2021
    Posts:
    5
    It's witchcraft so good it works.
    Thank you!
     
  9. benruiwang

    benruiwang

    Joined:
    Apr 4, 2017
    Posts:
    7
    What did Unity 2021 do? Click the play button of the editor and wait for a few minutes, or even crash directly. Tried all the methods in this post. invalid. Back to unity2020, the problem is solved. The main engine is not well maintained, and it is useless to get a bunch of others, and you have to build a version management tool yourself. . . Are you looking down on git or something. . .
     
  10. itshipvn

    itshipvn

    Joined:
    Sep 15, 2021
    Posts:
    1
    More than 1 year and Unity Team still has not taken action to resolve this issue. What are they doing with Unity version 2021? I am working on some projects with the Unity version 2020 and 2021. All projects using 2020 version are stable but something is out of date. Thus, I upgraded to unity 2021 version and encountered this issue. My team's performance drops and all developers get tired of coding for unity 2021.
     
  11. 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 after 2018. It's time to switch to another real engine that doesn't have such basic flaws.

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

    As developer we do NOT need bunches of so called NEW features, we need a stable, fast engine.

    And, we give you the courage to add Plasctic SCM(Unity's Version Control tool like git?), you think your engineering team has a better understanding with the file system than git? it is totally a joke.
     
    RemDust and AshwinTheGammer like this.
  12. benruiwang

    benruiwang

    Joined:
    Apr 4, 2017
    Posts:
    7
    I have search and read all the suggestions, and follow their suggestions, If "Reload Domains" is disabled, it was a bit faster, but my project will freeze with no exception or warning. so I have to enable it, and take a coffee to wait the "Reloading". I have tried every combination, library directory was deleted and the whole project was reimported. nothing was changed, just Click Play, Click Stop, then click Play again, then you can have your coffee time.

    please extend my fury to your CTO. and please fire him. let him go, please.
     
    AshwinTheGammer likes this.
  13. feyyd

    feyyd

    Joined:
    Apr 23, 2014
    Posts:
    8
    This was so aggravating, 2021.3.24f1, defaults for profiler should be disabled as this is a huge productivity killer.
     
  14. daicoden

    daicoden

    Joined:
    Mar 21, 2022
    Posts:
    6
    FWIW - After using the profiling I found that the PythonEngine was taking up 62% of the time. Not sure there's anything I can do to fix this - except disable python.

    upload_2023-6-4_1-53-22.png

    Edit: and it appears that python taking so long affected other things - not sure why, but reload speed is down about 90%. Weee! Thank you profiler!
     
    Last edited: Jun 4, 2023
  15. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    66
    Alas the same problem, with every new version of unity it gets worse and worse, the editor is dying and that's a fact. This problem is one of the reasons why I want to switch from Unity to another editor