unity exit game on button click code example Example: quit button unity void quitGame() { Application.Quit(); }