handlesGameControllerEvents(matching:)
Specifies the game controllers events which should be delivered through the GameController framework when the view, or one of its descendants has focus.
Declaration
nonisolated func handlesGameControllerEvents(matching types: GCUIEventTypes) -> some View
Discussion
SpriteView(scene: MyGameScene())
.handlesGameControllerEvents(matching: .gamepad)
.focused(true)