Quickstart¶
Installation¶
Either install the plugin to your engine (via Epic Games Launcher) or directly into your project’s Plugins/ folder.
Important
ControllerHawk is maintained on Unreal 5.3. While the code can be made to compile on earlier engine versions, the assets are saved on Unreal 5.3 and cannot by default be backported easily to earlier engine versions.
At startup make sure to enable the plugin.
Adding a Controller Overlay¶
Adding a controller overlay to your game is pretty straightforward: construct a UI_DebugControllerOverlay and add it to the screen.
You can customize this by creating a copy of the widget or creating your own to set position an opacity as desired.
Tip
For my own projects I have the Controller overlay turn on an off using a Debug Menu and/or a CVar. This means you can opt into having the controller overlay on as desired.
Sample Project¶
Example project (UE 5.3+) can be downloaded here. Install ControllerHawk into the Plugins/ folder of the project. Once opened, hit Play and you should see the controller overlay as shown below.
Using the Controller Debugger¶
Right-click on /ControllerHawk/Utilities/EUW_ControllerDebugger and select Run Editor Utility Widget. This will open up the Controller Debugger.
As you press inputs and attach and detach controllers, you should see them appear (assuming you have compatible runtime drivers for your device).
Supported Controllers¶
Controller Icons¶
ControllerHawk comes with textures and assets from Kenney’s Input Prompts package (https://kenney.nl/assets/input-prompts). These include glyphs for Xbox, PlayStation, and Switch controllers.
For CommonUI, there are data assets (of type UCommonControllerBaseInputData) that you can use to auto-populate parts of your user interface with controller button icons. The following are available:
Keyboard and Mouse: /ControllerHawk/ControllerData/Hawk_Keyboard_ControllerData
Xbox / XInput devices: /ControllerHawk/ControllerData/Hawk_XInput_ControllerData
To use these assets, update your Game - Common Input Settings under Input > Platform Input > (Your Platform) > Default > Controller Data.