I have created a blueprint that is meant to be able to spawn actors from a dynamic set of blueprints, and the spawn actor from class function requires a class to be passed in to spawn an actor, how can I get the class from a blueprint I have created and pass that class into the spawn actor function?
Basically I want to be able to have logic to select a blueprint (or class) and spawn that as an actor from the blueprint script.
Some from my understanding you got set of blueprint classes (since blueprint is practically a class as same as coded in C++) and one class that select one of those classes and spawn them.
I can’t find block which would grab asset form content browser, but C++ has APIs for that so you could try to use that if you got skill. Alternatively, you could create array of classes and select classes from that array.
I’m not sure you need to extract it, you can spawn bluebrints, they are really classes, which the _c tacked to the end of their name kind of indicates. I have used the SpawnActor node and in the selection box dropdown my blueprints that do extend from Actor in some way are there.
As for looping through the list of them. I’m not 100% sure, but have you looked at the Blueprint LibraryAsset?