# Binding blueprint method/event to C++ delegate

**URL:** <https://forums.unrealengine.com/t/binding-blueprint-method-event-to-c-delegate/377392>\
**Category:** Blueprint\
**Tags:** event-dispatcher, unreal-engine, functions, question, CPP\
**Created:** [November 25, 2016, 12:17pm UTC](https://forums.unrealengine.com/t/binding-blueprint-method-event-to-c-delegate/377392 "2016-11-25T12:17:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taberu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/taberu/32/1140383_2.png) [@Taberu](https://forums.unrealengine.com/u/Taberu)\
**Post date:** [November 25, 2016, 12:17pm UTC](https://forums.unrealengine.com/t/binding-blueprint-method-event-to-c-delegate/377392/1 "2016-11-25T12:17:13Z")

</div>

Hey guys,

the case here is, I want to give blueprint designers a possibility to connect a method to my C++ component, which will invoke that specific method in a certain moment. I’m out of ideas how it could be implemented, so I’d appreciate any help.

It’s already done within Unreal Blueprint Editor in a dispatcher system, so let me illustrate it by this screenshot:

![116324-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/4/6042dd5a4f6302bfc544047cc34f4dc56d44819a.png)

Now, I have a C++ class inheriting from ActorComponent, above which I’m declaring some kind of delegate (for example multicast) and I have a method inside that C++ class, named AddMethodCallback().

I want AddMethodCallback, to have an argument to pass the function so I could bind it’s address to my delegate. AddMethodCallback would be a BlueprintCallable and I just don’t know how to declare the argument so it would appear in Editor just like on the screenshot.

I know how to declare other types of inputs and outputs, just not this one “Event input type”. Any ideas?

BTW.  
2nd question:  
I didn’t use dispatchers too much, could you explain me the outcome here, related to the first screenshot?

 ![116326-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/c/fac930eb79a424436cae040add46c1deb0f96f8e.png)

---

<div class="post-metadata">

**Author:** ![Furinyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furinyx](https://forums.unrealengine.com/u/Furinyx)\
**Post date:** [March 31, 2017, 9:13pm UTC](https://forums.unrealengine.com/t/binding-blueprint-method-event-to-c-delegate/377392/2 "2017-03-31T21:13:32Z")

</div>

In case you haven’t solved this, or for others reference - you need to ensure the delegate in your C++ component has the UPROPERTY set to **BlueprintAssignable**.

You should have your delegate declared as DYNAMIC\_MULTICAST somewhere and have a variable defined in the component like in the following example:

```
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FExampleDelegate_OnSomething, float, _exampleEventParameter);

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class YOURPROJECTNAME_API UComponentExample : public UActorComponent
{
    GENERATED_BODY()

public:
    UPROPERTY(BlueprintAssignable)
        FExampleDelegate_OnSomething ExampleDelegateVariable;
}

```

To access this in a Blueprint, get the component reference in the Event Graph and pull off of it to create a node, this will allow you to create a node to - assign to the delegate; bind an event to the delegate; call the delegate; unbind event(s) from the delegate.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 10, 2023, 2:20pm UTC](https://forums.unrealengine.com/t/binding-blueprint-method-event-to-c-delegate/377392/3 "2023-10-10T14:20:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
