• Unity
  • incomplete image name on atlas file

First of all, I don't know if I should ask this on this forum or the editor forum. And I am an animator, not a programmer.

I run into this problem where some images had their name incomplete on the atlas file. the first and sixth line of the image I attached below contains the names of two images. Each supposed to have numbers in them ("obj_harnes_01" and "obj_harnes_02"), but on the atlas, they didn't show the numbers, and when the .json file is exported into unity, it shows error and I had to tamper the atlas file manually.

Anyone knows what caused this?
Thanks in advance!

Related Discussions
...
  • Изменено

No worries about which subforum to post if it's a border case, we will find your posting regardless of where you post it.

Which version of the Spine Editor and which version of the spine-unity runtime (name of the unitypackage, also listed in Assets/Spine/version.txt) are you using?

It seems that you enabled the Indexes option in the texture packer settings. When this option is enabled, image names are stripped of everything after the last underscore. Spine User Guide explains the purpose of this option:
Texture packing - Spine User Guide: Image indexes

Harald написал

No worries about which subforum to post if it's a border case, we will find your posting regardless of where you post it.

Which version of the Spine Editor and which version of the spine-unity runtime (name of the unitypackage, also listed in Assets/Spine/version.txt) are you using?

I'll need check it on my work PC regarding the version because that's where Spine is installed on. But I remember that my Spine Editor is on version 4.0.63. I'll get back to you regarding the unity runtime version later


Misaki написал

It seems that you enabled the Indexes option in the texture packer settings. When this option is enabled, image names are stripped of everything after the last underscore. Spine User Guide explains the purpose of this option:
Texture packing - Spine User Guide: Image indexes

Ah I see, but then that means there should be no problem, right? I should've added the picture before, but this is the error that we received, and when I searched about it on the forum, I found that some users said it was caused by having empty regions in the skeleton, which I checked and I didn't find any... This is when I started to manually re-add the number indications in the atlas file.

Also, this project uses quite a lot of skins, but all the images are stored in the same folder (hence why we have to use number indication). Could this also be the reason why we received an error? Should images from different skins always be placed in a different folder?

I may not fully understand why you are saying you need to use the Indexes option, but it would not be appropriate in your case. Indexes is primarily an option for frame-by-frame animation.

Should images from different skins always be placed in a different folder?

Yes, it is better to place the images in a different folder for each skin, and if there are images you want to pack on the same page, use pack.json to specify the subdirectories you want to combine. I think this post may be helpful:
It's possible Export keeping the original names ot the imgs?

Misaki написал

I may not fully understand why you are saying you need to use the Indexes option, but it would not be appropriate in your case. Indexes is primarily an option for frame-by-frame animation.

Should images from different skins always be placed in a different folder?

Yes, it is better to place the images in a different folder for each skin, and if there are images you want to pack on the same page, use pack.json to specify the subdirectories you want to combine. I think this post may be helpful:
It's possible Export keeping the original names ot the imgs?

My bad about the indexes confusion, but I think I do have it checked from a previous project that runs fine, and I thought the same export settings would work just fineon this current project, so kept it checked. I will try unchecking it and apply the solution from the post you linked.

Thank you so much, Misaki. I should really spend more time on the User Guide.

Hmm, I see. Since Indexes is disabled by default, I'm also a little wondering why you had it enabled in your previous project, but at any rate, it shouldn't be necessary to enable it just because your skeleton has a lot of skins. Thank you for getting back to us! 🙂

Harald написал

No worries about which subforum to post if it's a border case, we will find your posting regardless of where you post it.

Which version of the Spine Editor and which version of the spine-unity runtime (name of the unitypackage, also listed in Assets/Spine/version.txt) are you using?

the spine runtime is on version 4.0

Thanks for posting your spine-unity runtime version. In your case (when Editor and runtime versions match and are not too old) we expect it to only be related to accidentally enabling the Indexes Texture Packer option.

Harald написал

Thanks for posting your spine-unity runtime version. In your case (when Editor and runtime versions match and are not too old) we expect it to only be related to accidentally enabling the Indexes Texture Packer option.

Thank you so much you guys @Misaki @Harald, vey happy you all responded quickly!