Child actor components spawn in level

Hi there,
I’ve got a bunch of actors with children actor components spawned at construct.
For some reason, sometimes all of these components are spawned into the level, so when I play my game the actors are duplicated and it becomes a mess. As an example I have a set of 8 buttons (spawned as children actor components for a specific use). Sometimes when trying the game, using a button makes nothing - and in the editor I find that the 8 buttons are spawned in the level, as well as the actor component children in the blueprint.
It happens with rotating buttons on a secure lock too.
Any idea why this happens and how to avoid this ?

Can you show some code, because this is a bit unclear.

You can’t spawn in the construction. Also, if these components are child actors they would already be part of the BP, no?

Sorry if I was unclear, I think I misused some vocabulary.
See attachments : children actor components are ADDED at construct. But in some cases, these are SPAWNED in the level too - and I don’t know why.

Well what you have there looks ok. Could it be that the spawned buttons just ‘look’ like they’re in the level, but actually attached to the BP?

Very odd…

We can see that you’re feeding the For Each Loop an array (of enumerators?) - what are the chances the content (size, namely) of this array is altered while the loop is doing its magic - this could, potentially, explain all kind of crazy.

But in some cases, these are SPAWNED
in the level too - and I don’t know
why.

So what you’re saying that Child Actor Components are being created without a parent actor and still spawn their own Actors into the level?

Nope. I can select them manually (and have to delete them). The children cannot be selected (it selects the parent actor instead).

I use level streaming, could it be a reason ?

The array (of enums, yes, to define the state of each button) uses a variable modified by instance (but NOT dynamically) on the blueprint. I know array are sometimes weirdos, I use them with precautions since I had bad experiences.
And yes, that’s what I’m saying - and it looks like more awful said like that. The children become independant actors spawned in the level. Like the “add child actor” were considered as a “spawn actor”, and the world locations are the right ones.

The array (of enums […]

It looks like this array is part of a struct? Perhaps something is Setting Members of this struct while the loop is iterating? Or no?

The children become independant actors
spawned in the level. Like the “add
child actor” were considered as a
“spawn actor”, and the world locations
are the right ones.

Do the actors that are supposed to hold onto the Child Actor Components get destroyed at any point, prematurely perhaps?

The blueprint uses a Structure Array, picks a random one, which struct is an array of enums. The initial structure array is set in editor by hand, no dynamic changes occur.

The children actors are spawned once when the level is loaded, and destroyed only with the whole level when unloaded. No specific spawn/destroy action.
As it goes the same for another blueprint (the safety lock), I guess there is a logical reason somehow…

Well I didn’t have the problem for weeks, so I assume it won’t append anymore. If needed I’ll reopen the topic. Thanks all !