Update YooAsset

This commit is contained in:
hevinci
2022-03-09 21:53:01 +08:00
parent c3ecca7cfd
commit 1c7b90806c
77 changed files with 596 additions and 604 deletions
@@ -61,7 +61,7 @@ namespace YooAsset
public void Release()
{
if (RefCount <= 0)
Logger.Warning("Asset provider reference count is already zero. There may be resource leaks !");
YooLogger.Warning("Asset provider reference count is already zero. There may be resource leaks !");
RefCount--;
}
@@ -97,7 +97,7 @@ namespace YooAsset
// 验证结果
if (IsDone == false)
{
Logger.Warning($"WaitForAsyncComplete failed to loading : {AssetPath}");
YooLogger.Warning($"WaitForAsyncComplete failed to loading : {AssetPath}");
}
}
@@ -84,7 +84,7 @@ namespace YooAsset
if (IsWaitForAsyncComplete)
{
// 强制挂起主线程(注意:该操作会很耗时)
Logger.Warning("Suspend the main thread to load unity asset.");
YooLogger.Warning("Suspend the main thread to load unity asset.");
AssetObject = _cacheRequest.asset;
}
else
@@ -97,7 +97,7 @@ namespace YooAsset
States = AssetObject == null ? EAssetStates.Fail : EAssetStates.Success;
if (States == EAssetStates.Fail)
Logger.Warning($"Failed to load asset : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}");
YooLogger.Warning($"Failed to load asset : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}");
InvokeCompletion();
}
}
@@ -42,7 +42,7 @@ namespace YooAsset
ownerInfo.BundleName = OwnerBundle.BundleFileInfo.BundleName;
ownerInfo.Version = OwnerBundle.BundleFileInfo.Version;
ownerInfo.RefCount = OwnerBundle.RefCount;
ownerInfo.States = OwnerBundle.States;
ownerInfo.States = (int)OwnerBundle.States;
output.Add(ownerInfo);
DependBundles.GetBundleDebugInfos(output);
@@ -64,7 +64,7 @@ namespace YooAsset
}
else
{
Logger.Warning($"Failed to load scene : {AssetName}");
YooLogger.Warning($"Failed to load scene : {AssetName}");
States = EAssetStates.Fail;
InvokeCompletion();
}
@@ -84,7 +84,7 @@ namespace YooAsset
if (IsWaitForAsyncComplete)
{
// 强制挂起主线程(注意:该操作会很耗时)
Logger.Warning("Suspend the main thread to load unity asset.");
YooLogger.Warning("Suspend the main thread to load unity asset.");
AllAssets = _cacheRequest.allAssets;
}
else
@@ -97,7 +97,7 @@ namespace YooAsset
States = AllAssets == null ? EAssetStates.Fail : EAssetStates.Success;
if (States == EAssetStates.Fail)
Logger.Warning($"Failed to load sub assets : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}");
YooLogger.Warning($"Failed to load sub assets : {AssetName} from bundle : {OwnerBundle.BundleFileInfo.BundleName}");
InvokeCompletion();
}
}
@@ -59,7 +59,7 @@ namespace YooAsset
{
States = AssetObject == null ? EAssetStates.Fail : EAssetStates.Success;
if (States == EAssetStates.Fail)
Logger.Warning($"Failed to load asset object : {AssetPath}");
YooLogger.Warning($"Failed to load asset object : {AssetPath}");
InvokeCompletion();
}
#endif
@@ -46,7 +46,7 @@ namespace YooAsset
}
else
{
Logger.Warning($"Failed to load scene : {AssetName}");
YooLogger.Warning($"Failed to load scene : {AssetName}");
States = EAssetStates.Fail;
InvokeCompletion();
}
@@ -66,7 +66,7 @@ namespace YooAsset
{
States = AllAssets == null ? EAssetStates.Fail : EAssetStates.Success;
if (States == EAssetStates.Fail)
Logger.Warning($"Failed to load all asset object : {AssetPath}");
YooLogger.Warning($"Failed to load all asset object : {AssetPath}");
InvokeCompletion();
}
#endif