Simple unity input debug tool that displays currently pressed input on the screen.
Useful when recording gameplay demo for issue reporting or demonstrating how input is handled and translated into the game.
Current implementation depends on the legacy Unity Input System. I plan to extend the tools to support the new input system.
Features
Installation
Usage
Examples
Credits
- Input capture
Displays currently held/active input on the screen
- Input history
Displays latest handled input in a queue
- Copy Assets/RuntimeInputDebugger folder to your project
- Download latest release zip and unzip it's content to your project
Main entry point for the debugger is the InputDebugger component. The component and the code is documented with comments, tags and tooltips.
The debugger includes default prefab (preset) that can be used or extended in most of the cases.
- Instantiate
InputDebuggerprefab when you need the input debugger or put it in the scene you want the debugger to be active InputDebuggercan be found in the Prefabs folder- The default preset:
- has the input display debugger enabled by default
- supports most of the keyboard keys and gamepad buttons
- handles small number of the default axis from the Input Project Settings - Horizontal, Vertical, Mouse X, Mouse Y, Mouse ScrollWheel
- is anchored in the top left part of the screen
- doesn't capture mouse position and doesn't display input history queue
The main component that you need to use is the InputDebugger component. The debugger is based on IMGUI so it's supposed to work wherever you attach it or instantiate it.
-
To use the debugger:
-
You can toggle the debugger on/off from the inspector enable/disable checkbox or from code -
EnableInputDebugger()/DisableInputDebugger()functions. -
You can toggle the input dislay debug from either the inspector
InputDisplayEnabledcheckbox or setting the same bool value from code -
You must assign
InputDebugCaptureActionsscriptable object in theInput Actionsfield -
InputDebugCaptureActionsis a collection of all the keys and axis that the debugger must listen for. The collection is composed from Keys and Axis collections.-
Keyscollection containsKeyInputAction. IfIconis not assigned, theNamewill be used during debugging. -
Axescollection containsAxisInputAction. IfPositiveValueIconand/orNegativeValueIconare not assigned,AxisNamewill be used and the value will be displayed based on theAxisValueLabelPatternset in theInputDebugger.
-
-
DebugTextStyleisGUIStyleso you can configure it by your preferences. Note that the default value for theNormalstyle is BLACK! -
Draw Anchorcan be used to alter the position of the debugger. Currently supported -TopLeft, TopCenter, TopRight, MiddleLeft, Middle, MiddleRight, BottomLeft, BottomCenter, BottomRight.
-
-
To use the input history queue:
- Enable it by toggling the
InputHistoryEnabledproperty either by code or by the inspector
- Enable it by toggling the
- Example usage of the debugger in the Unity Open Project - Chop Chop!:
- You can check the included DemoScene in
Assets/Scenes/folder





