I thought it would be interesting to learn how to pass an image from an imagePicker to my GameScene to use as a SKSpriteNode(texture: SKTexture(image: UIImage)) but i keep getting an error after selecting my image and pressing a button to go into my gameScene
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if (segue.identifier == "startSegue") {
var gameViewController = segue.destinationViewController as GameScene
gameViewController.imageToPass = pickedImage.image
}
anyone know what im doing wrong?
keep getting exc_breakpoint (code=exc_i386_bpt, subcode 0x0) when initializing gameViewController as GameScene
Aucun commentaire:
Enregistrer un commentaire