No Get Ref for actor subclass array?

Hey. When i take an array variable set to use a actor subclass, and I drag out of it I only see get a copy instead of get a ref for an input index. Why is this?
Is there any way to get a reference instead of a copy?

For objects you always get a reference. The return is a “copy” but still refers to the same object. Changes made to this item will be propagated back to the array.

For non-object variables, you can right click the node and choose whether it’s a copy or a reference and set-by-ref accordingly:

5 Likes

Oh! I hope someone fixes that, that’s very confusing. Well, thank you! How do I submit a bug report for this?

sorry to resurrect a dead thread but i was running low on sleep and noticed this same thing and googled it but then i came to my senses and realized. its not a bug. an array of objects (ie: custom actors) isn’t an array of objects at all… its an array of object REFERENCES. so you’re copying the reference which gives u a reference to the object (the object being a custom actor).

4 Likes

It is still present nearly three years later and highly confusing.

Hi, I know this is an old thread but I just wanted to expand on this in case anyone else encounters it.

It seems like there is a lot of confusion around the Array Get node, as it sounds in the tooltip like it returns a copy of the Object itself, after some tests, and reading this thread as well as threads Here and Here that what Get is doing is returning a copy of the Pointer to the Object, so when we Get the Object from the Array, then edit the object (ie set its variables), those changes to the Object will also effect the instance of the Object in the Array itself (as they are the same Object, referenced from two different copies of the pointer).

I agree with others on this thread that the wording is highly confusing though. Hopefully I understand this correctly as I am just learning Unreal, so please correct me if I am wrong!

4 Likes

Has this changed since this was posted?

I tried today to make an array of canvas panel objects, and it seems to forcibly convert nodes to copies even when explicitly told to use refs.

image

Apologies for the necro, I thought it would be more useful for others to ask in the top result of google than to make a new post. More visible for others here.

BPs copy a lot. But, if you get a copy of the canvas reference, it still points to the same canvas object, right? So, how does it matter whether you Get by copy or Get by ref in this example? You’re still talking to the same object.