Answers for "unity check if right keyboard button is down"

C#
0

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
	}
  
}
Posted by: Guest on April-29-2021

Code answers related to "unity check if right keyboard button is down"

C# Answers by Framework

Browse Popular Code Answers by Language