-
-
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
Expose query accesses #11700
Expose query accesses #11700
Conversation
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.
And so we inch closer to the access model laid out in bevyengine/rfcs#30 :D
I agree with this direction, and this PR is useful both as an ECS primitive and as something we can expose to users. I'd like to clean up the explanation and docs a bit further before merging.
Ideally we'd have module level documentation explaining the different kinds of access and how they relate to each other, but I won't block on that in this PR.
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.
Solid stuff. One small set of suggestions to clarify further, but I'm happy with this now.
Co-authored-by: Alice Cecile <[email protected]>
I'll think on what I would write here, but I probably won't include anything in this PR since module-level documentation generally requires a lot more thought than method-level documentation. |
Objective
It would be useful to be able to inspect a
QueryState
's accesses so we can detect when the data it accesses changes without having to iterate it. However there are two things preventing this:Has<T>
indirectly accessesT
, but does not register it.Solution
QueryState
.