Description

When a component delegate is called in a blueprint as an event, changing levels causes the delegate to loose binding and not be called.

Steps to Reproduce

This has not been reproduced internally (Steps based on report)

  1. Open UE4 Editor
  2. Add code to project based on Actor Component (MyActorComp)
  3. Add the following to MyActorComp.h
    • Add below list of includes:
      DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompDelegate);
    • Add inside class declaration:
      	UPROPERTY(BlueprintAssignable, Category = "test")
      		FCompDelegate CompDelegateTest;
  4. Add the following to MyActorComp.cpp
    CompDelegateTest.Broadcast();
  5. Compile
  6. Add blueprint based on actor
  7. Add instance of MyActorComp to blueprint
  8. With MyActorComp selected in component hierarchy, click the plus button for Comp Delegate Test to add event node for the delegate
  9. Wire print string node to event node
  10. Set Class Defaults > Auto Receive Input to Player 0
  11. Add input key event and connect Input event > Get Current Level Name > Open Level
  12. Connect Get Current Level Name - Return Value to Open Level - Level Name
  13. Place instance of blueprint in the level and PIE
  14. Press input key

Result:
Print string attached to the delegate event will print when PIE starts but does not print after restarting the level

Expected:
Delegate triggers each time the level is loaded.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-45510 in the post.

1
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay
Affects Versions4.15.34.16
Target Fix4.17
CreatedMay 30, 2017
ResolvedJun 21, 2017
UpdatedApr 27, 2018
View Jira Issue