In Toon tank homework I want to implement a floating health bar for the PawnTurret. I follow this:
https://www.youtube.com/watch?v=nNe-NSrtYUk&feature=emb_title.
So, I create a class derived from UUserWidget:
and derived this one to a Blueprint:
Then, I declared a WidgetComponent in my PawnBase to access from my PawnTurret or PawnTank:
*.h
*.cpp
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.