update asset bundle collector

增加了AddressDisable规则
pull/186/head^2
hevinci 2023-09-25 18:19:48 +08:00
parent bcb6443300
commit ade97605f9
5 changed files with 19 additions and 1 deletions

View File

@ -204,6 +204,8 @@ namespace YooAsset.Editor
{
string address = collectInfoPair.Value.Address;
string assetPath = collectInfoPair.Value.AssetPath;
if (string.IsNullOrEmpty(address))
continue;
if (address.StartsWith("Assets/") || address.StartsWith("assets/"))
throw new Exception($"The address can not set asset path in collector : {CollectPath} \nAssetPath: {assetPath}");

View File

@ -106,6 +106,9 @@ namespace YooAsset.Editor
{
string address = collectInfoPair.Value.Address;
string assetPath = collectInfoPair.Value.AssetPath;
if (string.IsNullOrEmpty(address))
continue;
if (addressTemper.TryGetValue(address, out var existed) == false)
addressTemper.Add(address, assetPath);
else

View File

@ -83,6 +83,9 @@ namespace YooAsset.Editor
{
string address = collectInfoPair.Value.Address;
string assetPath = collectInfoPair.Value.AssetPath;
if (string.IsNullOrEmpty(address))
continue;
if (addressTemper.TryGetValue(address, out var existed) == false)
addressTemper.Add(address, assetPath);
else

View File

@ -94,7 +94,8 @@ namespace YooAsset.Editor
typeof(AddressByFileName),
typeof(AddressByFilePath),
typeof(AddressByFolderAndFileName),
typeof(AddressByGroupAndFileName)
typeof(AddressByGroupAndFileName),
typeof(AddressDisable)
};
var customTypes = EditorTools.GetAssignableTypes(typeof(IAddressRule));

View File

@ -2,6 +2,15 @@
namespace YooAsset.Editor
{
[DisplayName("定位地址: 禁用")]
public class AddressDisable : IAddressRule
{
string IAddressRule.GetAssetAddress(AddressRuleData data)
{
return string.Empty;
}
}
[DisplayName("定位地址: 文件名")]
public class AddressByFileName : IAddressRule
{