This just started yesterday and the only thing I can think of that I changed was creating a GUI.Window and changing a model which threw a convex mesh collider error and I had to turn convex off.
Anyways when I play my game it takes the usual 10 seconds to load, but when I stop the play mode it takes 10-30 minutes to actually stop, it just freezes until it’s done.
I might as well just close unity and reopen it, probably faster.
Thought I might need to mention that if I click pause it’s fine, I can pause/unpause perfectly fine but no matter what if I click the stop button it pauses.
My game was set to High Quality in the editor but Low on Play. So when I would exit play mode there was a long pause while it switched all the textures to the higher resolution. This was an accident and once i set it so play mode and the editor both used the same quality level the pause went away.
1 Like
That’s weird. Did you try making a new, blank project then try starting and exiting play mode in the new project? Need to see if this is an issue with your project, PC, Unity3D or all of those.
I was having a similar issue, so I’ll throw out my anecdote. I found out it was my tiny editor script I was no longer using, slowing down the exit from Play mode. When I commented OnInspectorGUI() out, everything went back to normal. Here’s the script that was slowing it down:
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(CoverPoints))]
public class CoverCalculator : Editor
{
public override void OnInspectorGUI ()
{
DrawDefaultInspector();
CoverPoints coverPoints = (CoverPoints)target;
if(GUILayout.Button(new GUIContent("Calculate", "Calculate cover points.")))
{
coverPoints.Calculate();
}
}
}
I get that OnInspectorGUI is probably a hefty function, but can anyone explain why it slows down the editor so much? It would be nice to use editor scripts in the future without completely killing my iteration time.