mirror of https://github.com/tuyoogame/YooAsset
update asset bundle collector
parent
054ee93360
commit
d560d8a2e8
|
@ -193,6 +193,8 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
string assetPath = collectInfoPair.Value.AssetPath;
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
|
if (string.IsNullOrEmpty(address))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (address.StartsWith("Assets/") || address.StartsWith("assets/"))
|
if (address.StartsWith("Assets/") || address.StartsWith("assets/"))
|
||||||
throw new Exception($"The address can not set asset path in collector : {CollectPath} \nAssetPath: {assetPath}");
|
throw new Exception($"The address can not set asset path in collector : {CollectPath} \nAssetPath: {assetPath}");
|
||||||
|
|
|
@ -103,6 +103,9 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
string assetPath = collectInfoPair.Value.AssetPath;
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
|
if (string.IsNullOrEmpty(address))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (addressTemper.TryGetValue(address, out var existed) == false)
|
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||||
addressTemper.Add(address, assetPath);
|
addressTemper.Add(address, assetPath);
|
||||||
else
|
else
|
||||||
|
|
|
@ -103,6 +103,9 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
string address = collectInfoPair.Value.Address;
|
string address = collectInfoPair.Value.Address;
|
||||||
string assetPath = collectInfoPair.Value.AssetPath;
|
string assetPath = collectInfoPair.Value.AssetPath;
|
||||||
|
if (string.IsNullOrEmpty(address))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (addressTemper.TryGetValue(address, out var existed) == false)
|
if (addressTemper.TryGetValue(address, out var existed) == false)
|
||||||
addressTemper.Add(address, assetPath);
|
addressTemper.Add(address, assetPath);
|
||||||
else
|
else
|
||||||
|
|
|
@ -94,7 +94,8 @@ namespace YooAsset.Editor
|
||||||
typeof(AddressByFileName),
|
typeof(AddressByFileName),
|
||||||
typeof(AddressByFilePath),
|
typeof(AddressByFilePath),
|
||||||
typeof(AddressByFolderAndFileName),
|
typeof(AddressByFolderAndFileName),
|
||||||
typeof(AddressByGroupAndFileName)
|
typeof(AddressByGroupAndFileName),
|
||||||
|
typeof(AddressDisable)
|
||||||
};
|
};
|
||||||
|
|
||||||
var customTypes = EditorTools.GetAssignableTypes(typeof(IAddressRule));
|
var customTypes = EditorTools.GetAssignableTypes(typeof(IAddressRule));
|
||||||
|
|
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
|
[DisplayName("定位地址: 禁用")]
|
||||||
|
public class AddressDisable : IAddressRule
|
||||||
|
{
|
||||||
|
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[DisplayName("定位地址: 文件名")]
|
[DisplayName("定位地址: 文件名")]
|
||||||
public class AddressByFileName : IAddressRule
|
public class AddressByFileName : IAddressRule
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue