-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Avoid triggering change detection for inputs #6847
Conversation
Do we need to do similar things for our other |
It seems this pattern should be generalised and public for other type of input. Would there be a way to have a |
Only way I can think of is just using |
Yeah. The other option would be to add a serious trait bound for I've wanted this before, but it's much more invasive and I'm not 100% sure that it's the right abstraction. |
I wouldn't be very against using that... This pattern to avoid triggering change detection (either with check or with bypass) should also be mentioned in bevy/crates/bevy_input/src/input.rs Line 36 in c55d553
|
Could you update the title to mention it's not just for keyboard? |
bors r+ |
# Objective Fix #5292. ## Solution Avoid derefencing when clearing to ensure that change detection is not triggered when there is nothing to clear.
# Objective Fix bevyengine#5292. ## Solution Avoid derefencing when clearing to ensure that change detection is not triggered when there is nothing to clear.
# Objective Fix bevyengine#5292. ## Solution Avoid derefencing when clearing to ensure that change detection is not triggered when there is nothing to clear.
Objective
Fix #5292.
Solution
Avoid derefencing when clearing to ensure that change detection is not triggered when there is nothing to clear.