# LoadStateMachineForImporter<T>(string)

> Loads a fresh instance of the StateMachine of type T from disk for use in the asset import pipeline.

## Definition

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

```csharp
public static T LoadStateMachineForImporter<T>(string assetPath) where T : StateMachine
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the state machine asset file.

### Returns

| Type | Description                                                  |
| ---- | ------------------------------------------------------------ |
| T    | A new instance of the state machine read directly from disk. |

### Remarks

This is the [StateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine.md) counterpart of [GraphDatabase.LoadGraphForImporter](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphdatabase/loadgraphforimporter.md).
