Skip to content

Documentation improvement system_param.rs #20157

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
merged 1 commit into from
Jul 16, 2025
Merged

Conversation

tomaspecl
Copy link
Contributor

Objective

Improvement of the documentation for SystemParam derive section so that it mentions how to use a Query<&SomeComponent> as a SystemParam for a struct that should have #[derive(SystemParam)].

Solution

Added the documentation


Showcase

the previous documentation

Query<'w, 's, Entity>,
Res<'w, SomeResource>,
ResMut<'w, SomeOtherResource>,
Local<'s, u8>,
Commands<'w, 's>,
EventReader<'w, 's, SomeEvent>,
EventWriter<'w, SomeEvent>

the new documentation

Query<'w, 's, Entity>,
Query<'w, 's, &'static SomeComponent>,  <================== the new thing
Res<'w, SomeResource>,
ResMut<'w, SomeOtherResource>,
Local<'s, u8>,
Commands<'w, 's>,
EventReader<'w, 's, SomeEvent>,
EventWriter<'w, SomeEvent>

@janhohenheim janhohenheim added C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 16, 2025
@janhohenheim janhohenheim added this to the 0.17 milestone Jul 16, 2025
@chescock chescock added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 16, 2025
@mockersf mockersf added this pull request to the merge queue Jul 16, 2025
Merged via the queue into bevyengine:main with commit 2bcd854 Jul 16, 2025
43 checks passed
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 D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants