All of a sudden today, loading the editor, pressing play, stopping play, etc – take about 5:00-10:00 to do.
Yes, even ending play takes a minimum of 5 minutes to get back into the editor.
This is all in my menu scene.
Just the level select area that instantiates 30 prefabs (displaying the levels) over a few seconds (it only creates 1 every few frames) lags incredibly hard.
Using deep profiling I was able to find this, but I’m not sure what to make of it:
Try with deep profiling enabled to get more detailed info about this stack trace.
Since the issue is coming from instantiating your prefabs, there is a high chance that the delay is caused by one of the scripts on that prefab. Try disabling components or game objects in that prefab to narrow down what may be slowing things down.
The mention of File.Read may also hint at slow disk access, possibly a virus scanner interfering. If you have one installed, try disabling it and generally it’s best practice to exclude Unity project folders from virus scanners and Windows Defender (online/live scans).
And this is just one instance, literally doing anything. Loading up the project, turning ON deep profiling, playing or stopping. Literally anything creates a 5 to 10 minute slowdown.
(Note the instantiated objects have no scripts on them, game just creates a menu item and sets it’s text/image, these haven’t changed in a year)
It feels like an incredibly slow HDD issue, but the project is on an SSD along with my windows. Everything runs perfectly fast except for this ONE project that suddenly started doing this.
The ReadManager has over 225,000 draw calls. Is that normal?
As suggested I would definitely try is turning off any Antivirus, Windows Defender, etc.
Might also be worth opening the task manager and seeing if anything shows up while the project is loading - you might see the HDD usage going up, or a different process altogether suddenly spiking.
You could also try deleting the Library folder in case something got messed up in there.
Another option is to copy the project to another drive, just to see if there’s any difference.
I don’t use any sort of antivirus or windows defender.
Same project works perfectly on another computer (Identical asset folder through svn)
Other projects work fine on the same harddrive
HDD usage all seems normal when loading it.
I definitely think there’s something wrong with the core project files themselves, not the asset folder, since the only problems is this single project instance.
I’ll try deleting the Library folder.
Is there anything similar I can try in case that doesn’t work?
Edit: Deleting the library folder did nothing, it’s still freezing and lagging incredibly hard whenever something is instantiated in game, with hundreds of thousands of calls for 1 file load.
Any time unity literally does anything there’s a 5 minute loading bar. This includes editing a script or even simply clicking or tabbing back to the editor when it was not in focus lol. So yes, instantiating anything gives a 5 minute load, and trying to load a new scene makes it hang indefinitely.
2/3. Blanks screens are 5 min to start play
If the project works on a different computer but its slow on yours, you can try and delete the library folder from your project, and let unity re import everything.
Works it at least does mean there’s likely something in the project that causes it?
Hopefully you’re using source control, so you can diff the versions?
It may be slow, but you could “bisect” - basically once you know there’s a version that works, you take the half point between that version and yours. If the new version still works - you keep moving towards the one that doesn’t, and vice versa. That will let you find out the change that “broke” it.
Unfortunately they said they already tried that and it didn’t help.