I've managed to use multiskin option as you proposed. I create empty instance of skin and then apply another skins in particular order so later applied skins can override some slots of earlier applied ones. Then I set my multiskin to the skeleton through setSkin method.
But this works only for first pass when I create instance of skeleton and then apply multiskin. If I'll set new multiskin to the same skeleton
strange behavior of Skin's method attachAll will update just slots of current skin.
So I have to write my own version of setting skin method that overrides this behavior and acts like branch for empty current skin in Skeleton's setSkin method. Moreover to cleanup slots that became empty in new multiskin I'm not checking attachments for null and simply pass them to slots like this:
var slots = skeleton.slots;
for (i in 0...slots.length) {
var slot = slots[i];
var name = slot.data.attachmentName;
if (name != null) {
var attachment = skin.getAttachment(i, name);
slot.setAttachment(attachment);
}
}
skeleton.skin = skin;
It leads me to the next problem
after such update I have lost traversing of defaultSkin values for empty slots. I think my solution is slightly incorrect.
Oh, I have found the
skeleton.setSlotsToSetupPose();
method!
But my main question about continuous setting up skins still actual.