ios – 由于未捕获的异常终止应用程序“Texture Atlas Not Found”

我创建了一个使用Sprite Kit的简单动画项目.它运行良好,没有问题.
当我将工作副本中的文件合并时,会出现该错误.
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];

以下是控制台中的消息:

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’

我有搜索和研究的答案,但不幸的是我没有发现.请分享解决方案.

解决方法

去你的项目,并按照下列步骤: 1 GT;转到构建设置,2 – ;搜索启用纹理图集生成,然后选择是

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...