Confirmation of actor hierarchy use

I’m making a custom AActor based on some tutorials from EPIC and the community and I have a history of working with Unity.

I’ve read through Actors | Unreal Engine Documentation but still have some questions about the standard/correct use of the component hierarchy of actors.

In my particular scenario, I have a custom AActor which has a procedural mesh currently set up to be a simple cube shape. I can see that the root component BoxComponent isn’t aligned to the mesh yet, my question is about something else.

From tutorials online, I’ve set up the AActor constructor to:

UBoxComponent* BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("RootComponent"));
 RootComponent = BoxComponent;

//set up my procedural vertices and then:

mesh->CreateMeshSection(1, vertices, triangles, TArray<FVector>(), TArray<FVector2D>(), TArray<FColor>(), TArray<FProcMeshTangent>(), true);

mesh->AttachTo(RootComponent);

I then end up with the following hierarchy in the editor:

96233-vasfvpluginproject+-+unreal+editor+27062016+125253-001.jpg

I can see that the (Instance) is like the object of my class, and has my UPROPERTY(EditAnywhere) member variables. It also has a transform (location, rotation, scale).

Then the root object also has a transform (location, rotation, scale) and shape (the BoxComponent), physics and collision.

And under that I have my mesh which also has a transform, physics, collision and material.

Is there any reason in my scenario to have created the BoxComponent? I’m expecting to add more vertices later in the execution so the actual mesh shape will not be a cube, and so the root component BoxComponent won’t describe the shape anymore anyway.

Ok, I’ve changed my set up a little so that the procedural mesh is set as the RootComponent, and completely removed the BoxComponent which was from the tutorial.

It doesn’t crash (still) and it looks a bit neater to me. Hopefully that is fine!