mirror of https://github.com/tuyoogame/YooAsset
parent
b3ead90832
commit
b0dc829b04
|
@ -221,9 +221,16 @@ namespace YooAsset
|
||||||
manifest.AssetDic = new Dictionary<string, PackageAsset>(assetCount);
|
manifest.AssetDic = new Dictionary<string, PackageAsset>(assetCount);
|
||||||
|
|
||||||
if (manifest.EnableAddressable)
|
if (manifest.EnableAddressable)
|
||||||
|
{
|
||||||
manifest.AssetPathMapping1 = new Dictionary<string, string>(assetCount * 3);
|
manifest.AssetPathMapping1 = new Dictionary<string, string>(assetCount * 3);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
manifest.AssetPathMapping1 = new Dictionary<string, string>(assetCount * 2);
|
{
|
||||||
|
if (manifest.LocationToLower)
|
||||||
|
manifest.AssetPathMapping1 = new Dictionary<string, string>(assetCount * 2, StringComparer.OrdinalIgnoreCase);
|
||||||
|
else
|
||||||
|
manifest.AssetPathMapping1 = new Dictionary<string, string>(assetCount * 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (manifest.IncludeAssetGUID)
|
if (manifest.IncludeAssetGUID)
|
||||||
manifest.AssetPathMapping2 = new Dictionary<string, string>(assetCount);
|
manifest.AssetPathMapping2 = new Dictionary<string, string>(assetCount);
|
||||||
|
@ -245,8 +252,6 @@ namespace YooAsset
|
||||||
// 填充AssetPathMapping1
|
// 填充AssetPathMapping1
|
||||||
{
|
{
|
||||||
string location = packageAsset.AssetPath;
|
string location = packageAsset.AssetPath;
|
||||||
if (manifest.LocationToLower)
|
|
||||||
location = location.ToLower();
|
|
||||||
|
|
||||||
// 添加原生路径的映射
|
// 添加原生路径的映射
|
||||||
if (manifest.AssetPathMapping1.ContainsKey(location))
|
if (manifest.AssetPathMapping1.ContainsKey(location))
|
||||||
|
|
|
@ -138,9 +138,6 @@ namespace YooAsset
|
||||||
if (string.IsNullOrEmpty(location))
|
if (string.IsNullOrEmpty(location))
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
|
||||||
if (LocationToLower)
|
|
||||||
location = location.ToLower();
|
|
||||||
|
|
||||||
if (AssetPathMapping1.TryGetValue(location, out string assetPath))
|
if (AssetPathMapping1.TryGetValue(location, out string assetPath))
|
||||||
return assetPath;
|
return assetPath;
|
||||||
else
|
else
|
||||||
|
@ -307,9 +304,6 @@ namespace YooAsset
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LocationToLower)
|
|
||||||
location = location.ToLower();
|
|
||||||
|
|
||||||
if (AssetPathMapping1.TryGetValue(location, out string assetPath))
|
if (AssetPathMapping1.TryGetValue(location, out string assetPath))
|
||||||
{
|
{
|
||||||
return assetPath;
|
return assetPath;
|
||||||
|
|
Loading…
Reference in New Issue