broly
(broly)
1
I want use logic of GUI in C++ and construct forms in Blueprint.
For this, I must declare subwidgets in main widget class in C++ code.
And in blueprint I must define this widgets for placement and other operations.
How to do it? The declared in C++ widgets cannot be placed to widget hierarchy in “Designer mode” of Blueprint.
toolpaddz
(toolpaddz)
2
Did you find any solution to this? I’m having the same issue…
broly
(broly)
3
I used WidgetTree->FindWidget(“WidgetName”) method on widget context.
And this C++ widget (inherited from UUserWidget) must have blueprint child. After all we can write C++ logic and plcing UMG widgets manually.
Widget can be created in C++ using CreateWidget<UMyWidget>(GetWorld(), MyWidgetClass) where MyWidgetClass is blueprint TSubclassOf<UMyWidget>