Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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