diff --git a/Cargo.toml b/Cargo.toml index 865fb1a352ff7..47652d99ad624 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -142,7 +142,6 @@ default = [ "bevy_gltf", "bevy_input_focus", "bevy_log", - "bevy_mesh_picking_backend", "bevy_pbr", "bevy_picking", "bevy_render", @@ -165,6 +164,7 @@ default = [ "default_font", "hdr", "ktx2", + "mesh_picking", "morph", "morph_animation", "multi_threaded", @@ -187,7 +187,7 @@ default = [ default_no_std = ["libm", "critical-section", "bevy_color", "bevy_state"] # Provides an implementation for picking meshes -bevy_mesh_picking_backend = ["bevy_internal/bevy_mesh_picking_backend"] +mesh_picking = ["bevy_internal/mesh_picking"] # Provides an implementation for picking sprites sprite_picking = ["bevy_internal/sprite_picking"] @@ -2276,7 +2276,7 @@ wasm = false name = "error_handling" path = "examples/ecs/error_handling.rs" doc-scrape-examples = true -required-features = ["bevy_mesh_picking_backend"] +required-features = ["mesh_picking"] [package.metadata.example.error_handling] name = "Error handling" @@ -4351,7 +4351,7 @@ wasm = false name = "mesh_picking" path = "examples/picking/mesh_picking.rs" doc-scrape-examples = true -required-features = ["bevy_mesh_picking_backend"] +required-features = ["mesh_picking"] [package.metadata.example.mesh_picking] name = "Mesh Picking" diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 0579f61c76282..6d4c1e77f9a96 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -17,9 +17,7 @@ criterion = { version = "0.6.0", features = ["html_reports"] } bevy_app = { path = "../crates/bevy_app" } bevy_ecs = { path = "../crates/bevy_ecs", features = ["multi_threaded"] } bevy_math = { path = "../crates/bevy_math" } -bevy_picking = { path = "../crates/bevy_picking", features = [ - "bevy_mesh_picking_backend", -] } +bevy_picking = { path = "../crates/bevy_picking", features = ["mesh_picking"] } bevy_reflect = { path = "../crates/bevy_reflect", features = ["functions"] } bevy_camera = { path = "../crates/bevy_camera" } bevy_mesh = { path = "../crates/bevy_mesh" } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 8028f62b4fcad..a831ec3c9d2c6 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -314,10 +314,7 @@ bevy_remote = ["dep:bevy_remote", "serialize"] bevy_picking = ["dep:bevy_picking"] # Provides a mesh picking backend -bevy_mesh_picking_backend = [ - "bevy_picking", - "bevy_picking/bevy_mesh_picking_backend", -] +mesh_picking = ["bevy_picking", "bevy_picking/mesh_picking"] # Provides a sprite picking backend sprite_picking = ["bevy_picking", "bevy_sprite/bevy_picking"] diff --git a/crates/bevy_picking/Cargo.toml b/crates/bevy_picking/Cargo.toml index 4924a300b719a..8396d6c0c6f81 100644 --- a/crates/bevy_picking/Cargo.toml +++ b/crates/bevy_picking/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" [features] # Provides a mesh picking backend -bevy_mesh_picking_backend = ["dep:bevy_mesh", "dep:crossbeam-channel"] +mesh_picking = ["dep:bevy_mesh", "dep:crossbeam-channel"] [dependencies] # bevy diff --git a/crates/bevy_picking/src/lib.rs b/crates/bevy_picking/src/lib.rs index 5e72c8d0befc5..2656e78c4a88f 100644 --- a/crates/bevy_picking/src/lib.rs +++ b/crates/bevy_picking/src/lib.rs @@ -160,7 +160,7 @@ pub mod backend; pub mod events; pub mod hover; pub mod input; -#[cfg(feature = "bevy_mesh_picking_backend")] +#[cfg(feature = "mesh_picking")] pub mod mesh_picking; pub mod pointer; pub mod window; @@ -174,7 +174,7 @@ use hover::{update_is_directly_hovered, update_is_hovered}; /// /// This includes the most common types in this crate, re-exported for your convenience. pub mod prelude { - #[cfg(feature = "bevy_mesh_picking_backend")] + #[cfg(feature = "mesh_picking")] #[doc(hidden)] pub use crate::mesh_picking::{ ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastBackfaces, RayCastVisibility}, diff --git a/docs/cargo_features.md b/docs/cargo_features.md index e3bda7850b64d..6f7aaf054d1a8 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -29,7 +29,6 @@ The default feature set enables most of the expected features of a game engine, |bevy_light|Provides light types such as point lights, directional lights, spotlights.| |bevy_log|Enable integration with `tracing` and `log`| |bevy_mesh|Provides a mesh format and some primitive meshing routines.| -|bevy_mesh_picking_backend|Provides an implementation for picking meshes| |bevy_mikktspace|Provides vertex tangent generation for use with bevy_mesh.| |bevy_pbr|Adds PBR rendering| |bevy_picking|Provides picking functionality| @@ -51,6 +50,7 @@ The default feature set enables most of the expected features of a game engine, |gltf_animation|Enable glTF animation loading| |hdr|HDR image format support| |ktx2|KTX2 compressed texture support| +|mesh_picking|Provides an implementation for picking meshes| |morph|Enables support for morph target weights in bevy_mesh| |morph_animation|Enables bevy_mesh and bevy_animation morph weight support| |multi_threaded|Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.| diff --git a/examples/ecs/error_handling.rs b/examples/ecs/error_handling.rs index a84cbcd20870a..d1c14a5ea8dad 100644 --- a/examples/ecs/error_handling.rs +++ b/examples/ecs/error_handling.rs @@ -22,7 +22,7 @@ fn main() { app.add_plugins(DefaultPlugins); - #[cfg(feature = "bevy_mesh_picking_backend")] + #[cfg(feature = "mesh_picking")] app.add_plugins(MeshPickingPlugin); // Fallible systems can be used the same way as regular systems. The only difference is they diff --git a/release-content/migration-guides/feature-cleanup.md b/release-content/migration-guides/feature-cleanup.md index 04186de9050ca..d36ceb1d0b760 100644 --- a/release-content/migration-guides/feature-cleanup.md +++ b/release-content/migration-guides/feature-cleanup.md @@ -1,8 +1,9 @@ --- title: Feature cleanup -pull_requests: [21388, 21435, 21437] +pull_requests: [21388, 21435, 21436, 21437] --- `animation` has been renamed to `gltf_animation`. `bevy_sprite_picking_backend` has been renamed to `sprite_picking`. `bevy_ui_picking_backend` has been renamed to `ui_picking`. +`bevy_mesh_picking_backend` has been renamed to `mesh_picking`.