problems about spine animation

  1. it will draw nothing but bones(debugBones = true) if i load a spine animation with 2 skins(without default skin),even i call setSkin()

  2. it doesn’t work when i call setSkin(),i don’t know why.and i follow that,i found something.there is a function“Skin_attachAll”,if i change the line “if (slot~~>attachment == entry~~>attachment)” to “if (slot~~>attachment != entry~~>attachment)” ,then setSkin() can work correctly.i don’t know why.

help please.

I havent tried multiple skins myself, but the spine runtime bundled with cocos2dx may be out of date, it has been in the past for something else I needed. Try updating to the latest from esotericsoftware’s repos:
https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-cocos2dx

Thanks a lot.
You are right,but I have update the spine to the newest version. I still get the problems.

i have solved that!
See http://esotericsoftware.com/forum/viewtopic.php?f=7&t=1005&p=4711&hilit=setskin#p4711

skeletonNode = CCSkeletonAnimation::createWithFile(“spine/goblins.json”, “spine/goblins.atlas”);
skeletonNode~~>setSkin;
skeletonNode~~>setSlotsToSetupPose(); // <- Need this!