Version: 2022.3
言語: 日本語
public static bool anyKey ;

説明

現在なんらかのキーかマウスボタンが押されているかどうか(読み取り専用)

using UnityEngine;

public class Example : MonoBehaviour { // Detects if any key has been pressed.

void Update() { if (Input.anyKey) { Debug.Log("A key or mouse click has been detected"); } } }