com.wallstop-studios.unity-helpers 2.0.0-rc73.12 → 2.0.0-rc73.13

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.
@@ -341,19 +341,20 @@
341
341
  }
342
342
  );
343
343
 
344
- if (!hasVisible)
345
- {
346
- return null;
347
- }
348
-
349
344
  int cropWidth = maxX - minX + 1;
350
345
  int cropHeight = maxY - minY + 1;
351
346
 
352
- if (_onlyNecessary && cropWidth == width && cropHeight == height)
347
+ if (_onlyNecessary && (!hasVisible || (cropWidth == width && cropHeight == height)))
353
348
  {
354
349
  return null;
355
350
  }
356
351
 
352
+ if (!hasVisible)
353
+ {
354
+ cropWidth = 1;
355
+ cropHeight = 1;
356
+ }
357
+
357
358
  Texture2D cropped = new(cropWidth, cropHeight, TextureFormat.RGBA32, false);
358
359
  Color32[] croppedPixels = new Color32[cropWidth * cropHeight];
359
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.unity-helpers",
3
- "version": "2.0.0-rc73.12",
3
+ "version": "2.0.0-rc73.13",
4
4
  "displayName": "Unity Helpers",
5
5
  "description": "Various Unity Helper Library",
6
6
  "dependencies": {},
@@ -48,3 +48,4 @@
48
48
 
49
49
 
50
50
 
51
+