Thanks TJ for your answer and sorry when I didn’t made myself clear, but the struct needs to be also in an array! Here ist my setup and the output log which shows 1 twice although the element is set to 500
Create this blueprint that pulls the Struct out of the Array variable, then pulls the Int Array out of the Struct. You can then set any Int Array element and see the change.
Let me know if that works or not. Nested strucs/arrays can be quite confusing, if I’m not understanding correctly please bear with me and we can keep troubleshooting.
I’ve found a workaround for this. The solution is a bit awkward, but it should do the trick for people like me who have desperate need of nested arrays. The way you do this is to set a temporary variable to your struct array, modify this temporary array and then set this value back into the larger array. Here is how to do it for Set Array Element, though the same principle applies for manipulating the array in other ways. I hope someone will find this helpful until Epic finds an official solution:
Isn’t it because primitive (String, Integer) arrays get copied by value? Meaning any change on an array you just got from a struct is just a copy of the array the struct itself holds. Along with the fact that each separate usage of the array is a new copy of the original array of the struct itself. These explain the behaviour and suggest: Great copy constructors and loving passing by value