[UMG] 3d widget spawn in C++ Questions

This is my overlapbegins funtion

I want to write code that spawn a 3d widget here.

So I looked at other questions and followed them.

But the 3d widget was not properly spawn.

.h (overlap class)

TSubclassOf<class AJsonWidget> MyWidgetBlueprint;

.cpp

	static ConstructorHelpers::FObjectFinder<UBlueprint> WidgetBlueprint(TEXT("Blueprint'/Game/Content/Widget/MyJsonWidget'"));
	if (WidgetBlueprint.Object) {
		MyWidgetBlueprint = (UClass*)WidgetBlueprint.Object->GeneratedClass;
	}

A WidgetComponent Spawns a widget automaticly based on the class you give it or a direct Widget pointer. SetWidgetClass(TheClass), SetWidget(ThePointerOfExistingWidgetYouCreated).

I also noticed you dont have a WidgetComponent at all. You might want to create one in your Constructor and SetVisibility(false) aswell as SetWidgetClass(MyWidgetBlueprint) and in your BeginOverlap SetVisibility(true) / EndOverlap SetVisibility(false)

Thats it good Luck mate =)