We created for a game a customizable character, that is divided on different sections to change how it looks (hair, eyes, mouth, etc).
To do this we:
- Setup placeholders for the attachments
- Created skins for each category (as seen on the image)
- Then exported via image folder
The result of this is a folder with the atlas.txt / skeleton.json and finally 1 png per skin.
Then on Unity, when importing we did some quick tests, created skins at runtime based on the documentation and we have a simple system that can swap each part individually.
This works as intended here, and our next step is adding on top of this addressables. Our goal is to support a large number of assets per section (thats why we divided everything into 1 png).
My approach here would be having a "default" addressable group that should hold a initial configuration for the character and then setup different groups that have specific skin sets.
When opening the game then we would have a default character and download/update the other skin sets from a CDN.
The big issue we have right now is that while everything is divided on 1 png/material per skin, we have only 1 skeleton atlas asset that has an array of materials that representates all our skins.
Removing this via inspector generates errors on the console, stating that there are missing materials.
My intention here would be only loading to the atlas the materials I need. I manually tested this with the default skins we have and it works on the editor but it keeps throwing these missing materials errors.
I believe that this should be handled dynamically as we have been preping the assets but im not sure how we can avoid these errors (or if there is a better way to do so).
I checked the forums and found one or two similar questions but no clear solution, thanks for the help!