Hello people, I’m having this issue:
whenever I call Application.Quit(), it’s given me a huge delay, something like 10~15 seconds, and during this period, the device freeze’s, the same happens when i press the home button on my game, there’s a 10~15 seconds freeze until it closes…
so just by knew that, there is some more efficient way to close the application, ou of Application.Quit()? or it’s something with my project, the size, compressions, codes?
Thank you!
o/
Do you have a lot happening when the game quits or switches to running in the background?
This would be code in OnApplicationQuit, OnApplicationPause, etc functions.
actually i never used this functions… Oo
I have exactly the same issue,did you manage to solve it?
Do you write Application.Quit() in a huge class which include many methods?
then You try create other class which only have Application.Quit().For example click button and then call QuitGame /
There are a couple of ways to do this.
Lets say you are waiting for a certain condition to happen to force quitting, just have in Update() something like"if(x = true){Application.Quit();}
The way I normally do it is I either have a button with the OnMouseDown function and code it to where if the button is pressed then quit, and another way I do it for Android is with the actual back button. In Update(), I would just have an if statement saying if(KeyCode.Escape){Application.Quit();}
Hope this somewhat helps!