It is not clear what the problem is, can you tell me how to fix it?

Here is the code:

import SpriteKit class GameScene: SKScene { var Ma = SKSpriteNode() var TextureAtlas = SKTextureAtlas() var TextureArray = [SKTexture]() override func didMoveToView(view: SKView) { TextureAtlas = SKTextureAtlas(named: "bee.atlas") for i in 0...TextureAtlas.textureNames.count{ var Name = "c\(i).png" TextureArray.append(SKTexture(imageNamed: Name)) } Ma = SKSpriteNode(imageNamed: TextureAtlas.textureNames[0] ) Ma.size = CGSize(width: 25, height: 25) Ma.position = CGPoint(x: 250, y: 250) self.addChild(MainGuy) } override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { Ma.runAction(SKAction.repeatActionForever(SKAction.animateWithTextures(TextureArray, timePerFrame: 1.0))) } } 

The error takes off:

 SKTexture: Error loading image resource: 
  • which line is wrong? - Max Mikheyenko
  • @MaxMikheyenko there is no error in the code, the code is compiled, the iPhone simulator opens, after clicking the animation should start, but a red cross appears instead, and this error appears in the terminal. So I do not understand what the problem is. All the .png files, in the .atlas folder, tried to load the atlas into .xcassets and into the file of the application itself, nothing changes anyway. - VVVV
  • break-out and execute line by line until the error pops up. and write after what line it pops up - Max Mikheyenko
  • @MaxMikheyenko Added breakpoints, the application does not compile. The line `var Ma = SKSpriteNode ()` is highlighted in green and writes "Thread 1: breakpoint 29.5 30.3 31.332.5 33.3" - VVVV
  • : facepalm: this is breakpoint. find the "step over" button and press it, and after each press, see if an oshbika appeared - Max Mikheyenko

0