アプリケーションを終了します。
エディターや Web Player では無視されます。 重要: iOS では殆どの場合、ユーザーの判断でアプリケーションを終了させるべきです。 詳細は Apple Technical Page qa1561 を参照してください。
// Quits the player when the user hits escape
function Update () {
if (Input.GetKey ("escape")) {
Application.Quit();
}
}
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Update() { if (Input.GetKey("escape")) Application.Quit(); } }