The solution is to use an id on the GameScene and send it to the SpriteView with the .id() modifier, to force SwiftUI to create a new SpriteView.
class GameScene: SKScene, ObservableObject {
var id = UUID()
}
SpriteView(scene: scene, isPaused: paused).id(scene.id)
This question was answered on SO: https://stackoverflow.com/questions/69610165/spriteview-doesnt-pause-scene-on-state-change/69610906#69610906 by @jnpdx.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: