|
Hello! 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
(comments are locked)
|
|
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.
(comments are locked)
|
|
write this your scripts (KeyCode.Escape is code for native "Back" button on Android): if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } No Doubt it will work try this one.i tried also.
(comments are locked)
|
Unity Answers has moved to a new system, and some users may have trouble logging in.
Word on the forums is that we'll be able to handle the back button as the escape keycode in the upcoming RC2.
Any news on the back button feature?
So was this mapped to escape in the final release?