unity check if any key is pressed code example
Example 1: unity check if key pressed
if (Input.GetKeyDown(KeyCode.KEY))
Example 2: unity detect any key
if (Input.anyKey) {
// Code here
}
if (Input.GetKeyDown(KeyCode.KEY))
if (Input.anyKey) {
// Code here
}