parent
3e7d8e9099
commit
cfe64c30c5
|
@ -204,6 +204,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}");
|
||||||
|
|
|
@ -106,6 +106,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
|
||||||
|
|
|
@ -83,6 +83,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