-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] - Mention world_query(ignore) attribute for WorldQuery derivation #6309
Conversation
crates/bevy_ecs/src/query/fetch.rs
Outdated
/// | ||
/// * also implements `WorldQuery`, or | ||
/// * is marked with `#[world_query(ignore)]`. Fields decorated with this attribute | ||
/// will be created with the default value upon realisation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explicitly mention that Default
is both required to be implemented and used in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure what you mean by Default is [...] required to be [...] used
. Can you elaborate? For now I've only added that it needs to be implemented for the type.
87cdfbe
to
3f22ac9
Compare
3f22ac9
to
1bc1949
Compare
Hey :) Do you think the PR can be merged like this, or should I make additional changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
Co-authored-by: James Liu <contact@jamessliu.com>
bors r+ |
# Objective Add documentation `#[world_query(ignore)]`. Fixes #6283. --- I've only described it's behavior so far (which appears to be the same as with `system_param`). Is there another use-case for this besides with `PhantomData`? I could only find a single usage of this construct on GitHub, which is [here](https://github.com/tqwewe/bevy-editor-2/blob/ffcb816927a1bbdcf1cb0136ce47864e5040f9fb/bevy/examples/ecs/custom_query_param.rs#L102). I was also wondering if it would make sense to add a usage example to the `custom_query_example`? 🤔 That's why it's currently still in there. Co-authored-by: Lucas Jenß <243719+x3ro@users.noreply.github.com>
…engine#6309) # Objective Add documentation `#[world_query(ignore)]`. Fixes bevyengine#6283. --- I've only described it's behavior so far (which appears to be the same as with `system_param`). Is there another use-case for this besides with `PhantomData`? I could only find a single usage of this construct on GitHub, which is [here](https://github.com/tqwewe/bevy-editor-2/blob/ffcb816927a1bbdcf1cb0136ce47864e5040f9fb/bevy/examples/ecs/custom_query_param.rs#L102). I was also wondering if it would make sense to add a usage example to the `custom_query_example`? 🤔 That's why it's currently still in there. Co-authored-by: Lucas Jenß <243719+x3ro@users.noreply.github.com>
Objective
Add documentation
#[world_query(ignore)]
. Fixes #6283.I've only described it's behavior so far (which appears to be the same as with
system_param
). Is there another use-case for this besides withPhantomData
? I could only find a single usage of this construct on GitHub, which is here.I was also wondering if it would make sense to add a usage example to the
custom_query_example
? 🤔 That's why it's currently still in there.