---
title: previousState
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/animationgraphcomponent/activestatemachinenode/previousstate
---

# previousState

The ID of the previous state.

## Declaration

```swift
var previousState: Int { get }
```

## See Also

### Inspecting the node state

- [currentState](realitykit/animationgraphcomponent/activestatemachinenode/currentstate.md)
- [lastTransition](realitykit/animationgraphcomponent/activestatemachinenode/lasttransition.md)
- [wasReset](realitykit/animationgraphcomponent/activestatemachinenode/wasreset.md)
