Calling Application.Quit(); doesn’t seem to invoke calls to OnApplicationQuit().
I’m getting OnApplicationPause() when I press Windows-key to jump to OS front page, never an OnApplicationQuit().
Should this work?
Calling Application.Quit(); doesn’t seem to invoke calls to OnApplicationQuit().
I’m getting OnApplicationPause() when I press Windows-key to jump to OS front page, never an OnApplicationQuit().
Should this work?
when you press the windows key it should call the pause because players may want to jump back into the game. The only way to quit applications on Windows phones is by pressing the back button
How about Application.Quit()?
The back button equals KeyCode.Escape. To quit with the back button, add something like:
if (Input.GetButtonDown(KeyCode.Escape))
{
Application.Quit();
}
And yes, like Hale_88 mentioned, Windows Phone apps are NOT supposed to quit when you press the home-button, and it would be wrong to make your program behave like that.
Also:
I found calling Application.Quit() anywhere else seems to leave the game in a dormant state and you can’t restart it, so if you want a Quit button in game you need to use the Terminate api…but I’ve just gone for back to quit and lost the quit button for windows phone.