Update YooAsset
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.IO;
|
||||
using YooAsset.Utility;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
@@ -113,7 +112,7 @@ namespace YooAsset
|
||||
}
|
||||
|
||||
// 没有找到同名的资源文件
|
||||
Logger.Warning($"Not found asset : {filePath}");
|
||||
YooLogger.Warning($"Not found asset : {filePath}");
|
||||
return filePath;
|
||||
#else
|
||||
throw new System.NotImplementedException();
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace YooAsset
|
||||
DebugSummy.DebugProviderInfo providerInfo = new DebugSummy.DebugProviderInfo();
|
||||
providerInfo.AssetPath = provider.AssetPath;
|
||||
providerInfo.RefCount = provider.RefCount;
|
||||
providerInfo.States = provider.States;
|
||||
providerInfo.States = (int)provider.States;
|
||||
providerInfo.BundleInfos.Clear();
|
||||
summy.ProviderInfos.Add(providerInfo);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public interface IBundleServices
|
||||
{
|
||||
internal interface IBundleServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取AssetBundle的信息
|
||||
/// </summary>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace YooAsset
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning($"Scene is invalid or not loaded : {Scene.name}");
|
||||
YooLogger.Warning($"Scene is invalid or not loaded : {Scene.name}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace YooAsset
|
||||
// 注意:Unity2017.4编辑器模式下,如果AssetBundle文件不存在会导致编辑器崩溃,这里做了预判。
|
||||
if (System.IO.File.Exists(BundleFileInfo.LocalPath) == false)
|
||||
{
|
||||
Logger.Warning($"Not found assetBundle file : {BundleFileInfo.LocalPath}");
|
||||
YooLogger.Warning($"Not found assetBundle file : {BundleFileInfo.LocalPath}");
|
||||
States = ELoaderStates.Fail;
|
||||
return;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ namespace YooAsset
|
||||
if (_isWaitForAsyncComplete)
|
||||
{
|
||||
// 强制挂起主线程(注意:该操作会很耗时)
|
||||
Logger.Warning("Suspend the main thread to load unity bundle.");
|
||||
YooLogger.Warning("Suspend the main thread to load unity bundle.");
|
||||
CacheBundle = _cacheRequest.assetBundle;
|
||||
}
|
||||
else
|
||||
@@ -202,7 +202,7 @@ namespace YooAsset
|
||||
// Check error
|
||||
if (CacheBundle == null)
|
||||
{
|
||||
Logger.Error($"Failed to load assetBundle file : {BundleFileInfo.BundleName}");
|
||||
YooLogger.Error($"Failed to load assetBundle file : {BundleFileInfo.BundleName}");
|
||||
States = ELoaderStates.Fail;
|
||||
}
|
||||
else
|
||||
@@ -302,7 +302,7 @@ namespace YooAsset
|
||||
if (_isShowWaitForAsyncError == false)
|
||||
{
|
||||
_isShowWaitForAsyncError = true;
|
||||
Logger.Error($"WaitForAsyncComplete failed ! BundleName : {BundleFileInfo.BundleName} States : {States}");
|
||||
YooLogger.Error($"WaitForAsyncComplete failed ! BundleName : {BundleFileInfo.BundleName} States : {States}");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace YooAsset
|
||||
debugInfo.BundleName = loader.BundleFileInfo.BundleName;
|
||||
debugInfo.Version = loader.BundleFileInfo.Version;
|
||||
debugInfo.RefCount = loader.RefCount;
|
||||
debugInfo.States = loader.States;
|
||||
debugInfo.States = (int)loader.States;
|
||||
output.Add(debugInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user