EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.43k stars 2.92k forks source link

[unity] Provide component interface to set combined skins #1633

Open HaraldCsaszar opened 4 years ago

HaraldCsaszar commented 4 years ago

Requested on the forum: http://esotericsoftware.com/forum/COMBINED-SKIN-Initial-state-13562

Solutions: This could be implemented by a) extending the existing SkeletonRenderer Inspector UI, or b) [preferred] by adding an additional Component that tracks active skins and combines them. Optionally, repacking the attachments also needs to be supported then. (Note that the repacked atlas textures cannot be saved to the scene/prefab.)

The additional Component could be built like a wardrobe-picker with N slots (with one skin each) instead of a single UI mask dropdown field. This could then be a comfortable to use Component for custom combined skin characters.

Note: this is remotely related to this issue, adding component interfaces for important API calls: https://github.com/EsotericSoftware/spine-runtimes/issues/1629

HaraldCsaszar commented 2 years ago

Users @Jamez0r (base implementation) and @Nick (additions for SkeletonGraphic) have kindly shared their code for an in-editor skin assignment component: http://esotericsoftware.com/forum/suggestion-make-default-skin-support-combination-17077 Thanks very much for your work!