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

前端之家收集整理的这篇文章主要介绍了ios – 由于未捕获的异常终止应用程序“Texture Atlas Not Found”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我创建了一个使用Sprite Kit的简单动画项目.它运行良好,没有问题.
当我将工作副本中的文件合并时,会出现该错误.
  1. NSMutableArray *dPFrames = [NSMutableArray array];
  2.  
  3. SKTextureAtlas *dPAtlas = [SKTextureAtlas atlasNamed:@"dP"]; <<---- Thread 1: signal SIGBART
  4.  
  5. int numImages = dPAtlas.textureNames.count;
  6.  
  7. for (int i=1; i <= numImages; i++) {
  8. NSString *textureName = [NSString stringWithFormat:@"dP%d@2x",i];
  9. SKTexture *temp = [dPAtlas textureNamed:textureName];
  10. [dPFrames addObject:temp];
  11.  
  12. }
  13. _dPAnimateFrames = dPFrames;
  14.  
  15. SKTexture *temp = _dPAnimateFrames[0];
  16. _dP = [SKSpriteNode spriteNodeWithTexture:temp];
  17. _dP.position = CGPointMake(150,110);
  18. [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相关文章