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.
2
3
3
4
#![ allow( clippy:: type_complexity) ]
4
5
#![ allow( clippy:: too_many_arguments) ]
5
6
#![ deny( missing_docs) ]
6
7
7
8
use bevy:: { prelude:: * , render:: camera:: NormalizedRenderTarget } ;
8
- use bevy_egui:: EguiContext ;
9
+ use bevy_egui:: { EguiContext , EguiSet } ;
9
10
use bevy_picking_core:: backend:: prelude:: * ;
10
11
11
12
/// Commonly used imports for the [`bevy_picking_egui`](crate) crate.
@@ -20,8 +21,12 @@ pub struct EguiBackend;
20
21
impl PickingBackend for EguiBackend { }
21
22
impl Plugin for EguiBackend {
22
23
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 ( ) ) ;
25
30
26
31
#[ cfg( feature = "selection" ) ]
27
32
app. add_system ( update_settings. in_base_set ( CoreSet :: First ) ) ;
You can’t perform that action at this time.
0 commit comments