ドキュメント

Unity Engine

Unity Engine

Escape

Escape key.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
Escape = 27

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Debug.Log("Escape key was pressed"); } if (Input.GetKeyUp(KeyCode.Escape)) { Debug.Log("Escape key was released"); } if (Input.GetKey(KeyCode.Escape)) { Debug.Log("Escape key is being pressed"); } }}