• RuntimesUnity
  • GetRepackedSkin not working properly after upgrade Spine Runtime from 4.0 to 4.1

Hi, we have been using Unity Spine Runtime (v4.0) in our project for over 2 years, we are using GetRepackedSkin to repack our Spine characters at runtime as we are using mix-and-match equip system and also some Spine skeleton have more than 1 textures. Everything is working fine but when we tried to upgrade Spine Runtime to v4.1, some characters look messed-up after called to GetRepackedSkin.
The problem only occur to some characters but not all. And all characters work flawlessly before upgrade Spine v4.1 upgrade.
Please refer to the attached image below,

I can send in a minimal project which can reproduce the problem.
Thanks,
Martin.

Related Discussions
...

martinlu Thank you for sending the repro project! I have confirmed I can reproduce the problem and this appears to be like a bug when using Polygons packing when exporting from the Spine editor.

The reason I think this is because after I checked your Unity project, I tried to repack the textures of your skeleton using the example scene included in the spine-unity runtime, and I was able to reproduce the same problem there. So there seems to be no problem with the script or the implementation.
Then I imported your skeleton data into Spine 4.1.24 and re-exported the skeleton with the Packing option set to Rectangles and re-imported it into the Unity project, the repacking problem did not occur. However, when I set it to Polygons, the repacking problem occurred again.

Unfortunately, Harald, who is in charge of spine-unity, will not be available until January 8th for the winter holidays, so so we are afraid you will have to wait until this issue is fixed, but I think we should be able to work around it at least once by changing the packing method. Could you try it?

    Misaki Thanks a lot for the prompt help and detailed explanation. We will try out the work-around when we're back to office.

    Hi, we've tried the workaround to change all the problematic skeletons to using Rectangle during export, and it seems to have solved the above-mentioned "Repack Skin" problems so far. As "Polygon" export is more efficient than "Rectangle", hope the "repack skin" bugs could be fixed when Harald is back.
    Really appreciate the quick help on this!
    Thanks a lot!
    Martin.

      martinlu Glad to hear that the workaround worked! Sorry to keep you waiting on the issue of textures packed by Polygons not working with repacking skins, but thanks for the kind words 🙂

      12 days later

      @martinlu Sorry for the long delay. We are having a deeper look at your reproduction project, we will get back to you as soon as we've figured out what's going wrong.

      @martinlu This is indeed a bug with skin repacking which occurs with polygon packing. It seems to only occur when the region is packed at 270 degree rotation by the packer and when texture aspect ratios change from original to repacked texture.

      We have created an issue ticket here for you to subscribe:
      EsotericSoftware/spine-runtimes2445
      Thanks for reporting and sorry for the troubles. We will post here as soon as we have a bugfix ready.

        a month later

        Thanks Harald. The updated package fixed the issues.

        Thanks for confirming, glad to hear.