unity check if right keyboard button is down code example
Example: unity check if right keyboard button is down
void Update()
{
// Do stuff when the spacebar is pressed:
if(Input.GetKeyDown(KeyCode.Space))
{
// Do stuff
}
// Do stuff when the spacebar is held down:
if(Input.GetKey(KeyCode.Space))
{
// Do stuff
}
}