# Sandbox.Animation.GraphBuilder.StateMachine

```csharp
StateMachineBuilder StateMachine()
```

Add a state machine. Add states wrapping pose nodes, wire them together with
transitions, then use it anywhere a [Sandbox.Animation.GraphBuilder.Node](/api/Sandbox.Animation.GraphBuilder.Node) is expected. The first
state added is the default state.

### Returns

`StateMachineBuilder`

Declared in [Sandbox.Animation.GraphBuilder](/api/Sandbox.Animation.GraphBuilder).
Assembly: `Sandbox.Engine`.
