How can I list all my levels into an array?

Hi guys,

so inspired by veggiesaurus answer on [this thread][1], I’ve made a scrollable dynamic list of buttons that lead to several levels of my game.

The thing is that in order to add all those levels into the array I use to create the list, I “need” to manually do it like in the following screen capture. Therefore, my question is if there is any simpler, more elegant way to do the same, which is basically add the name of all my levels to the World List array.

Create a string | struct map in the Game Instance. Or even string | int if it’s as simple as you show above.

More info on maps:

Or use a data table, or create an array of string. Then use ForEach loop to populate the array in the widget.

edit: tbh, why not create the struct array to start with? Any reasons for that? You can select the array variable and populate it manually.

I was wondering why you linked to a page regarding Maps… and WTF?!
I had no idea these existed!
Whilst I understand why “Maps” makes sense as a name for them, given that term aready existed, it’sa terrible name choice. I probably spotted this a while ago and thought they were levels

Awesome! Thanks. And Grr! For me not knowing about them. This engine is vast…

Ha, they’re also referred to as dictionaries so, yeah, naming conventions:


I was trying to avoid populating the array manually, but in the end it has been the quickest, most effective approach.
Also, I didn’t know about maps in Unreal, and when I looked for them used the word dictionaries, so thanks for that too Newest

I couldn’t find a way to automatically get all .umap names so I just created a simple String array and filled the entries manually.

You could write a Python or bash script that returns all files with a .umap ending if really needed but I doubt it’s worth it (other than testing for missing map files)

A Map is a generic data term that predates the existence of the UE engine, but I can see why that would be confusing. UE is actually pretty good about using conventions found more broadly in computer science (especially the AI stuff).

1 Like