diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs index 8449b7c..0bff9ef 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; + /// /// 收集器是否有效 /// @@ -160,6 +170,20 @@ namespace YooAsset.Editor { if (IsValidateAsset(assetPath) && 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, isRawAsset); @@ -281,7 +305,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(AssetBundleCollectorGroup group, string assetPath) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs index 486ce7e..3aba38a 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