Download

Can Construction BP spawn Blueprints?

I have Blueprint that can spawn a maze (or top level of layout), for now it has just instanced static meshes in place of all walls. I want to replace those boxes with Blueprints to add more variation.
I also want to do this all from construction script, so i can see it in editor, change random seed, place some blueprints manually etc.

Is this possible? Add actor from blueprint does not work in construction script.

short answer, yes.
But if you plan to drag it into your scene, then please don’t.
Otherwise every time you drag that object, it will get reconstructed and then spawn many unwanted duplicates.

You can use Add ChildActorComponent to spawn Blueprints in the Construction Script. ChildActors will get destroyed when the Construction Script is run again, so you won’t have the endless spawning problem that PenguinTD mentions.

Great, but how do i use it? I tried yesterday and it complained all the time tat actor is not my_blueprint class.