Remove redundant asset waiting and reloading when saving materials
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -355,7 +355,6 @@ namespace FlaxEditor.Windows.Assets
|
||||
Editor.LogError("Failed to save surface data");
|
||||
}
|
||||
_asset.Reload();
|
||||
_asset.WaitForLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user