mirror of https://github.com/tuyoogame/YooAsset
Update asset system
parent
bf0f479234
commit
79efe6237d
|
@ -106,7 +106,10 @@ namespace YooAsset
|
|||
Status = AssetObject == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
{
|
||||
LastError = $"Failed to load asset : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
if(AssetType == null)
|
||||
LastError = $"Failed to load asset : {AssetName} AssetType : null AssetBundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
else
|
||||
LastError = $"Failed to load asset : {AssetName} AssetType : {AssetType} AssetBundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
YooLogger.Error(LastError);
|
||||
}
|
||||
InvokeCompletion();
|
||||
|
|
|
@ -106,7 +106,10 @@ namespace YooAsset
|
|||
Status = AllAssetObjects == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
{
|
||||
LastError = $"Failed to load sub assets : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
if (AssetType == null)
|
||||
LastError = $"Failed to load sub assets : {AssetName} AssetType : null AssetBundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
else
|
||||
LastError = $"Failed to load sub assets : {AssetName} AssetType : {AssetType} AssetBundle : {OwnerBundle.BundleFileInfo.BundleName}";
|
||||
YooLogger.Error(LastError);
|
||||
}
|
||||
InvokeCompletion();
|
||||
|
|
|
@ -60,10 +60,26 @@ namespace YooAsset
|
|||
// 2. 检测加载结果
|
||||
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 : {AssetPath} AssetType : {AssetType}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Status = AssetObject == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
{
|
||||
LastError = $"Failed to load asset object : {AssetPath}";
|
||||
if (AssetType == null)
|
||||
LastError = $"Failed to load asset object : {AssetPath} AssetType : null";
|
||||
else
|
||||
LastError = $"Failed to load asset object : {AssetPath} AssetType : {AssetType}";
|
||||
YooLogger.Error(LastError);
|
||||
}
|
||||
InvokeCompletion();
|
||||
|
|
|
@ -74,7 +74,10 @@ namespace YooAsset
|
|||
Status = AllAssetObjects == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
{
|
||||
LastError = $"Failed to load sub assets : {nameof(AssetType)} in {AssetPath}";
|
||||
if (AssetType == null)
|
||||
LastError = $"Failed to load sub assets : {AssetPath} AssetType : null";
|
||||
else
|
||||
LastError = $"Failed to load sub assets : {AssetPath} AssetType : {AssetType}";
|
||||
YooLogger.Error(LastError);
|
||||
}
|
||||
InvokeCompletion();
|
||||
|
|
Loading…
Reference in New Issue