bevy_wasm 0.10.1

Run WASM systems in Bevy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bevy::prelude::*;

use crate::wasm_asset::WasmAsset;

/// The [`WasmMod`] component is used to spawn a new WebAssembly Mod into the world
///
/// # Example
///
/// ```
/// commands.spawn(WasmMod {
///     wasm: asset_server.load("my_mod.wasm"),
/// });
/// ```
#[derive(Component)]
pub struct WasmMod {
    /// Handle to the underlying WebAssembly binary
    pub wasm: Handle<WasmAsset>,
}