I am well aware that running a game inside the editor is worse on performance than if I built a stand alone build, but of course some times it is impractical to build every time I need to run the game. However, lately I have been having an issue in my project where every time I hit play, editor performance gets worse. There are spikes every X seconds, the first time I play, they last 0.1s, then after running the game in editor 3-5 times they get up to .25, then .5, then 1, etc and keep getting worse. I can tell that the issue is in editor because the profiler clearly shows the spikes in the editor segment. The issue also doesn’t occur in stand alone builds.
I assume it is an issue of some static value in my game or editor scripts that isn’t getting cleared in between play sessions in editor, but since the editor segment in the profiler doesn’t give me a breakdown like the rest of the game, I am having a really hard time tracking down where the issue is occurring.
Does anyone have any tricks or suggestion for debugging untiy editor performance?