Im trying to attach multiple skeletal meshes into the “Mesh” of the character blueprint in c++ . But in doing so im always receiving a crash . Below is the code im using (just two lines) and the crash error thrown .
code :
this->Hands_Mesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Hands"));
Hands_Mesh->AttachTo(this->GetMesh() );
error :
Assertion failed: ChildCount > AttachChildren.Num() [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp] [Line: 837]
AttachChildren count increased while detaching 'Hands', likely caused by OnAttachmentChanged introducing new children, which could lead to an infinite loop.
UE4Editor.exe has triggered a breakpoint.
Any insight into what i did wrong will be appreciated . Thanks .