# AddStateMachineBehaviour

> Non-generic version of this method.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Animations](/engine/6000.7/script-reference/unityeditor/animations.md)
* **Assembly:** UnityEditor.CoreModule

## AddStateMachineBehaviour(Type)

Non-generic version of this method.

```csharp
public StateMachineBehaviour AddStateMachineBehaviour(Type stateMachineBehaviourType)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)):&#x20;

### Returns

| Type                                                                                          | Description |
| --------------------------------------------------------------------------------------------- | ----------- |
| [StateMachineBehaviour](/engine/6000.7/script-reference/unityengine/statemachinebehaviour.md) |             |

## AddStateMachineBehaviour\<T>()

Adds a state machine behaviour class of type T to the AnimatorState. Note that there is no corresponding "Remove" method. To remove a state machine behaviour, use [Object.Destroy](/engine/6000.7/script-reference/unityengine/object/destroy.md).

```csharp
public T AddStateMachineBehaviour<T>() where T : StateMachineBehaviour
```

### Returns

| Type | Description                                 |
| ---- | ------------------------------------------- |
| T    | The type of state machine behaviour to add. |
