How come my For Each Loop isn't working in a widget blueprint?

So, I’m trying to use a For Each Loop to get the length of the array to reflect on the number of child widgets added in a wrap box, but it doesn’t work. The only thing that works for me is “For Loop”, but I’ve seen others use “For Each Loop” and it works for them… :cry:

The blueprint I created in the widget goes like this…

Event Pre Construct > For Each Loop > Create widget > Add to Wrap Box.

For “For Each Loop”, I called the “Get player Character” from there I got the “Get Component by Class” and then pulled out the Array from there.

What am I doing wrong? :frowning_face:

For some odd reason, the “For each loop” only works with “Event Tick” but not “Event pre construct” Or “Event Construct”, why is that?

You mean, the ForEach loop is not visible in the context browser?
If ao…
go into a Blueprint you knoe a foreach is inside… or can be added.
Just copy and Paste it from there, into the buggy BP…

Hello! :slight_smile:

No, I mean like, the child widgets don’t appear during runtime.

If the length of the array is 10, and I do a For Each Loop, nothing happens.

If I do a “For Loop”, it works, for some reason… 10 widgets appear when I start the game. I’m not sure why it works for “For Loop” but not “For Each Loop”.

Can you show me the Code you created?