If I have a C++ property of a user widget that’s itself a widget - for example:
UCLASS()
class UMyWidget : public UUserWidget {
/*...*/
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UButton* Button;
/*...*/
};
and I create a Blueprint dervied from UMyWidget
called BP_MyWidget
, and in BP_MyWidget
I add and position a UButton
in the UMG Editor, is there a way to have the Button
property assigned to this UButton
?
(At the moment I make it a variable in the blueprint called ButtonImpl
and then in the construct method I assign ButtonImpl
to Button
, but is there a way to bind it directly? It’s a lot of boilerplate for non-trivial panels.)