SKTransition crossFadeWithDuration no longer works

I'm having trouble using the SKTransaction crossFadeWithDuration .

It used to bring the new SKScene to the top of the current SKScene perfectly for me, but now it works more like a fadeWithDuration object, leaving a gray distance between the two SKScenes.

It seems to me that this difference has occurred with a recent update, but so far I have not noticed this. I just call this method with UIButton press:

  self.skView.presentScene(Puzzle1(size: (self.view?.bounds.size)!), transition: SKTransition.crossFadeWithDuration(2.0)) 

Has anyone else had this problem, or was there any known solution / workaround for this?

+6
source share
1 answer

This is because you made self.skView and not self.scene?.view?.presentScene also when transitioning to a scene do this let Scene = Puzzle1(size : self.size) Scene.scaleMode = SKSceneScaleMode.AspectFill self.scene?.view?.presentScene(Scene, transition: SKTransition.crossFadeWithDuration(2.0))

0
source

All Articles