//Triggers if Space is pressed
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
//Your code
}
}
Input.GetKeyDown(KeyCode.UpArrow)
if(Input.GetKey(KeyCode.space))
{
print("Space key was pressed")
}
Update is called -> GetKeyDown is true (this frame only) -> isJumpPressed = true
Update is called -> GetKeyDown is false -> isJumpPressed = false
FixedUpdate is called -> isJumpPressed is false
// Arrow Keys
Input.GetKeyDown(KeyCode.UpArrow)
// Specific Letter e.g. "A"
Input.GetKeyDown(KeyCode.A)
// Space
Input.GetKeyDown(KeyCode.Space)