Hi!
so when my avatar is in the pool area I turn on the attachment of the mask like so
skel.Skeleton.SetAttachment(slot, slot);
the issue happens when I change the appearance of the avatar (with different clothes) and therefore repacking the skeleton
which in turn calls the SetSlotAttachmentsToSetupPose Method
when that happens I get null on the mask's slot attachmentName
string attachmentName = slot.data.attachmentName;
so I've found a workaround by adding the lines 6-7 to the SetSlotAttachmentsToSetupPose method as follows
public static void SetSlotAttachmentsToSetupPose (this Skeleton skeleton) {
var slotsItems = skeleton.slots.Items;
for (int i = 0; i < skeleton.slots.Count; i++) {
Slot slot = slotsItems[i];
string attachmentName = slot.data.attachmentName;
if(attachmentName == null)
attachmentName = slot.Attachment?.Name;
slot.Attachment = string.IsNullOrEmpty(attachmentName) ? null : skeleton.GetAttachment(i, attachmentName);
}
}
I can't tell if that's a bug or expected behavior and that I'm missing something?
Any help and clarifications will be appreciated