-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
WithBundle missing WorldQuery implementation #2023
Labels
A-ECS
Entities, components, systems, and events
C-Docs
An addition or correction to our documentation
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
Comments
alice-i-cecile
added
C-Docs
An addition or correction to our documentation
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
labels
Apr 26, 2021
Yup it looks like we lost the WorldQuery impl during the ECS V2 rewrite. We should add it back :) |
(and then check the new implementation for correctness because clearly that hasn't been done since the rewrite) |
CGMossa
added a commit
to CGMossa/bevy
that referenced
this issue
Apr 27, 2021
This addresses WithBundle missing WorldQuery implementation bevyengine#2023.
NiklasEi
pushed a commit
to NiklasEi/bevy
that referenced
this issue
May 1, 2021
In response to bevyengine#2023, here is a draft for a PR. Fixes bevyengine#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>
ostwilkens
pushed a commit
to ostwilkens/bevy
that referenced
this issue
Jul 27, 2021
In response to bevyengine#2023, here is a draft for a PR. Fixes bevyengine#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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-ECS
Entities, components, systems, and events
C-Docs
An addition or correction to our documentation
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
While fiddling with bundles, I wanted to do
Query<(My, Components), WithBundle<MyBundle>>
but instead I'm met with this compilation error:
According to @TehPers, it might only need this
I was asked to create this issue, so here it is.
The text was updated successfully, but these errors were encountered: