how to check if a key is pressed C# Unity code example Example: unity check if key pressed if (Input.GetKeyDown(KeyCode.KEY))