If I make the delegate properties BlueprintReadOnly or BluePrintReadWrite, they show up in the “Break Struct” as variables but I still can’t bind to them.
For now it seemed to work to use a UObject instead of a Struct to contain the delegates. It’s a bit more annoying and requires more steps from the blueprint side, but at least I have a working way to route events now.
UCLASS(BlueprintType, Blueprintable, DefaultToInstanced, EditInlineNew)
class RDBASEFRAMEWORK_API URDBaseUIButtonInteractionSettingsSettings : public UObject
{
GENERATED_BODY()
public:
/** Called when the button is clicked */
UPROPERTY(BlueprintAssignable, Category="Button|Event")
FOnButtonClickedEvent OnClicked;
};
UPROPERTY(EditAnywhere, BlueprintReadOnly, Instanced, Category = "Button|Event")
TMap<FKey, URDBaseUIButtonInteractionSettingsSettings*> InteractionKeys;
I have to manually write some blueprint in a construction script or some other event that runs early to bind to an event instead of using the properties directly. Once I get a reference to the URDBaseUIButtonInteractionSettingsSettings object, I can bind to its delegates.