Sharing Data from JavaScript to Bevy via WASM #8860
Closed
vinnyhoward
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm creating a Bevy game in the browser with WASM and need to pass user inputs (in this case a URL string) from JavaScript to a Bevy system. I've tried using
Arc<Mutex<_>>
to share state across threads and have tried several other approaches but I'm still struggling to update a shared resource within the Bevy system from the WASM function.How can I effectively share JavaScript user inputs with a Bevy system via WASM so I can dynamically alter the game based on these inputs?
Beta Was this translation helpful? Give feedback.
All reactions