• Editor
  • Export JSON and texture atlas

Hello
I have a character that has 50 skins
I want to use it in a browser game where each user will have a unique set of skins
If I just export it, it will have several large png files

How can I export each skin to a separate png file and then in the browser receive from the server only the skins I need and not all the texture atlases that take up a lot of space and load the network?

Thank you for your time

  • Nate bunu yanıtladı.
    Related Discussions
    ...

    SerjChey How can I export each skin to a separate png file

    This wording doesn't make sense. Skins are stored in the skeleton data, which is JSON or binary. If space is a concern, use binary. The skeleton data always contains all skins, Spine doesn't support partially exporting a skeleton.

    SerjChey then in the browser receive from the server only the skins I need and not all the texture atlases that take up a lot of space and load the network

    You will always have all the skins in the skeleton data. That is fine, they don't take up much space.

    To pack a texture atlas with a PNG containing the images for each skin, place your skin images in subfolders. See here:
    http://esotericsoftware.com/spine-texture-packer#Folder-structure

    At runtime, instead of AtlasAttachmentLoader, you can use your own AttachmentLoader that doesn't require all the PNGs to be loaded when the attachments are created. Before you can render your skeleton, you'll need to configure each attachment the skeleton will need for rendering using your texture atlas. See here:
    http://esotericsoftware.com/spine-loading-skeleton-data#AttachmentLoader
    Also see the source for AtlasAttachmentLoader, as that is what you need to do, just only for the attachments you care about.