com.wallstop-studios.unity-helpers 2.0.0-rc73.18 → 2.0.0-rc73.19
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.
|
@@ -111,32 +111,12 @@
|
|
|
111
111
|
|
|
112
112
|
if (GUILayout.Button("Generate/Update All .spriteatlas Assets", GUILayout.Height(40)))
|
|
113
113
|
{
|
|
114
|
-
|
|
115
|
-
EditorUtility.DisplayDialog(
|
|
116
|
-
"Generate All Atlases",
|
|
117
|
-
"This will create or update .spriteatlas assets based on all loaded configurations. Continue?",
|
|
118
|
-
"Yes",
|
|
119
|
-
"No"
|
|
120
|
-
)
|
|
121
|
-
)
|
|
122
|
-
{
|
|
123
|
-
GenerateAllAtlases();
|
|
124
|
-
}
|
|
114
|
+
GenerateAllAtlases();
|
|
125
115
|
}
|
|
126
116
|
|
|
127
117
|
if (GUILayout.Button("Pack All Generated Sprite Atlases", GUILayout.Height(40)))
|
|
128
118
|
{
|
|
129
|
-
|
|
130
|
-
EditorUtility.DisplayDialog(
|
|
131
|
-
"Pack All Atlases",
|
|
132
|
-
"This will pack all .spriteatlas assets in the project into textures. This can take some time. Continue?",
|
|
133
|
-
"Yes",
|
|
134
|
-
"No"
|
|
135
|
-
)
|
|
136
|
-
)
|
|
137
|
-
{
|
|
138
|
-
PackAllProjectAtlases();
|
|
139
|
-
}
|
|
119
|
+
PackAllProjectAtlases();
|
|
140
120
|
}
|
|
141
121
|
EditorGUILayout.Space(20);
|
|
142
122
|
_scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition);
|
|
@@ -583,7 +563,7 @@
|
|
|
583
563
|
foreach (Sprite sprite in result.spritesToAdd)
|
|
584
564
|
{
|
|
585
565
|
bool alreadyExists = false;
|
|
586
|
-
for (int i = 0; i < spritesListProp.arraySize; i
|
|
566
|
+
for (int i = 0; i < spritesListProp.arraySize; ++i)
|
|
587
567
|
{
|
|
588
568
|
if (spritesListProp.GetArrayElementAtIndex(i).objectReferenceValue == sprite)
|
|
589
569
|
{
|
|
@@ -633,7 +613,7 @@
|
|
|
633
613
|
int countRemoved = 0;
|
|
634
614
|
List<Sprite> spritesActuallyToRemove = new(result.spritesToRemove);
|
|
635
615
|
|
|
636
|
-
for (int i = spritesListProp.arraySize - 1;
|
|
616
|
+
for (int i = spritesListProp.arraySize - 1; 0 <= i; --i)
|
|
637
617
|
{
|
|
638
618
|
SerializedProperty element = spritesListProp.GetArrayElementAtIndex(i);
|
|
639
619
|
if (
|
|
@@ -700,11 +680,6 @@
|
|
|
700
680
|
EditorUtility.ClearProgressBar();
|
|
701
681
|
AssetDatabase.SaveAssets();
|
|
702
682
|
AssetDatabase.Refresh();
|
|
703
|
-
EditorUtility.DisplayDialog(
|
|
704
|
-
"Generation Complete",
|
|
705
|
-
$"Processed {totalConfigs} atlas configurations.",
|
|
706
|
-
"OK"
|
|
707
|
-
);
|
|
708
683
|
}
|
|
709
684
|
}
|
|
710
685
|
|
|
@@ -844,7 +819,7 @@
|
|
|
844
819
|
AssetDatabase.StartAssetEditing();
|
|
845
820
|
try
|
|
846
821
|
{
|
|
847
|
-
for (int i = 0; i < spritesToProcess.Count; i
|
|
822
|
+
for (int i = 0; i < spritesToProcess.Count; ++i)
|
|
848
823
|
{
|
|
849
824
|
Sprite sprite = spritesToProcess[i];
|
|
850
825
|
EditorUtility.DisplayProgressBar(
|
|
@@ -948,11 +923,6 @@
|
|
|
948
923
|
$"Finished processing source sprite textures for '{config.name}'.\n"
|
|
949
924
|
+ $"Successfully modified importers for: {modifiedCount} textures.\n"
|
|
950
925
|
+ $"Errors/Skipped duplicates: {errorCount + (spritesToProcess.Count - processedAssetPaths.Count)}.";
|
|
951
|
-
EditorUtility.DisplayDialog(
|
|
952
|
-
"Source Sprite Modification Complete",
|
|
953
|
-
summaryMessage,
|
|
954
|
-
"OK"
|
|
955
|
-
);
|
|
956
926
|
this.Log($"{summaryMessage}");
|
|
957
927
|
}
|
|
958
928
|
}
|
package/package.json
CHANGED