The “EWidgetSpace Space” of UWidgetComponent is protected and cannot be set when constructing it as a subobject in C++.
This means for every BP implementation I need to manually set it to Screen space.
My request: expose this when constructing in C++.
Example:
WidgetComp = CreateDefaultSubobject<UWidgetComponent>(TEXT("Widget"));
//WidgetComp->Space = EWidgetSpace::Screen; // Set space to "Screen" in Blueprints
WidgetComp->RelativeLocation = FVector(0, 0, 0);
WidgetComp->SetDrawSize(FVector2D(800, 300));
WidgetComp->SetMaxInteractionDistance(0);
WidgetComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
WidgetComp->AttachParent = RootComponent;