Answers for "key code control unity"

C#
1

c# unity control key input

[SerializeField] KeyCode your_key; //select a key in the inspector

void Update()
{
	if (Input.GetKey(your_key))
    {
    	print("your selected key was pressed");
	}
}
Posted by: Guest on December-06-2021
0

intro keycode unity

Input.GetKey(KeyCode.Return)
Posted by: Guest on July-27-2020

C# Answers by Framework

Browse Popular Code Answers by Language