New to Unreal Engine here, but not new to c++. In the tutorials I saw, the way they created the UStaticMeshComponenent was by first using
mesh = CreateAbstractDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
and then opening up the unreal editor and setting the shape of the mesh manually. For example, select the drop-down box and select "cube" or something. However, this seems a little inconvenient for me, since every time you drag and drop the actor into the level, you need to manually change the shape of the static mesh. I was wondering if it is possible set the shape from c++ itself. For example, something like this:
mesh->SetStaticMesh(Shapes::Cube);
Of course that isn't a real method, Shapes isn't a real namespace, and Cube isn't a real object. But what method and what parameters can I use to make this possible?