trying to have a widget hover over an actor and display text depending on the blueprint variables

Hello,

I have created a widget class that I want to update what is shown depending on the blueprint it is attached to.

.cpp file in the constructor, I have created a TSubclassOf for the WidgetClass in the header file

	ConstructorHelpers::FClassFinder<UPickupInfo> WidgetClassFinder(TEXT("/Game/Blueprints/Widgets/WBP_PickupInfo"));
	if (WidgetClassFinder.Class != nullptr)
	{
		WidgetClass = WidgetClassFinder.Class;
	}

I have tried this in BeginPlay, However it is always empty

UPickupInfo* pickup = Cast<UPickupInfo>(WidgetClass);