Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public static void SaveGraph(Graph graph)

Parameters

graph

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.