How can I take an SKSpriteNode and all its child SKSpriteNodes and merge them down into a single flattened SKSpriteNode with no children?
Thanks.
How can I take an SKSpriteNode and all its child SKSpriteNodes and merge them down into a single flattened SKSpriteNode with no children?
Thanks.
Create a texture of the node and create a new sprite from that texture:
SKTexture* tex = [self.scene.view textureFromNode:parentSprite];
SKSpriteNode* newSprite = [SKSpriteNode spriteNodeWithTexture:tex];
PS: be sure not to run this in init otherwise self.view will be nil.