Skip to content

Commit 6ddce70

Browse files
authored
Merge pull request #82 from CyberAgentGameEntertainment/bugfix/infinite-import-loop
無限インポートループの修正
2 parents a11746e + 666fe29 commit 6ddce70

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Assets/SmartAddresser/Editor/Core/Tools/Importer/SmartAddresserAssetPostProcessor.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ string[] movedFromAssetPaths
2020
)
2121
{
2222
var addressableSettings = AddressableAssetSettingsDefaultObject.Settings;
23+
var beforeHash = addressableSettings.currentHash;
2324

2425
// Check this because AddressableAssetSettingsDefaultObject.Settings may be null at this point when the Library folder is deleted.
2526
if (addressableSettings == null)
@@ -57,16 +58,19 @@ string[] movedFromAssetPaths
5758
foreach (var importedAssetPath in importedAssetPaths)
5859
{
5960
var guid = AssetDatabase.AssetPathToGUID(importedAssetPath);
60-
applyService.Apply(guid, false, true);
61+
applyService.Apply(guid, false, false);
6162
}
6263

6364
foreach (var movedAssetPath in movedAssetPaths)
6465
{
6566
var guid = AssetDatabase.AssetPathToGUID(movedAssetPath);
66-
applyService.Apply(guid, false, true);
67+
applyService.Apply(guid, false, false);
6768
}
6869

69-
applyService.InvokeBatchModificationEvent();
70+
if (beforeHash != addressableSettings.currentHash)
71+
{
72+
applyService.InvokeBatchModificationEvent();
73+
}
7074
}
7175

7276
private static bool ShouldProcess(

0 commit comments

Comments
 (0)