可寻址地址冲突时,打印冲突地址的资源地址
parent
20b0bd26ae
commit
0f9e932616
|
@ -197,16 +197,17 @@ namespace YooAsset.Editor
|
|||
// 检测可寻址地址是否重复
|
||||
if (command.EnableAddressable)
|
||||
{
|
||||
HashSet<string> adressTemper = new HashSet<string>();
|
||||
var addressTemper = new Dictionary<string, string>();
|
||||
foreach (var collectInfoPair in result)
|
||||
{
|
||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||
{
|
||||
string address = collectInfoPair.Value.Address;
|
||||
if (adressTemper.Contains(address) == false)
|
||||
adressTemper.Add(address);
|
||||
string assetPath = collectInfoPair.Value.AssetPath;
|
||||
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||
addressTemper.Add(address, assetPath);
|
||||
else
|
||||
throw new Exception($"The address is existed : {address} in collector : {CollectPath}");
|
||||
throw new Exception($"The address is existed : {address} in collector : {CollectPath}.\nAssetPath:\n {existed}\n {assetPath}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,16 +96,17 @@ namespace YooAsset.Editor
|
|||
// 检测可寻址地址是否重复
|
||||
if (command.EnableAddressable)
|
||||
{
|
||||
HashSet<string> adressTemper = new HashSet<string>();
|
||||
var addressTemper = new Dictionary<string, string>();
|
||||
foreach (var collectInfoPair in result)
|
||||
{
|
||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||
{
|
||||
string address = collectInfoPair.Value.Address;
|
||||
if (adressTemper.Contains(address) == false)
|
||||
adressTemper.Add(address);
|
||||
string assetPath = collectInfoPair.Value.AssetPath;
|
||||
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||
addressTemper.Add(address, assetPath);
|
||||
else
|
||||
throw new Exception($"The address is existed : {address} in group : {GroupName}");
|
||||
throw new Exception($"The address is existed : {address} in group : {GroupName}.\nAssetPath:\n{existed}\n{assetPath}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,16 +76,17 @@ namespace YooAsset.Editor
|
|||
// 检测可寻址地址是否重复
|
||||
if (command.EnableAddressable)
|
||||
{
|
||||
HashSet<string> adressTemper = new HashSet<string>();
|
||||
var addressTemper = new Dictionary<string, string>();
|
||||
foreach (var collectInfoPair in result)
|
||||
{
|
||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||
{
|
||||
string address = collectInfoPair.Value.Address;
|
||||
if (adressTemper.Contains(address) == false)
|
||||
adressTemper.Add(address);
|
||||
string assetPath = collectInfoPair.Value.AssetPath;
|
||||
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||
addressTemper.Add(address, assetPath);
|
||||
else
|
||||
throw new Exception($"The address is existed : {address}");
|
||||
throw new Exception($"The address is existed : {address}.\nAssetPath:\n {existed}\n {assetPath}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue