From 5254fb65efeed8050165d211e0b7df8c6e9cbf0a Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 8 Mar 2023 18:34:48 +0800 Subject: [PATCH] update asset bundle collector --- .../Editor/AssetBundleCollector/DefaultAddressRule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs b/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs index da13444..3b295be 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/DefaultAddressRule.cs @@ -27,8 +27,8 @@ namespace YooAsset.Editor string IAddressRule.GetAssetAddress(AddressRuleData data) { string fileName = Path.GetFileNameWithoutExtension(data.AssetPath); - string collectorName = Path.GetFileNameWithoutExtension(data.CollectPath); - return $"{collectorName}_{fileName}"; + FileInfo fileInfo = new FileInfo(data.AssetPath); + return $"{fileInfo.Directory.Name}_{fileName}"; } } } \ No newline at end of file