文档

Unity Engine

Unity Engine

SaveGraph(Graph)

Saves the asset of the specified Graph to disk if it has unsaved changes.
阅读时间1 分钟最后更新于 1 个月前

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.