Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity c# check if multiple keys are pressed

// Checks if W or D keys are have been pressed or being held down
if (Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
{
	// do something...
}
 
PREVIOUS NEXT
Tagged: #unity #check #multiple #keys #pressed
ADD COMMENT
Topic
Name
8+6 =