Download

dynamically add Blueprint from constructor - similar to dynamic fence mesh example

i have 2 blueprints, classA and classB
i want classA to be resizeable in the editor, and as it is resized it is populated by classB relative to the space that is available

i can see this working when i click “simulate” but id like to see it in the editor
in the construct script i can’t SpawnActor

is this at all possible?

You want to take a look at the "Add ChildActorComponent " node. One reason this is the way to go, is that if you could just spawn actors (which blueprints derive from) in the construction script, then whenever that script was re run you’d end up with duplicates. The Child Actor is still owned by the parent blueprint and thus gets destroyed and re created when the construction script runs, which is a much more desirable situation.

sorry I dont quite understand how to use Add ChildActorComponent for the desired behaviour
destroyed/run in construct sounds like what i want though!

375b92c8a71b03b1fd227ea5901448c5907a73db.png

and you can play with the return value as you want (destroy it , add it to an array …)