diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/EditorSimulateModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/EditorSimulateModeImpl.cs index 82acded..57d7da8 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/EditorSimulateModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/EditorSimulateModeImpl.cs @@ -138,6 +138,11 @@ namespace YooAsset return result; } + public List GetNeedDownloadTagsRawFiles(string[] tags) + { + return new List(); + } + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs index f88bce1..1e6deff 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs @@ -377,6 +377,33 @@ namespace YooAsset return result; } + public List GetNeedDownloadTagsRawFiles(string[] tags) + { + List neetDownloadList = new List(200); + foreach (PackageBundle bundle in _activeManifest.BundleList) + { + if (IsCachedPackageBundle(bundle)) + { + continue; + } + + if (IsBuildinPackageBundle(bundle)) + { + continue; + } + + if (!bundle.HasAnyTags()) + { + continue; + } + + bundle.HasTag(tags); + neetDownloadList.Add(bundle); + } + + return neetDownloadList; + } + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs index c19f841..680e5fc 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs @@ -139,6 +139,11 @@ namespace YooAsset return new List(); } + public List GetNeedDownloadTagsRawFiles(string[] tags) + { + return new List(); + } + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs b/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs index 7182387..4be848f 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs @@ -866,6 +866,19 @@ namespace YooAsset OperationSystem.StartOperation(operation); return operation; } + + public long GetNeedDownloadTagsRawFileSize(string[] tags) + { + DebugCheckInitialize(); + var list=_playModeServices.GetNeedDownloadTagsRawFiles(tags); + long size = 0; + foreach (PackageBundle packageBundle in list) + { + size += packageBundle.FileSize; + } + + return size; + } #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/Services/Internal/IPlayModeServices.cs b/Assets/YooAsset/Runtime/Services/Internal/IPlayModeServices.cs index 042de3d..7b8d58f 100644 --- a/Assets/YooAsset/Runtime/Services/Internal/IPlayModeServices.cs +++ b/Assets/YooAsset/Runtime/Services/Internal/IPlayModeServices.cs @@ -40,5 +40,6 @@ namespace YooAsset ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout); List GetCachedTagsRawFiles(string[] tags); + List GetNeedDownloadTagsRawFiles(string[] tags); } } \ No newline at end of file