Adding a HUD to the game
In this section, you will create a Heads Up Display (HUD) for the game that will assist in monitoring the player character’s progress during the game. As you may already know, the best way to create such information is through the Unreal Motion Graphics (UMG) system – a GUI-based editor that allows developers to create user interface elements for their game, such as menus, HUDs, and other display screens. You’ll be using this system to create the HUD widget with the relative info.
What we need to show at the moment is quite simple – one set of text showing the character’s experience points and another set showing the level.
Let’s start by creating the Blueprint and the visual elements.
Creating the Widget Blueprint
To create the Widget Blueprint, within Unreal Editor, take the following steps:
- Open your
Blueprints
folder, right-click on the Content Browser, and select User Interface | Widget Blueprint...