4.7p5 Copy/paste doesn't preserve targets when there's a duplicate function name

I’m currently running 4.7p5 but I believe this has been happening for a long time.

If you copy/paste nodes where there is an overlap of same function name in multiple blueprints, copy/paste of nodes gets confused and breaks targets of pasted node.

Here’s my example and how to repro:

Make a new UMG widget (NewWidgetBlueprint is catchy) with two functions: UpdateScore and TestMe that both take one integer argument. They don’t need any code inside of them.

Make a new BP subclass of HUD. Often I use this pattern where I will have same function names in my HUD and my widget, rest of my app always calls one in HUD and it in turn passes it off to widget to actually do work.

So add a function UpdateScore to HUD BP that takes one integer. You don’t need to put any code inside it to see issue. Do not make a TestMe function in HUD.

Add a variable in HUD to hold widget, I called mine Widget of type NewWidgetBlueprint.

Add following nodes across top row to your event graph. Very important: drag out wire from Set Widget to search for UpdateScore to make sure you get one from widget, not one in HUD. Copy nodes for UpdateScore and TestMe and paste their copies in below.

You can see that since TestMe does not have a matching function in HUD it has correct target, while UpdateScore had its target switched out from underneath it from widget to HUD. This to me is a very sneaky bug.


ps. I still can’t get any attachments to work on UEAnswers today.

Hi ,

This is a known issue, reported here:

issue has not yet been resolved, but I have added your notes to bug report. For now, be sure to be aware of it when copy/pasting a function from another BP in a BP that shares same name as a function within that BP.