com.wallstop-studios.unity-helpers 2.0.0-rc81.5 → 2.0.0-rc81.6
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.
|
@@ -161,6 +161,18 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
161
161
|
public int crunchCompressionLevel = 50;
|
|
162
162
|
|
|
163
163
|
public TextureImporterCompression compression = TextureImporterCompression.Compressed;
|
|
164
|
+
|
|
165
|
+
private void OnValidate()
|
|
166
|
+
{
|
|
167
|
+
if (!Application.isPlaying)
|
|
168
|
+
{
|
|
169
|
+
int removed = spritesToPack.RemoveAll(sprite => sprite == null);
|
|
170
|
+
if (removed > 0)
|
|
171
|
+
{
|
|
172
|
+
EditorUtility.SetDirty(this);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
164
176
|
}
|
|
165
177
|
#endif
|
|
166
178
|
}
|
|
@@ -830,9 +830,15 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
830
830
|
atlas.Remove(toRemove.ToArray<Object>());
|
|
831
831
|
}
|
|
832
832
|
|
|
833
|
-
|
|
834
|
-
if (
|
|
833
|
+
int removed = config.spritesToPack.RemoveAll(sprite => sprite == null);
|
|
834
|
+
if (removed > 0)
|
|
835
835
|
{
|
|
836
|
+
EditorUtility.SetDirty(config);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
if (config.spritesToPack.Count > 0)
|
|
840
|
+
{
|
|
841
|
+
Object[] spritesToAdd = config.spritesToPack.ToArray<Object>();
|
|
836
842
|
atlas.Add(spritesToAdd);
|
|
837
843
|
}
|
|
838
844
|
else
|
|
@@ -857,7 +863,7 @@ namespace WallstopStudios.UnityHelpers.Editor.Sprites
|
|
|
857
863
|
AssetDatabase.Refresh();
|
|
858
864
|
}
|
|
859
865
|
this.Log(
|
|
860
|
-
$"'{config.name}': Successfully generated/updated at {outputPath}. Sprites included: {
|
|
866
|
+
$"'{config.name}': Successfully generated/updated at {outputPath}. Sprites included: {config.spritesToPack.Count}."
|
|
861
867
|
);
|
|
862
868
|
}
|
|
863
869
|
|