{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Event Dispatcher (Declare & Assignable) in Unreal Engine 5 C++UE Docs

A Blueprint Event Dispatcher in C++ is a dynamic multicast delegate declared with DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam, then exposed as a UPROPERTY(BlueprintAssignable) member so Blueprints can bind to it.

Blueprint node & C++ equivalent

C++
// .h — declare the delegate signature, then expose an instance
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnHealthChanged, int32, NewHealth);

UPROPERTY(BlueprintAssignable, Category="Events")
FOnHealthChanged OnHealthChanged;

What is an Event Dispatcher in C++?

An Event Dispatcher lets an object announce that something happened so other objects can react, without the broadcaster knowing who is listening. The C++ form is a delegate type plus an instance of that delegate held on the class.

First declare the signature: DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnHealthChanged, int32, NewHealth);. The macro generates a type named FOnHealthChanged that carries a single int32 argument named NewHealth.

Why BlueprintAssignable matters

After declaring the type, expose an instance: UPROPERTY(BlueprintAssignable, Category="Events") FOnHealthChanged OnHealthChanged;. The BlueprintAssignable specifier is what makes the dispatcher show up in Blueprints with Bind Event and Assign nodes.

It must be a dynamic multicast delegate for BlueprintAssignable to compile. Non-dynamic delegates declared with DECLARE_MULTICAST_DELEGATE cannot be exposed to Blueprint and are C++ only.

Choosing the right delegate macro

Use the _OneParam variant when the event carries exactly one value, _TwoParams for two, and the plain DECLARE_DYNAMIC_MULTICAST_DELEGATE when it carries none. Each parameter is given as a type followed by a name so Blueprint can label the output pins.

By convention the delegate type name starts with F and is usually prefixed FOn to read as an event, such as FOnHealthChanged.

Frequently asked questions

How do I create an Event Dispatcher in C++ for Unreal Engine 5?+

Declare a delegate type with a DECLARE_DYNAMIC_MULTICAST_DELEGATE macro, then add a UPROPERTY(BlueprintAssignable) member of that type to your class. The property is the dispatcher that other code broadcasts and Blueprints bind to.

What does BlueprintAssignable do?+

BlueprintAssignable exposes a dynamic multicast delegate to Blueprints so they can use Bind Event and Assign nodes to subscribe to it. It only works on dynamic multicast delegates.

Why must the delegate be dynamic and multicast?+

Dynamic delegates support reflection and serialization needed for Blueprint binding, and multicast allows many listeners. BlueprintAssignable requires both, which is why the DYNAMIC_MULTICAST macro is used.

Related Events & Dispatchers nodes

View all Events & Dispatchers nodes →