This version of Unity is unsupported.

AssetDatabase.SaveAssetIfDirty

Declaration

public static void SaveAssetIfDirty(Object obj);

Declaration

public static void SaveAssetIfDirty(GUID guid);

Parameters

obj The asset object to be saved, if dirty.
guid The guid of the asset to be saved, if dirty.

Description

Writes all unsaved changes to the specified asset to disk.

This function is similar to SaveAssets, and likewise should not be called during serialization.

It does not invoke AssetModificationProcessor.OnWillSaveAssets, as the asset is directly specified.