Provides functionality needed to access, and perform operations on, state machine assets.
The StateMachineDatabase class is the StateMachine counterpart of GraphDatabase.
Use this class to create, load, and save StateMachine instances and their associated assets.
Use 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.
| Method | Description |
|---|---|
| CreateStateMachine | Creates a new state machine asset of type T at the specified file path. |
| 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 T from the asset at the specified path. |
| LoadStateMachineForImporter | Loads a fresh instance of the StateMachine of type T from disk for use in the asset import pipeline. |
| 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. |