SaveAssetIfDirty
Writes all unsaved changes to the specified asset to disk.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
SaveAssetIfDirty(GUID)
Writes all unsaved changes to the specified asset to disk.
public static void SaveAssetIfDirty(GUID guid)
Parameters
Remarks
This function is similar to AssetDatabase.SaveAssets, and likewise should not be called during serialization.
It does not invoke AssetModificationProcessor.OnWillSaveAssets(string[]), as the asset is directly specified.
SaveAssetIfDirty(Object)
Writes all unsaved changes to the specified asset to disk.
public static void SaveAssetIfDirty(Object obj)
Parameters
The asset object to be saved, if dirty.
Remarks
This function is similar to AssetDatabase.SaveAssets, and likewise should not be called during serialization.
It does not invoke AssetModificationProcessor.OnWillSaveAssets(string[]), as the asset is directly specified.