Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateStateMachine<T>(string)

Creates a new state machine asset of type T at the specified file path.
Read time 1 minuteLast updated 13 days ago

Definition

public static T CreateStateMachine<T>(string assetPath) where T : StateMachine, new()

Parameters

assetPath

The relative path for the new asset (e.g., "Assets/Graphs/MyStateMachine.mystatemachine").

Returns

Type

Description

TThe created state machine instance.

Remarks

This is the StateMachine counterpart of GraphDatabase.CreateGraph.