How to show level previews?

Hi! There will be many maps in our project and I want designers to store info about every map in levels blueprints such as “preview image”, “min/max players count”, “minimap preview” and so on. In game will be menu where player can select what map he wants to play and I want to show him this “meta” information for every map. So, how can I achieve this goal through blueprints (better) or c++?

There are a lot of ways to achieve this. The easier one I can think of is:

  1. Creating a Structure with all the data you want to store (Right Clickon the Content Browser > Blueprints > Structure).
  2. Create a blueprint with a variable that is of that Structure Type and make it an array (Inside the blueprint > Add variable > Set the class/type to the structure you created > click on the little grid beside your variable in the menu).
  3. In the defaults of said blueprint add members to the array with the data you want to store about each map.
  4. In your level selection menu get the default of the after mentioned blueprint (get the array of structs). Build your menu around the data contained in each of thelements of the array.

Hope it helps. Cheers.

Thank you. But the question is how to store this info in “level blueprints” (or near it). This solution may help us to distribute maps separately. For example, in StarCraft or in Unreal Tournament you can upload new map without changing other assets. Just place it in the maps directory and the game “understands” that there is a new map with defined attributes to show in level selection menu. So, the question is: “How it works?”. Especially, can I implement such a thing through blueprints. If no - what the simplest way to do it in C++ (just main idea, maybe somebody faced this problem, knows the pitfalls and there is no need to reinvent the wheel)

It cannot be done in blueprints (at leas not that i know of). However you can check the code of Unreal Tournament to see how its done there (you can get it from github). I would start checking out how they made the main menu, and see what variables they are getting from the level, if any.

You may want to expand the UWorldSettings Class like mentioned here. I don’t know how you will get the data from the map without opening it, but it has to be on the Level selection menu from the Unreal Tournament code.

OK! Thank you again :slight_smile: At least I’ll not spend my time in hopeless search in blueprint docs. It is nice that we have access to UT code.

Also I have some ideas about how to retrieve levels info. In my opinion, program already has initial array of maps data, as you mentioned earlier. After entering the menu, code scans maps folder and if it is different with actual array, adds or removes info about maps downloading or parsing them. Then saves the array on the disk for further use.

That my thoughts about the problem right now.