From 5d51bfe751749b74c400f3f1967c8ba1592e48f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Wed, 10 Sep 2025 21:00:51 +0800 Subject: [PATCH] feat #639 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复问题 --- .../DefaultEditorFileSystem/DefaultEditorFileSystem.cs | 10 +++++----- .../internal/DownloadVirutalBundleOperation.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/DefaultEditorFileSystem.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/DefaultEditorFileSystem.cs index 88357b24..0d699f3a 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/DefaultEditorFileSystem.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/DefaultEditorFileSystem.cs @@ -8,7 +8,7 @@ namespace YooAsset /// internal class DefaultEditorFileSystem : IFileSystem { - protected readonly HashSet _records = new HashSet(); + protected readonly Dictionary _records = new Dictionary(10000); protected string _packageRoot; /// @@ -149,7 +149,7 @@ namespace YooAsset { if (VirtualDownloadMode) { - return _records.Contains(bundle.BundleGUID); + return _records.ContainsKey(bundle.BundleGUID); } else { @@ -198,10 +198,10 @@ namespace YooAsset } #region 内部方法 - public void RecordDownloadFile(string bundleName) + public void RecordDownloadFile(PackageBundle bundle) { - if (_records.Contains(bundleName) == false) - _records.Add(bundleName); + if (_records.ContainsKey(bundle.BundleGUID) == false) + _records.Add(bundle.BundleGUID, bundle.BundleName); } public string GetEditorPackageVersionFilePath() { diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/Operation/internal/DownloadVirutalBundleOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/Operation/internal/DownloadVirutalBundleOperation.cs index 5e29e1bc..963c378f 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/Operation/internal/DownloadVirutalBundleOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultEditorFileSystem/Operation/internal/DownloadVirutalBundleOperation.cs @@ -92,7 +92,7 @@ namespace YooAsset if (_unityDownloadFileOp.Status == EOperationStatus.Succeed) { - _fileSystem.RecordDownloadFile(Bundle.BundleName); + _fileSystem.RecordDownloadFile(Bundle); _steps = ESteps.Done; Status = EOperationStatus.Succeed; }