包含此页的版本:
不含此页的版本:
当前是否有任何键或鼠标按钮处于按下状态?(只读)
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"); } } }