Event dispatchers (i.e. delegate property values) are currently copied to the new instance when users copy/paste/dupe actors.

However, this means that if you have an instance whose dispatcher is dynamically bound to some event on another instance (i.e. via dynamic binding), duplicates end up being bound to the same event(s). The only way users can clear the binding from the duplicated dispatchers is to redirect the dynamic binding to each duplicate instance and then clear it. Deleting instances with bound events also can leave dispatchers with stale bindings to deleted instances.

Both of those seem like potentially unwanted behavior; we should probably be clearing those out on copy/paste/duplicate and/or when bound instances are deleted.

Steps to Reproduce
  1. Create a blueprint Actor named BP_TriggerSender
  2. Create a blueprint Actor named BP_TriggerReceiver
  3. In BP_TriggerSender, add an event dispatcher called "OnTrigger" that takes a BP_TriggerSender as its parameter
  4. In Begin Play, invoke OnTrigger with "self"
  5. In BP_TriggerReceiver, add a member variable called TriggerSender to BP_TriggerReceiver actor of type BP_TriggerSender
  6. Mark the TriggerSender variable Instance Editable
  7. Under the Events section, click the green + next to "On Trigger" to bind a new custom event to it
  8. In the body of the event trigger, use PrintString to display both names like "{receiver} triggered by {sender}"
  9. In the Level Editor, add a BP_TriggerSender and rename it to BP_TriggerSender_Instance1
  10. Add a BP_TriggerReceiver and rename it to BP_TriggerReceiver_Instance1
  11. On BP_TriggerReceiver_Instance1, set the Sender variable to BP_TriggerSender_Instance1 (using the eyedropper/dropdown)
  12. Play in Editor and notice the expected output: 'BP_TriggerReceiver_Instance1 triggered by BP_TriggerSender_Instance1'
  13. Exit PIE
  14. Duplicate BP_TriggerSender_Instance1 and BP_TriggerReceiver_Instance1 (this creates the _Instance2 versions)
  15. Play in Editor, and notice that the first instance's delegate is invoked twice, once by each instance


Have Comments or More Details?

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

Login to Vote

ComponentUE - Gameplay - Blueprint Editor
Affects Versions4.264.275.0
CreatedMay 12, 2022
UpdatedMar 26, 2023
View Jira Issue