Just to give anyone who’s having the same problem a simple step-by-step to what I did:
-
Create HUD on the UMG Editor;
-
Create a custom GameState class;
-
Set that GameState class as the one to be used, in the GameMode.cpp (remember to include your custom gamestate.h!):
GameStateClass = APacGameState::StaticClass();
-
Do stuff on your code, reference and set values to the game state. This is how I referenced it (not sure if you need all that, but it ensures nothing is null):
APacGameState* gameState = GetWorld() != NULL ? GetWorld()->GetGameState() : NULL;
-
Create a new blueprint (yeah, there’s no escaping those) to exclusively call your HUD, and place it on your level (and set it hidden in game). This is how I did it:
- Create bindings to the values you want to change on your hud. An example:
That’s it! It worked beautifully for me! And I have to admit, after taking a small time to actually learn a little about bluprints… Well, they’re kind of sexy, can’t say I still hate them!
Thank you so much braindigitalis!