diff --git a/Assets/SmartAddresser/Editor/Core/Tools/Importer/SmartAddresserAssetPostProcessor.cs b/Assets/SmartAddresser/Editor/Core/Tools/Importer/SmartAddresserAssetPostProcessor.cs index e17579b..0720abd 100644 --- a/Assets/SmartAddresser/Editor/Core/Tools/Importer/SmartAddresserAssetPostProcessor.cs +++ b/Assets/SmartAddresser/Editor/Core/Tools/Importer/SmartAddresserAssetPostProcessor.cs @@ -20,6 +20,7 @@ string[] movedFromAssetPaths ) { var addressableSettings = AddressableAssetSettingsDefaultObject.Settings; + var beforeHash = addressableSettings.currentHash; // Check this because AddressableAssetSettingsDefaultObject.Settings may be null at this point when the Library folder is deleted. if (addressableSettings == null) @@ -57,16 +58,19 @@ string[] movedFromAssetPaths foreach (var importedAssetPath in importedAssetPaths) { var guid = AssetDatabase.AssetPathToGUID(importedAssetPath); - applyService.Apply(guid, false, true); + applyService.Apply(guid, false, false); } foreach (var movedAssetPath in movedAssetPaths) { var guid = AssetDatabase.AssetPathToGUID(movedAssetPath); - applyService.Apply(guid, false, true); + applyService.Apply(guid, false, false); } - applyService.InvokeBatchModificationEvent(); + if (beforeHash != addressableSettings.currentHash) + { + applyService.InvokeBatchModificationEvent(); + } } private static bool ShouldProcess(