I cannot get sprite instances that were added by reference (drag one sks file to another sks file in Xcode 9) for animation. This seems valid, since you can physically do such a thing, but I'm not sure why the auxiliary nodes are not expecting.
Example 1. Start with the standard spritekit template 2. add the HUD.sks file and add a color sprite somewhere, name it "hudSpriteNode" 3. drag the HUD.sks file into the GameScene.sks scene - center it to zero 4. Find hudSpriteNode ( by name) 5. Move it using .position (works!) 6. Move it using animation (crash!)
Help???
HUD.sks 
GameScene.sks 
Add this code to GameScene.swift
if let testSpriteNode = childNode(withName: "//hudSpriteNode") as? SKSpriteNode { print("Found test sprite node") print("Test node position 1: \(testSpriteNode.position)") testSpriteNode.position = CGPoint.zero print("Test node position 2: \(testSpriteNode.position)") testSpriteNode.run(SKAction.moveBy(x: 200, y: 200, duration: 4)) }
Run ... the position has been moved correctly, but the animation does not work.
source share