Spawning a blueprint using its name

Hey all,

I’m working on a randomly generated dungeon that has lots of prebuilt chunks. To choose which to spawn I’m currently adding them to arrays based on their type but as the amount increases it’s very time consuming having the blueprint narrow down to a specific list and manually adding them as the game grows.

What i would like to do is construct a string that is the blueprints name and have it spawn that blueprint, is it possible to do this?

So for example it would check the various arrays and return a string like this “Temple_1Exit_1_4” and that would be the name of a blueprint in the content browser.

Thanks!

I don’t know of an ‘easy’ way to do this. It would be nice if there were. However, I can think of a few ways to ‘work around’ it. The easiest way would be to load your objects into an array, and then check the string against some value set on each object. There are also Object libraries, which do something similar, but I am not too familiar with precisely how they work in terms of calling assets out of them.

A somewhat messier solution would be to create an enum with the values being equal to your names, and then do a switch on enum, but that would become more and more unmanageable the larger your list became.

This really is a feature that needs added, though.

I asked a similar question, but got no answers. I’m trying to build a ‘modular’ character, randomly choosing it’s wearing and weapons from a predefined set. I ended up creating a Blueprint that chooses a random meshes from a manually filled arrays.

I’m asking for the same too, I think there is a way to get over this via C++