Pass-by-Reference in EventDispatcher

Hi everbody,

I have two questions regarding the use of the Pass-by-Reference option for the Inputs in an EventDispatcher :

  1. I am not quite sure to fully understand what it is used or useful for ?

For example, I have an EventDispatcher with the following inputs :


Given that my Object input’s type is already an Object Reference (what I picked from the drop-down list), what would be the difference if I would enable the Pass-by-Reference option then ?

  1. Furthermore, I did try with and without this option to see if there was any noticeable difference, and yes there is. If I enable the Pass-by-Reference I get a warning which reads :

No value will be returned by reference. Parameter 'Object'.

But even though it says that “no value will returned by reference”, on the receiving end of my EventDispatcher I can definitely retrieve the reference and cast it to whatever I need to. It works perfectly fine and in a completely similar manner whether or not the Pass-by-Reference is enabled and regardless of the warning.


1 : In which situation and why would I want to Pass-by-Reference something that is already a reference ?

2 : What does this warning mean ? There’s definitely a value which is returned since I can use/test/cast the reference whether the Pass-by-Reference option is used or not.

I want to emphasize I did my fair share of research on the matter, but all the informations seem to be clashing between one another. Some say it’s a long time bug, some say it’s a normal warning, some say this warning doesn’t make sense, … . So it is really hard for me to wrap my head around this option and fully understand what it does and if I could actually need it.

Thanks a lot in advance !!

Reference is just an index.

An object that is only responsible for passing input.

For example, in loop, if the original object changes, then the object passed from the Input node will also change.

If this is not checked, the Input node remembers the variable when it is obtained, storing it for the time being.

The above is my personal understanding, not necessarily right.

In detail, you can learn:

The difference between Reference and Instance in C++.