This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
backends/bevy_picking_egui/src Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- //! A raycasting backend for [`bevy_egui`]
1+ //! A raycasting backend for [`bevy_egui`]. This backend simply ensures that egui blocks other
2+ //! entities from being picked.
23
34#![ allow( clippy:: type_complexity) ]
45#![ allow( clippy:: too_many_arguments) ]
56#![ deny( missing_docs) ]
67
78use bevy:: { prelude:: * , render:: camera:: NormalizedRenderTarget } ;
8- use bevy_egui:: EguiContext ;
9+ use bevy_egui:: { EguiContext , EguiSet } ;
910use bevy_picking_core:: backend:: prelude:: * ;
1011
1112/// Commonly used imports for the [`bevy_picking_egui`](crate) crate.
@@ -20,8 +21,12 @@ pub struct EguiBackend;
2021impl PickingBackend for EguiBackend { }
2122impl Plugin for EguiBackend {
2223 fn build ( & self , app : & mut App ) {
23- app. add_system ( egui_picking. in_set ( PickSet :: Backend ) )
24- . insert_resource ( EguiBackendSettings :: default ( ) ) ;
24+ app. add_system (
25+ egui_picking
26+ . in_set ( PickSet :: Backend )
27+ . after ( EguiSet :: BeginFrame ) ,
28+ )
29+ . insert_resource ( EguiBackendSettings :: default ( ) ) ;
2530
2631 #[ cfg( feature = "selection" ) ]
2732 app. add_system ( update_settings. in_base_set ( CoreSet :: First ) ) ;
You can’t perform that action at this time.
0 commit comments