Why is my exit script not working?

Not sure what I did wrong, here is the Script:

function Start () { } function Update(){ if (Input.GetKeyDown(KeyCode.Space)) Application.Quit; };
Any help will be much appreciated!,


Application.Quit(); is used for Quit application but when in unity it will not quit…means in inspector it will not work…but that doesn’t mean it will not work on Device…so Don’t panic it will work only on device not in unity editor…cheers…enjoy…if found useful then don’t forget to tick the answer…