Hi all!
First of all, I am new to this forum, so if there is anything I can do better, or you have any feedback, I'm keen to hear it!
So here is my problem: I'm using Unreal Engine 4.27.1. I have created a C++ class called HealthWidget
that inherits from UUserWidget
. I have also created a blueprint class that derives from HealthWidget
, called WBP_HealthWidget
. I also have a CustomPawn
C++ class that inherits from APawn
, and a blueprint class that derives from CustomPawn
, called BP_CustomPawn
. I want to use the HealthWidget
from the CustomPawn
class, so I included this in CustomPawn.h
:
![](https://uploads.gamedev.net/forums/monthly_2022_01/66aad8ec18ab4610bfe4d744352b7d9a.image.png)
Then in the BP_CustomPawn
blueprint, I am selecting the WBP_HealthWidget
, like so:
![](https://uploads.gamedev.net/forums/monthly_2022_01/81b9e750e67d48128e7f21850ec4d79d.image.png)
It lets me select it, but when I compile this blueprint, it goes back to None
. I added some logs to check that this was not a UI problem, and that it was really selected but was not showing up correctly, but nothing.
Anyone knows what am I missing?
Thank you very much!