activeTags
TypeScriptget activeTags(): Array<AnimationGraphComponent_ActiveTag>Swift declarationvar activeTags: [AnimationGraphComponent.ActiveTag] { get }The tags that were active or fired during the most recent graph evaluation tick.
struct · iOS 27.0+ · SDK 27.1
struct AnimationGraphComponentA component that drives skeletal animation on an entity using an animation graph. ``AnimationGraphComponent`` attaches a compiled ``AnimationGraphResource`` to an entity. The component evaluates the graph each frame, computes a skeletal pose by blending and transitioning between animation clips, and applies the resulting pose to the entity's ``SkeletalPosesComponent``. Multiple components in the same scene can reference the same resource, which lets a single graph drive many entities without duplicating its underlying data. Each component keeps its own per-instance evaluation state — animation timing, state-machine progress, and parameter values — so characters that share a graph stay independent. ### Attach a graph to an entity ```swift entity.components.set(AnimationGraphComponent(graph: graphResource)) ``` ### Inspect the active graph state The component exposes the graph's runtime state for debugging and for building tools that visualize what a character is doing. ``activeNodes`` returns every node that contributed to the most recent pose. To work with a single kind of node, iterate ``activeStateMachineNodes`` or ``activeClipNodes`` instead — those collections return the narrower ``ActiveStateMachineNode`` and ``ActiveClipNode`` types, which expose only the fields that apply to that node kind. ```swift for node in component.activeStateMachineNodes { print("\(node.name): state \(node.currentState)") } for node in component.activeClipNodes { print("\(node.name): cycle \(node.currentCycle)") } ``` To observe outputs the graph emits back to the rest of the application, read ``activeTags``. Tags are graph-level signals that the graph raises while certain states are active.
get activeTags(): Array<AnimationGraphComponent_ActiveTag>Swift declarationvar activeTags: [AnimationGraphComponent.ActiveTag] { get }The tags that were active or fired during the most recent graph evaluation tick.
get activeNodes(): Array<SDKHandle>Swift declarationvar activeNodes: [any AnimationGraphComponent.ActiveNode] { get }Every node that contributed to the most recent graph evaluation tick. The returned array is a snapshot — its element type is `any` ``ActiveNode``, so each entry exposes only the fields common to all node kinds. To inspect node-kind- specific state, downcast each element to ``ActiveStateMachineNode`` or ``ActiveClipNode``, or iterate ``activeStateMachineNodes`` or ``activeClipNodes`` for the same view filtered to a single kind.
get activeClipNodes(): Array<AnimationGraphComponent_ActiveClipNode>Swift declarationvar activeClipNodes: [AnimationGraphComponent.ActiveClipNode] { get }The animation clip nodes that were active during the most recent graph evaluation tick. This is the typed view of ``activeNodes`` filtered to ``ActiveClipNode``.
get activeStateMachineNodes(): Array<AnimationGraphComponent_ActiveStateMachineNode>Swift declarationvar activeStateMachineNodes: [AnimationGraphComponent.ActiveStateMachineNode] { get }The state machine nodes that were active during the most recent graph evaluation tick. This is the typed view of ``activeNodes`` filtered to ``ActiveStateMachineNode``.
get graph(): AnimationGraphResourceSwift declarationvar graph: AnimationGraphResource { get }The compiled animation graph that backs this component.
static init(graph: AnimationGraphResource): AnimationGraphComponentSwift declarationinit(graph: AnimationGraphResource)Creates a component that drives skeletal animation on an entity using the supplied compiled animation graph. Per-instance evaluation state initializes when the entity becomes active in a scene, so accessors such as ``activeNodes`` return an empty array until the first evaluation tick has run. - Parameter graph: The compiled ``AnimationGraphResource`` that drives this component.
No declarations were skipped in this snapshot.