diff --git a/crates/bevy_picking/src/events.rs b/crates/bevy_picking/src/events.rs index 00293c1d5e..cb6edebbf8 100644 --- a/crates/bevy_picking/src/events.rs +++ b/crates/bevy_picking/src/events.rs @@ -58,6 +58,7 @@ use crate::{ /// The documentation for the [`pointer_events`] explains the events this module exposes and /// the order in which they fire. #[derive(Clone, PartialEq, Debug, Reflect, Component)] +#[reflect(Component, Debug)] pub struct Pointer { /// The pointer that triggered this event pub pointer_id: PointerId, diff --git a/crates/bevy_picking/src/focus.rs b/crates/bevy_picking/src/focus.rs index c5fd0b989c..3d10019401 100644 --- a/crates/bevy_picking/src/focus.rs +++ b/crates/bevy_picking/src/focus.rs @@ -190,7 +190,7 @@ fn build_hover_map( /// the entity will be considered pressed. If that entity is instead being hovered by both pointers, /// it will be considered hovered. #[derive(Component, Copy, Clone, Default, Eq, PartialEq, Debug, Reflect)] -#[reflect(Component, Default)] +#[reflect(Component, Default, PartialEq, Debug)] pub enum PickingInteraction { /// The entity is being pressed down by a pointer. Pressed = 2, diff --git a/crates/bevy_picking/src/lib.rs b/crates/bevy_picking/src/lib.rs index 29d294913b..4f38d3454d 100644 --- a/crates/bevy_picking/src/lib.rs +++ b/crates/bevy_picking/src/lib.rs @@ -175,7 +175,7 @@ pub mod prelude { /// make an entity non-hoverable, or allow items below it to be hovered. See the documentation on /// the fields for more details. #[derive(Component, Debug, Clone, Reflect, PartialEq, Eq)] -#[reflect(Component, Default)] +#[reflect(Component, Default, Debug, PartialEq)] pub struct Pickable { /// Should this entity block entities below it from being picked? /// @@ -317,7 +317,7 @@ impl Plugin for DefaultPickingPlugins { /// This plugin contains several settings, and is added to the wrold as a resource after initialization. You /// can configure picking settings at runtime through the resource. #[derive(Copy, Clone, Debug, Resource, Reflect)] -#[reflect(Resource, Default)] +#[reflect(Resource, Default, Debug)] pub struct PickingPlugin { /// Enables and disables all picking features. pub is_enabled: bool, diff --git a/crates/bevy_picking/src/pointer.rs b/crates/bevy_picking/src/pointer.rs index 01c292bc1d..4dbeb46146 100644 --- a/crates/bevy_picking/src/pointer.rs +++ b/crates/bevy_picking/src/pointer.rs @@ -26,7 +26,7 @@ use crate::backend::HitData; /// This component is needed because pointers can be spawned and despawned, but they need to have a /// stable ID that persists regardless of the Entity they are associated with. #[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, Component, Reflect)] -#[reflect(Component, Default)] +#[reflect(Component, Default, Debug, Hash, PartialEq)] pub enum PointerId { /// The mouse pointer. #[default] @@ -65,7 +65,7 @@ impl PointerId { /// Holds a list of entities this pointer is currently interacting with, sorted from nearest to /// farthest. #[derive(Debug, Default, Clone, Component, Reflect)] -#[reflect(Component, Default)] +#[reflect(Component, Default, Debug)] pub struct PointerInteraction { pub(crate) sorted_entities: Vec<(Entity, HitData)>, } @@ -93,7 +93,7 @@ pub fn update_pointer_map(pointers: Query<(Entity, &PointerId)>, mut map: ResMut /// Tracks the state of the pointer's buttons in response to [`PointerInput`] events. #[derive(Debug, Default, Clone, Component, Reflect, PartialEq, Eq)] -#[reflect(Component, Default)] +#[reflect(Component, Default, Debug, PartialEq)] pub struct PointerPress { primary: bool, secondary: bool, @@ -155,7 +155,7 @@ impl PointerButton { /// Component that tracks a pointer's current [`Location`]. #[derive(Debug, Default, Clone, Component, Reflect, PartialEq)] -#[reflect(Component, Default)] +#[reflect(Component, Default, Debug, PartialEq)] pub struct PointerLocation { /// The [`Location`] of the pointer. Note that a location is both the target, and the position /// on the target. @@ -180,6 +180,7 @@ impl PointerLocation { /// render target. It is up to picking backends to associate a Pointer's `Location` with a /// specific `Camera`, if any. #[derive(Debug, Clone, Component, Reflect, PartialEq)] +#[reflect(Component, Debug, PartialEq)] pub struct Location { /// The [`NormalizedRenderTarget`] associated with the pointer, usually a window. pub target: NormalizedRenderTarget,