mirror of https://github.com/tuyoogame/YooAsset
可寻址地址冲突时,打印冲突地址的资源地址
parent
20b0bd26ae
commit
0f9e932616
|
@ -197,16 +197,17 @@ namespace YooAsset.Editor
|
||||||
// 检测可寻址地址是否重复
|
// 检测可寻址地址是否重复
|
||||||
if (command.EnableAddressable)
|
if (command.EnableAddressable)
|
||||||
{
|
{
|
||||||
HashSet<string> adressTemper = new HashSet<string>();
|
var addressTemper = new Dictionary<string, string>();
|
||||||
foreach (var collectInfoPair in result)
|
foreach (var collectInfoPair in result)
|
||||||
{
|
{
|
||||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
if (adressTemper.Contains(address) == false)
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
adressTemper.Add(address);
|
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||||
|
addressTemper.Add(address, assetPath);
|
||||||
else
|
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)
|
if (command.EnableAddressable)
|
||||||
{
|
{
|
||||||
HashSet<string> adressTemper = new HashSet<string>();
|
var addressTemper = new Dictionary<string, string>();
|
||||||
foreach (var collectInfoPair in result)
|
foreach (var collectInfoPair in result)
|
||||||
{
|
{
|
||||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
if (adressTemper.Contains(address) == false)
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
adressTemper.Add(address);
|
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||||
|
addressTemper.Add(address, assetPath);
|
||||||
else
|
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)
|
if (command.EnableAddressable)
|
||||||
{
|
{
|
||||||
HashSet<string> adressTemper = new HashSet<string>();
|
var addressTemper = new Dictionary<string, string>();
|
||||||
foreach (var collectInfoPair in result)
|
foreach (var collectInfoPair in result)
|
||||||
{
|
{
|
||||||
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
if (collectInfoPair.Value.CollectorType == ECollectorType.MainAssetCollector)
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
if (adressTemper.Contains(address) == false)
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
adressTemper.Add(address);
|
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||||
|
addressTemper.Add(address, assetPath);
|
||||||
else
|
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