You don't use an index directly, you should instead query the index once as shown in the example scene code here:
int visorSlotIndex = skeleton.FindSlotIndex(visorSlot); // You can access GetAttachment and SetAttachment via string, but caching the slotIndex is faster.
Then you can use the returned index in SetAttachment()
as shown a few lines further down:
customSkin.SetAttachment(visorSlotIndex, visorKey, newAttachment);
What is ExposedLIst? How i can get slot or slot name from exposedList by index?
You can access the content at an index via exposedList.Items[index]
, so skeleton.Slots.Items[index]
. Most likely you won't need it here.