O'Reilly logo

Mastering Unreal Engine 4.X by Muhammad A.Moniem

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required