Unreal - Delegates and Events
Delegates and Events are simliar with different semantics.
- Delegates can be
Broadcast
by anyone where as events can only be broadcast by the owner
- Delegates can be
Only
DYNAMIC_MULTICAST_DELEGATES
can be accesed from Blueprints. Non dynamic delegates are event are code only forms- This is due to the need to call the delgate by name
DYNAMIC_MULTICAST_DELEGATES
are said to be slower, which would makes sense considering the level of indirection needed to call from blueprint. Avoid use in pure code parts.
To be used in blueprint it is important to have the property
BlueprintAssignable
|
|
- When defining a struct as the argument it is important that the struct is also a
BlueprintType
if it is planned to be usable in blueprint
|
|