I want to present SCNScene with SKTransition.fadeWithColor. It works good with standart colors like UIColor.greenColor(), but id does not work with color made with patternImage. Transition in this case is just transparent. Here is the code:
guard let patternImage = UIImage(named: "pattern") else {return}
let patternColor = UIColor(patternImage: patternImage)
scnView.presentScene(scene, withTransition: SKTransition.fadeWithColor(patternColor, duration: 1), incomingPointOfView: nil) {
...
}
Same color is used to fill the background of view and it works like a charm, but not with transition. So the questions are:
- Why color becomes transparent during transition?
- Is there a way to make it work with such a color?
- If no - what is the alternative solution for making fade-like or dissolve-like transition (scene1 -> Image -> scene2)?
Thanks in advance!