Merge Arrays in Blueprint UMG

Hi all…

Im creating a dynamic list in umg that pulls players information into a bar.
1: Players Rank Icon (Slate brush asset)
2: Players Name (Text)

b93418d947a9adddae9221a57d1b9f9c0a7073c4.jpeg

And i can get it so show: for example 4 players names with a for each loop etc.

But im not sure how i go about combining the 2 arrays together (Players Rank Icon (Slate brush asset) + Players Name (Text)) Before i add to the for each loop … Or am i trying the wrong approach. Thanks for any advice in advance.

You can create a user struct representing the player data, (Name, Rank, …etc). Then you’ll just have a single array of data. Alternatively, if the UI needs to be updated while visible, like if rank can change while the UI is up, I would instead just assign the user name to the player row widget, and have the widget internally query the rank of that player in a binding.

Thanks for the advice, but i seem to be having the same problem with the struct…
Could you maybe explain some more

The struct advice requires you to change the storage mechanism to always use structs, so that you’re not trying to compose them out of multiple arrays. Use a ‘for loop’ instead of the ‘for each loop’, then you can just access the same index in a single pass for multiple arrays.

Yep i understand…, thank you,