UAnimInstance::GetLinkedAnimGraphInstanceByTag
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintPure
Description
Finds and returns the UAnimInstance running inside a Linked Anim Graph node that has the specified tag. Used to access or modify state on a sub-graph instance at runtime.
Caveats & Gotchas
- • Returns nullptr if no linked graph node with that tag exists or if the node is not currently active. Always null-check the result before casting.
- • Tags on Linked Anim Graph nodes must be unique within an AnimGraph — if the same tag appears on multiple nodes, only the first one found is returned. Duplicate tags produce a warning in the editor.
Signature
ENGINE_API UAnimInstance* GetLinkedAnimGraphInstanceByTag(FName InTag) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InTag | FName | The tag name assigned to the Linked Anim Graph node in the AnimGraph. | — |
Return Type
UAnimInstance* Example
Accessing a locomotion sub-graph instance C++
if (UAnimInstance* LocomotionInst = GetLinkedAnimGraphInstanceByTag(FName("LocomotionGraph")))
{
if (UMyLocomotionAnimInstance* LocAnim = Cast<UMyLocomotionAnimInstance>(LocomotionInst))
{
LocAnim->SetMovementSpeed(CurrentSpeed);
}
} Tags
Version History
Introduced in: 4.24
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?