I have a very simple SpriteKit game written in Swift with two scenes that I am trying to transition between. This code works perfectly:
let skView = self.view as SKView
let scene = GameScene(size: self.scene.size)
scene.size = skView.bounds.size
scene.scaleMode = .AspectFill
//This line shows the new scene immediately (as expected)
skView.presentScene(scene)
The trouble comes when I replace the above line of code with this:
let sceneTransition = SKTransition.doorsCloseHorizontalWithDuration(2.0)
skView.presentScene(scene, transition: sceneTransition)
When I do this nothing happens (the current scene remains on screen). I have tried several different transitions, but always with the same result.
Any thoughts?