Unity freezes for progressively longer each time I enter playmode.

Before anyone gives the obvious suggestion of checking my code, it’s not my code.

When I first start Unity there’s no issues, I can enter playmode reasonably quickly. But over time Unity freezes for longer when I enter playmode. Eventually it freezes for over a minute which is quite unacceptable. Restarting the Unity editor fixes this, but the problem creeps up again. (This is why I’m quite sure that it’s not my code)

I’ve checked the profiler, but it shows no spikes, it doesn’t seem to register any activity for the duration of the freeze. Task manager reports the Unity editor as not responding for the duration of the freeze as well.

I have no clue where to even start troubleshooting this.

I am using version 2020.3.3f1 on Windows 10. My resource utilization doesn’t spike, however my ram usage steadily increases every time I enter playmode.

I have noticed that Unity in some cases, will only refresh certain scripts, and then other times seems to refresh every script, UI instance, prefabs, and whole big bunch of other mess. The only answer to this is that it will never be fixed, lol.

I have also noticed that a lot of the long waiting times, is actually my CPU, which in my case is my anti-virus tends to update, or download new definitions, often at the most inconvenient of times. So before I kirk out on Unity, I always check my Task Manager(which I leave open all the time). And most cases of long refresh times, it’s not actually Unity at all doing the lag.

But I do feel your pain, sometimes you just gotta change one little thing, get back in and test it before you forget it… and boom… 5 minute waiting time, lol(and also done forgot it). * Also try to keep your PC defragged and clean as much as possible :slight_smile: