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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Official Improving iteration time on C# script changes

Discussion in 'Scripting' started by xoofx, Oct 18, 2021.

  1. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    409
    How is this normal? :D

    Capture.JPG
     
    Lahcene and TigerHix like this.
  2. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    I found a better more elegant solution without having to make a separate minimalistic project and it's great ! but make sure to backup your proj and apply it on the copy.
    The answer is define symbols & conditional compilation.
    I managed to reduce my iteration time from ~9.6s to ~7.7s that's almost 2 secs but unfortunately that's the lowest I could get, it seems capped to that time in my particular project.
    So you could disable the features that aren't vital or you don't need when working on other aspects and free up some iteration time..
    As for enter playmode it takes < 1 sec by simply making a testing box scene with bare minimum content.

    Basically put your big dependencies/3rd party in separate asmdefs and add define constraints to the asmdef files then you can enable and disable chunks of your codebase which causes the assembly to not be generated and as you reduce the count of these the reload will naturally decrease.
    The define constraint symbols are added in Project Settings > Player.
    A simple way to disable an asmdef is by adding a character to the define constraint symbol (e.g FEATUREX to enable an asmdef and add "!" to it FEATUREX! to disable, I put it the "!" on the right to be more visible).

    Once you disable an asmdef and if you have a loose enough coupling to it in your code you can just wrap the parts of code that throw errors with
    #if #end
    .
    It took me only about a 1 day & half to properly disable practically all of my 3rd party plugins with exception of few ones that I kept cuz they have no significant impact on reload.
    I wish I could reduce it to ~5s but it is what it is, the rest is either caused by my code which I doubt due to its size & nature being much less than most of the individual 3rd party systems I disabled, or by Unity's internals.
    Edit: I did test the 3D gamekit and iteration time is ~5.55s there despite how many packages it has so I guess it is from my code which unfortunately is harder to split further into asmdefs.

    The good thing is that you don't lose the excluded scripts' components, they just remain disabled.
    The bad thing is that they prevent you from saving a prefab when you make changes cuz Unity demands that you "fix the missing components" first so you have to renable the asmdef. Also for unknown reason I did lose some data linked to visual scripting components but was able to restore it from my backup that's why you have to make sure to have backups.

    I hope other ppl read this cuz it can help if it's applicable to their project as they may reduce their iteration time even more than I did depending on their case.
    Always backup first regardless !
     
    Last edited: Jul 2, 2022
    sameng likes this.
  3. RobertOne

    RobertOne

    Joined:
    Feb 5, 2014
    Posts:
    205
    palla-deserto.gif

    well, at least you tried. thats honorable
     
    DavidJares and Lahcene like this.
  4. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    In recent years I have felt Unity (the company) has lost the focus on fundamentals of a 3D engine. The rendering pipelines (emphasis on plural) are still disjointed, network support is hovering between deprecated old and unfinished new stacks, and (as this thread has abundantly documented) editor performance on project iteration is seriously impaired. We don't need the new features that accrue from acquisitions and mergers. We need an engine and development environment that work reliably and efficiently. If anything, my impression (admittedly, from the outside of the company) is that assimilating the new features from mergers/acquisitions is distracting or siphoning Unity's best talent from fundamental engine improvements.

    With respect to the topic of this thread, I came here looking for a solution to an archviz project of modest scope (just a single-story small office with about a 100 meter square terrain outside) that takes 4 to 5 minutes of loading time now that I've "upgraded" {ahem!} it from Unity 2020.x to 2021.x and thence (hoping for improvement) to 2022.1.9. During the "stuck" loading time, my 12-core CPU and 64 GB of RAM are only fractionally utilized, and the project and Unity software both reside on high-quality NVMe SSDs. What is it doing that takes so long? (Rhetorical question)
     
  5. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    Can anyone please make a backup of their project (code only) and test it on Unity 2022.2b since they claim to have improved reload time by 8-22% ?
    I had 0 % difference unless I disable Roslyn analyzers which for some reason makes all script files unusable... This behavior doesn't occur on prior versions to 2022.2.
    I made a bug report and 2 threads with 0 answers for over a month and it really frustrates me a lot considering the importance of iteration time.
    Let me know of the result.
     
    Last edited: Jul 19, 2022
    Lahcene likes this.
  6. RobertOne

    RobertOne

    Joined:
    Feb 5, 2014
    Posts:
    205
    updated a medium HDRP project from 2020LTS to 2022.2b - So far I had compile times of roughly 5 seconds, now 8 seconds on 2022. so i cant say things improved. yes, i deleted the library folder

    also, in the Unity 2022.2.0 Alpha 1X release notes, under "known issues" you could always see:
    Asset - Database: The creating and import of a new script in Editor became really slow in trunk (UUM-2620)

    why has this been removed in the Unity 2022.2.0 Beta release notes without a fix?

    I was always stalking the release notes if this might have been fixed and was happy when i couldnt see it anymore in the 22.2 beta notes
     
    Last edited: Jul 20, 2022
  7. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    I also noticed the time difference for new scripts the moment I jumped from 2020 LTS to 2022.
    In the tracker it still says active at least.

    Had the same sentiment about script asm reload times when they removed the issue from the release notes only to later find it's been marked as postponed.

    My current script change iteration time is about 9~11s after personal optimizations which is better than the previously 17-30s + ~28s for enter playmode without domain reload (enter playmode in minimal scene is ~1s now) but still annoying considering I have less than 200 cs files in the project which is bound to increase as the project grows.
     
  8. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Since i got told creating a empty project and measure the compile times don't reflect any real life usage
    I just updated my current project to all mayor 20X versions.

    project detail:
    - HDRP, yes i am using asmdefs, I estimate around 200-300 scripts.
    - deleted the library and temp folder before upgrading
    - made sure the game works and starts.
    - project size: 25GB, asset folder: 8,6GB, 23k files
    - Windows 10, i9 i9 9900k, 32GB DDR4 Ram, Samsung 980 Pro NVME SSD, 2080Ti
    - 8 packages installed:

    PackageCapture.PNG

    for the test i simply duplicated this line, hit save while the scene view is open with the main scene:
    rb.AddForce(transform.forward * force, ForceMode.Impulse);

    2020.3.30 LTS:
    skate_compile_times_2020_3_30.PNG

    2021.3.6 LTS
    skate_compile_times_2021_3_6.PNG :

    2022.2.0b1
    skate_compile_times_2022_2_0b1.PNG


    So it gets better, but there is no way i will use any version beyond 2020 LTS.

    Its not just that the scipt change takes 2 seconds longer, that's not really the mayor bummer, but everythiing just takes longer. Like the most curios thing is that when i close 2020, it closes right away - but i have no idea what's going on in 21/22 but the engine stays open for a while - hold on, busy popup, and then decides to close after a few seconds and in general the infamous popup shows up way more often in 21/22 then in 20
     
    Last edited: Jul 21, 2022
  9. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    4.4s is a great iteration time, there's no reason to fidget with the editor for that. I wish I could bring it down to that but so far seems not practically possible.
    On the other hand you have faster import and build times and apparently more responsive editor when selecting/dealing with a high GameObjects count in the scene in 2022.

    You also have some out of preview packages and if you need the native recorder you can finally set a custom bitrate in the currently latest preview versions which is an important point for me.
     
  10. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    48
    Because they have no backbone and sold their roots and souls.
     
    akuno likes this.
  11. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    48
    To the Unity-Devs: You are no pioneers at all any more. Just like politicians, you degraded yourselves to puppets.
     
  12. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    48
    By the way -
    Today I backported my project from 2021.3.3f1 to 2020.3.37f1 -> total time after changing a script to being in gamemode went from 20-30s down to ~15s.
    Then I backported to 2019.4.40f1 and now the total time dropped even further to <10s.
    No headaches anymore and I can finally start finishing my project. F* that, I can happily live with 2019, although of course I enjoyed some of the newer features, they are not worth it at the end of the day if they stop me from making progress. As a developer I am able to find workarounds if necessary to compensate for newer features that are missing.
     
  13. RobertOne

    RobertOne

    Joined:
    Feb 5, 2014
    Posts:
    205
    even just dragging the editor to another display triggers a "Reload Script Assemblies" popup now... why?

    ezgif-5-0c1935e06a.gif
     
    Threepwood, ujz, florianBrn and 9 others like this.
  14. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    185
    @RobertOne with next unity update there will be a "notice": don't breath, unless you want to reload a domain / scripting assemblies.

    Oh my god - Dear Mr John Riccitiello - are you even aware of what we're dealing here with, to make a use of your product (you got gainz from this)?

    I think like people making decisions in this regard didn't have a afterthought - cool, we're moving stuff to C# and etc. etc., but... maybe...just maybe... people will NOTICE a reloading times going up times and times more since 2019?...

    I understand all the tech and reasoning behind, I understand it's complicated process that takes time, but for gods sake: do you people at Unity think about customer, like at all?

    Why I am saying this, is because it already happened on course of human civilization when one introduces a feature which makes life of current customers worse, until you get it right and people would experience ultimate benefit.

    This is why in such instances you provide your customers with additional measures, to deal with this downgraded experience for the time being. For example more manual control over what is taken into account while reloading / preparing to entering Play mode. Like you can check / uncheck asm defs or whatever to be included / excluded from the reload. So you can iterate part of the code quicker, get it right, then fall back to default reload ALL behaviour and hand it over other to the next people working on the project.
     
    Lahcene and sameng like this.
  15. oscarAbraham

    oscarAbraham

    Joined:
    Jan 7, 2013
    Posts:
    216
    Was Unity focused before dragging the window?
     
    stonstad likes this.
  16. Lahcene

    Lahcene

    Joined:
    Jun 18, 2013
    Posts:
    30
    Okay, this is getting out of hand... See you guys in 2025 when CoreCLR is finally imlpemented.
     
    Last edited: Aug 1, 2022
    kloot, DavidJares and akuno like this.
  17. RobertOne

    RobertOne

    Joined:
    Feb 5, 2014
    Posts:
    205
    yes
     
  18. oscarAbraham

    oscarAbraham

    Joined:
    Jan 7, 2013
    Posts:
    216
    Hm, that sounds like a bug to me then. I've tried to replicate but I can't. Maybe it's something to do with different resolutions? Do the monitors have different pixel densities?
     
  19. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    Can you guys please participate in the poll so at least the people at UT know whether whatever improvements they've made did work or not for the majority of users?
     
    kloot, Lahcene and DragonCoder like this.
  20. maxter23

    maxter23

    Joined:
    Oct 29, 2014
    Posts:
    8
    Unity 2019.x, 2020.x, 2021.x, 2022.x all were slow on my home Windows PC but worked great on my office Windows PC.

    By slow I mean that empty freshly created project with one script in it took 15 second for Unity to process the change to a script ("Hold on" "Reload Scripting Assemblies") and 10 more seconds after pressing Play button to actually enter Play mode.

    HERE IS HOW I FIXED THIS ISSUE:

    My office Windows PC System Language was to English US and my home PC was set to Ukrainian.
    By setting your Windows System language to English US the issue is gone.

    Unity team, can you confirm reproducing this bug with any other non-English language setting?
     
  21. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    My system is set in french language and I don't have that issue.
     
  22. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    Meanwhile John's friends at some hedge fond shorted the stock like crazy.
     
    DavidJares and Lahcene like this.
  23. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    409
    What the F is all this - I know this may not be related, but I've never waited around for a piece of software as much as this version of Unity. It takes 20 - 30 minutes every morning for everyone to start the project, I'm getting this now, we don't even use a Cacheserver to my knowledge. I'm not moaning, but I'm getting tired of making excuses for the 'hold on' messages in Unity when someone asks for an update, I just want to start work!

    upload_2022-8-16_11-39-16.png
     
    Lahcene likes this.
  24. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    I respectfully disagree with this. As you've seen in my earlier post, I'm concerned about the corporate focus of Unity and am experiencing significant problems with core functionality. But the developers don't make decisions about corporate acquisitions or the allocation of people and funding to strategic projects. Those are executive decisions, and the developers have to work within the boundaries set by executive leadership.

    Through over 35 years as a computer engineer in industrial, IT, and 3D industries, I've found that almost without exception everyone wants to be proud of their work and to be respected for its quality. The Unity developers are dedicated professionals trying to do their best amid a shifting executive focus. Even the executives, who are making decisions that I find questionable, are intending to benefit the company. They, however, are incentivized on shareholder return and fiscal priorities, not directly on the quality of the engine code. People will deliver the results for which they are rewarded.

    Where I think Unity has gone astray is that the executives underestimate the resources required to assimilate new technology partnerships so customers can effectively and seamlessly deploy them in projects. The acquisitions are expensive, so naturally the fiscally-driven executives prioritize this integration so they can see a return on these large investments. Issues like editor performance and disjointed rendering or network features are a long-term problem but don't impact the bottom line immediately, so they are pushed further down the timeline.

    My opinion is that both developers and executives at Unity are well-intentioned professionals, but they have different priorities, and the corporate hierarchy almost guarantees that when priorities conflict, the executive priority will prevail. The developers, in all likelihood, are struggling to deliver engine improvements but are simply stretched too thin.
     
    fjolne, NotaNaN, Alic and 3 others like this.
  25. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    409
    ^ I agree with that, Unity is still great, I can't imagine the amount of work that goes into it and developer's skills, the puppets thing was a little bit harsh!
     
    syscrusher likes this.
  26. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    If they can't improve the reload time perhaps can they at least make the process async so it is merged with the enter playmode time or even let it finish during the first few secs once that mode is running ?
    Or let us choose which assemblies or parts of are reloaded ? Like give us some options please :(

    According to this poll pretty much none of us seen any improvement in the 2022.2b despite the changelog claims.
    I wish I could have 4 secs of total iteration time that'd be such awesome work experience..
     
    Erdjei, Lahcene and kloot like this.
  27. AlexRoseGames

    AlexRoseGames

    Joined:
    Jul 13, 2015
    Posts:
    24
    I've been on unity since 3.2 in 2011. I refused to update past unity 2018 on my own projects for many years (I would rather upgrade the project 4 major revisions just before launch than deal with this absolutely unworkable environment), honestly even going to 2018 from 5 was painful

    Nowadays I HAVE to use 2021 etc. for my job. I have been convincing all my clients to switch to Unreal because I can't deal with this anymore. I used to be a free evangelist for Unity but now they do not give a single solitary s**t about devs. How are you supposed to make games when you have console recompile times on basic development? There is no such thing as rapid iteration, if you're writing complicated low level systems where you need a lot of testing and debugging it's just impossible, I have to write code in blank projects in unity 5 and then move the scripts over because modern unity is completely unusable.

    Cannot wait until I'm good enough at Unreal that I never have to touch this engine again, it's absolutely dead and the devs don't care an iota. We said for years "hey unity, try making a game", it's clear no one on the team uses this editor at all because otherwise they would know it isn't even basically functional anymore. I'm just tired. I can deal with the dumb top down decisions like questionable mergers, questionable direction, I can put up with working around new half baked features, but I can't work with an engine that can't recompile on time. I lose hours of work a day.

    I stayed blindly loyal for a decade, but after 11 years I am jumping ship permanently as soon as possible and I'm going to take every studio I can with me over to unreal and just start refusing unity work

    even as close as 1 year ago you can see me tweeting that I still love unity unconditionally:

    https://twitter.com/AlexRoseGames/status/1378130026198093827

    but in the past year they have completely lost a decade long customer. how can I use an engine that doesn't work?
     
    Threepwood, Erdjei, Lahcene and 2 others like this.
  28. AlexRoseGames

    AlexRoseGames

    Joined:
    Jul 13, 2015
    Posts:
    24
    I've just tweeted about this as well and I'm not the only one I know who appears to be leaving unity for good because of this

    https://twitter.com/callumtw/status/1559854116507197440

    https://twitter.com/SimoRoth/status/1559848223170338816

    https://twitter.com/fiets38/status/1559845018122309633

    https://twitter.com/shahidkamal/status/1559844981602402304

    These are devs I have known for years, lots of us are newschool devs who have only ever known used Unity. It's been my entire career. But we can't work with a game engine that doesn't work anymore. Callum put it best

    You don't seem to understand that the difference between a 5 second compile and a 30 second compile is a difference between 3 hours of work achieved a day and 7 hours of work achieved a day. The last good version of unity is now deprecated for console dev. I can't hold onto the stable builds anymore, the only thing I can do is move to Unreal and take as many clients as I can with me, and since I'm a senior dev and most of my clients are auters who don't really care about their engine as long as they can achieve their vision, most clients have absolutely zero preference on engine as long as they're confident the team can get stuff done. And I'm no longer confident about shipping unity games
     
    Threepwood, NotaNaN, Alic and 7 others like this.
  29. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    409
    I don't want to derail this thread, but I don't think you can balance a compile glitch to over 15 years of contributing to game development - I can't see many people leaving Unity over this, I love Unity and this doesn't change anything to me honest. I've worked on four published games in it and it's always been nice experience.
    I worked on Unreal a couple of years ago and the amount of wait times with compiling shaders etc in that on a biggish project makes this look like nothing.

    Does everyone get the 'mousedown' and application tick thing a lot, stuff that seemingly shouldn't take 20 seconds to process?
     
    Alic likes this.
  30. AlexRoseGames

    AlexRoseGames

    Joined:
    Jul 13, 2015
    Posts:
    24
    As I said, I have been a loyal Unity dev since 2011, but there's no reason whatsoever for me to keep working with Unity as soon as the product becomes unusable. It's irrelevant how much good work they did over 15 year if the entire future of the product is doomed. I am a console developer, I can't just park on 2019 forever as I have been doing for game jams and prototypes, we are forced to update to the latest version of the SDK which are only supported by the newer versions. I have now been forced onto these broken versions of Unity that fundamentally do not work and I won't continue to use Unity, because why would I tolerate a broken tool?

    I think you think this is just some minor inconvenience. You are vastly underestimating the scope of this problem. It is not some small little ignorable bug. I would say this "bug" (aka severe teamwide fundamental architectural flaw) is responsible for probably a 50% productivity drop in my workflow. That's completely unacceptable. Unreal has blueprints for when you need to rapid prototype and with source code access there's ways I can more trivially speed up compilation to acceptable speeds, and hot reload is already faster than Unity dev now in my experience

    And.. as I said, I'm not the only one leaving, just after I tweeted my complaint I got replies from 5 other long term unity devs who I've known for 7+ years who are also leaving Unity on account of these reassembly times, it's destroyed the only saving grace Unity still held over its competitors in a landscape where it's been trying its hardest to become irrelevant for several years now. The fact this problem has been allowed to go on for years and hasn't been solved shows this is a deadend engine, the mergers etc. are just icing on the cake

    I started a discord a couple of months ago just for my close circle of friends for unity devs learning unreal, through word of mouth alone we have 300 active members, all unity vets who are in the process of learning a new engine because we are all fed up and are leaving. I will continue to use unity just to maintain my current earnings but as soon as my unreal is up to par with my unity I'm never looking back and I'm far from the only one. I've been able to put up with a lot over the years. changing torque in unity 3.6. removing oncollisionexit2d's ability to output a normal in unity 2018, some things that have really negatively affected my products mid development cycle - even engine failures that made us fail xbox certification. but I can't work with an engine that won't even let me develop. I'm done

    here's another tweet as well I got, another longterm unity dev with several shipped console titles moving off of unity because of this

    https://twitter.com/TomNullpointer/status/1559937741772701698
    https://twitter.com/TomNullpointer/status/1559937067643174917
     
    Last edited: Aug 17, 2022
    Erdjei, Alic and Lahcene like this.
  31. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    409
    Fair enough, have fun with Unreal's zero wait times.
     
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,082
    same here, sticking with 2019 still : / constant popups and delays break the flow..

    btw. just saw this
    https://twitter.com/s4schoener/status/1560183697550282759
     
    Alic and graskovi like this.
  33. AlexRoseGames

    AlexRoseGames

    Joined:
    Jul 13, 2015
    Posts:
    24
    No one claimed unreal wait times are zero, but Unity used to kill Unreal on compilation times. Now Unreal hot reload is faster than Unity assembly reloading and blueprints obviously kill Unity. A full engine rebuild takes a while but at the point where I'm already waiting 40 seconds for unity to update 1 line of code, waiting a minute for an engine rebuild is no bigger of a time waste, once you cross the threshold for how long you can reasonably sit and stare at a monitor without alt tabbing away or picking up your phone, it really makes no difference if it's 40 seconds or 60

    Unreal already kills Unity in most aspects, the thing Unity had going for it was rapid dev, now it's lost that benefit so there is pretty much no reason other than C# being easier than C++ to pick unity over unreal
     
    stonstad and Lahcene like this.
  34. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    108
    To create a default 2D project, it takes 15ms to compile a single script. Why? Unity version 2021.3.8
     
  35. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    399
    Do you mean 15 milliseconds or seconds?
     
  36. graskovi

    graskovi

    Joined:
    May 28, 2016
    Posts:
    12
    Looks like there's a new section for editor performance on Unity's Platform Roadmap site, the "Optimize code editing workflows" seems like the most important card as I'm sure other people here will agree, I've voted for it in the hopes that Unity will prioritize it in the 2023 cycle.
     
  37. TangerineDev

    TangerineDev

    Joined:
    Sep 28, 2020
    Posts:
    38
    Bro, you know Unity is just gonna mark that done after 3 months, even though the editor is getting worse...

    Well, maybe I'm way too pessimistic so let's see...:(
     
  38. graskovi

    graskovi

    Joined:
    May 28, 2016
    Posts:
    12
    There are issues with development priorities at Unity but when it comes to giving feedback on where priorities should lie despair isn't a very useful approach to take. It's pretty easy to give feedback using the roadmap and since they're taking the time to field feedback in editor performance it's reasonable to think that if a lot of people vote for code editing as an important/critical area that they will prioritize that work. I'm not expecting performance to return to Unity 2019 levels but I'd much rather try to push development towards a faster cycle of code editing than say that things will just get worse and throw my hands up.
     
    Luxxuor and Ghat-Smith like this.
  39. maxter23

    maxter23

    Joined:
    Oct 29, 2014
    Posts:
    8
    I am replying to this message because I want to tag a person from Unity in this message.

    I am using Unity for the last 10 years and recently got the issue described in this thread.
    I spent a day trying to fix it and at certain point it it was gone after I changed the language from Ukrainian to English US in my Windows system, but then the issue appeared again. (Domain Reloading in Play mode setting was on all the time). Switching the language back again and reverting it after also never helped again.

    I have two PCs, one at the office at my work, and the second one, my personal laptop.
    What is bothering me is that my office PC which I use for the last 5 years, starting with Unity 5.6 doesn't have a slow domain reload issue at all. I recently checked multiple projects and multiple unity versions, entering play mode and recompiling scripts is very quick and smooth even in projects containing significant amount of scripts, packages, assets and DLL plugins. But if I copy same projects to my laptop and open them with same Unity versions, it will take around 15 seconds longer for domain reloading and script changes to process.

    Both PCs have Windows 10 installed.
    Both are powerful PCs which are for example capable of running AAA games smoothly and compute machine learning tasks.

    Since I have one "good" PC and one "bad" PC, I would like to establish an email contact with someone from Unity and to suggest my help in investigating this issue. Perhaps one of the engineers will be able to identify what is causing the the difference in domain reloading between two PCs.
     
    bac9-flcl and Ghat-Smith like this.
  40. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,955
    Longstanding advice has been to add both your project folder and the Unity Editor .exe to Windows Defender exclusions. You might have done that a while ago on your office computer and not on your laptop. Could make quite a difference.
     
    Lahcene likes this.
  41. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    399
    Optimize code editing workflows
    Optimize time taken to build your project
    Reduce initial project import time
    Improve time taken to test changes on non-desktop platforms
    Reduce incremental import times
    Improve usability when editing larger projects

    Would these require SRP API rewrite?
     
  42. maxter23

    maxter23

    Joined:
    Oct 29, 2014
    Posts:
    8
    Windows Defender is off on Both PCs, it is not the issue.
     
  43. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    Done, thanks for the link.
     
  44. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    28
    Did we ever find a fix for the infinite 'Reload Script Assemblies' bug? Reload Script Assemblies.png
     
    TangerineDev likes this.
  45. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    For some people simply modifying a script in IDE, saving then back to editor fixes it.
     
  46. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    28
    Yes, I do this several hundred times per day. I would call this a 'workaround' to the application-breaking bug, not a fix.
     
  47. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    Yeah I meant it as a workaround. I personally don't have this issue so I just reported what some users who had it said.
     
  48. Reiku32

    Reiku32

    Joined:
    Sep 24, 2022
    Posts:
    1
    I don't know what kind of programming wizardry they pulled but with Unity 2022.2.0b8.3023 the compile/reload times are virtually non-existent. I didn't have the biggest project but it was big enough to generate about 30s downtime for each reload in Unity 2022.1.17f. Now its less than 5 seconds.
     
    Last edited: Sep 24, 2022
    Lahcene, DragonCoder and valarus like this.
  49. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    399
    What about compilation in HDRP? Does it takes less than 5sec?
     
  50. StellarVeil

    StellarVeil

    Joined:
    Aug 31, 2018
    Posts:
    60
    Hope you right, I tried multiple .2 betas and none yielded any improvement for my projects.
    Will test and come back to provide feedback.
     
    kloot likes this.
unityunity