Ios Don';在SKTextureAtlas中找不到纹理图像

Ios Don';在SKTextureAtlas中找不到纹理图像,ios,Ios,我在Xcode 5上使用spritekit。我创建了一个名为images的文件夹,扩展名为“.atlas”,其中包括:bear1.png、bear2.png和bear3.png 在模拟过程中,此SKTextureAtlas由“[SkTextureAtlasNamed:@“images”]”创建,但当我尝试使用“[ursoAtlas TextureName:@“bear1”]”恢复某些图像时,它找不到图像。我打印了变量temp,它返回“MissingResource.png”,代码中的numIma

我在Xcode 5上使用spritekit。我创建了一个名为images的文件夹,扩展名为“.atlas”,其中包括:bear1.png、bear2.png和bear3.png 在模拟过程中,此SKTextureAtlas由“[SkTextureAtlasNamed:@“images”]”创建,但当我尝试使用“[ursoAtlas TextureName:@“bear1”]”恢复某些图像时,它找不到图像。我打印了变量temp,它返回“MissingResource.png”,代码中的numImages为0。我预计numImages为3

SKTextureAtlas *ursoAtlas = [SKTextureAtlas atlasNamed:@"images"];

SKTexture *temp = [ursoAtlas textureNamed:@"bear1"];

NSLog(@"%@", temp);
int numImages = ursoAtlas.textureNames.count;
NSLog(@"%d", numImages);
一切看起来都很好。 你把images.atlas拖到项目中了吗? 或者你可以尝试创建新的test_image.atlas并将其拖到项目中。

我创建了“test_image.atlas”并将其拖到我的项目中,但它不起作用。我尝试了另一件事:我在internet上找到了一个教程并下载了示例项目,但它也不起作用。它显示了丢失的资源图像(正方形中的一个“x”)而不是预期的教程图像