From 96c3005ebad2a5d6af9ce76cc415bdaf8e273728 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Apr 2024 10:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=A0=87=E7=AD=BE=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD/=E8=A7=A3=E5=8E=8B=E6=96=B9=E6=B3=95=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E5=8C=85=E5=90=AB=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResourcePackage/Interface/IPlayMode.cs | 4 ++-- .../Operation/PreDownloadContentOperation.cs | 24 +++++++++---------- .../PlayMode/EditorSimulateModeImpl.cs | 4 ++-- .../PlayMode/HostPlayModeImpl.cs | 16 ++++++------- .../PlayMode/OfflinePlayModeImpl.cs | 10 ++++---- .../PlayMode/WebPlayModeImpl.cs | 12 +++++----- .../ResourcePackage/ResourcePackage.cs | 20 +++++++++------- Assets/YooAsset/Runtime/YooAssetsExtension.cs | 20 +++++++++------- 8 files changed, 59 insertions(+), 51 deletions(-) diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs b/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs index ca51c1e1..fedecbe5 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs @@ -30,12 +30,12 @@ namespace YooAsset // 下载相关 ResourceDownloaderOperation CreateResourceDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout); - ResourceDownloaderOperation CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout); + ResourceDownloaderOperation CreateResourceDownloaderByTags(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout); ResourceDownloaderOperation CreateResourceDownloaderByPaths(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain, int timeout); // 解压相关 ResourceUnpackerOperation CreateResourceUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout); - ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout); + ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, bool includeTags, int upackingMaxNumber, int failedTryAgain, int timeout); // 导入相关 ResourceImporterOperation CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout); diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs index c2286328..c992cea5 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs @@ -21,7 +21,7 @@ namespace YooAsset /// 同时下载的最大文件数 /// 下载失败的重试次数 /// 超时时间 - public abstract ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60); + public abstract ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60); /// /// 创建资源下载器,用于下载指定的资源标签列表关联的资源包文件 @@ -30,7 +30,7 @@ namespace YooAsset /// 同时下载的最大文件数 /// 下载失败的重试次数 /// 超时时间 - public abstract ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60); + public abstract ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60); /// /// 创建资源下载器,用于下载指定的资源依赖的资源包文件 @@ -71,11 +71,11 @@ namespace YooAsset { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } @@ -108,11 +108,11 @@ namespace YooAsset { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } @@ -262,7 +262,7 @@ namespace YooAsset var operation = new ResourceDownloaderOperation(_impl.Download, _impl.PackageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } - public override ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { if (Status != EOperationStatus.Succeed) { @@ -270,11 +270,11 @@ namespace YooAsset return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - List downloadList = _impl.GetDownloadListByTags(_manifest, new string[] { tag }); + List downloadList = _impl.GetDownloadListByTags(_manifest, new string[] { tag }, includeTags); var operation = new ResourceDownloaderOperation(_impl.Download, _impl.PackageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } - public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { if (Status != EOperationStatus.Succeed) { @@ -282,7 +282,7 @@ namespace YooAsset return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - List downloadList = _impl.GetDownloadListByTags(_manifest, tags); + List downloadList = _impl.GetDownloadListByTags(_manifest, tags, includeTags); var operation = new ResourceDownloaderOperation(_impl.Download, _impl.PackageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } @@ -342,11 +342,11 @@ namespace YooAsset { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public override ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { return ResourceDownloaderOperation.CreateEmptyDownloader(_impl.Download, _impl.PackageName, downloadingMaxNumber, failedTryAgain, timeout); } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs index 159842e3..dfa5e823 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs @@ -71,7 +71,7 @@ namespace YooAsset { return ResourceDownloaderOperation.CreateEmptyDownloader(Download, PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout) + ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout) { return ResourceDownloaderOperation.CreateEmptyDownloader(Download, PackageName, downloadingMaxNumber, failedTryAgain, timeout); } @@ -84,7 +84,7 @@ namespace YooAsset { return ResourceUnpackerOperation.CreateEmptyUnpacker(Download, PackageName, upackingMaxNumber, failedTryAgain, timeout); } - ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout) + ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, bool includeTags, int upackingMaxNumber, int failedTryAgain, int timeout) { return ResourceUnpackerOperation.CreateEmptyUnpacker(Download, PackageName, upackingMaxNumber, failedTryAgain, timeout); } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs index 601f61ec..02a6584a 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs @@ -154,13 +154,13 @@ namespace YooAsset return ConvertToDownloadList(downloadList); } - ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout) + ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout) { - List downloadList = GetDownloadListByTags(_activeManifest, tags); + List downloadList = GetDownloadListByTags(_activeManifest, tags, includeTags); var operation = new ResourceDownloaderOperation(Download, PackageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } - public List GetDownloadListByTags(PackageManifest manifest, string[] tags) + public List GetDownloadListByTags(PackageManifest manifest, string[] tags, bool includeTags) { List downloadList = new List(1000); foreach (var packageBundle in manifest.BundleList) @@ -185,7 +185,7 @@ namespace YooAsset else { // 查询DLC资源 - if (packageBundle.HasTag(tags)) + if (packageBundle.HasTag(tags) == includeTags) { downloadList.Add(packageBundle); } @@ -272,13 +272,13 @@ namespace YooAsset return BundleInfo.CreateUnpackInfos(_assist, downloadList); } - ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout) + ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, bool includeTags, int upackingMaxNumber, int failedTryAgain, int timeout) { - List unpcakList = GetUnpackListByTags(_activeManifest, tags); + List unpcakList = GetUnpackListByTags(_activeManifest, tags, includeTags); var operation = new ResourceUnpackerOperation(Download, PackageName, unpcakList, upackingMaxNumber, failedTryAgain, timeout); return operation; } - private List GetUnpackListByTags(PackageManifest manifest, string[] tags) + private List GetUnpackListByTags(PackageManifest manifest, string[] tags, bool includeTags) { List downloadList = new List(1000); foreach (var packageBundle in manifest.BundleList) @@ -290,7 +290,7 @@ namespace YooAsset // 查询DLC资源 if (IsBuildinPackageBundle(packageBundle)) { - if (packageBundle.HasTag(tags)) + if (packageBundle.HasTag(tags) == includeTags) { downloadList.Add(packageBundle); } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs index c6d7cc92..aa5cc65f 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs @@ -86,7 +86,7 @@ namespace YooAsset { return ResourceDownloaderOperation.CreateEmptyDownloader(Download, PackageName, downloadingMaxNumber, failedTryAgain, timeout); } - ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout) + ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout) { return ResourceDownloaderOperation.CreateEmptyDownloader(Download, PackageName, downloadingMaxNumber, failedTryAgain, timeout); } @@ -116,13 +116,13 @@ namespace YooAsset return BundleInfo.CreateUnpackInfos(_assist, downloadList); } - ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout) + ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, bool includeTags, int upackingMaxNumber, int failedTryAgain, int timeout) { - List unpcakList = GetUnpackListByTags(_activeManifest, tags); + List unpcakList = GetUnpackListByTags(_activeManifest, tags, includeTags); var operation = new ResourceUnpackerOperation(Download, PackageName, unpcakList, upackingMaxNumber, failedTryAgain, timeout); return operation; } - private List GetUnpackListByTags(PackageManifest manifest, string[] tags) + private List GetUnpackListByTags(PackageManifest manifest, string[] tags, bool includeTags) { List downloadList = new List(1000); foreach (var packageBundle in manifest.BundleList) @@ -132,7 +132,7 @@ namespace YooAsset continue; // 查询DLC资源 - if (packageBundle.HasTag(tags)) + if (packageBundle.HasTag(tags) == includeTags) { downloadList.Add(packageBundle); } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs index 5b9cc70d..b2d9a0b4 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs @@ -72,7 +72,7 @@ namespace YooAsset if (_wechatQueryServices != null) return _wechatQueryServices.Query(PackageName, packageBundle.FileName, packageBundle.FileCRC); else - return false; + return false; } private bool IsBuildinPackageBundle(PackageBundle packageBundle) { @@ -139,13 +139,13 @@ namespace YooAsset return ConvertToDownloadList(downloadList); } - ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout) + ResourceDownloaderOperation IPlayMode.CreateResourceDownloaderByTags(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout) { - List downloadList = GetDownloadListByTags(_activeManifest, tags); + List downloadList = GetDownloadListByTags(_activeManifest, tags, includeTags); var operation = new ResourceDownloaderOperation(Download, PackageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } - public List GetDownloadListByTags(PackageManifest manifest, string[] tags) + public List GetDownloadListByTags(PackageManifest manifest, string[] tags, bool includeTags) { List downloadList = new List(1000); foreach (var packageBundle in manifest.BundleList) @@ -166,7 +166,7 @@ namespace YooAsset else { // 查询DLC资源 - if (packageBundle.HasTag(tags)) + if (packageBundle.HasTag(tags) == includeTags) { downloadList.Add(packageBundle); } @@ -229,7 +229,7 @@ namespace YooAsset { return ResourceUnpackerOperation.CreateEmptyUnpacker(Download, PackageName, upackingMaxNumber, failedTryAgain, timeout); } - ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout) + ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, bool includeTags, int upackingMaxNumber, int failedTryAgain, int timeout) { return ResourceUnpackerOperation.CreateEmptyUnpacker(Download, PackageName, upackingMaxNumber, failedTryAgain, timeout); } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs index 0629bdb1..5f0ab860 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs @@ -1011,26 +1011,28 @@ namespace YooAsset /// 创建资源下载器,用于下载指定的资源标签关联的资源包文件 /// /// 资源标签 + /// 包含还是排除标签 /// 同时下载的最大文件数 /// 下载失败的重试次数 /// 超时时间 - public ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { DebugCheckInitialize(); - return _playModeImpl.CreateResourceDownloaderByTags(new string[] { tag }, downloadingMaxNumber, failedTryAgain, timeout); + return _playModeImpl.CreateResourceDownloaderByTags(new string[] { tag }, includeTags, downloadingMaxNumber, failedTryAgain, timeout); } /// /// 创建资源下载器,用于下载指定的资源标签列表关联的资源包文件 /// /// 资源标签列表 + /// 包含还是排除标签 /// 同时下载的最大文件数 /// 下载失败的重试次数 /// 超时时间 - public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) { DebugCheckInitialize(); - return _playModeImpl.CreateResourceDownloaderByTags(tags, downloadingMaxNumber, failedTryAgain, timeout); + return _playModeImpl.CreateResourceDownloaderByTags(tags, includeTags, downloadingMaxNumber, failedTryAgain, timeout); } /// @@ -1111,24 +1113,26 @@ namespace YooAsset /// 创建内置资源解压器,用于解压指定的资源标签关联的资源包文件 /// /// 资源标签 + /// 包含还是排除标签 /// 同时解压的最大文件数 /// 解压失败的重试次数 - public ResourceUnpackerOperation CreateResourceUnpacker(string tag, int unpackingMaxNumber, int failedTryAgain) + public ResourceUnpackerOperation CreateResourceUnpacker(string tag, bool includeTags, int unpackingMaxNumber, int failedTryAgain) { DebugCheckInitialize(); - return _playModeImpl.CreateResourceUnpackerByTags(new string[] { tag }, unpackingMaxNumber, failedTryAgain, int.MaxValue); + return _playModeImpl.CreateResourceUnpackerByTags(new string[] { tag }, includeTags, unpackingMaxNumber, failedTryAgain, int.MaxValue); } /// /// 创建内置资源解压器,用于解压指定的资源标签列表关联的资源包文件 /// /// 资源标签列表 + /// 包含还是排除标签 /// 同时解压的最大文件数 /// 解压失败的重试次数 - public ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, int unpackingMaxNumber, int failedTryAgain) + public ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, bool includeTags, int unpackingMaxNumber, int failedTryAgain) { DebugCheckInitialize(); - return _playModeImpl.CreateResourceUnpackerByTags(tags, unpackingMaxNumber, failedTryAgain, int.MaxValue); + return _playModeImpl.CreateResourceUnpackerByTags(tags, includeTags, unpackingMaxNumber, failedTryAgain, int.MaxValue); } #endregion diff --git a/Assets/YooAsset/Runtime/YooAssetsExtension.cs b/Assets/YooAsset/Runtime/YooAssetsExtension.cs index edaf7cf6..6e5afbda 100644 --- a/Assets/YooAsset/Runtime/YooAssetsExtension.cs +++ b/Assets/YooAsset/Runtime/YooAssetsExtension.cs @@ -482,24 +482,26 @@ namespace YooAsset /// 创建资源下载器,用于下载指定的资源标签关联的资源包文件 /// /// 资源标签 + /// 包含还是排除标签 /// 同时下载的最大文件数 /// 下载失败的重试次数 - public static ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain) + public static ResourceDownloaderOperation CreateResourceDownloader(string tag, bool includeTags, int downloadingMaxNumber, int failedTryAgain) { DebugCheckDefaultPackageValid(); - return _defaultPackage.CreateResourceDownloader(new string[] { tag }, downloadingMaxNumber, failedTryAgain); + return _defaultPackage.CreateResourceDownloader(new string[] { tag }, includeTags, downloadingMaxNumber, failedTryAgain); } /// /// 创建资源下载器,用于下载指定的资源标签列表关联的资源包文件 /// /// 资源标签列表 + /// 包含还是排除标签 /// 同时下载的最大文件数 /// 下载失败的重试次数 - public static ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain) + public static ResourceDownloaderOperation CreateResourceDownloader(string[] tags, bool includeTags, int downloadingMaxNumber, int failedTryAgain) { DebugCheckDefaultPackageValid(); - return _defaultPackage.CreateResourceDownloader(tags, downloadingMaxNumber, failedTryAgain); + return _defaultPackage.CreateResourceDownloader(tags, includeTags, downloadingMaxNumber, failedTryAgain); } /// @@ -567,24 +569,26 @@ namespace YooAsset /// 创建内置资源解压器,用于解压指定的资源标签关联的资源包文件 /// /// 资源标签 + /// 包含还是排除标签 /// 同时解压的最大文件数 /// 解压失败的重试次数 - public static ResourceUnpackerOperation CreateResourceUnpacker(string tag, int unpackingMaxNumber, int failedTryAgain) + public static ResourceUnpackerOperation CreateResourceUnpacker(string tag, bool includeTags, int unpackingMaxNumber, int failedTryAgain) { DebugCheckDefaultPackageValid(); - return _defaultPackage.CreateResourceUnpacker(tag, unpackingMaxNumber, failedTryAgain); + return _defaultPackage.CreateResourceUnpacker(tag, includeTags, unpackingMaxNumber, failedTryAgain); } /// /// 创建内置资源解压器,用于解压指定的资源标签列表关联的资源包文件 /// /// 资源标签列表 + /// 包含还是排除标签 /// 同时解压的最大文件数 /// 解压失败的重试次数 - public static ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, int unpackingMaxNumber, int failedTryAgain) + public static ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, bool includeTags, int unpackingMaxNumber, int failedTryAgain) { DebugCheckDefaultPackageValid(); - return _defaultPackage.CreateResourceUnpacker(tags, unpackingMaxNumber, failedTryAgain); + return _defaultPackage.CreateResourceUnpacker(tags, includeTags, unpackingMaxNumber, failedTryAgain); } #endregion