Attribute used to specify which StateMachine types are compatible with the decorated state machine element, such as a State, SelfTransition, or Condition class.
This attribute links a specific state machine element to one or more StateMachine types, enabling fine-grained control over which state machine types support the element. This allows framework authors to explicitly declare element compatibility across different kinds of state machines and ensures that only valid elements are available for use in each state machine context. By default, elements defined in the same assembly as the state machine are considered compatible and available. In this default setup, the UseWithStateMachineAttribute is not required. However, when a state machine uses StateMachineOptions.DisableAutoInclusionOfStatesFromStateMachineAssembly, this attribute must be used to declare which StateMachine types support the element. This attribute affects editor behaviors such as graph item library population and helps prevent the accidental use of unsupported elements. This is the StateMachine counterpart of UseWithGraphAttribute.
| Constructor | Description |
|---|---|
| UseWithStateMachineAttribute | Initializes a new instance of the UseWithStateMachineAttribute class with the specified supported state machine types. |
| Method | Description |
|---|---|
| IsStateMachineTypeSupported | Determines whether the specified state machine type supports the element decorated with this attribute. |