MeshComps = NewObject<USkeletalMeshComponent>(this, NAME_None, RF_NoFlags, GetMesh());
MeshComps->SetAnimInstanceClass(nullptr);
MeshComps->SetCollisionEnabled(ECollisionEnabled::NoCollision);
MeshComps->AttachToComponent(GetMesh(),FAttachmentTransformRules::SnapToTargetIncludingScale);
MeshCompsSetMasterPoseComponent(GetMesh());//和主mesh共用一套骨骼,如果不需要那么不需要设置这个方法
MeshComps->RegisterComponentWithWorld(GetWorld());

  



posted on 2022-11-02 11:41  jackdesk  阅读(42)  评论(0编辑  收藏  举报