Spawn a child actor in scene

Hi,

I’m looking for a way to add an actor that includes child actors into my scene, and then spawn all the child actors out of my main actor.
I can create a script that removes the child actor and then spawn in it the world but I would like to keep all the variables set in the main actor.

In other words, how can I de-attach the child actor from an actor and make it a normal actor while keeping al the variables in there?

Hi Crossroad1000,

Are you using ChildActorComponents or spawning actors and attaching them?

If you spawn child Actors (Spawn an actor and then Attach it to the parent with “AttachActorToActor”) you can then “DetachFromActor” that actor without having to recreate it (or loose information).

If you’re using ChildActorComponents, that’s not so straight forward - you will need to copy the contents yourself - making a function like (CloneMe) in each of the actors you want to spawn off would keep it fairly simple…

1 Like