Blueprint Array - Set - reference or value?

When I set my “Chunks to Remove” array as I am, does this copy my “Loaded Chunk IDS” array or make my “Chunks to Remove” array a reference to my “Loaded Chunk IDS” array?

16051-bp_help.png

Why don’t you check for yourself? ;] if "chunk to Remove changes will appear in “Loaded Chunk IDS” it means it’s a refrence

In C++ it does not work like that, as you can decide whatever variable is a pointer/refrence (TArray*) or container (TArray). One of complements from C++ opposition in this community is that you need to learn about that… but as you can see sometimes it’s very useful :stuck_out_tongue:

You could try workaround this with “Append Array” node or some other array operation nodes

I was hoping I wouldn’t have to waste the time doing so when I got back to working on it. The documentation says nothing about it. As far I can tell, there is no way to copy an array other than looping through it. If it works similar to a c++ array, then I would expect that “Chunks to Remove” is a reference variable.

You are right. I’m getting my C# and C++ mixed up. I did the testing and it does work the way I want it to.

For those interested, this method does copy the array.