Skip to content

Commit

Permalink
fix: ReimportFolders API adds option to skip the reimport confirm dia…
Browse files Browse the repository at this point in the history
…log (#84)
  • Loading branch information
vanifatovvlad authored Feb 8, 2023
1 parent 678569b commit 5ebbcd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Editor/AddressableImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public class FolderImporter
/// Reimporter folders.
/// </summary>
/// <param name="settings">Reference to the <see cref="AddressableAssetSettings"/></param>
public static void ReimportFolders(IEnumerable<String> assetPaths)
public static void ReimportFolders(IEnumerable<String> assetPaths, bool showConfirmDialog = true)
{
HashSet<string> pathsToImport = new HashSet<string>();
foreach (var assetPath in assetPaths)
Expand Down Expand Up @@ -375,7 +375,8 @@ public static void ReimportFolders(IEnumerable<String> 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;
Expand Down

0 comments on commit 5ebbcd8

Please sign in to comment.