use bevy::{ app::{App, Startup}, core_pipeline::core_2d::Camera2dBundle, ecs::system::Commands, ui::node_bundles::NodeBundle, DefaultPlugins, }; use bevy_dioxus::{ bevy_mod_picking::DefaultPickingPlugins, dioxus::prelude::*, DioxusUiBundle, DioxusUiPlugin, DioxusUiRoot, }; fn main() { App::new() .add_plugins((DefaultPlugins, DioxusUiPlugin, DefaultPickingPlugins)) .add_systems(Startup, |mut commands: Commands| { commands.spawn(DioxusUiBundle { dioxus_ui_root: DioxusUiRoot::new(ui_root), node_bundle: NodeBundle::default(), }); commands.spawn(Camera2dBundle::default()); }) .run(); } fn ui_root(cx: Scope) -> Element { render!("Hello") }