Quitting an Application in Unity
An important detail to keep in mind while making games in Unity – When calling the method Application.Quit, remember that it is not used by the editor. Quit will only work once you have compiled your game and it is being run outside of the editor.
3ggames.net