StateMachineDatabase
Provides functionality needed to access, and perform operations on, state machine assets.
Read time 1 minuteLast updated 20 days ago
Definition
- Type: Class
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public static class StateMachineDatabase
Remarks
The class is the StateMachine counterpart of GraphDatabase. Use this class to create, load, and save StateMachine instances and their associated assets.
StateMachineDatabaseUse StateMachineDatabase.PromptInProjectBrowserToCreateNewAsset to create and name a new asset, StateMachineDatabase.CreateStateMachine to generate an asset file, and StateMachineDatabase.LoadStateMachine to retrieve an existing one.
Use StateMachineDatabase.SaveStateMachine to persist state machine data changes, and StateMachineDatabase.LoadStateMachineForImporter to load a clean instance during import.
Static Methods
Method | Description |
|---|---|
| CreateStateMachine | Creates a new state machine asset of type |
| GetStateMachineAssetGUID | Retrieves the globally unique identifier (GUID) for the asset associated with the specified StateMachine. |
| GetStateMachineAssetPath | Retrieves the file path of the asset associated with the specified StateMachine. |
| LoadStateMachine | Loads a StateMachine of type |
| LoadStateMachineForImporter | Loads a fresh instance of the StateMachine of type |
| PromptInProjectBrowserToCreateNewAsset | Creates a new state machine asset and activates the naming field in the Project Browser. |
| SaveStateMachine | Saves the asset of the specified StateMachine to disk if it has unsaved changes. |