parent
fd1edcdedf
commit
adf1776b1e
|
@ -399,7 +399,7 @@ namespace YooAsset
|
|||
providerInfo.SpawnTime = provider.SpawnTime;
|
||||
providerInfo.LoadingTime = provider.LoadingTime;
|
||||
providerInfo.RefCount = provider.RefCount;
|
||||
providerInfo.Status = (int)provider.Status;
|
||||
providerInfo.Status = provider.Status.ToString();
|
||||
providerInfo.DependBundleInfos = new List<DebugBundleInfo>();
|
||||
result.Add(providerInfo);
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace YooAsset
|
|||
{
|
||||
if (IsValidWithWarning == false)
|
||||
return EOperationStatus.None;
|
||||
if (Provider.Status == ProviderBase.EStatus.Fail)
|
||||
if (Provider.Status == ProviderBase.EStatus.Failed)
|
||||
return EOperationStatus.Failed;
|
||||
else if (Provider.Status == ProviderBase.EStatus.Success)
|
||||
else if (Provider.Status == ProviderBase.EStatus.Succeed)
|
||||
return EOperationStatus.Succeed;
|
||||
else
|
||||
return EOperationStatus.None;
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace YooAsset
|
|||
var bundleInfo = new DebugBundleInfo();
|
||||
bundleInfo.BundleName = loader.MainBundleInfo.Bundle.BundleName;
|
||||
bundleInfo.RefCount = loader.RefCount;
|
||||
bundleInfo.Status = (int)loader.Status;
|
||||
bundleInfo.Status = loader.Status.ToString();
|
||||
output.Add(bundleInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ namespace YooAsset
|
|||
}
|
||||
|
||||
private ESteps _steps = ESteps.None;
|
||||
private bool _isWaitForAsyncComplete = false;
|
||||
private bool _isShowWaitForAsyncError = false;
|
||||
private DownloaderBase _unpacker;
|
||||
private DownloaderBase _downloader;
|
||||
|
@ -136,8 +135,6 @@ namespace YooAsset
|
|||
/// </summary>
|
||||
public override void WaitForAsyncComplete()
|
||||
{
|
||||
_isWaitForAsyncComplete = true;
|
||||
|
||||
int frame = 1000;
|
||||
while (true)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace YooAsset
|
|||
|
||||
if (DependBundleGroup.IsSucceed() == false)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = DependBundleGroup.GetLastError();
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -56,7 +56,7 @@ namespace YooAsset
|
|||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = OwnerBundle.LastError;
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -66,7 +66,7 @@ namespace YooAsset
|
|||
{
|
||||
if (OwnerBundle.IsDestroyed)
|
||||
throw new System.Exception("Should never get here !");
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"The bundle {OwnerBundle.MainBundleInfo.Bundle.BundleName} has been destroyed by unity bugs !";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -115,8 +115,8 @@ namespace YooAsset
|
|||
}
|
||||
}
|
||||
|
||||
Status = AssetObject == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = AssetObject == null ? EStatus.Failed : EStatus.Succeed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
if (MainAssetInfo.AssetType == null)
|
||||
LastError = $"Failed to load asset : {MainAssetInfo.AssetPath} AssetType : null AssetBundle : {OwnerBundle.MainBundleInfo.Bundle.BundleName}";
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace YooAsset
|
|||
var bundleInfo = new DebugBundleInfo();
|
||||
bundleInfo.BundleName = OwnerBundle.MainBundleInfo.Bundle.BundleName;
|
||||
bundleInfo.RefCount = OwnerBundle.RefCount;
|
||||
bundleInfo.Status = (int)OwnerBundle.Status;
|
||||
bundleInfo.Status = OwnerBundle.Status.ToString();
|
||||
output.Add(bundleInfo);
|
||||
|
||||
DependBundleGroup.GetBundleDebugInfos(output);
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace YooAsset
|
|||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = OwnerBundle.LastError;
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ namespace YooAsset
|
|||
if (Status == EStatus.Checking)
|
||||
{
|
||||
RawFilePath = OwnerBundle.FileLoadPath;
|
||||
Status = EStatus.Success;
|
||||
Status = EStatus.Succeed;
|
||||
InvokeCompletion();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace YooAsset
|
|||
|
||||
if (DependBundleGroup.IsSucceed() == false)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = DependBundleGroup.GetLastError();
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -60,7 +60,7 @@ namespace YooAsset
|
|||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = OwnerBundle.LastError;
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -83,7 +83,7 @@ namespace YooAsset
|
|||
}
|
||||
else
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"Failed to load scene : {_sceneName}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -98,8 +98,8 @@ namespace YooAsset
|
|||
if (SceneObject.IsValid() && _activateOnLoad)
|
||||
SceneManager.SetActiveScene(SceneObject);
|
||||
|
||||
Status = SceneObject.IsValid() ? EStatus.Success : EStatus.Fail;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = SceneObject.IsValid() ? EStatus.Succeed : EStatus.Failed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
LastError = $"The load scene is invalid : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace YooAsset
|
|||
|
||||
if (DependBundleGroup.IsSucceed() == false)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = DependBundleGroup.GetLastError();
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -56,7 +56,7 @@ namespace YooAsset
|
|||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = OwnerBundle.LastError;
|
||||
InvokeCompletion();
|
||||
return;
|
||||
|
@ -104,8 +104,8 @@ namespace YooAsset
|
|||
}
|
||||
}
|
||||
|
||||
Status = AllAssetObjects == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = AllAssetObjects == null ? EStatus.Failed : EStatus.Succeed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
if (MainAssetInfo.AssetType == null)
|
||||
LastError = $"Failed to load sub assets : {MainAssetInfo.AssetPath} AssetType : null AssetBundle : {OwnerBundle.MainBundleInfo.Bundle.BundleName}";
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace YooAsset
|
|||
{
|
||||
if (Status == EStatus.None)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = error;
|
||||
InvokeCompletion();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace YooAsset
|
|||
string guid = UnityEditor.AssetDatabase.AssetPathToGUID(MainAssetInfo.AssetPath);
|
||||
if (string.IsNullOrEmpty(guid))
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"Not found asset : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -59,8 +59,8 @@ namespace YooAsset
|
|||
// 2. 检测加载结果
|
||||
if (Status == EStatus.Checking)
|
||||
{
|
||||
Status = AssetObject == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = AssetObject == null ? EStatus.Failed : EStatus.Succeed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
if (MainAssetInfo.AssetType == null)
|
||||
LastError = $"Failed to load asset object : {MainAssetInfo.AssetPath} AssetType : null";
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace YooAsset
|
|||
string guid = UnityEditor.AssetDatabase.AssetPathToGUID(MainAssetInfo.AssetPath);
|
||||
if (string.IsNullOrEmpty(guid))
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"Not found asset : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -46,7 +46,7 @@ namespace YooAsset
|
|||
if(Status == EStatus.Checking)
|
||||
{
|
||||
RawFilePath = MainAssetInfo.AssetPath;
|
||||
Status = EStatus.Success;
|
||||
Status = EStatus.Succeed;
|
||||
InvokeCompletion();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace YooAsset
|
|||
}
|
||||
else
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"Failed to load scene : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -66,8 +66,8 @@ namespace YooAsset
|
|||
if (SceneObject.IsValid() && _activateOnLoad)
|
||||
SceneManager.SetActiveScene(SceneObject);
|
||||
|
||||
Status = SceneObject.IsValid() ? EStatus.Success : EStatus.Fail;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = SceneObject.IsValid() ? EStatus.Succeed : EStatus.Failed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
LastError = $"The loaded scene is invalid : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace YooAsset
|
|||
string guid = UnityEditor.AssetDatabase.AssetPathToGUID(MainAssetInfo.AssetPath);
|
||||
if (string.IsNullOrEmpty(guid))
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
Status = EStatus.Failed;
|
||||
LastError = $"Not found asset : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
InvokeCompletion();
|
||||
|
@ -70,8 +70,8 @@ namespace YooAsset
|
|||
// 2. 检测加载结果
|
||||
if (Status == EStatus.Checking)
|
||||
{
|
||||
Status = AllAssetObjects == null ? EStatus.Fail : EStatus.Success;
|
||||
if (Status == EStatus.Fail)
|
||||
Status = AllAssetObjects == null ? EStatus.Failed : EStatus.Succeed;
|
||||
if (Status == EStatus.Failed)
|
||||
{
|
||||
if (MainAssetInfo.AssetType == null)
|
||||
LastError = $"Failed to load sub assets : {MainAssetInfo.AssetPath} AssetType : null";
|
||||
|
|
|
@ -13,8 +13,8 @@ namespace YooAsset
|
|||
CheckBundle,
|
||||
Loading,
|
||||
Checking,
|
||||
Success,
|
||||
Fail,
|
||||
Succeed,
|
||||
Failed,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -80,7 +80,7 @@ namespace YooAsset
|
|||
{
|
||||
get
|
||||
{
|
||||
return Status == EStatus.Success || Status == EStatus.Fail;
|
||||
return Status == EStatus.Succeed || Status == EStatus.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status;
|
||||
public string Status;
|
||||
|
||||
public int CompareTo(DebugBundleInfo other)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status;
|
||||
public string Status;
|
||||
|
||||
/// <summary>
|
||||
/// 依赖的资源包列表
|
||||
|
|
Loading…
Reference in New Issue