mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
86ad5bf420
In response to #2023, here is a draft for a PR. Fixes #2023 I've added an example to show how to use `WithBundle`, and also to test it out. Right now there is a bug: If a bundle and a query are "the same", then it doesn't filter out what it needs to filter out. Example: ``` Print component initated from bundle. [examples/ecs/query_bundle.rs:57] x = Dummy( <========= This should not get printed 111, ) [examples/ecs/query_bundle.rs:57] x = Dummy( 222, ) Show all components [examples/ecs/query_bundle.rs:50] x = Dummy( 111, ) [examples/ecs/query_bundle.rs:50] x = Dummy( 222, ) ``` However, it behaves the right way, if I add one more component to the bundle, so the query and the bundle doesn't look the same: ``` Print component initated from bundle. [examples/ecs/query_bundle.rs:57] x = Dummy( 222, ) Show all components [examples/ecs/query_bundle.rs:50] x = Dummy( 111, ) [examples/ecs/query_bundle.rs:50] x = Dummy( 222, ) ``` I hope this helps. I'm definitely up for tinkering with this, and adding anything that I'm asked to add or change. Co-authored-by: Carter Anderson <mcanders1@gmail.com> |
||
---|---|---|
.. | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_core | ||
bevy_derive | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_gilrs | ||
bevy_gltf | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_math | ||
bevy_pbr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_wgpu | ||
bevy_window | ||
bevy_winit |