run commands from a #[wasm_bindgen] method #10135
-
I'm embedding my game on a webpage and i'd like to have buttons on the webpage do stuff in the game. I'd just be able to do like #[wasm_bindgen]
pub fn foo() {
let commands: Commands = todo!(); // ???????
commands.spawn(MyBundle {...});
} how can i achieve this? |
Beta Was this translation helpful? Give feedback.
Answered by
SIGSTACKFAULT
Oct 18, 2023
Replies: 1 comment
-
as of bevy 0.11 and 0.12 and probably for a while there's no way to do this. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SIGSTACKFAULT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as of bevy 0.11 and 0.12 and probably for a while there's no way to do this.
but you can put a Vec in a Mutex and treat it as a queue.