Keyboard and mouse inputs not working

Followed a tutorial and the following if statement does not produce any result in the console

if (Input.GetKeyDown(KeyCode.UpArrow)) Debug.Log("Up Arrow key was pressed");

Tried changing the input key to a mouse button but still wouldn’t work.

Cheers

Are you sure you clicked inside the Game Window? It doesn’t recognize any inputs unless you are inside the Play Window and focused onto it (by clicking on it once).

Be sure to move from scene view to game view, which can be added from layouts if you removed it by mistake.