お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closeアプリケーションを終了します。
エディターや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(); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Update() as void: if Input.GetKey('escape'): Application.Quit()