Games are interactive because they respond to player actions. Whether pressing a key to jump, moving the mouse to aim, or touching the screen to shoot, handling input is what makes a game feel alive. Unity provides the Input class to detect player input across all devices.
Input Class
The Input class is Unity's gateway to all player input. It provides methods and properties to check the state of keyboards, mice, touch screens, controllers, and joysticks.
Available anywhere in your scripts (just type Input).
Works across all platforms automatically.
Provides both discrete (press/release) and continuous (axis) input.