Custom component with a hierarchy

I’d like to, as the title said, code a custom component which contain one or more child. It would create a hierarchy like when we drag’n drop components on one another in the Components tab of the Blueprint window. Right now, I’ve tried this:

UCLASS(meta = (BlueprintSpawnableComponent))
class UBadAssComponent : public USceneComponent
{
    GENERATED_BODY()
    
    UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
    UStaticMeshComponent mesh;

public:
    UBadAssComponent(const FObjectInitializer& ObjectInitializer);

};

Right now, UE will mix all of the attributes from the two component when I add it in the editor. That behavior is really not helpful to make complex component. For exemple, one could think of a component that contain two or three different static mesh.
If needed, I could do a mock to demonstrate the idea.

Here some pictures to explain my point. Say I made a custom AActor in C++. When I create a blueprint from it, I can see each of its children on its own in the component tab.

27700-hierarchyincustomactor.png

You can then edit the property as you’d like by selecting every component in the actor. You can also add new components.

27711-childcomponent2+-+copie.jpg

So now we have cool little hierarchy between all the different component. In UE term, I think we would say they are attached and so their transform vectors are relative to their parent (I think). Now I’d like to create a custom ActorComponent which, when added to a blueprint, would show as a parent-child hierarchy. The result would be like in the green box, but the hierarchy would have been made by c++ code instead of by drag’n droping in blueprint.

Please don’t mind the bad example used in the picture, I made it on the fly to demonstrate my idea. I also open to another way to achieve a similar result.

Can you elaborate on ‘mix all of the attributes from the two components’ ? You can create custom details presentation (for details panel) which will separate them…

I’ve edited my original post. And thank you for you’re time. It is greatly appreciated.

Hey Refnil
Did you find a solution for your Problem?

I have exactly the same problem! Looks like a bug in UE!

Same question. Anyone have fixed the problem?