# SwiftUI - SpriteKit Integration (Passing Data)

**URL:** <https://forums.kodeco.com/t/swiftui-spritekit-integration-passing-data/134445>\
**Category:** Sprite Kit\
**Created:** [March 7, 2021, 7:16am UTC](https://forums.kodeco.com/t/swiftui-spritekit-integration-passing-data/134445 "2021-03-07T07:16:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyoryusha](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hyoryusha/32/102075_2.png) [@hyoryusha](https://forums.kodeco.com/u/hyoryusha)\
**Post date:** [March 7, 2021, 7:16am UTC](https://forums.kodeco.com/t/swiftui-spritekit-integration-passing-data/134445/1 "2021-03-07T07:16:11Z")

</div>

Hello. I’m baffled by an issue that seems so simple. What is the best practice for updating a SwiftUI View from a SpriteKit Scene? I have a ContentView which is a simple list of different games. Each game is presented via SpriteView(). At the conclusion of each game, I want the total score to update in the ContentView. In a prototype project I am able to pass the data I want smoothly between SwiftUI views (Content → Detail → Content, etc.), but this flow is broken when I try to call a method on a property of an ObservedObject in a SpriteKit scene. I feel a bit embarrassed because I think I’m missing something really obvious. But I hope anyone else who’s ever been in my place can understand and – please – help .

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [August 20, 2021, 11:16pm UTC](https://forums.kodeco.com/t/swiftui-spritekit-integration-passing-data/134445/2 "2021-08-20T23:16:17Z")

</div>

Closed on August 20, 2021, 11:16pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
