From 5ebbcd8a48232ad3282c1f5589d8aaa5e5dffc46 Mon Sep 17 00:00:00 2001 From: VladV Date: Wed, 8 Feb 2023 11:06:26 +0400 Subject: [PATCH] fix: ReimportFolders API adds option to skip the reimport confirm dialog (#84) --- Editor/AddressableImporter.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Editor/AddressableImporter.cs b/Editor/AddressableImporter.cs index ef7043d..e8f201c 100644 --- a/Editor/AddressableImporter.cs +++ b/Editor/AddressableImporter.cs @@ -340,7 +340,7 @@ public class FolderImporter /// Reimporter folders. /// /// Reference to the - public static void ReimportFolders(IEnumerable assetPaths) + public static void ReimportFolders(IEnumerable assetPaths, bool showConfirmDialog = true) { HashSet pathsToImport = new HashSet(); foreach (var assetPath in assetPaths) @@ -375,7 +375,8 @@ public static void ReimportFolders(IEnumerable assetPaths) { Debug.Log($"AddressableImporter: Found {pathsToImport.Count} asset paths..."); - if (!EditorUtility.DisplayDialog("Process files?", + if (showConfirmDialog && + !EditorUtility.DisplayDialog("Process files?", $"About to process {pathsToImport.Count} files and folders, is that OK?", "Yes", "No")) return;