Application.Quit Manual     Reference     Scripting  
Scripting > Runtime Classes > Application
Application.Quit

static function Quit () : void

Description

Quits the player application. Quit is ignored in the editor or the web player.

// Quits the player when the user hits escape
function Update () {
if (Input.GetKey ("escape")) {
Application.Quit();
}
}