Hi,
I have created a custom bp component based on UWidgetComponent. And I want to create/add this bp component in my actor’s constructor. I tried the following code but it doesn’t work:
ConstructorHelpers::FClassFinder<UWidgetComponent> DisplayWidgetTest(TEXT("/Game/Test/BP/NameWidgetBP"));
DisplayNameTest = CreateDefaultSubobject<DisplayWidgetTest.Class>(TEXT("Test"));
The compiler says the argument type is not matching, could you tell me what is the correct method to achieve my intention?
Thanks!