i want to create child actors in a constructor in blueprints

Am playing about in blueprints.

I want to create some actors at the root and then have them also able to spawn child actors.

But I would like to do it all in the constructor - because I quite like to play in the viewport of the actor.
However, I cannot access any of the spawn functions (which makes sense tbh).

Is this folly?
The closet thing i have found is the ‘Add Child Actor Compoennt’ but big warning attached so cannot imagine that is the answer.

What am i missing? :smiley:

You can make a function or event “call in editor,” which will add a button in the details panel. That will let you spawn actors in the editor. These will spawn them persistently, so you will have to manually manage deletion of them. They also can be undone.

Thanks, will remember that.

Its not quite what I want. I was writing some code to create levels at runtime.

I was using the constructor as it seemed like it was goign to make all kinds of things easier to be able to see then in the editor.

I now see the error of my ways - especially as I have started to get all this working multiplayer and the importance of server vs client becomes apparent (and stuff that is in the constructor really only happening in the editor).

I am just using spawn actor functions in begin play (of the level blueprint now)

1 Like