StateMachineOptions
Flags that define configuration options that affect the behavior and capabilities of a StateMachine class.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Enum
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
[Flags]public enum StateMachineOptions
Remarks
Use the StateMachineOptions enum in conjunction with the StateMachineAttribute to customize how a state machine behaves, including automatic state discovery. The default value is StateMachineOptions.Default, 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 counterpart of GraphOptions. Flag values are kept in sync with GraphOptions so that a StateMachineOptions value can be safely cast to the matching GraphOptions value.
Examples
[StateMachine("mystatemachine", StateMachineOptions.DisableAutoInclusionOfStatesFromStateMachineAssembly)]public class MyStateMachine : StateMachine { }
Fields
Value | Description |
|---|---|
| Default | The default state machine configuration. |
| DisableAutoInclusionOfStatesFromStateMachineAssembly | Disables the automatic inclusion of states and conditions defined in the same assembly as the state machine. |
| None | No state machine options enabled. |
| SupportsSubgraphs | Indicates that this state machine supports subgraphs. |