Something like IsValid for array of struct elements?

Hi,

I’m trying to see if my array of struct elements contains an item at a given index. If it was an array of objects or strings or so, it would be possible to do an “Is Valid” check on an array “Get” but this doesn’t seem to exist for an array or structs.

What would be the correct way to see if the struct array contains anything on a given index?

I found a solution. Just do Break Struct on the Get node and then do IsValid on one of the fields from the struct.

1 Like

structs are not “reference types”, basically structs are always valid, by default are 0/false initialized, if you need to check if those values are default just check if are all 0, alternatively you could add a bool flag " initialized", and set it to “initialized” when struct has meaningfull values.

Wrong. You’re probably talking about C# structs not C++ ones.
https://www.google.com/search?q=c%2B%2B+difference+between+struct+and+class