<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23AnimationGraphComponentV22ActiveStateMachineNodeV"
  },
  "title" : "AnimationGraphComponent.ActiveStateMachineNode"
}
-->

# AnimationGraphComponent.ActiveStateMachineNode

Debug information for an active state machine node within the graph.

```
struct ActiveStateMachineNode
```

## Overview

Use this type to read the current and previous states of a state machine, along with
the most recent transition the state machine took. The state and transition values
are IDs into the graph definition rather than human-readable strings.

## Topics

### Identifying the node

[`let id: Int`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/id)

The unique identifier of the node within the compiled graph.

### Inspecting the node state

[`var currentState: Int`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/currentState)

The ID of the state the state machine is currently in.

[`var previousState: Int`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/previousState)

The ID of the state the state machine was in immediately before
[`currentState`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/currentState).

[`var lastTransition: Int`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/lastTransition)

The ID of the most recent transition the state machine took.

[`var wasReset: Bool`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/wasReset)

A Boolean value that indicates whether the node was reset during the last
evaluation tick.

### Instance Properties

[`let name: String`](/documentation/RealityKit/AnimationGraphComponent/ActiveStateMachineNode/name)

The author-supplied name of the node from the graph definition.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Identifiable`](/documentation/Swift/Identifiable)

[`ActiveNode`](/documentation/RealityKit/AnimationGraphComponent/ActiveNode)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)