Spinebot did well this time. Please give that a try, with the info below, and let us know if you are still having trouble!
SirBarrett If a I make separated slots for each one It works, but I guess that's not how is intended to work.
A slot has one attachment or no attachment visible at any given time:
https://esotericsoftware.com/spine-slots
Since you have 2 pieces you want visible at the same time, you need 2 slots: foregrip and suppressor. If you have multiple types of foregrips or suppressors, you would put them in those slots for organization, since you can't have 2 foregrips or 2 suppressors visible at the same time.
Similarly, you probably want to have a single slot for all sights.
As a more complex example, if some sights are 2 pieces, you could have sight1
and sight2
slots, where sight2
has no attachment for most sights. Then, instead of having a sight "item" in your game represented as 1 attachment that you equip, you'd need to have it as multiple attachments. At that point it may be more convenient to have a skin per sight item. You can have multiple skins visible at the same time using the skins view:
https://esotericsoftware.com/spine-skins-view
At runtime you'd combine a bunch of skins to equip many items. This is an advanced step though, so get the basics of skins working first. See the mix-and-match example project for combining skins:
https://esotericsoftware.com/spine-examples-mix-and-match
SirBarrett Even if this way soves this problem, the gun image needs to be in all configs and duplicate slots and assign manually to each skin seems to be a pain in the **s.
If you need an attachment in all skins, you can take it out of the skins instead (so it's not under a skin placeholder). If it needs to be in many skins but not all, you would put it in each of the skins where you want it. That doesn't involved duplicating slots.
To reduce the pain when managing attachments across many skins, you can enable Show all skin attachments
:
https://esotericsoftware.com/spine-tree#Show-all-skin-attachments