For each loop not creating and add child to widget. But the array is working.

[Blueprints]I am using UE 5.1 and made an inventory system. When i implemented a transfer feature to this system. The ui implementation would not work. But it was not the for each loop not working the loop is increase it array index for each item in the context i have. But after the child is not added to the ui grid list. I am using the slots as a button to activate the transfer and these items are being added to my inventory. yet only the first slot appears and i have to close the ui and open it up again and then they appears.



FRIST ITEM

Second item which is an apple

And when i reopen it

Fix Problem
I was using a Grid Panel. It seams that you can’t create new Grid slots during run time. I replaced all references with a Vertical Box that has solved my problem.

You can, you need to feed it column and row:


You could also use a Wrap Box which would automatically create a Grid like layout providing it exceeds container desired size.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.