First of all, what we want to achieve:
We have a shared Skeleton with multiple Skins.
In our game, we do not want to load all of those Skins and Textures at the same time: we want to load only what players will use.
Our current situation:
We export each skin 1 by 1, generating multiple SkeletonDataAssets.
This way skins are compatible with each other and we can even achieve Skin transition seamlessly.
There are some problems with this approach:
- We must export each skin 1 by 1, manually enabling/disabling them in the editor.
- When there are updates to the main skeleton, we must update ALL OF THEM. If we forget to update some, bugs will happen and they are hard to preemptively detect them. Updating all of the skin skeletons is a very error-prone task.
What we want:
We want to be able to automatic export multiple Skins in their separate files in a way that we can easily load them separately and add them to the main Skeleton.
I tried repacking all the skins from the Skeleton in the Unity Editor and exporting the generated material and texture but I can't save the SkeletonData since it's loaded from the Skeleton JSON
.
If I could just create and save a SkeletonBinary
from any given SkeletonData in the Unity Editor it would be a good solution.
Another good one is just a smart export that exports all Skins to self-packed files.
NOTE: I know about Addressables Spine module, but that is not very useful, since it ends up loading the original "full of skins" textures.