SaveAssetIfDirty
Writes any unsaved changes to the asset with the specified GUID to disk.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
SaveAssetIfDirty(GUID)
Writes any unsaved changes to the asset with the specified GUID to disk.
public static void SaveAssetIfDirty(GUID guid)
Parameters
Remarks
This method is similar to AssetDatabase.SaveAssets, so don't call it during serialization either. Because you specify the asset directly, it doesn't call AssetModificationProcessor.OnWillSaveAssets(string[]).
SaveAssetIfDirty(Object)
Writes any unsaved changes to an asset object to disk.
public static void SaveAssetIfDirty(Object obj)
Parameters
The asset object to save, if it has unsaved changes.
Remarks
This method is similar to AssetDatabase.SaveAssets, so don't call it during serialization either. Because you specify the asset directly, it doesn't call AssetModificationProcessor.OnWillSaveAssets(string[]).