How do I obtain the SKSpriteNode of an item created through SpriteKit Editor? How do I obtain the SKSpriteNode of an item created through SpriteKit Editor? xcode xcode

How do I obtain the SKSpriteNode of an item created through SpriteKit Editor?


If you set the name property of a node in the Sprite Kit Editor, you can access the node, in Swift, by

if let node = self.childNodeWithName("NodeName") as? SKSpriteNode {    // Set up your sprite here}

or

SKSpriteNode *node = (SKSpriteNode *)[self childNodeWithName:@"NodeName"];

in Obj-C.