Skip to content

Commit

Permalink
Egui backend system ordering (#217)
Browse files Browse the repository at this point in the history
* Fix egui backend inconsistent ordering

* Fix egui system ordering
  • Loading branch information
aevyrie authored Jun 17, 2023
1 parent ed2359e commit 1f7df34
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions backends/bevy_picking_egui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//! A raycasting backend for [`bevy_egui`]
//! A raycasting backend for [`bevy_egui`]. This backend simply ensures that egui blocks other
//! entities from being picked.

#![allow(clippy::type_complexity)]
#![allow(clippy::too_many_arguments)]
#![deny(missing_docs)]

use bevy::{prelude::*, render::camera::NormalizedRenderTarget};
use bevy_egui::EguiContext;
use bevy_egui::{EguiContext, EguiSet};
use bevy_picking_core::backend::prelude::*;

/// Commonly used imports for the [`bevy_picking_egui`](crate) crate.
Expand All @@ -20,8 +21,12 @@ pub struct EguiBackend;
impl PickingBackend for EguiBackend {}
impl Plugin for EguiBackend {
fn build(&self, app: &mut App) {
app.add_system(egui_picking.in_set(PickSet::Backend))
.insert_resource(EguiBackendSettings::default());
app.add_system(
egui_picking
.in_set(PickSet::Backend)
.after(EguiSet::BeginFrame),
)
.insert_resource(EguiBackendSettings::default());

#[cfg(feature = "selection")]
app.add_system(update_settings.in_base_set(CoreSet::First));
Expand Down

0 comments on commit 1f7df34

Please sign in to comment.