Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ audio = ["bevy_audio", "vorbis"]
scene = ["bevy_scene"]

# COLLECTION: Enables picking functionality.
picking = ["bevy_picking", "mesh_picking", "sprite_picking", "ui_picking"]
picking = ["mesh_picking", "sprite_picking", "ui_picking"]

# COLLECTION: The core pieces that most apps need. This serves as a baseline feature set for other higher level feature collections (such as "2d" and "3d"). It is also useful as a baseline feature set for scenarios like headless apps that require no rendering (ex: command line tools, servers, etc).
default_app = [
Expand Down Expand Up @@ -324,9 +324,6 @@ bevy_gltf = ["bevy_internal/bevy_gltf"]
# Adds PBR rendering
bevy_pbr = ["bevy_internal/bevy_pbr"]

# Provides picking functionality
bevy_picking = ["bevy_internal/bevy_picking"]

# Provides rendering functionality
bevy_render = ["bevy_internal/bevy_render"]

Expand Down Expand Up @@ -2036,7 +2033,7 @@ wasm = false
name = "asset_saving"
path = "examples/asset/asset_saving.rs"
doc-scrape-examples = true
required-features = ["bevy_picking", "sprite_picking"]
required-features = ["ui_picking", "sprite_picking"]

[package.metadata.example.asset_saving]
name = "Asset Saving"
Expand Down Expand Up @@ -5036,7 +5033,7 @@ name = "simple_picking"
path = "examples/picking/simple_picking.rs"
# Causes an ICE on docs.rs
doc-scrape-examples = false
required-features = ["bevy_picking"]
required-features = ["ui_picking"]

[package.metadata.example.simple_picking]
name = "Showcases simple picking events and usage"
Expand Down
9 changes: 5 additions & 4 deletions crates/bevy_internal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,18 @@ pan_camera = ["bevy_camera_controller/pan_camera"]
# Enable support for the Bevy Remote Protocol
bevy_remote = ["dep:bevy_remote", "serialize"]

# Provides picking functionality
bevy_picking = ["dep:bevy_picking", "bevy_input_focus?/bevy_picking"]

# Provides a mesh picking backend
mesh_picking = ["bevy_picking", "bevy_picking/mesh_picking"]

# Provides a sprite picking backend
sprite_picking = ["bevy_picking", "bevy_sprite?/bevy_picking"]

# Provides a UI picking backend
ui_picking = ["bevy_picking", "bevy_ui?/bevy_picking"]
ui_picking = [
"bevy_picking",
"bevy_ui?/bevy_picking",
"bevy_input_focus?/bevy_picking",
]

# Provides a UI debug overlay
bevy_ui_debug = ["bevy_ui_render?/bevy_ui_debug"]
Expand Down
3 changes: 1 addition & 2 deletions docs/cargo_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ collections to build your own "profile" equivalent, without needing to manually
|dev|Enable this feature during development to improve the development experience. This adds features like asset hot-reloading and debugging tools. This should not be enabled for published apps! **Feature set:** `debug`, `bevy_dev_tools`, `file_watcher`.|
|audio|Features used to build audio Bevy apps. **Feature set:** `bevy_audio`, `vorbis`.|
|scene|Features used to compose Bevy scenes. **Feature set:** `bevy_scene`.|
|picking|Enables picking functionality. **Feature set:** `bevy_picking`, `mesh_picking`, `sprite_picking`, `ui_picking`.|
|picking|Enables picking functionality. **Feature set:** `mesh_picking`, `sprite_picking`, `ui_picking`.|
|default_app|The core pieces that most apps need. This serves as a baseline feature set for other higher level feature collections (such as "2d" and "3d"). It is also useful as a baseline feature set for scenarios like headless apps that require no rendering (ex: command line tools, servers, etc). **Feature set:** `async_executor`, `bevy_asset`, `bevy_input_focus`, `bevy_log`, `bevy_state`, `bevy_window`, `custom_cursor`, `reflect_auto_register`.|
|default_platform|These are platform support features, such as OS support/features, windowing and input backends, etc. **Feature set:** `std`, `android-game-activity`, `android_shared_stdcxx`, `bevy_gilrs`, `bevy_winit`, `default_font`, `multi_threaded`, `webgl2`, `x11`, `wayland`, `sysinfo_plugin`.|
|common_api|Default scene definition features. Note that this does not include an actual renderer, such as bevy_render (Bevy's default render backend). **Feature set:** `bevy_animation`, `bevy_camera`, `bevy_color`, `bevy_gizmos`, `bevy_image`, `bevy_mesh`, `bevy_shader`, `bevy_material`, `bevy_text`, `hdr`, `png`.|
Expand Down Expand Up @@ -88,7 +88,6 @@ This is the complete `bevy` cargo feature list, without "profiles" or "collectio
|bevy_mesh|Provides a mesh format and some primitive meshing routines.|
|bevy_mikktspace|Provides vertex tangent generation for use with bevy_mesh.|
|bevy_pbr|Adds PBR rendering|
|bevy_picking|Provides picking functionality|
|bevy_post_process|Provides post process effects such as depth of field, bloom, chromatic aberration.|
|bevy_remote|Enable the Bevy Remote Protocol|
|bevy_render|Provides rendering functionality|
Expand Down
12 changes: 12 additions & 0 deletions release-content/migration-guides/bevy_picking_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "`bevy_picking` feature flag removed"
pull_requests: [22933]
---

The `bevy/bevy_picking` feature flag has been removed. This previously enabled picking functionality in `bevy_input_focus`,
allowing users to select elements to focus using their mouse.

This is now exposed as part of the existing `bevy/bevy_ui_picking` feature, which is itself part of the `ui` feature collection.
In most cases, you should add the `ui` feature collection to your project if you are using `bevy_ui`.

If you want to enable `bevy_input_focus`'s picking functionality, but do *not* want to use `bevy_ui`, add a separate dependency to the same version of `bevy_input_focus` in your project and enable the optional `bevy_picking` feature there.