Is there any way to know when 'back' button on the phone is pressed?
I'd like to exit the game when this button is pressed, and not hide it (if hidden, after touching the icon the second time - the game resumes from the previous point and does not restart).
thanks
Word on the forums is that we'll be able to handle the back button as the escape keycode in the upcoming RC2.
The "escape" key label appears to be mapped to the back button on the android platform in the final release of Unity 3.0. As far as other mappings I've found that the "menu" key label is mapped to the menu key and that that MonoBehaviours will get an "OnApplicationPause" + true call when the home button is pressed and an "OnApplicationPause" + false when the application is brought back as the current process. I've not found a mapping for the search button as of yet.
Thank you VERY VERY Much RitchParker, this helped me a lot in creating my android game which needs to be on the pause screen when the user presses the Back Key or Menu Key.
Please don't add new questions as comments to 3yr old threads. But the answer is simple: replace Application.Quit(); with Application.LoadLevel("YourPreviousLevel");
Word on the forums is that we'll be able to handle the back button as the escape keycode in the upcoming RC2.
– anon67043269Any news on the back button feature?
– anon43584039