CaptainCollect

I created a simple idle animation on the Spine animation software. Then I exported the animation into a spritesheet and I imported it to Unity. Then used sprite editor and split it up and then create the animation. The pviot point at the center x = .5, y = .5. All the images look like it got split correctly, but once I tested the animation it looks like some of the images shift ever so slightly as if they weren't centered. I am not sure if this was spine exporting it and like shifting the images just so slightly when combing it into a spritesheet or that the unity sprite editor wasnt able to slip it good. If I were to just export each image individually instead of creating a sprite sheet then the images are all centered when i create the animation with no shifting. I messed around with the settings on exporting scaling, stuff like that in Spine but nothing has helped. Anyone have an ideas?

I have attached my settings for the export to this post
Attachments
Spine Export Settings.png
CaptainCollect
Posts: 1

Pharan

Currently, Spine approximates the export image size based on the bounds of the poses of the animation. So between animations, the pivot points are likely not aligned.

The current workaround is to add a rectangle image behind your skeleton to force Spine to use it for the bounds calculation for all animations regardless of poses. You just have to make sure none of the poses go beyond that rectangle. Then make that rectangle transparent by changing its attachment or slot color, so that it's not visible on the exported frames themselves.

Exporting individual frames for Unity to pack is probably better than a prepacked sprite sheet. Unity's tight packing is better at saving sprite atlas space than than any grid packing.
User avatar
Pharan

Pharan
Posts: 5092


Return to Unity