Download

Loop through struct variable with two array types

Hello,
I wounder how I could loop through two array types (string and Texture2D) and pass the elements to a “Create Widget” node?
The widget to create contains two variables (Name and Texture2D) that will create N numbers of widgets, depending on array length.

I guess my problem is to have a ForEachLoop execution of two array types at the same time? I tried look into how struct variables could help out but got stucked.

Thanks!

I did a test of making a custom ForEachLoop, built on the standard macro.
Added another array input and element output. Then added another array length for the branch check condition.
The custom ForEachLoop seem not to be able to handle wildcards so I set the input arrays to the types I needed as well as the output element.
It seems to work!

cool, not sure exact situation, but maybe: create a struct containing the string and icon, feed it into a foreachloop, , from array element “break” struct, or you maybe looking for a combo of “for each loop” and “for loop” if they need to be separate arrays.