SaveGraph(Graph)
Saves the asset of the specified Graph to disk if it has unsaved changes.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public static void SaveGraph(Graph graph)
Parameters
The graph to save.
Remarks
Use this method to persist any pending modifications made to a Graph instance. It prevents data loss by ensuring the asset on disk reflects the in-memory graph state. This method is similar to AssetDatabase.SaveAssetIfDirty and only performs a save if the graph is marked dirty.