perf : optimize package manifest deserialize

pull/241/merge
hevinci 2024-02-20 10:04:10 +08:00
parent c7329fcab5
commit 88a1184877
1 changed files with 2 additions and 2 deletions

View File

@ -142,9 +142,9 @@ namespace YooAsset
Manifest.AssetPathMapping1.Add(location, packageAsset.AssetPath); 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)) if (Manifest.AssetPathMapping1.ContainsKey(locationWithoutExtension))
YooLogger.Warning($"Location have existed : {locationWithoutExtension}"); YooLogger.Warning($"Location have existed : {locationWithoutExtension}");
else else