Hey folks,
anyone figured out how to create and add a Widget to a Widgettree which is visible in designer tab?
I just tried the following and it seems that the button is valid. But i miss something to really make the button visible and editable in designertab
of the MyUserWidget derived blueprint.
void UMyUserWidget::OnWidgetRebuilt()
{
Super::OnWidgetRebuilt();
// TODO: would like to create the widgets in c++, not working yet
if (WidgetTree)
{
TSubclassOf<UButton> BtnClass = UButton::StaticClass();
Button = WidgetTree->ConstructWidget<UButton>(BtnClass, FName("Button"));
}
}
any help appreciated