Advertisement

UE4 - Widget Class selection goes back to none when compiling

Started by January 29, 2022 07:26 PM
0 comments, last by paulovick 2 years, 9 months ago

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:

Then in the BP_CustomPawn blueprint, I am selecting the WBP_HealthWidget, like so:

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!

This topic is closed to new replies.

Advertisement