To use a Script Graph or State Graph file in your project, you must attach it to a Script Machine or State Machine.
A Script Machine or State Machine is a component. Components attach to GameObjects, and help define their behavior. For more information on components and GameObjects, see Using components or GameObjects in the Unity User Manual.
[!includeopen-hierarchy]
In the Hierarchy window, select a GameObject where you’d like to add a Script Machine or State Machine.
[!includeopen-inspector-window]
In the GameObject’s Inspector window, select Add Component.
The Components menu opens.
Do one of the following:
The new Script Machine or State Machine component appears in the Inspector window for the GameObject:
In the Inspector window, locate your Script Machine or State Machine component.
Set the Source to Graph.
Do one of the following:
For more information on how to create Script or State Graphs, see Create a new graph file.
After you attach a graph to a Script Machine or State Machine, you can open the graph and edit. For more information, see Open a graph file.