I cant add a UWidgetComponent to my Actor via C++ because it always throws errors at me I tried doing it the following way:
.H
UPROPERTY(EditAnywhere)
class UWidgetComponent* WidgetComp;
.CPP
AGatherableActor::AGatherableActor(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
WidgetComp = ObjectInitializer.CreateDefaultSubobject<UWidgetComponent>(TEXT("Widget"));
}