Description

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.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add Code to project based on actor (MyActor) and Actor Component (MyActorComp)
  3. Add the following to MyActorComp.h
    • Above the UCLASS macro
      DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompDelegate);
      
    • Inside the class declaration
      UPROPERTY(BlueprintAssignable, Category = "Flow")
      	FCompDelegate CompDelegateTest;
      
  4. Add the following to MyActor.h
    • Above the UCLASS macro
      DECLARE_DYNAMIC_MULTICAST_DELEGATE(FActorDelegate);
      
    • Inside the class declaration
      UPROPERTY(BlueprintAssignable, Category = "Flow")
      	FActorDelegate ActorDelegateTest;
      
  5. In both BeginPlay functions, add the appropriate .Broadcast() call
    ActorClass - ActorDelegateTest.Broadcast();
    ComponentClass - CompDelegateTest.Broadcast();
    
  6. Compile
  7. Open the project and create a blueprint based on MyActor (MyActorBP)
  8. Add an instance of MyActorComp to the component hierarchy
  9. Click the plus next to Comp Delegate Test in the details panel
  10. Connect a Print String message to the created event
  11. In The "MyBlueprint" panel, expand the dropdown for "Flow" in the Event Dispatchers section and add ActorDelegateTest(Event)
  12. Wire ActoreDelegateTest into a print string node
  13. Add an instance of the blueprint to the level
  14. PIE

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.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-45266 in the post.

2
Login to Vote

Unresolved
ComponentGameplay - Blueprint
Affects Versions4.15.24.16
CreatedMay 22, 2017
UpdatedSep 7, 2017