unity > ボタン押下時のアプリの終了 > if(GUI.Button(...)) { Application.Quit(); ...


http://docs.unity3d.com/ScriptReference/GUI.Button.html
http://docs.unity3d.com/ScriptReference/Application.Quit.html

if (GUI.Button (new Rect (10, 50, 100, 40), "Quit")) {
    Application.Quit ();
}