Set members doesn't work with array element

I’m not sure if it is a bug or not, but still want to report it.

I know, that I can use Set array Elem. But in this case I need to connect all of the values like this:

But this is really bad way to work. What if I need to change only one member in many places? And if I add one more variable to this stuct, I have to connect it’s value everywhere I use such logic.

P.S. I chose 4.9 Preview, because it is the latest version. 4.8, 4.7 and other ones are also have this issue.

Hi ,

This is a known issue as UE-6451. Unfortunately I do not have a timeframe of when it will be addressed.

At least you know :slight_smile:

Thank you) Hope Epic will fix that in the future.

This issue is still open? I have the same problem in 4.9.2.
Is the fix eventuell in 4.10. ?

Ok, there seems to be no fix for UE-6451 in 4.10 preview, according to the release notes…

But there seems to be a small workaround:

  1. Take array element that you need to modify
  2. Assign the array element to a temporary struct variable (if you are working in a function, use a local variable)
  3. Change the struct member you need to change with “set member in …”
  4. Assign the temporary variable to the array to the same location (index) you took the element from.

Still no fix in 4.10 release.

Confirming the workaround of assigning the struct to a local variable that will then be modified works.

Hey everyone,

The devs are still investigating this.

Just adding to Rasterizer’s comment. I tried this in house and it does seem to be a useful workaround for the issue.

Thanks for this workaround, bug still here in 4.11.2

Hi ,

This bug is marked as fixed in 4.12. While I cannot guarantee that it will make it into the final release build, I would keep an eye on the release notes on our [Announcements and Releases][1] section of the forums.


I still have that issue in 4.12.4

Hi, the Jira ticket UE-6451 is still indicated as “unresolved” (I have 4.14). Could you please give an update ?

Hi, the Jira ticket UE-6451 is still indicated as “unresolved” (I have 4.14). Could you please give an update ?

The issue is still being investigated by our developers with a targeted 4.16 fix version. Keep in mind that this is subject to change at any point as priorities shift and new crashes and blockers are discovered.

Have a great day

Omg awesome bug. And I naively believed that it is enough to simply pass the address of a member of the structure to a function))

It’s still there in 4.18

Actually it is not… You can now get as a ref to structure, but not as a copy, wich works fine with SetMembers.

Does add to an array work though?

I’d like to share the answer to this.

The problem is that set member in struct requires that a reference of a struct is feed in. So just passing a copy of that struct won’t do the job.
There is a get node for arrays called “get by ref” which returns a reference (shown as shape instead of the circle on the get node). Or more elegantly put here is how it should look:

Note that you cannot use the foreachloop node since it returns copy of any array you feed into it.

4.25.4, This problem is still there…