<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKStateMachine/currentState",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKStateMachine(py)currentState"
  },
  "title" : "currentState"
}
-->

# currentState

The state machine’s current state.

```
var currentState: GKState? { get }
```

## Discussion

A state machine can be in only one of its states at a time. To transition to another state, call the [`enter(_:)`](/documentation/GameplayKit/GKStateMachine/enter(_:)) method.

When you call the [`update(deltaTime:)`](/documentation/GameplayKit/GKStateMachine/update(deltaTime:)) method, the state machine calls the [`update(deltaTime:)`](/documentation/GameplayKit/GKState/update(deltaTime:)) method on its current state object.

---

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)