Lesh_M

I added skin atlas repacking and encountered an issue where some of my regions weren't being rotated properly.
This is the problematic code:
// \Spine\Runtime\spine-sharp\Atlas.cs
if (region.degrees == 90) {
region.u2 = (region.x + region.height) / (float)page.width;
region.v2 = (region.y + region.width) / (float)page.height;

(region.packedWidth, region.packedHeight) = (region.packedHeight, region.packedWidth);
} else {
region.u2 = (region.x + region.width) / (float)page.width;
region.v2 = (region.y + region.height) / (float)page.height;
}
if I change this:
if (region.degrees == 90)
to this:
if (region.degrees is 90 or 270)
it works properly, and ideas?

P.S
I attached a minimal project extracted from my main one to reproduce the bug.
It also writes log warnings for the 3 regions that aren't rotated.
Just run it and you'll understand everything.
You do not have the required permissions to view the files attached to this post.
Lesh_M
  • Posts: 1

Harald

Thanks for sending your reproduction project and sorry for the troubles. We will get back to you as soon as we've figured out what's going wrong.

---

Issue ticket URL:
https://github.com/EsotericSoftware/spine-runtimes/issues/2181

---

This issue has just been fixed on the 4.1 and 4.2-beta branches.
New spine-unity unitypackages are available for download here as usual:
spine-unity Download.

Thanks for reporting!
User avatar
Harald

Harri
  • Posts: 4459


Return to Bugs