I am not sure if it is a bug or not, but even when I set a Custom Class name on one of the Sprite, it seems to be completely ignored.

I tried with a dragged asset, and then with a empty node, both completely ignores the Monkey class association and just create a raw SKSpriteNode.
The Monkey Node code is as follow.
import Foundation
import SpriteKit
class Monkey: SKSpriteNode{
let monkeyWalkAtlas = SKTextureAtlas(named: "MonkeyWalk")
override init(texture: SKTexture?, color: NSColor, size: CGSize) {
super.init(texture: texture, color: color, size: size)
print("Monkey.init debug")
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
Note: Custom class on .sks node are new in xcode7.
Edited June 21st 2015
I simplified the setup, but still the issue whe compiling/running in the iOS9 simulator. I created a project with the default SpriteKit template, chnage the GameSence to just have the following (and the empty Monkey class)
import SpriteKit
class GameScene: SKScene {
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
print("touch down")
/* Called when a touch begins */
for node in self.children {
print(node)
}
}
override func update(currentTime: CFTimeInterval) {
/* Called before each frame is rendered */
}
}
public class Monkey: SKSpriteNode {}
Dragged an Empty node on the GameScene.sks, set the custom class to Monkey, but when I touch down to print the sub nodes, I get again:
touch down
<SKSpriteNode> name:'SKNode_0' texture:['nil'] position:{753.5, 333.5} scale:{1.00, 1.00} size:{0, 0} anchor:{0, 0} rotation:0.00
@objc(name)name)? Either way, it's probably worth filing a bug. - ricksterclass Monkey: SKSpriteNode {}, created a scene, added an empty node, linked it and then instantiated it with this code:let c = SKScene(fileNamed: "MyScene")!; print(c.children.first! as! Monkey). This did not crash. Have you tried cleaning the project? Creating a new scene, class? Remember to first create the class before you try to link it. Xcode needs an existing class to successfully link. - vrwim