Condense bevy_picking (input focus) feature into bevy_ui_picking feature#22933
Open
alice-i-cecile wants to merge 4 commits intobevyengine:mainfrom
Open
Condense bevy_picking (input focus) feature into bevy_ui_picking feature#22933alice-i-cecile wants to merge 4 commits intobevyengine:mainfrom
alice-i-cecile wants to merge 4 commits intobevyengine:mainfrom
Conversation
Contributor
|
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
Lyndon-Mackay
approved these changes
Feb 13, 2026
Smerom
approved these changes
Feb 13, 2026
Contributor
Smerom
left a comment
There was a problem hiding this comment.
Looks like a good clarification and reasonable approach to me.
ickshonpe
approved these changes
Feb 13, 2026
Contributor
ickshonpe
left a comment
There was a problem hiding this comment.
Yeah I've only had a quick look at this but there already two approvals and this makes sense to me. Not sure about the observer overhead concerns. If we could add some concrete benchmarks in a follow up, like a a many_ui_observers or something, that should help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
The feature flags "bevy_picking" and "picking" have the same description despite fulfilling different goals. This is very confusing!
Fixes #22931.
The status quo before this PR.
Solution
Condense bevy_picking at the bevy_internal level into bevy_ui_picking. There's no way someone wants general UI picking but not input focus picking. This fixes the redundancy, and groups functionality more reasonably, while still making it possible to avoid UI picking as a whole off if you're concerned for whatever reason.
Users who want even more granularity than that can of course compose the various Bevy crates however they please.
Alternative
input_focus_picking.ui_picking.This adds another niche feature flag at the top level, but makes it easier for users who want to use
bevy_input_focuswithoutbevy_ui. I have never met such a user, but maybe they exist!