title: SpriteKit unarchiveFromFile does not load textures from asset catalogues and atlases
body: <p>I'm still new with SpriteKit, and wanted to see if I can construct a level using Xcode's SKS editor. When i added a couple of sprites with the "Spaceship.png" texture and built the template app, the textures don't load.</p>
  
  <p>Here's a screenshot of the vanilla OSX Game template using Swift as the language, and adding a supplied "Spaceship.png" sprite. The texture shows fine:
  <img src="https://i.stack.imgur.com/2YdjM.jpg" alt="Sprite texture shows fine in the SKScene editor">
  And here's the result of building and running the app with only that modification to the template:
  <img src="https://i.stack.imgur.com/Qk2YK.jpg" alt="enter image description here"></p>
  
  <p>The debug console displays this warning message:
  <img src="https://i.stack.imgur.com/5hafo.jpg" alt="enter image description here">
  I tried to add an .atlas folder, and got the same result. the scene just displays the red X icon in place of the sprite. If the added sprites where just color sprites, they display fine. I had an app some time ago that I scrapped, where I used to load the SKScene and would manually add the sprite assets within to my SKScene sub-class, and it worked fine.</p>
  
  <p>If, however, i moved the textures - "Spaceship.png" as an example - to the root of the project, i.e. not inside an asset catalogue or .atlas folder, the scene loads with the textures displaying fine.</p>
  
  <p>Here's the texture added to the root of the project:</p>
  
  <p><img src="https://i.stack.imgur.com/3XuE2.jpg" alt="enter image description here"></p>
  
  <p>And this is the desired result:
  <img src="https://i.stack.imgur.com/bfwki.jpg" alt="enter image description here">
  I tried to manually add the loaded assets from the SKS file to the scene via <code>enumerateChildNodesWithName(_,usingBlock)</code> and I get the same result if the textures were not in the root of the project folder.</p>
  
  <p>This is me trying to add the assets manually:</p>
  
  <pre><code>    func applicationDidFinishLaunching(aNotification: NSNotification) {
      /* Pick a size for the scene */
      if let scene = GameScene.unarchiveFromFile("GameScene") as? GameScene {
          let sceneToBePresented = GameScene()
  
          /* Set the scale mode to scale to fit the window */
          sceneToBePresented.scaleMode = .AspectFill
          sceneToBePresented.size = scene.size
  
          /* Sprite Kit applies additional optimizations to improve rendering performance */
          self.skView!.ignoresSiblingOrder = true
  
          self.skView!.showsFPS = true
          self.skView!.showsNodeCount = true
          scene.enumerateChildNodesWithName("*") { node, stop in
              sceneToBePresented.addChild(node.copy() as SKSpriteNode)
          }
  
          self.skView!.presentScene(sceneToBePresented)
      }
  }
  </code></pre>
  
  <p>I looked around SpriteKit classes - <code>SKNode</code>, <code>SKScene</code>, <code>SKTexture</code>, <code>SKSPriteNode</code> - for any clue about paths, caching, preloading, or anything but was unable to find a thing that could make this work.</p>
  
  <p>I am running Xcode 6.1.1 and my target is 10.9, and the language I'm using is Swift, although the same behavior holds true using ObjC. Is this a feature or a bug? Anybody else running/ran into a similar situation ?</p>
  
  <p>Thanks in advance for any help</p>
  
  <p>[UPDATE]</p>
  
  <p>Looks like this is not implemented yet - loading textures from asset catalogs - as this post in the dev forums discusses the same issue, and his solution is to rename the asset catalogues to be the same name as the texture. In essence, what I found out about having the image files in the root folder: <a href="https://devforums.apple.com/thread/253526?tstart=0" rel="nofollow noreferrer">How do you load sprite textures from Images.xcassets when using SKS scene file</a>, although my earlier app which i managed to roll-back to a working state does load textures from .atlas'es, but i can't seem to do it with a clean template!!!</p>