Remove redundant asset waiting and reloading when saving materials

This commit is contained in:
2024-05-19 14:03:42 +03:00
parent 58214ffc35
commit 7f1bcd91f5
2 changed files with 1 additions and 9 deletions

View File

@@ -459,8 +459,7 @@ namespace FlaxEditor.Windows.Assets
/// <returns>True if failed, otherwise false.</returns>
protected virtual bool SaveToOriginal()
{
// Wait until temporary asset file be fully loaded
if (_asset.WaitForLoaded())
if (_asset.LastLoadFailed)
{
Editor.LogError(string.Format("Cannot save asset {0}. Wait for temporary asset loaded failed.", _item.Path));
return true;
@@ -494,12 +493,6 @@ namespace FlaxEditor.Windows.Assets
return true;
}
// Reload original asset
if (originalAsset)
{
originalAsset.Reload();
}
// Refresh thumbnail
_item.RefreshThumbnail();

View File

@@ -355,7 +355,6 @@ namespace FlaxEditor.Windows.Assets
Editor.LogError("Failed to save surface data");
}
_asset.Reload();
_asset.WaitForLoaded();
}
}