Get All Map Names Plugin

Description:
Lets you get all names of your maps that exist in your project. Good for Level-Selection menus. You can type in “GetAllMapNames” or “GAMN” to get the pure function or the call function. Both methods give you an output of a string-Array. An example on how to use it is provided as example Project.

Technical Details:
Simple C++ function accessible in every Blueprint that gives back all map-names in form of a string-Array. Either as result of a pure function or a function call.

Images:





Download Link:

UE4.15.1:

With Example Project:

Without Example Project

Approved !

Much easier to move it around projects with a plugin, thanks. :slight_smile:

So, I have been looking for a way to do this myself, and it seems fairly difficult in the editor without writing C++. I saw this, and was excited, but I am developing my game in 4.16.2 and this does not seem to be compatible with it because it is 4.15.1. Would there be any possibility of this being updated to work with 4.16.2? I’d love to have this feature for level select drop down lists in my game. This looks great!

Can you upload this in github? Would be great to expand and update on it. If you are not willing or don’t have the time, please let me know if I can upload it myself and share back with the community.
Thanks!

So sorry to read this at this time, I will update it to the new engine versions, 4.20 and 4.21 so you can use it now sorry for the delay I didn’t get the messages
Greetings
Luis

Sure you can do that, i will update it to 4.20 and 4.21 and will upload both to github as branches so you can access it and change stuff of course

So here is the link to the 4.21 version on github.
4.20 and 4.22 will follow very soon. If you have any problems with it let me know.

Luis

Is there a way to get this compiled for 4.24?

Thanks!

If I have time the next days I will try to.
But as far as I know there is a way to get level files inside the engine now.
But I don’t remember it at the moment.

Hi, wouldn’t something like this be better?



TArray<FString> GetAllMapNames(FString levelsFolder)
{ TArray<FString> MapPaths;
IFileManager::Get().FindFilesRecursive(MapPaths, *FPaths::ProjectContentDir(), TEXT("*.umap"), true, false, false);

TArray<FString> MapNames = TArray<FString>();

for(FString mapPath : MapPaths)
{
  [INDENT=2]//remove the path
FString mapFile;
FString discard;
mapPath.Split(levelsFolder, &discard, &mapFile);

//remove the extension
FString mapName;
if(mapFile.Split(".", &mapName, &discard))
{[/INDENT]
  [INDENT=3]//add map name to our array
MapNames.Add(mapName);[/INDENT]
  [INDENT=2]}[/INDENT]
  }
return MapNames;
 }


You can create a “Plugins” folder at the root of your project folder. Put the “GetAllMapNamesPlugin” folder in. Start your project, it will ask to rebuild for your version. Once done, you can move it to your …/Engine/Plugins/ folder if you wish.

So I’ve tried this - downloaded the code from GitHub, put the GetAllMapNames folder in my project’s Plugins folder (I have UE 4.26 and VS 2019 installed) and when I start the project, it says it needs to rebuild the plugin, I tell it do do so, but it fails and says it needs to be recompiled from source.