FObject finder not able to find UUserWidget

Is anyone able to figure out why this isn’t working? This is driving me mad!

The project gives a warning that the asset doesn’t exist, yet I have literally used the “Copy Reference” function from within the project with my asset. I am 100% certain the asset is there.

ConstructorHelpers::FObjectFinder<UUserWidget> InteractionWidgetFinder(TEXT("WidgetBlueprint'/Game/UI/BP_InteractionWidget.BP_InteractionWidget'"));
if (InteractionWidgetFinder.Succeeded())
	Widget = InteractionWidgetFinder.Object;

I have tried appending _C to the end of the asset reference, still isn’t working. I am calling this code from inside of a constructor.

Did you originally create the widget object from within this project or did you move it into this project from another project?

I created it from within the project.

I realise that this thread is almost 2 years old but I’ve been having the same problem and this popped up at the top of the search so I figured I’d answer it.

For a Blueprint widget, you need to use FClassFinder which gets a TSubclass of UUserWidget and then set the WidgetClass

static ConstructorHelpers::FClassFinder<UUserWidget> InteractWidget(TEXT("WidgetBlueprint'/Game/Blueprints/Widgets/WBP_InteractionCard.WBP_InteractionCard_C'"));

	if (InteractWidget.Succeeded())
		WidgetClass = InteractWidget.Class;