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