How do I color both the left and the right images on an animation in Spine through Unity?

292 Views Asked by At

I have a problem where only one side of my animation is being colored. enter image description here

I am using the following code:

    teamCrowdNoneColor.skeleton.FindSlot ("torso").SetColor (teamNoneColor);
    teamCrowdNoneColor.skeleton.FindSlot ("sleeve").SetColor (teamNoneColor);

You can see from the below image there is no left or right for the sleeve, or arm. Any ideas on how I can fix this?

enter image description here

1

There are 1 best solutions below

5
On

The API does not seem to support this. Either have the skeleton data modified, so it has distinct slots for left and right, or access its fields directly:

foreach (Slot slot in teamCrowdNoneColor.skeleton.slots)
{
    if (slot.data.name == "sleeve")
        slot.SetColor(teamNoneColor);
}