Support Warning
WebGPU is currently only supported on Chrome starting with version 113, and only on desktop. If they don't work on your configuration, you can check the WebGL2 examples
here.
use bevy::{app::PluginGroupBuilder, prelude::*};
fn main() {
App::new()
.add_plugins((
DefaultPlugins,
HelloWorldPlugins,
))
.run();
}
pub struct HelloWorldPlugins;
impl PluginGroup for HelloWorldPlugins {
fn build(self) -> PluginGroupBuilder {
PluginGroupBuilder::start::<Self>()
.add(PrintHelloPlugin)
.add(PrintWorldPlugin)
}
}
pub struct PrintHelloPlugin;
impl Plugin for PrintHelloPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, print_hello_system);
}
}
fn print_hello_system() {
info!("hello");
}
pub struct PrintWorldPlugin;
impl Plugin for PrintWorldPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, print_world_system);
}
}
fn print_world_system() {
info!("world");
}