Hello everyone, currently I am trying to get into UE, to dust off my CPP skills and so on.
My current problem is probably 50/50 related to CPP and Blueprints.
So what I have is this:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Interaction")
UWidgetComponent* InteractionPrompt;
In header file for my door and then this in constructor of the door
InteractionPrompt = CreateDefaultSubobject<UWidgetComponent>(TEXT("InteractionPrompt"));
InteractionPrompt->SetupAttachment(RootComponent);
InteractionPrompt->SetVisibility(true);
Then I created widget blueprint, added text then went back to door and tapped on InteractivePrompt - class - MyWidgetBlueprint. In viewport the text is visible, up until I hit play, then it dissapears. Based on what I set in constructor, the widget should be visible, but it isn’t.
Here is the image of the situation:
I made some line trace routines and I would like to show the widget when I am looking at it, so yeah. Is there any lead of what I am doing wrong? Thank you in advance.