It was a file naming problem.
You had both a .atlas file (new version) and a .atlas.txt (old version). The runtime was using the old atlas with the new png so it had the wrong coordinates for the regions.
The Spine-Unity runtime seemed to fail to detect that you had two atlas files. (one extended .atlas.txt
, and the other extended .atlas
).
We can assume the first time you exported the atlas that Unity detected the .atlas file and automatically renamed it .atlas.txt. But after that, I think it just broke, as the case where it detects both ".atlas" and ".atlas.txt" hasn't been handled yet. Or has it? I haven't actually gone through the importer code myself.
USER SOLUTION:
Just delete all previous exports. Export a new set of files, and in Spine's Create Atlas/Texture Packer settings, change the atlas extension from ".atlas" to ".atlas.txt".
You shouldn't be getting this problem any more after that.
Note to the animator and the programmer:
Spine exports 3 files. A png
, a json
, and a .atlas
(.atlas.txt for compatibility).
Spine-Unity's importer generates 3 more files (though not 100% true, think of them as having a 1:1 correspondence with the original Spine exports): a Material
for the image. an AtlasAsset
for the atlas, and a SkeletonDataAsset
for the json.
That makes a total of 6 files with any regular set of Spine assets. Any more and you should be suspicious if you didn't have some kind of special setup. I know it just turns into a jumble of files most of the time. But it's handy when you need to figure out what broke.
Last tip:
You should trim/crop your Shadow.png
image to remove the empty transparent areas.
That's extra work the GPU doesn't need to do, and wasted space in your atlas.