-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-window support in quick
plugins
#156
Comments
The only thing in You can copy them and tweak them to use your preferred window. |
If this use case comes up a lot and can be integrated into the quick plugins without sacrificing usability in the common case I'll consider adding that as a feature |
This feature would be great imo! |
quick
plugins
This is what I ended up doing: app.add_plugins(bevy_egui::EguiPlugin)
.add_plugins(DefaultInspectorConfigPlugin)
.add_systems(Startup, spawn_editor_window)
.add_systems(Update, editor_ui);
fn spawn_editor_window(mut commands: Commands) {
commands.spawn((Window::default(), EditorWindow));
}
fn editor_ui(world: &mut World) {
let mut egui_ctx = world
.query_filtered::<&mut EguiContext, With<EditorWindow>>()
.single(world)
.clone();
egui::CentralPanel::default().show(egui_ctx.get_mut(), |ui| {
egui::ScrollArea::vertical()
.auto_shrink([false, false])
.show(ui, |ui| {
bevy_inspector::ui_for_world(world, ui);
})
});
} Agree it would have been nice to have it as a quick plugin. Sometimes the regular world inspector gets in the way of gameui, or the window layout makes it difficult (e.g. when making mobile games in portrait mode) |
I want to implement a multi-window function, the main window shows the game, the second window shows the inspector, can you provide this support?
The text was updated successfully, but these errors were encountered: