Skip to content

Commit 68ed3b9

Browse files
author
Tim Gerken
committed
Catch the exception thrown when an image type (to removed in 2018) is encountered) and log a warnining instead of abandoning all remaining images.
1 parent f610b6b commit 68ed3b9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Assets/HoloToolkit/Utilities/Scripts/Editor/SetIconsWindow.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,18 @@ private static void ResizeImages()
196196

197197
foreach (var scale in scales)
198198
{
199-
PlayerSettings.WSA.SetVisualAssetsImage(CloneAndResizeToFile(type, scale), type, scale);
200-
201-
progress++;
199+
try
200+
{
201+
PlayerSettings.WSA.SetVisualAssetsImage(CloneAndResizeToFile(type, scale), type, scale);
202+
}
203+
catch (Exception e)
204+
{
205+
Debug.LogWarning(e.Message);
206+
}
207+
finally
208+
{
209+
progress++;
210+
}
202211
if (EditorUtility.DisplayCancelableProgressBar("Generating images", string.Format("Generating resized images {0} of {1}", progress, progressTotal), progress / progressTotal))
203212
{
204213
canceled = true;

0 commit comments

Comments
 (0)