I have created a project that has a simple animation using Sprite Kit. It worked well and there is no problem in it. The error occurs when I merged the files in our working copy.
NSMutableArray *dPFrames = [NSMutableArray array];
SKTextureAtlas *dPAtlas = [SKTextureAtlas atlasNamed:@"dP"]; <<---- Thread 1: signal SIGBART
int numImages = dPAtlas.textureNames.count;
for (int i=1; i <= numImages; i++) {
NSString *textureName = [NSString stringWithFormat:@"dP%d@2x", i];
SKTexture *temp = [dPAtlas textureNamed:textureName];
[dPFrames addObject:temp];
}
_dPAnimateFrames = dPFrames;
SKTexture *temp = _dPAnimateFrames[0];
_dP = [SKSpriteNode spriteNodeWithTexture:temp];
_dP.position = CGPointMake(150, 110);
[self addChild:_dP];
Here is the message in Console:
2013-10-09 10:52:14.777 MyProject[1550:a0b] * Terminating app due to uncaught exception 'Texture Atlas Not Found', reason: 'Texture Atlas Not Found'
I have search and research for answer but unfortunately I found nothing. Please share solution if you have.
Go to you'r Project and follow these steps:- 1> Go to Build Settings, 2> Search for Enable Texture Atlas Generation and select YES
I had the same problem and I solved it by Reseting Contents and Settings of the Simulator
From the top bar: iOS Simulator -> Reset Contents and Settings...
I also cleaned the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With