• Editor
  • Multiple Atlas export for one Skeleton Json

Related Discussions
...

Hello,

We have a situation where we have a bunch of characters that all share the same animations. But of these, say 12 characters each has their own set of attachments they can use.

We are starting to reach the limits of a 2048x2048 atlas and are looking into splitting up these characters into different atlases.

Ideally we could share the one skeleton.json file (we are using Unity). For each character type we would create a SkeletonData using this skeleton.json, but just change out the atlas file to only include attachments that would be valid for that character type.

We can't do this as we get missing attachment error as every atlas will be missing a bunch of the attachments for other unit types.

Is there a better way to approach this issue? I assume its a common thing people run into with lots of attachments?

Currently, our best idea is to write a script that builds new Skeleton.json files that only contain the attachments that each character uses but this will still result in a lot of duplicated animation data through the project.

Thank you

You could use Skins to replace the skeleton’s appearance, pack separate texture pages for each character skin.
In this case, you may be concerned that all pages will be loaded as soon as your skeleton's SkeletonDataAsset is loaded even if you want to display one of the 12 characters. However, as Harald explains on the following thread, you can implement delayed texture loading so that only the necessary textures are loaded:
Mix and match outfits + Addressables loading issue
I hope this will help you.

Hey that was exactly what I needed. Was most of the way to a solution, but the filler single pixel texture to get rid of the error was the final step.

Thank you!

I'm glad to hear that! Thank you for getting back to us 🙂