From 290e13934643592e48dca202b3de7a6b5d96653d Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 24 Mar 2023 16:13:39 +0800 Subject: [PATCH] update asset bundle collector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加了AddressByFilePath规则类 --- .../AssetBundleCollectorSettingData.cs | 1 + .../Editor/AssetBundleCollector/DefaultAddressRule.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs index a3f1a28..40728c2 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs @@ -108,6 +108,7 @@ namespace YooAsset.Editor List types = new List(100) { typeof(AddressByFileName), + typeof(AddressByFilePath), typeof(AddressByFolderAndFileName), typeof(AddressByGroupAndFileName) }; diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs b/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs index 3b295be..d23c78b 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs @@ -11,6 +11,15 @@ namespace YooAsset.Editor } } + [DisplayName("定位地址: 文件路径")] + public class AddressByFilePath : IAddressRule + { + string IAddressRule.GetAssetAddress(AddressRuleData data) + { + return data.AssetPath; + } + } + [DisplayName("定位地址: 分组名+文件名")] public class AddressByGroupAndFileName : IAddressRule {