Connecting the UI with the game logic

Now, though we have UI widgets being built, we still can't see anything when we hit Play, simply because the UI widget needs to be spawned to the player. Its content needs to be connected to some logic in order to change the health bar value or to change the collected coins count.

In order to be able to go ahead, we have to make sure of a few things. Visual Studio will not allow us to write anything related to UMG without having things set up beforehand. So within the Bellz.h header file of the game, make sure that we are using the engine itself, not the minimal version of it.

#ifndef __PUREGAME_H__ #define __PUREGAME_H__ //I replaced the EngineMinimal.h, in order to get access to lots of other things...Mainly ...

Get Mastering Unreal Engine 4.X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.