Change Attachments In Spine (SOLVED)

I have a game where you have to change a character’s hairstyle, clothes, decorations - many small changes. I made a character in the spine, but I can not change attachments! Json file:

Like this (other sdk) - skeleton:setAttachment(“veil”, “sprite1”);

There is a spine.set_skin but it works differently - it changes the whole skin and not some part of the character.

Is there any way around the barrier? I can not create a sprite for each clothes because of problems with the layers.

Thanks!

Yes, you can change skin for one bone using spine.set_skin(url, spine_skin, [spine_slot]), look at the third parameter [spine_slot] - optional slot id to only change a specific slot

2 Likes

Okay!
I created this stucture

code
spine.set_skin(“#spinemodel”, “frame2”, “veil”)

and realy works!

Thank you!

2 Likes