Fixed load sprite issues in editor simulate mode

修复加载精灵图片失败的问题在编辑器模拟模式下。
pull/13/head
hevinci 2022-05-16 20:16:10 +08:00
parent d01dce438c
commit 0dcbe0574c
1 changed files with 0 additions and 13 deletions

View File

@ -59,19 +59,6 @@ namespace YooAsset
// 2. 检测加载结果 // 2. 检测加载结果
if (Status == EStatus.Checking) if (Status == EStatus.Checking)
{ {
if (AssetObject != null)
{
if (UnityEditor.AssetDatabase.IsMainAsset(AssetObject) == false)
{
AssetObject = null;
Status = EStatus.Fail;
LastError = $"The loaded asset object is not main asset : {MainAssetInfo.AssetPath} AssetType : {MainAssetInfo.AssetType}";
YooLogger.Error(LastError);
InvokeCompletion();
return;
}
}
Status = AssetObject == null ? EStatus.Fail : EStatus.Success; Status = AssetObject == null ? EStatus.Fail : EStatus.Success;
if (Status == EStatus.Fail) if (Status == EStatus.Fail)
{ {