GetKeyDown Enter button not working

I wanted to print “Enter key pressed” when I press the enter key but it’s not working.

Here’s my code: (note: it’s in the void Update() section)

  if(Input.GetKeyDown(KeyCode.Return)) {
            Debug.Log("Enter Key Pressed");     

The code is correct. Make sure you click in the game window first though after you have pressed play to run the game. You only need to do this in the unity editor once you build the game it should work fine without having to do this.