dynamically add components to actor scene hierarchy (construction script)

Is it possible to build the scene hierarchy with construction script. I was working on scriptable tool and while I can add the component using add component from class on event setup, the moment I move it, the component disappears, probably it rebuilds itself ?
but here, can we make those component appear or attach to actors visibly once the construction script is executed ?

Construction script is executed multiple times, mainly when manipulating and moving the object, which means that whatever you create you must store and each time check if it is already created.

Otherwise you’ll be creating multiple components each frame or on each move.

Other than that, yes you can create a hierarchy by attaching Actors to other Actors, however in my experience Unreal projects have pretty flat hierarchy (compared to Unity) since their internal components are not shown in the tree.

Also, take the time to check Procedural Content Generation Overview | Unreal Engine 5.6 Documentation | Epic Developer Community

Can’t really recommend it because I have no idea what you are trying to achieve but still…

I understand that its executed on some operation but since it already doing the hard part of creating the cubes itself and going through the loop, why we cant have the hierarchy ? its possible with C++ but I am not a unreal programmer.

I’ve used PCG but PCG isnt what I need in this case.

Basically I was working on a scriptable tool in unreal which allows you to create editor tools and make your life easy, so scriptable tools have better integration with dynamic meshes and geometry scripting but both suffer from exactly the same issue.

e.g I was planning to simply create some meshes with add component from class (or in Geo scripting its Append Mesh or append box), the idea is to modify to component once its created, but unfortunately I am not able to do it.

another note is that I can create a static mesh and than then I can assign it (most common way to do it) but that kills the whole point, what if you need 50 static meshes ? I mean its no different from creating 50 manually using add button inside root component and then setting it up through construction script.

UE5 C++ 14 - How To Add Components To Blueprints with C++? - Unreal Engine Tutorial Editor CPP - YouTube

In the video I shared above check around 17:19.. He is running the tool and an actual component is added, any way to do it via scriptable tools ? if not construction script ? obviously no C++.