I am actually trying to do this in a very short form such as in this blueprint image we set the base mesh once and attaching all its sub meshes to used the base mesh as a master pose component, we are not calling the base mesh for each of its sub mesh particularly.
but in C++ I am calling the base mesh for each of the sub mesh each time.
Is it possible to call the base mesh once as in blueprint I did?
#pragma region Setting body parts
//Setting fashion head mesh
MeshHead = CreateDefaultSubobject <USkeletalMeshComponent>("HeadMesh");
MeshHead->SetupAttachment(GetMesh());
MeshHead->SetMasterPoseComponent(GetMesh());
//Setting fashion hairs mesh
MeshHairs = CreateDefaultSubobject <USkeletalMeshComponent>("HairsMesh");
MeshHairs->SetupAttachment(GetMesh());
MeshHairs->SetMasterPoseComponent(GetMesh());
//Setting fashion chest mesh
MeshChest = CreateDefaultSubobject <USkeletalMeshComponent>("ChestMesh");
MeshChest->SetupAttachment(GetMesh());
MeshChest->SetMasterPoseComponent(GetMesh());
//Setting fashion vest mesh
MeshVest = CreateDefaultSubobject <USkeletalMeshComponent>("VestMesh");
MeshVest->SetupAttachment(GetMesh());
MeshVest->SetMasterPoseComponent(GetMesh());
//Setting fashion shoes mesh
MeshShoes = CreateDefaultSubobject <USkeletalMeshComponent>("ShoesMesh");
MeshShoes->SetupAttachment(GetMesh());
MeshShoes->SetMasterPoseComponent(GetMesh());
//Setting fashion whole mesh
MeshWhole = CreateDefaultSubobject <USkeletalMeshComponent>("WholeMesh");
MeshWhole->SetupAttachment(GetMesh());
MeshWhole->SetMasterPoseComponent(GetMesh());
//Setting fashion hands mesh
MeshHands = CreateDefaultSubobject <USkeletalMeshComponent>("HandsMesh");
MeshHands->SetupAttachment(GetMesh());
MeshHands->SetMasterPoseComponent(GetMesh());
//Setting fashion backpack mesh
MeshBackpack = CreateDefaultSubobject <USkeletalMeshComponent>("BackpackMesh");
MeshBackpack->SetupAttachment(GetMesh());
MeshBackpack->SetMasterPoseComponent(GetMesh());
//Setting fashion body mesh
MeshBody = CreateDefaultSubobject <USkeletalMeshComponent>("BodyMesh");
MeshBody->SetupAttachment(GetMesh());
MeshBody->SetMasterPoseComponent(GetMesh());
#pragma endregion End Setting body parts