how to remove child node spritekit code example
Example: remove child from scene swift
if let child = self.childNode(withName: "object") as? SKSpriteNode {
child.removeFromParent()
}
if let child = self.childNode(withName: "object") as? SKSpriteNode {
child.removeFromParent()
}