From 88a1184877aefa8de3e0bcdcac198885883e41f1 Mon Sep 17 00:00:00 2001 From: hevinci Date: Tue, 20 Feb 2024 10:04:10 +0800 Subject: [PATCH] perf : optimize package manifest deserialize --- .../Operation/Internal/DeserializeManifestOperation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs index 21fcc6c..77e088b 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs @@ -142,9 +142,9 @@ namespace YooAsset Manifest.AssetPathMapping1.Add(location, packageAsset.AssetPath); // 添加无后缀名路径的映射 - if (Path.HasExtension(location)) + string locationWithoutExtension = Path.ChangeExtension(location, null); + if (ReferenceEquals(location, locationWithoutExtension) == false) { - string locationWithoutExtension = PathUtility.RemoveExtension(location); if (Manifest.AssetPathMapping1.ContainsKey(locationWithoutExtension)) YooLogger.Warning($"Location have existed : {locationWithoutExtension}"); else