Hello everyone,
I'm having issues when changing skins in my game.
The initial skin has a slot whose skin placeholders are empty, but another upgraded skin contains shoulder pads. The problem is that the shoulder pads are not visible after switching skins. Strangely, the attachments for the first placeholder skin (E) and the last one (W) are visible, but the attachments for the other directions are not.
The animation has an initial keyframe that enables and disables attachments depending on the character's facing direction. In both skins, the shoulder-pad slot attachments are animated and keyed because the animations are exactly the same for both skins. However, once I add the skins and switch between them, some of the attachments stop appearing.
What is most confusing to me is that this only happens from certain viewing directions.
I've attached screenshots showing the slot setup in both the unarmored skin and the armored skin so you can see how everything is structured in Spine.


The script used to change skins is the following (it applies the change to multiple skeletons because there are several copies of the same character that need to be updated simultaneously):
using Spine;
using Spine.Unity;
using UnityEngine;
using Sirenix.OdinInspector;
public class SpineCombinedSkins : MonoBehaviour
{
[SerializeField] SkeletonAnimation[] skeletonAnimations;
private Skin mixAndMatchSkin = new Skin("custom-skin");
[SpineSkin("", "", false, false, true, false)]
public string baseSkinName;
[SpineSkin("", "", false, false, true, false)]
public string weaponSkinName;
void Start()
{
UpdateSkins();
}
[Button]
public void UpdateSkins()
{
var skeleton = skeletonAnimations[0].Skeleton;
var skeletonData = skeleton.Data;
mixAndMatchSkin.Clear();
mixAndMatchSkin.AddSkin(skeletonData.FindSkin(baseSkinName));
mixAndMatchSkin.AddSkin(skeletonData.FindSkin(weaponSkinName));
foreach (var animation in skeletonAnimations)
{
animation.Skeleton.SetSkin(mixAndMatchSkin);
animation.Skeleton.SetToSetupPose();
}
}
}