Add marker for ExtractResource#22867
Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom Feb 9, 2026
Merged
Conversation
atlv24
reviewed
Feb 8, 2026
| /// Therefore it sets up the[`ExtractSchedule`] step | ||
| /// for the specified [`Resource`]. | ||
| pub struct ExtractResourcePlugin<R: ExtractResource>(PhantomData<R>); | ||
| pub struct ExtractResourcePlugin<R: ExtractResource<M>, M = ()>(PhantomData<(R, M)>); |
Contributor
There was a problem hiding this comment.
ExtractComponent uses F for the marker, i think for "Foreign type" it would be nice to be consistent
Contributor
There was a problem hiding this comment.
I called them Marker just to spell out that it isn't used for anything. I think F is probably fine as well, but M is used in too many places for Material.
alice-i-cecile
approved these changes
Feb 8, 2026
kristoff3r
approved these changes
Feb 8, 2026
| /// Therefore it sets up the[`ExtractSchedule`] step | ||
| /// for the specified [`Resource`]. | ||
| pub struct ExtractResourcePlugin<R: ExtractResource>(PhantomData<R>); | ||
| pub struct ExtractResourcePlugin<R: ExtractResource<M>, M = ()>(PhantomData<(R, M)>); |
Contributor
There was a problem hiding this comment.
I called them Marker just to spell out that it isn't used for anything. I think F is probably fine as well, but M is used in too many places for Material.
Contributor
Author
|
I went back and forth a bit on this, but ended up with using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
bevy_extract#22852Solution
ExtractResouceSyncComponentTesting
cargo run --example animated_mesh