TSoftClassPtr<UUserWidget> Screen

*.h

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = Building)
TSoftClassPtr Screen;

*.cpp

void ACharacter_Anzeige::BeginPlay()
{
Super::BeginPlay();

if (Screen.ToSoftObjectPath().IsValid())
{
UE_LOG(LogTemp, Warning, TEXT(“not empty”));
}
else
{
UE_LOG(LogTemp, Warning, TEXT(“empty”));
}

}

Hey.
No matter what I do. I always get screen blank.
As you can see, I add the widget via the blueprint.
Would like to create a soft reference, but it’s really hard for me to get a return and then also access the class.

Can somebody help me with it?