csharp unity control key input
Code Example - csharp 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");
}
}