From d0c010b05167c58e92350449d04864a91ca13fd2 Mon Sep 17 00:00:00 2001 From: Jiang Yin Date: Tue, 28 Sep 2021 20:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resource/ResourceManager.ResourceUpdater.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/GameFramework/Resource/ResourceManager.ResourceUpdater.cs b/GameFramework/Resource/ResourceManager.ResourceUpdater.cs index e02ee559..b81aef02 100644 --- a/GameFramework/Resource/ResourceManager.ResourceUpdater.cs +++ b/GameFramework/Resource/ResourceManager.ResourceUpdater.cs @@ -688,14 +688,16 @@ private void GenerateReadWriteVersionList() int index = 0; foreach (KeyValuePair i in m_ResourceManager.m_ReadWriteResourceInfos) { - resources[index] = new LocalVersionList.Resource(i.Key.Name, i.Key.Variant, i.Key.Extension, (byte)i.Value.LoadType, i.Value.Length, i.Value.HashCode); - if (i.Value.UseFileSystem) + ResourceName resourceName = i.Key; + ReadWriteResourceInfo resourceInfo = i.Value; + resources[index] = new LocalVersionList.Resource(resourceName.Name, resourceName.Variant, resourceName.Extension, (byte)resourceInfo.LoadType, resourceInfo.Length, resourceInfo.HashCode); + if (resourceInfo.UseFileSystem) { List resourceIndexes = null; - if (!m_CachedFileSystemsForGenerateReadWriteVersionList.TryGetValue(i.Value.FileSystemName, out resourceIndexes)) + if (!m_CachedFileSystemsForGenerateReadWriteVersionList.TryGetValue(resourceInfo.FileSystemName, out resourceIndexes)) { resourceIndexes = new List(); - m_CachedFileSystemsForGenerateReadWriteVersionList.Add(i.Value.FileSystemName, resourceIndexes); + m_CachedFileSystemsForGenerateReadWriteVersionList.Add(resourceInfo.FileSystemName, resourceIndexes); } resourceIndexes.Add(index);