Having an issue where Application.Quit() is taking a long time to exit the game from a built version of the game. I have seen this issue in a few Google searches and I attempted changes that I found without any luck.
Things I have done:
- I am using StopAllCoroutines() on scripts that are running coroutines in the OnDisable methods so stop routines when scenes are being unloaded
- I used Memory Profiler to check for leaks, but it looks like after my game runs for a bit sometimes it will actually be using less memory than when it started.
- I loaded up an empty scene in a build that just checks for a key press to quit the game, and directly calls Application.Quit(). I get the same result when doing this. This one makes me think some asset or plugin is doing something that I don’t understand.
- I grabbed a Player.log which I will upload here. I probably need more experience reading these. I see many ALLOC_TEMP_Job.Worker lines even though in my generic test scene I am not using any of this. Can this be a problem and if so, is this some Project setting that I need to change?
Player.zip (2.8 KB)
Thanks for any help!
Edit: Oh, more important info, I made a dev build and attached to it and then ran Application.Quit(). I paused the execution on the debugger but I my call stack never seems to actually land on any of my own code. It looks like there’s a thread running but I can’t view the code for it: