Tuesday, 20 August 2013

File not Found when loading multipack spritesheet in Cocos2d

File not Found when loading multipack spritesheet in Cocos2d

I'm attempting to use multipacking via TexturePacker to handle multiple
animations for the same sprite. I added all my images in TexturePacker and
published them, no problem. I've added them to the Resources folder in my
project and I even see them in Finder.

When I attempt to call this
-(CCSpriteBatchNode*)createSpritesheet {
[[CCSpriteFrameCache sharedSpriteFrameCache]
addSpriteFramesWithFile:@"Clea1.plist"];
CCSpriteBatchNode *spritesheet = [CCSpriteBatchNode
batchNodeWithFile:@"Clea1.png"];
return spritesheet;
}
I wind up with the following errors:
2013-08-21 00:08:13.024 HFZ[10498:a0b] -[CCFileUtils
fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found:
Clea1.plist
2013-08-21 00:08:13.025 HFZ[10498:a0b] cocos2d: CCSpriteFrameCache: Trying
to use file 'Clea1.png' as texture
2013-08-21 00:08:13.025 HFZ[10498:a0b] -[CCFileUtils
fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found:
Clea1.png
2013-08-21 00:08:13.026 HFZ[10498:a0b] cocos2d: Couldn't find file:Clea1.png
2013-08-21 00:08:13.026 HFZ[10498:a0b] cocos2d: CCSpriteFrameCache: Frame
'CleaStand00.png' not found
I really don't understand why this is happening. Before I tried the
multipack solution, I was attempting to use one spritesheet per animation,
but this seemed like the better route to go. Any ideas on this?

No comments:

Post a Comment