# GetStateMachineAssetPath(StateMachine)

> Retrieves the file path of the asset associated with the specified StateMachine.

## Definition

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

```csharp
public static string GetStateMachineAssetPath(StateMachine stateMachine)
```

### Parameters

**** (\[StateMachine]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine)): The state machine whose asset path you want to retrieve.

### Returns

| Type                                                           | Description            |
| -------------------------------------------------------------- | ---------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The asset's file path. |

### Remarks

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