Version: 2022.3
言語: 日本語

説明

Escape

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"); } } }

Did you find this page useful? Please give it a rating: