com.wallstop-studios.unity-helpers 2.0.0-rc74.4 → 2.0.0-rc74.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -816,6 +816,7 @@
|
|
|
816
816
|
int errorCount = 0;
|
|
817
817
|
HashSet<string> processedAssetPaths = new();
|
|
818
818
|
|
|
819
|
+
List<TextureImporter> importers = new();
|
|
819
820
|
AssetDatabase.StartAssetEditing();
|
|
820
821
|
try
|
|
821
822
|
{
|
|
@@ -901,6 +902,7 @@
|
|
|
901
902
|
if (settingsActuallyModified)
|
|
902
903
|
{
|
|
903
904
|
importer.SaveAndReimport();
|
|
905
|
+
importers.Add(importer);
|
|
904
906
|
modifiedCount++;
|
|
905
907
|
this.Log(
|
|
906
908
|
$"Set import settings for texture: {assetPath} (from sprite: {sprite.name}) to uncompressed ({targetFormat})."
|
|
@@ -914,8 +916,14 @@
|
|
|
914
916
|
EditorUtility.ClearProgressBar();
|
|
915
917
|
}
|
|
916
918
|
|
|
919
|
+
foreach (TextureImporter importer in importers)
|
|
920
|
+
{
|
|
921
|
+
importer.SaveAndReimport();
|
|
922
|
+
}
|
|
923
|
+
|
|
917
924
|
if (modifiedCount > 0 || errorCount > 0)
|
|
918
925
|
{
|
|
926
|
+
AssetDatabase.SaveAssets();
|
|
919
927
|
AssetDatabase.Refresh();
|
|
920
928
|
}
|
|
921
929
|
|
|
@@ -559,6 +559,7 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
List<TextureImporter> importers = new();
|
|
562
563
|
AssetDatabase.StartAssetEditing();
|
|
563
564
|
try
|
|
564
565
|
{
|
|
@@ -591,6 +592,7 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
591
592
|
try
|
|
592
593
|
{
|
|
593
594
|
importer.SaveAndReimport();
|
|
595
|
+
importers.Add(importer);
|
|
594
596
|
}
|
|
595
597
|
catch (Exception ex)
|
|
596
598
|
{
|
|
@@ -604,6 +606,11 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
604
606
|
{
|
|
605
607
|
AssetDatabase.StopAssetEditing();
|
|
606
608
|
EditorUtility.ClearProgressBar();
|
|
609
|
+
foreach (TextureImporter importer in importers)
|
|
610
|
+
{
|
|
611
|
+
importer.SaveAndReimport();
|
|
612
|
+
}
|
|
613
|
+
|
|
607
614
|
this.Log($"Processed {spriteCount} sprites.");
|
|
608
615
|
if (0 < spriteCount)
|
|
609
616
|
{
|
package/package.json
CHANGED