In this lesson, you will learn how to use the Input Debugger window to monitor your connected hardware and verify that Unity is successfully receiving your input signals.
When building games with the New Input System, it is common to run into situations where a controller or keyboard input doesn’t seem to trigger an action. Before you start debugging your code or checking your InputAction mappings, you need to ensure the "connection" between the physical device and Unity is alive. This is exactly what the Input Debugger is designed for.
Accessing the Input Debugger
To open this tool, navigate to Window > Analysis > Input Debugger. This window acts as a real-time dashboard for everything Unity "sees" plugged into your computer.
Monitoring Live Signals
Inside the Input Debugger, you will see a list of connected devices like your keyboard, mouse, or gamepads. If you click on a specific device—for example, a game controller—the window will expand to show a list of all its buttons and axes.
The most powerful part of this tool is the live visual feedback:
- Real-time activity: If you press a button on your controller, you should see the corresponding entry in the Debugger window highlight or update its value (typically changing from
0to1for buttons). - Device Discovery: If your controller isn't appearing in the list, you know the issue is at the hardware or driver level, not in your C# scripts.
Verifying Input Flow
If you can see the input activity in the Debugger but your game isn't responding, you know the signal is reaching Unity, but your Action Maps or Input Actions (which we configured in previous lessons) are likely misconfigured. By isolating the input source using the Debugger, you save yourself hours of hunting for "ghost bugs" in your code.
// Debugger check logic (conceptual)
// If the Input Debugger shows activity but your code does not:
void Update() {
// Ensure your Input Action is enabled
// and that the event is subscribed correctly.
Debug.Log("Checking if script detects input...");
}
Key Takeaway: The Input Debugger is your first line of defense; use it to confirm that Unity recognizes your hardware before troubleshooting your C# input logic.