Post

Replies

Boosts

Views

Activity

SpriteView > WatchOS 7
Ciao, I would like to use SpriteKit within SwiftUI on WatchOS 7. Which works fabulously on iOS 14 via SpriteView(scene: scene) But when I use the same code from iOS 14: import SwiftUI import SpriteKit class GameScene: SKScene { override func didMove(to view: SKView) { physicsBody = SKPhysicsBody(edgeLoopFrom: frame)     } } SKView throws an error. And now I'm not sure how to use SpiteKit within SwiftUI on watchOS 7. Before with WatchKit. I used WKInterfaceSKScene... via Storyboard. I would love to get some some suggestions what I've been missing. Grazie Vasco
4
0
2.1k
Dec ’21
SpriteView > WatchOS 7
Ciao, I would like to use SpriteKit within SwiftUI on WatchOS 7. Which works fabulously on iOS 14 via SpriteView(scene: scene) But when I use the same code from iOS 14: import SwiftUI import SpriteKit class GameScene: SKScene { override func didMove(to view: SKView) { physicsBody = SKPhysicsBody(edgeLoopFrom: frame)     } } SKView throws an error. And now I'm not sure how to use SpiteKit within SwiftUI on watchOS 7. Before with WatchKit. I used WKInterfaceSKScene... via Storyboard. I would love to get some some suggestions what I've been missing. Grazie Vasco
Replies
4
Boosts
0
Views
2.1k
Activity
Dec ’21