@ant5033 Thanks for sending the reproduction assets. The problem is that the folder structure of the attachment images does not match.
You exported the skeleton monster 01
having the monster 01/images
directory set as Images
directory in the Spine project. When you export the skeleton with Texture atlas:
pack
enabled, the badan
attachment image will be exported just as the path badan
. This is what the skeleton .skel.bytes
file has stored and is looking up when searching an atlas file for its required attachment regions.
With your combined atlas however, the directory structure is exporting using two directories above, leading to the following path being stored in the combined monsters.atlas.txt
:
monster 01/images/badan
So when loading the skeleton, it searches for badan
but does not find this in the atlas, monster 01/images/badan
, monster 02/images/badan
or monster 03/images/badan
do not count as equal. And even if it did count them as a match, which of these should it use then?
While there is an option Flatten paths
for this problem, your image names are all the same and not unique, so this is not an option. The solution for your problem is to use the same directory structure when exporting the skeleton as when exporting the atlas. Likely it's easiest to rename the images
dir in each of your Spine projects to a unique name, e.g. monster-01-images
. So you would change the directory Monster03SpineProject/images
to Monster03SpineProject/monster-03-images
.
Then you could use a simple copy batch script which copies your directories over to your atlas packaging directory, e.g. to a structure like this:
combined-atlas // pack this directory
- monster-01-images
-- badan, etc
- monster-02-images
-- badan, etc
- monster-03-images
-- badan, etc
Then the resulting image paths should match up properly, like e.g. monster-03-images/badan
. A side note: you can open the .atlas.txt
files using a normal text editor to quickly check what image path names have been exported.