mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Fixed TK2D sprite collection rotated region import. See #2113.
This commit is contained in:
parent
79be6d41a1
commit
5bb43d31a5
@ -88,6 +88,11 @@ namespace Spine.Unity.TK2D {
|
||||
|
||||
regionWidth = (int)(def.boundsData[1].x / def.texelSize.x);
|
||||
regionHeight = (int)(def.boundsData[1].y / def.texelSize.y);
|
||||
if (regionRotated) {
|
||||
float tempSwap = regionWidth;
|
||||
regionWidth = regionHeight;
|
||||
regionHeight = tempSwap;
|
||||
}
|
||||
|
||||
float x0 = def.untrimmedBoundsData[0].x - def.untrimmedBoundsData[1].x / 2;
|
||||
float x1 = def.boundsData[0].x - def.boundsData[1].x / 2;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user