Version: Unity 6.4 Alpha (6000.4)
LanguageEnglish
  • C#

GraphDatabase.SaveGraph

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void SaveGraph(Unity.GraphToolkit.Editor.Graph graph);

Parameters

Parameter Description
graph The graph to save.

Description

Saves the asset of the specified Graph to disk if it has unsaved changes.

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 UnityEditor.AssetDatabase.SaveAssetIfDirty and only performs a save if the graph is marked dirty.