bevy/crates/bevy_picking/src
Antony 0a9740c18f
Make sprite picking opt-in (#17225)
# Objective

Fixes #16903.

## Solution

- Make sprite picking opt-in by requiring a new `SpritePickingCamera`
component for cameras and usage of a new `Pickable` component for
entities.
- Update the `sprite_picking` example to reflect these changes.
- Some reflection cleanup (I hope that's ok).

## Testing

Ran the `sprite_picking` example

## Open Questions

<del>
   <ul>
    <li>Is the name `SpritePickable` appropriate?</li>
    <li>Should `SpritePickable` be in `bevy_sprite::prelude?</li>
  </ul> 
</del>

## Migration Guide

The sprite picking backend is now strictly opt-in using the
`SpritePickingCamera` and `Pickable` components. You should add the
`Pickable` component any entities that you want sprite picking to be
enabled for, and mark their respective cameras with
`SpritePickingCamera`.
2025-01-09 18:11:44 +00:00
..
mesh_picking Allow clippy::too_many_arguments to lint without warnings (#17249) 2025-01-09 07:26:15 +00:00
backend.rs Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
events.rs Allow clippy::too_many_arguments to lint without warnings (#17249) 2025-01-09 07:26:15 +00:00
hover.rs Simplify sort/max_by calls (#17048) 2024-12-30 22:59:36 +00:00
input.rs Remove tracing re-export from bevy_utils (#17161) 2025-01-05 23:06:34 +00:00
lib.rs Make sprite picking opt-in (#17225) 2025-01-09 18:11:44 +00:00
pointer.rs Replace map + unwrap_or(false) with is_some_and (#17067) 2024-12-31 20:28:02 +00:00
window.rs Window picking (#16103) 2024-12-05 21:14:39 +00:00