• RuntimesUnity
  • How to export skins in independent atlas and skel folders at the same time

I'm working on a game in Unity and I'm exporting the characters skeletons as binary files.

In this project I prefer to export the characters skins as different skeletons in Unity, making them share only the same Reference Assets, it has proven to be better for the game's performance.

Turns out, every time I need to make a change on a skin I re-export it from Spine and replace the atlas and skel files in the Unity folder with the new files, and this causes the skins of the same skeleton in Unity to bug and have missing body elements. The problem is solved when I re-export all the other skins of that same skeleton in the project again.

The problem is: the main character has A LOT of skins, as you can see in the image bellow and this has been a lot of work because I need to re-export all of them one by one when I only need to make a change on a single skin

I could export all the skins at once but then they will all share the same skeleton and atlas in Unity and I don't want that to happen.

My question is: is there any way to export each skin in a different atlas and skeleton at the same time? In different folders? Without having to export them one by one?

  • Misaki ответили на это сообщение.
    Related Discussions
    ...

    To export each skin in a different atlas and skeleton at the same time, you can use a combination of Spine's Texture Packer and scripting to automate the process. While Spine does not currently support exporting each skin into separate atlases directly, you can achieve this by organizing your images into folders and using a script to automate the export process. Here's a general approach:

    1. Organize Images: Place each skin's images into separate folders. This will help in packing them into separate atlases.

    2. Use Texture Packer: Utilize Spine's Texture Packer to pack each folder into a separate atlas. You can do this manually or automate it using a script.

    3. Automate Export: Write a script to automate the export process using Spine's Command Line Interface (CLI). This script can iterate over each skin folder, pack the images, and export the skeleton data.

    4. Modify Unity Integration: In Unity, ensure that each skin's skeleton data and atlas are loaded separately. You may need to adjust your Unity project to handle multiple skeletons and atlases.

    By following these steps, you can streamline the process of exporting multiple skins without having to do it manually one by one.

    guaxinim_raccoon Your question itself is about the operation of the editor, but I thought it was actually a matter of the way it was implemented on Unity, so I changed the tag to Unity.

    Actually, there are our official recommendations on how to improve the performance of loading and rendering skeletons when there are a large number of skins and a large number of textures to load:


    It is possible to pack multiple texture atlases in the way described by Spinebot, but you will still need to update the skeleton data each time you make changes to the skin. So instead of having separate skeleton data for each skin, it is better to keep them together, but load lightweight dummy data when the skin is not actually needed.