- Home /
Is there a way to pause the game before it goes to the background?
I am building an action/shooter on the iPhone and I am trying to make it so the game pauses when the game goes to the background (due to the player pressing home, a phone call, etc.). When I use OnApplicationPause(), however, none of the changes are implemented until the game resumes. This ends up looking a little tacky because the game pauses and brings up a simple menu after one frame of gameplay upon reloading.
On a related note, is there any way to pause the game more quickly when it is about to go to the background. Right now, the game seems to run for around a second until the app gets pushed to the background and trigger OnApplicationPause, which is more than enough time to get into trouble in my game. Is there a way to trigger some clean-up as soon as the app becomes aware of an event that will push it to the background?
Thanks for any help! :)
$$anonymous$$y bad, didn't know it was iOS... I really need to read the whole question for now on, sorry....