Difference between get (a ref) and get (a copy)

As ClockworkOcean said:

Getting a copy is actually creating a new chunk of data that contains the same data, but is otherwise unrelated to the array element.

Getting a ref (reference) is actually getting the array element itself.

If you modify the ref, the changes are reflected back into the array.

If you modify the copy, the changes are not reflected back into the array.


My advice is you use the “Get (a copy)” nod for when you just need to read the data from the array, but you don’t want to modify it. (Like retrieving the score of a player from an array of player scores)…

An you should use the “Get (a ref)” node for when you want to change the data from the array. (Like giving a player more points in an array of player scores).

Hope this helps

5 Likes