- Home /
Quit button
I wanna program my start screen so when i hit a button (using Fire1 for test) it will shut down the game. Its not working at all. Heres my current script:
function Update() { if(Input.GetButton("Fire1")){ Application.Quit(); } }
Comment
Answer by Dave-Carlile · Jun 07, 2013 at 08:15 PM
This should work fine. Remember though, as the documentation states, Application.Quit
is ignored in the editor and the web player. Have you tested your code in a standalone build?
Your answer
Follow this Question
Related Questions
Make a button quit the game, Unity 4.6 UI C# 1 Answer
End/Pause Game! 2 Answers
you leave a question by pressing a button? 3 Answers
A node in a childnode? 1 Answer
Multiple entries TouchScreenKeyboard iOS 0 Answers