Dynamic add sub components to component by using blueprints

Hi all,

I am attaching an actor blueprint to my level during runtime, which works just fine.
After I attached it to the selected level actor, I would like to create a sub-structure of StaticMeshComponents inside the new attached actor.

At the moment, I just found one solution to archive this, here is the blueprint of the new attached actor.

Red: How to create new staticmashcomponents during runtime.
Blue: Just loop of my data
Green: What I really want to do Is like the Add button, to attach a new static mesh component to the “floor” component.

With my solution, new attached staticmashcomponents will be added to the actor, can be clicked in by level but they are not visible inside the outliner or the details pane of the new attached actor, also they will not be saved, when I save my project.

Is there any way to add custom staicmashcomponents of a selected actor by using blueprints or c++?

Please help

Hi,

Found a solution myself, here is the final blueprint to create the static mesh components.

The problem was that the array for the data was provided by an blueprint interface event, which was just available during generation, therefore i had to create a custom array variable inside the blueprint which will now be stored and can be reused during construction.