Swift tutorial 33 - Game doesn't perform the transition

+1 Bob Marley · August 19, 2015
Recently I have been following the Swift game tutorials (video's 31-33). However, once I got to video 33, the transition didn't work, while my code was the same as Bucky's:

import SpriteKit

class GameScene: SKScene {
    /* Setup your scene here */
    override func didMoveToView(view: SKView) {

    /* Called when a touch begins */
    override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
        let introLabel = childNodeWithName("introLable")
        if (introLabel != nil) {
            let fadeOut = SKAction.fadeOutWithDuration(1.5)
            introLabel?.runAction(fadeOut, completion: {
                let doors = SKTransition.doorwayWithDuration(1.5)
                let shooterScene = ShooterScene(fileNamed: "ShooterScene")
                self.view?.presentScene(shooterScene, transition: doors)


   /* Called before each frame is rendered */
    override func update(currentTime: CFTimeInterval) {

The only difference I could find was that my code had Set<NSObject> instead of NSSet. I read that this was brought in during the Xcode 6.3 update. Does anybody know what the effect is of Set<NSObject> and how I can make the transition work?

Post a Reply


Oldest  Newest  Rating
0 Patrick D · August 29, 2015
I have the same exact problem....
0 Gabby Cotogna · October 17, 2015
I have that problem as well but for tutorial 35. Set<NSObject> does not really matter. Your code should work with it written as that. My code is exactly like in the video. But i looked and found that in the shooterScene.sks my images parent name is the same as its name, and it will not change to how Bucky has it in the video which is SKScene_0 

it will not let me change that and I don't know why. Did you ever find a solution to your problem?
0 bhavneesh sohal · January 27, 2016
self.view?.presentScene(shooterscene, transition: doors) Error: value of shooterscene optional type not unwrapped
  • 1

iOS Development / Swift


This forum is for questions, comments, and general discussion about iOS Development and Swift.

Bucky Roberts Administrator