I’m trying to add a sprite to a CCSpriteBatchNode but its causing a crash at the line:
@ CCAssert(dynamic_cast<CCSprite*>(child) != NULL, “CCSpriteBatchNode only supports CCSprites as children”);@ in the file CCSpriteBatchNode.cpp.
I have other sprites attached to this node using the same texture atlas. And the sprites I’m adding to the spritebatch were previously attached to a layer.
I’ve made sure I’m removing them from the layer first before adding them to the spritebatch.
Can anyone tell me why this is crashing?