Download

Change static mesh to skeletel with bones

Hi! how to change static mesh to skeletal?
.h file
UPROPERTY(Category = Mesh, VisibleDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = “true”))
class UStaticMeshComponent* PlaneMesh;

    FORCEINLINE class UStaticMeshComponent* GetPlaneMesh() const { return PlaneMesh; }

    .cpp file:

struct FConstructorStatics
{
ConstructorHelpers::FObjectFinderOptional<UStaticMesh> PlaneMesh;
FConstructorStatics()
: PlaneMesh(TEXT(“StaticMesh’/Game/Flying/Meshes/1_non-triangle.1_non-triangle’”))
{
}
};
static FConstructorStatics ConstructorStatics;

// Create static mesh component
PlaneMesh = CreateDefaultSubobject&lt;UStaticMeshComponent&gt;(TEXT("PlaneMesh0"));
PlaneMesh-&gt;SetStaticMesh(ConstructorStatics.PlaneMesh.Get());
RootComponent = PlaneMesh;

i tryed to change this code to

ConstructorHelpers::FObjectFinder<USkeletalMesh> New_Mesh(
TEXT(“SkeletalMesh’/Game/AnimStarterPack/UE4_Mannequin/Mesh/SK_Mannequin.SK_Mannequin’”));
GetMesh()->SetSkeletalMesh(New_Mesh.Object); but getmesh() - is not identificate
why?