# How to bind to dynamic delegate in a struct? Or any delegate reference?

**URL:** <https://forums.unrealengine.com/t/how-to-bind-to-dynamic-delegate-in-a-struct-or-any-delegate-reference/500828>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, UE4-27, question\
**Created:** [February 22, 2022, 6:13am UTC](https://forums.unrealengine.com/t/how-to-bind-to-dynamic-delegate-in-a-struct-or-any-delegate-reference/500828 "2022-02-22T06:13:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![illYay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illYay](https://forums.unrealengine.com/u/illYay)\
**Post date:** [February 22, 2022, 6:13am UTC](https://forums.unrealengine.com/t/how-to-bind-to-dynamic-delegate-in-a-struct-or-any-delegate-reference/500828/1 "2022-02-22T06:13:36Z")

</div>

So I have some code written in C++ where I have a map of keys to a struct with dynamic multicast delegates.

However I can’t find a way to bind to these dynamic multicast delegates in Blueprint.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/4/8f411b037f3a9b4e67ea8feaf605d189b6fe5858.png)

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/9/24947e20901e4f7fd9e9fbf22a8c730e85b34ab5.png)

The C++.

```auto
USTRUCT(BlueprintType)
struct RDBASEFRAMEWORK_API FRDBaseUIButtonInteractionSettings
{
	GENERATED_USTRUCT_BODY();
	
	/** Called when the button is clicked */
	UPROPERTY(BlueprintAssignable, Category="Button|Event")
	FOnButtonClickedEvent OnClicked;

        ... etc...
};

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Button|Event")
TMap<FKey, FRDBaseUIButtonInteractionSettings> InteractionKeys;

```

It seems like the blueprint editor only exposes access to these if they’re directly members of a class.

---

<div class="post-metadata">

**Author:** ![illYay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illYay](https://forums.unrealengine.com/u/illYay)\
**Post date:** [February 22, 2022, 4:18pm UTC](https://forums.unrealengine.com/t/how-to-bind-to-dynamic-delegate-in-a-struct-or-any-delegate-reference/500828/2 "2022-02-22T16:18:31Z")

</div>

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.

```auto
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.
