Osamsa Thank you for sending the Unity package that reproduces the issue! I was able to reproduce the problem and confirm that when a slider has slot attachment keys, changing the color of that slot via code can be prevented. However, the slot color does not become completely impossible to change. Similar to when the animation has slot color keys, it appears to work correctly if the slot color change is applied after the animation has been applied. For example, if you modify SpineColorTester as shown below, you'll be able to correctly change the color of slots constrained by sliders:
public class SpineColorTester : MonoBehaviour
{
// 스파인 컴포넌트를 자동으로 가져옵니다.
[HideInInspector]
public SkeletonAnimation skeletonAnimation;
// 에디터 스크립트에서 선택한 슬롯 이름과 색상을 저장할 변수
[HideInInspector]
public string selectedSlotName;
[HideInInspector]
public Color targetColor = Color.white;
Color appliedColor = Color.white;
bool applyColor = false;
void Awake()
{
skeletonAnimation = GetComponent<SkeletonAnimation>();
}
// 인스펙터 창에서 버튼을 누르면 실제로 색상을 바꿔줄 함수
public void ApplyColor()
{
appliedColor = targetColor;
applyColor = true;
ApplyColorNow();
#if UNITY_EDITOR
UnityEditor.EditorUtility.SetDirty(gameObject);
#endif
}
void LateUpdate()
{
if (!applyColor) return;
ApplyColorNow();
}
void ApplyColorNow()
{
if (skeletonAnimation == null)
skeletonAnimation = GetComponent<SkeletonAnimation>();
if (skeletonAnimation == null || string.IsNullOrEmpty(selectedSlotName)) return;
if (skeletonAnimation.Skeleton == null) return;
// 스파인 슬롯을 찾아서 색상 변경
var slot = skeletonAnimation.Skeleton.FindSlot(selectedSlotName);
if (slot != null)
slot.SetColor(appliedColor);
}
}
In any case, it is confusing for sliders to affect slot colors even when there are no slot color keys, so I will create an issue ticket for this problem.
Regarding the thread title, unfortunately users can no longer edit their own thread titles after a certain amount of time has passed since posting. If needed, please let us know and we can change it on our side.
Thank you as well for reporting the translation mistake! We would like to investigate whether we can improve the issue where parts of the original text sometimes remain untranslated like this. The translation for the affected post has already been corrected.