RealDocs

USkeletalMeshComponent

class Engine Blueprint Since 4.0
#include "Components/SkeletalMeshComponent.h"

Description

A component that renders a skeletal mesh and drives it with animation. This is the primary component for characters, creatures, and any mesh that needs bones, sockets, or animation.

Caveats & Gotchas

  • Assign an Animation Blueprint via SetAnimInstanceClass() at runtime, or set it in the Details panel at design time.
  • Physics simulation and animation are mutually exclusive per-bone — use SetAllBodiesSimulatePhysics carefully alongside animation.
  • GetAnimInstance() returns null if no Animation Blueprint is set or if the component hasn't been registered yet.

Example

Play a montage via the mesh component C++
USkeletalMeshComponent* Mesh = GetMesh();
if (UAnimInstance* AnimInst = Mesh->GetAnimInstance())
{
    AnimInst->Montage_Play(MyMontage);
}

Functions (1)

Animation
1
Access Type Name
public function USkeletalMeshComponent::PlayAnimation

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.