Terminating app due to uncaught exception 'Texture Atlas Not Found'

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.

Answers


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.


Need Your Help

Modifying a std::vector function (inheritance?)

c++ c++11 inheritance operator-overloading overloading

I'm porting some Fortran90 code to C++ (because I'm stupid, to save the "Why?!").

set globally absolute position to a div

jquery html css position css-position

I am grabbing the position of an element using jquery's .offset() and then setting the div to be position:absolute; and setting it's left and top based off the information I got from offset().