I am having an issue when opening our project - it takes over 10 minutes to open, with the progress bar showing “Refresh Asset Database”. No one else on the team is having this issue. Annoyingly, I cannot profile at this stage as Unity isn’t open. I’m unsure of where to look, as there isn’t much info to go on.
I have included part of the log file below, which shows that most of the time is spent in “Project init time”.
I’m an almost certain that this is only happening since we upgraded the project from 2020.1.11f1 to 2020.2.6f1.
Another potentially related problem I am experiencing is that sometimes when I hit Ctrl+S (or call AssetDatabase.SaveAssets from a script) it can take 8-10 minutes before Unity is repsonsive again.
Unity also takes a similar amount of time to close (the progress bar showing “Application.Quit”). I guess it could be saving the assets here, so maybe related to the issue above.
Is anyone having similar issues, or have any suggestions of where to look next?
I have kept the profiler running all the time to try to catch this when it happens (it seems to randomly happen on any event which saves assets, for example when duplicating an asset). I finally managed to capture it, and it shows that all the time was taken in “Write asset changes to disk”. Unfortunately it all shows as self time and I don’t see a way of digging into it anymore, but it’s a clue.
This is absolutely way outside my area in Unity but what immediately comes to mind, especially considering other team members don’t get this with the same project, is that something might be corrupt. Maybe come out of Unity, destroy all the temp folders such as “Library”, “Obj”, “Logs” (etc) and load it again. When all that’s done try coming out and going back in again.
Maybe you’ve tried this already but thought I’d mention it. Beyond that, I don’t have any other ideas, sorry.
Does this still happen? Can you repro this problem AND supply a native stack trace?
I put together a guide on how to do that here: Debugging Editor freezes and hangs [Windows Only]
If the editor is stuck a long time doing something, and there’s no good info from the profiler, the native stack trace could help us figure out if it is indeed a mutex or something else that’s taking a really long time.
I don’t experience this any more. I do find that project open times increase over time, but deleting library and other temp folders and then reimport brings the time back down again
For anyone who is stuck for more than 10 to 15 minutes where a Unity Project has multiple Asset store Assets which in turn generate ~ 50 + Project files
I found that debugging options that I have here makes it instantaneous.
After fiddling with it (because I was fed up not being able to debug) for a few hours here is what I have.
See if these settings make a difference in your UX
Settings above made debugging take about 5 seconds to start
It was about 9 to 12 minutes before made changes to the options above and I am not exaggerating.
Wish I knew what fixed it. But it is what it is.