Duplicating a return node not working as expected

When in a blueprint function,

  • duplicate the return node (via right-click duplicate, or copy and paste it)
  • change the outputs on one

expected: it changes the output on the one return node

actual: it changes the output on both!


It’s therefor not a copy or a duplicate, it’s two individual nodes representing the same node!

The only way it works as expected is if you right-click empty space → Add return node.


56914-bug1.png

Pretty sure this is intended behaviour, as I can’t see in which scenario it would make sense to have multiple return nodes with different output pins. How would a caller of this function know which of these return nodes is used? How can you know which values you will be getting back, if every return node declares completely different pins? When calling the function from somewhere else, you shouldn’t have to know, that the function actually has multiple return nodes, this is an implementation detail.

If you are familiar with C++ (or almost any other programming language), you should see the analogy of having multiple return statements, where you cannot return different types of values for the same function, as the function signature is completely independent of the return statements used.

you’re right, my bad. I was staring at it for too long and just thought it was the same as macros.

I agree with him, this is likely the intended behavior.