UAnimInstance::GetOwningComponent
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintCallable
Description
Returns the skeletal mesh component that created and hosts this animation instance.
Caveats & Gotchas
- • For linked animation instances (sub-graphs set via Set Linked Anim Instance), this returns the skeletal mesh component that the linked instance was added to, not the component of the leader/root anim instance.
- • Do not call this during the static initializer phase of the animation blueprint class; the component reference is only valid after InitializeAnimation has run.
Signature
UFUNCTION(BlueprintCallable, Category = "Animation")
ENGINE_API USkeletalMeshComponent* GetOwningComponent() const Return Type
USkeletalMeshComponent* Example
Access socket transform from within the anim graph C++
if (USkeletalMeshComponent* Mesh = GetOwningComponent())
{
FTransform SocketTransform = Mesh->GetSocketTransform(FName("hand_r"));
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?