bevy/examples/picking
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
..
debug_picking.rs Upstream DebugPickingPlugin from bevy_mod_picking (#17177) 2025-01-07 05:19:50 +00:00
mesh_picking.rs Rename Pointer<Down/Up> -> Pointer<Pressed/Released> in bevy_picking. (#16331) 2024-12-10 02:20:48 +00:00
simple_picking.rs Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00
sprite_picking.rs Make sprite picking opt-in (#17225) 2025-01-09 18:11:44 +00:00