When a user clicks a button in my game, I call Unity's native
Application.Quit() to close my game. The call is directly on the button press, with no coroutines or intermediate processes that sit between the press and the call.
In a standalone build of my game, after the button press, it takes around 2 seconds for the window to close. Ideally, I'd like the window to close near immediately, as it does in other Unity games I've played.
Application.Quit() take so long to close the window, and how can I speed it up so that the window closes immediately?
For what it's worth, I am running Windows 10 on a Razer Blade 15 w/ 10th gen core i7. The game is a simple platformer w/ no networking or external integrations.