Using UUserWidget for floating health bar in ToonTank Project

In Toon tank homework I want to implement a floating health bar for the PawnTurret. I follow this:

So, I create a class derived from UUserWidget:

Captura de pantalla 2021-02-21 154035

and derived this one to a Blueprint:

Then, I declared a WidgetComponent in my PawnBase to access from my PawnTurret or PawnTank:

Captura de pantalla 2021-02-21 154521


When I edited the WidgetComponent in the Turret blueprint I can configure it without problems. The real problem is when I compile and save the Turret blueprint that the WidgetComponent is kind of empty.

The strange behavior goes away when I comment the *.cpp line above, compile, uncomment, and compile again. I can configure the WidgetComponent, but when I compile and save the Turret blueprint the same problem occurs.

Replied on Udemy

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.