- Home /
Exit Game Without Quitting on Mobile
I am aware of Application.Quit(). But instead of quitting the app, I want android users to be able to hit the back button and suspend the app and allow them to pick up right where they left off. I cannot seem to find a way to achieve this.
$$anonymous$$inimising the app already does that (unless im misunderstanding you)
Yes you are correct. I'm just wondering if there's a way to do it other than when the user presses the home button.
Answer by tanoshimi · Mar 19, 2016 at 10:18 PM
You're describing default behaviour: pressing the back button on Android pauses an application. If you want to do something when this occurs, implement OnApplicationPause().
The home button pauses the app and gets you back to the home screen. The back button actually is just the ESC button. You can handle it in a script but Unity doesn't have a built-in way to switch to the home screen manually. It should be possible with some JNI magic^^