diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundleGrouper.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundles.cs similarity index 77% rename from Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundleGrouper.cs rename to Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundles.cs index eb78955..7252f84 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundleGrouper.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundles.cs @@ -4,17 +4,17 @@ using System.Collections.Generic; namespace YooAsset { - internal class DependAssetBundleGroup + internal class DependAssetBundles { /// /// 依赖的资源包加载器列表 /// - internal readonly List DependBundles; + internal readonly List DependList; - public DependAssetBundleGroup(List dpendBundles) + public DependAssetBundles(List dpendList) { - DependBundles = dpendBundles; + DependList = dpendList; } /// @@ -22,7 +22,7 @@ namespace YooAsset /// public bool IsDone() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { if (loader.IsDone() == false) return false; @@ -35,7 +35,7 @@ namespace YooAsset /// public bool IsSucceed() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { if (loader.Status != BundleLoaderBase.EStatus.Succeed) { @@ -50,7 +50,7 @@ namespace YooAsset /// public string GetLastError() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { if (loader.Status != BundleLoaderBase.EStatus.Succeed) { @@ -65,7 +65,7 @@ namespace YooAsset /// public void WaitForAsyncComplete() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { if (loader.IsDone() == false) loader.WaitForAsyncComplete(); @@ -77,7 +77,7 @@ namespace YooAsset /// public void Reference() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { loader.Reference(); } @@ -88,7 +88,7 @@ namespace YooAsset /// public void Release() { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { loader.Release(); } @@ -99,7 +99,7 @@ namespace YooAsset /// internal void GetBundleDebugInfos(List output) { - foreach (var loader in DependBundles) + foreach (var loader in DependList) { var bundleInfo = new DebugBundleInfo(); bundleInfo.BundleName = loader.MainBundleInfo.Bundle.BundleName; diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundleGrouper.cs.meta b/Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundles.cs.meta similarity index 100% rename from Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundleGrouper.cs.meta rename to Assets/YooAsset/Runtime/AssetSystem/Loader/DependAssetBundles.cs.meta diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAllAssetsProvider.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAllAssetsProvider.cs index 98b1632..bfbf3e2 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAllAssetsProvider.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAllAssetsProvider.cs @@ -28,19 +28,19 @@ namespace YooAsset { if (IsWaitForAsyncComplete) { - DependBundleGroup.WaitForAsyncComplete(); + DependBundles.WaitForAsyncComplete(); OwnerBundle.WaitForAsyncComplete(); } - if (DependBundleGroup.IsDone() == false) + if (DependBundles.IsDone() == false) return; if (OwnerBundle.IsDone() == false) return; - if (DependBundleGroup.IsSucceed() == false) + if (DependBundles.IsSucceed() == false) { Status = EStatus.Failed; - LastError = DependBundleGroup.GetLastError(); + LastError = DependBundles.GetLastError(); InvokeCompletion(); return; } diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAssetProvider.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAssetProvider.cs index 82acd2b..af83277 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAssetProvider.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledAssetProvider.cs @@ -28,19 +28,19 @@ namespace YooAsset { if (IsWaitForAsyncComplete) { - DependBundleGroup.WaitForAsyncComplete(); + DependBundles.WaitForAsyncComplete(); OwnerBundle.WaitForAsyncComplete(); } - if (DependBundleGroup.IsDone() == false) + if (DependBundles.IsDone() == false) return; if (OwnerBundle.IsDone() == false) return; - if (DependBundleGroup.IsSucceed() == false) + if (DependBundles.IsSucceed() == false) { Status = EStatus.Failed; - LastError = DependBundleGroup.GetLastError(); + LastError = DependBundles.GetLastError(); InvokeCompletion(); return; } diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSceneProvider.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSceneProvider.cs index 0364b86..b8e4d6b 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSceneProvider.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSceneProvider.cs @@ -36,15 +36,15 @@ namespace YooAsset // 1. 检测资源包 if (Status == EStatus.CheckBundle) { - if (DependBundleGroup.IsDone() == false) + if (DependBundles.IsDone() == false) return; if (OwnerBundle.IsDone() == false) return; - if (DependBundleGroup.IsSucceed() == false) + if (DependBundles.IsSucceed() == false) { Status = EStatus.Failed; - LastError = DependBundleGroup.GetLastError(); + LastError = DependBundles.GetLastError(); InvokeCompletion(); return; } diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSubAssetsProvider.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSubAssetsProvider.cs index 36c6545..f48fb65 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSubAssetsProvider.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/BundledSubAssetsProvider.cs @@ -28,19 +28,19 @@ namespace YooAsset { if (IsWaitForAsyncComplete) { - DependBundleGroup.WaitForAsyncComplete(); + DependBundles.WaitForAsyncComplete(); OwnerBundle.WaitForAsyncComplete(); } - if (DependBundleGroup.IsDone() == false) + if (DependBundles.IsDone() == false) return; if (OwnerBundle.IsDone() == false) return; - if (DependBundleGroup.IsSucceed() == false) + if (DependBundles.IsSucceed() == false) { Status = EStatus.Failed; - LastError = DependBundleGroup.GetLastError(); + LastError = DependBundles.GetLastError(); InvokeCompletion(); return; } diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs index ee449af..445e00d 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs @@ -91,7 +91,7 @@ namespace YooAsset protected BundleLoaderBase OwnerBundle { private set; get; } - protected DependAssetBundleGroup DependBundleGroup { private set; get; } + protected DependAssetBundles DependBundles { private set; get; } protected bool IsWaitForAsyncComplete { private set; get; } = false; private readonly List _handles = new List(); @@ -109,9 +109,9 @@ namespace YooAsset OwnerBundle.Reference(); OwnerBundle.AddProvider(this); - var dependBundles = impl.CreateDependAssetBundleLoaders(assetInfo); - DependBundleGroup = new DependAssetBundleGroup(dependBundles); - DependBundleGroup.Reference(); + var dependList = impl.CreateDependAssetBundleLoaders(assetInfo); + DependBundles = new DependAssetBundles(dependList); + DependBundles.Reference(); } } @@ -133,10 +133,10 @@ namespace YooAsset OwnerBundle.Release(); OwnerBundle = null; } - if (DependBundleGroup != null) + if (DependBundles != null) { - DependBundleGroup.Release(); - DependBundleGroup = null; + DependBundles.Release(); + DependBundles = null; } } @@ -322,7 +322,7 @@ namespace YooAsset DownloadReport result = new DownloadReport(); result.TotalSize = (ulong)OwnerBundle.MainBundleInfo.Bundle.FileSize; result.DownloadedBytes = OwnerBundle.DownloadedBytes; - foreach (var dependBundle in DependBundleGroup.DependBundles) + foreach (var dependBundle in DependBundles.DependList) { result.TotalSize += (ulong)dependBundle.MainBundleInfo.Bundle.FileSize; result.DownloadedBytes += dependBundle.DownloadedBytes; @@ -342,7 +342,7 @@ namespace YooAsset bundleInfo.Status = OwnerBundle.Status.ToString(); output.Add(bundleInfo); - DependBundleGroup.GetBundleDebugInfos(output); + DependBundles.GetBundleDebugInfos(output); } #endregion }