Pass-by-Reference for Class Reference

What does Pass-by-References do for parameters of type “Class Reference”?

Class Reference Parameter

class_reference

Pass-By-Reference

pass_by_reference

They are the same term for two different meanings.

A class “reference” or object “reference” is basically a pointer. It’s the memory address that points to the instance of an object, or to the class of an object.

“Pass by reference” is a term used in functions arguments(parameters), meaning the passed parameter can be modified by the function, so when the function finishes execution the variable you passed in may have a different value (which is normally not the case).
A good example is the increment(++) node :

2 Likes

also you can notice an input BP is a reference because the input node is a diamond like this one:

image

Somehow I feel OP is well aware of what by-ref means, and is asking specifically about passing a class by ref:

Apart from blowing Blueprints up, not sure what this could be used for. :expressionless:


Reparent a child class to another child class?

You explained “Pass-by-Reference” generally, but I already understand that.

I specifically want to know what “Pass-by-Reference” does for “Class References”.