# StateMachineOptions

> Flags that define configuration options that affect the behavior and capabilities of a StateMachine class.

## Definition

* **Type:** Enum
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
[Flags]
public enum StateMachineOptions
```

## Remarks

Use the [StateMachineOptions](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions.md) enum in conjunction with the [StateMachineAttribute](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineattribute.md) to customize how a state machine behaves, including automatic state discovery. The default value is [StateMachineOptions.Default](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/default.md), which enables standard behavior such as allowing states defined in the same assembly as the state machine to be automatically included in the graph item library. Combine flags to customize behavior. This enum is marked with FlagsAttribute, so you can combine values using bitwise operations to enable multiple options.

This is the [StateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine.md) counterpart of [GraphOptions](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphoptions.md). Flag values are kept in sync with [GraphOptions](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphoptions.md) so that a [StateMachineOptions](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions.md) value can be safely cast to the matching [GraphOptions](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphoptions.md) value.

## Examples

```csharp
[StateMachine("mystatemachine", StateMachineOptions.DisableAutoInclusionOfStatesFromStateMachineAssembly)]
public class MyStateMachine : StateMachine { }
```

## Fields

| Value                                                                                                                                                                                         | Description                                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [Default](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/default.md)                                                                                           | The default state machine configuration.                                                                     |
| [DisableAutoInclusionOfStatesFromStateMachineAssembly](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/disableautoinclusionofstatesfromstatemachineassembly.md) | Disables the automatic inclusion of states and conditions defined in the same assembly as the state machine. |
| [None](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/none.md)                                                                                                 | No state machine options enabled.                                                                            |
| [SupportsSubgraphs](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/supportssubgraphs.md)                                                                       | Indicates that this state machine supports subgraphs.                                                        |
