Harald đã viếtunless you have created animation keys where the attachment is switched in the Spine editor.
thank you for your reply, but i still in trouble with the hidden attachment. there are two "left hand" for different situations:one is hidden, another is shown. in my case, i hide all the "left hand" attachment. but when i run another animation, an animation key shows the hidden left hand. therefore, i need a solution that i could hide all the "left hand" no matter how they were set in spine editor.
BTW, in spine-unity, when i run a new animation, which script will show the attachments/slots.
Slot[] slots = gb.GetComponent<SkeletonAnimation>().skeleton.Slots.Items;
foreach (Slot item in slots)
{
if (item.ToString().Contains("lefthand"))
{
gb.GetComponent<SkeletonAnimation>().Skeleton.SetAttachment(item.ToString(), null);
item.A = 0;
}
}
this is my new method of hiding attachment.
when i switch several different skeleton animations in Inspector view of Unity, these animations randomly occurred the hidden image appeared. sometimes they don't. so i wanna know about this. how does this happened?