Spine - Batch all Skeletons / Sprites from one atlas

Hey,

I just recently started using Spine. Is it possible to batch draw all SkeletonAnimations from one texture atlas?

I’ve got multiple different sprites with animations from Spine and I want to draw them all in one draw call.

How can I achieve this?

Here’s my code that results in two draw calls:

    nodeA = SkeletonAnimation::createWithFile("fileA.json", "myatlas.atlas");
    nodeA->setPosition(Vec2(180, 180));
    addChild(nodeA);
    nodeA->setScale(0.5);
    
    nodeB = SkeletonAnimation::SkeletonAnimation::createWithFile("fileB.json", "myatlas.atlas");
    nodeB->setPosition(Vec2(180, 180));
    addChild(nodeB);
    nodeB->setScale(0.5);

Have same problem~

For me, the complex spine animation does not batch even in one instance. How to batch the spine?

@liudibo sorry, I’m a bit late - but I got it to work in the meantime.

I’m building my texture sheets with TexturePacker now, simply putting all images that spine needs into the texture.
Then with the latest Spine version it should just work (hopefully) :wink: