Function bevy_inspector_egui::bevy_inspector::ui_for_resource
source · Expand description
Display the resource R
Examples found in repository?
src/quick.rs (line 89)
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
fn inspector_ui<T: Resource + Reflect>(world: &mut World) {
let egui_context = world
.resource_mut::<bevy_egui::EguiContext>()
.ctx_mut()
.clone();
egui::Window::new(pretty_type_name::<T>())
.default_size((0., 0.))
.show(&egui_context, |ui| {
egui::ScrollArea::vertical().show(ui, |ui| {
bevy_inspector::ui_for_resource::<T>(world, ui);
ui.allocate_space(ui.available_size());
});
});
}