Referencing a map by something other than it's name


Our game requires we load/unload levels conditionally at various points. I’d like to make some sensible way of doing this so that it’s extendable and safe, and relying on string names for maps is a bit of a pain. Is there any way to reference the map assets from a blueprint/struct variable?

If the levels names are known, I suggest using an enumeration or a structure, so you have a single place where the names are written as plain text. At least that’s what I do, but I have a finite amount of levels which is known at build-time