How do you add components to an actor class at runtime in C++?

#Attach

What you CAN easily do

is spawn Static Mesh Actors

and Attach them to your core ship component that is always created.

Then you can go wild with creating Static Mesh assets and then you can dynamically set the Static Mesh Actor’s Static mesh in code

#Set Static Mesh

//AStaticMeshActor* MySMA in .h
if(!MySMA) return;
MySMA->StaticMeshComponent->SetStaticMesh(your static mesh)

#Dynamic Load Object

See my wiki page to load your various static mesh assets from file path