How to use Spine exported texture atlases in Cocos Creator

Hi,

When exporting atlases from Spine you get .atlas file. The .atlas file doesn’t get read the same way a .plist texture atlas gets read if for example exported from TexturePacker.

Spine works fine, but I would like to use the images in the exported atlases also for other purposes.

Why aren’t .atlas files supported at texture atlases?
Are there any way to convert .atlas to .plist or other formats that cocos creator understands?

Thanks!

To clarify

.atlas file is formatted like this:
image

while .plist has the XML formatting:

Since I only have the .atlas file from Spine, how can I use the individual images as normal images in Cocos Creator as well as in Spine animations?

What’re the purposesyou need?
Can you just convert it to plist? See https://www.google.com/search?q=convert+libgdx+atlas+to+plist&oq=convert+libgdx+atlas+to+plist&aqs=chrome..69i57.7183j0j4&sourceid=chrome&ie=UTF-8

Hi @jare,

Thanks for your message!

What works fine:

  • Import a spine animation and have the spine animation work as it should :white_check_mark:

What does not work fine:

  • Use images from the spine exported atlas directly in cocos, to drag and drop a spriteFrame into a component :no_entry_sign:
    image
    As you can see in the screenshot:
  • Cocos is not understanding from-spine texture atlas and you cannot drag-and-drop or use the images from this texture atlas in anything else than in your predefined spine animation. I see no reason why you should not be able to reference them both in the spine animation AND use them in cocos like a regular texture atlas.
  • You can of course not either have them as separate images and let Cocos pack them into a texture atlas, because then spine would not find the images.

Solutions:

  1. Best solution would be for cocos to understand this “libgdx atlas” format
  2. Another solution would be to have one “libgdx atlas” and one .plist referencing the same texture

Thanks for the word “libgdx atlas”, I think that could help finding a parser for the solution #2.

1 Like

@jare managed to convert it to plist and this post is solved and turned more now into a feature request to support the libgdx atlas file format in cocos creator.

Thanks for your help and swift response!

Thanks a lot for the information!

Just wanted to end this topic with this :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Why you need to use the image directly?

To be able to use it in Cocos Creator for other use-cases than the Spine animation itself

Otherwise I need to create the custom .plist atlas through half-buggy third party software or have double downloads for same assets

Ok, thanks