update asset bundle collector
收集界面增加用户自定义数据栏。
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[DisplayName("以文件名称为定位地址")]
|
||||
[DisplayName("定位地址: 文件名")]
|
||||
public class AddressByFileName : IAddressRule
|
||||
{
|
||||
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
||||
@@ -11,7 +11,7 @@ namespace YooAsset.Editor
|
||||
}
|
||||
}
|
||||
|
||||
[DisplayName("以分组名称+文件名称为定位地址")]
|
||||
[DisplayName("定位地址: 分组名+文件名")]
|
||||
public class AddressByGroupAndFileName : IAddressRule
|
||||
{
|
||||
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
||||
@@ -21,8 +21,8 @@ namespace YooAsset.Editor
|
||||
}
|
||||
}
|
||||
|
||||
[DisplayName("以收集器名称+文件名称为定位地址")]
|
||||
public class AddressByCollectorAndFileName : IAddressRule
|
||||
[DisplayName("定位地址: 文件夹名+文件名")]
|
||||
public class AddressByFolderAndFileName : IAddressRule
|
||||
{
|
||||
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
||||
{
|
||||
@@ -31,36 +31,4 @@ namespace YooAsset.Editor
|
||||
return $"{collectorName}_{fileName}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DisplayName("以Address+文件路径为定位地址")]
|
||||
public class AddressByAddressAndFilePath : IAddressRule
|
||||
{
|
||||
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
||||
{
|
||||
if (Path.HasExtension(data.CollectPath))
|
||||
{
|
||||
return data.Address;
|
||||
}
|
||||
else
|
||||
{
|
||||
string path = data.AssetPath.Replace(data.CollectPath, "");
|
||||
if (data.IsMultiPlatform)
|
||||
{
|
||||
string platform = "Windows";
|
||||
#if UNITY_ANDROID
|
||||
platform = "Android";
|
||||
#elif UNITY_IOS
|
||||
platform = "iOS";
|
||||
#elif UNITY_STANDALONE_OSX
|
||||
platform = "OSX";
|
||||
#endif
|
||||
path = path.Replace($"{platform}/", "");
|
||||
}
|
||||
string fileName = Path.GetFileName(data.AssetPath);
|
||||
return $"{data.Address}{path}";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user