diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs
index 2a9208b..141365a 100644
--- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs
+++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs
@@ -46,6 +46,16 @@ namespace YooAsset.Editor
public string AssetTags = string.Empty;
+ ///
+ /// 可寻址路径
+ ///
+ public string Address = string.Empty;
+
+ ///
+ /// 跨平台
+ ///
+ public bool IsMultiPlatform = false;
+
///
/// 收集器是否有效
///
@@ -163,6 +173,20 @@ namespace YooAsset.Editor
{
if (IsValidateAsset(assetPath, isRawFilePackRule) && IsCollectAsset(assetPath))
{
+ if (IsMultiPlatform)
+ {
+ string platform = "Windows";
+#if UNITY_ANDROID
+ platform = "Android";
+#elif UNITY_IOS
+ platform = "iOS";
+#elif UNITY_STANDALONE_OSX
+ platform = "OSX";
+#endif
+ if (!assetPath.Contains(platform))
+ continue;
+ }
+
if (result.ContainsKey(assetPath) == false)
{
var collectAssetInfo = CreateCollectAssetInfo(command, group, assetPath, isRawFilePackRule);
@@ -305,7 +329,7 @@ namespace YooAsset.Editor
return string.Empty;
IAddressRule addressRuleInstance = AssetBundleCollectorSettingData.GetAddressRuleInstance(AddressRuleName);
- string adressValue = addressRuleInstance.GetAssetAddress(new AddressRuleData(assetPath, CollectPath, group.GroupName));
+ string adressValue = addressRuleInstance.GetAssetAddress(new AddressRuleData(assetPath, CollectPath, group.GroupName, Address, IsMultiPlatform));
return adressValue;
}
private string GetBundleName(CollectCommand command, AssetBundleCollectorGroup group, string assetPath)
diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
index 9ec9366..3b96ed7 100644
--- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
+++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
@@ -582,6 +582,18 @@ namespace YooAsset.Editor
label.style.width = 90;
elementBottom.Add(label);
}
+ {
+ var textField = new TextField();
+ textField.name = "TextField0";
+ textField.label = "Address";
+ textField.style.unityTextAlign = TextAnchor.MiddleLeft;
+ textField.style.flexGrow = 1f;
+ elementBottom.Add(textField);
+ var label = textField.Q