Skip to content

Commit

Permalink
代码调整
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiang Yin committed Sep 28, 2021
1 parent 4f61b12 commit d0c010b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions GameFramework/Resource/ResourceManager.ResourceUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,16 @@ private void GenerateReadWriteVersionList()
int index = 0;
foreach (KeyValuePair<ResourceName, ReadWriteResourceInfo> 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<int> resourceIndexes = null;
if (!m_CachedFileSystemsForGenerateReadWriteVersionList.TryGetValue(i.Value.FileSystemName, out resourceIndexes))
if (!m_CachedFileSystemsForGenerateReadWriteVersionList.TryGetValue(resourceInfo.FileSystemName, out resourceIndexes))
{
resourceIndexes = new List<int>();
m_CachedFileSystemsForGenerateReadWriteVersionList.Add(i.Value.FileSystemName, resourceIndexes);
m_CachedFileSystemsForGenerateReadWriteVersionList.Add(resourceInfo.FileSystemName, resourceIndexes);
}

resourceIndexes.Add(index);
Expand Down

0 comments on commit d0c010b

Please sign in to comment.