From 769678a4b53887f133bedabe60ce952b10760535 Mon Sep 17 00:00:00 2001 From: JellyHoney <494883350@qq.com> Date: Thu, 1 Feb 2024 16:46:34 +0800 Subject: [PATCH] update DeserializeManifestOperation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化修改文件后缀耗时 --- .../Operations/Internal/DeserializeManifestOperation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs b/Assets/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs index bca8586..14fffae 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/Operations/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)) { - string locationWithoutExtension = PathUtility.RemoveExtension(location); if (Manifest.AssetPathMapping1.ContainsKey(locationWithoutExtension)) YooLogger.Warning($"Location have existed : {locationWithoutExtension}"); else