How to put an option button Quit Game?
type, when the player clicks the button Quit game a message appears with two options type, Want Close the Game? “Yes” or “No”.
I am grateful if you can help: D
How to put an option button Quit Game?
type, when the player clicks the button Quit game a message appears with two options type, Want Close the Game? “Yes” or “No”.
I am grateful if you can help: D
You can always quit an the game using the following code:
if (Input.GetKey ("escape")) {
Application.Quit();
}
In case you need a confirmation window, use this, which should be put in you OnGUI() method and triggered when the exit button is pressed. Quit the application only if the OK button is then pressed too.