When a delegate is created in a component class, adding the component to a blueprint will show the delegate in the Event section of the Details panel when the component is selected. This allows an event of the delegate to be created and is callable from .Broadcast(). By contrast, a delegate that is created in an actor class cannot have an event placed/called in blueprints without first being bound.
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompDelegate);
UPROPERTY(BlueprintAssignable, Category = "Flow")
FCompDelegate CompDelegateTest;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FActorDelegate);
UPROPERTY(BlueprintAssignable, Category = "Flow")
FActorDelegate ActorDelegateTest;
ActorClass - ActorDelegateTest.Broadcast(); ComponentClass - CompDelegateTest.Broadcast();
Result:
The print string connected to the component event is displayed but the message connected to the actor event is not.
Expected:
Delegate behavior is the same when defined in an actor as it is when defined elsewhere.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-45266 in the post.
3 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.15.2, 4.16 |
Created | May 22, 2017 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |