Skip to content

Add marker for ExtractResource#22867

Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom
Zeophlite:resource-marker
Feb 9, 2026
Merged

Add marker for ExtractResource#22867
alice-i-cecile merged 3 commits intobevyengine:mainfrom
Zeophlite:resource-marker

Conversation

@Zeophlite
Copy link
Copy Markdown
Contributor

Objective

Solution

  • Add marker to ExtractResouce
  • Pass marker to SyncComponent

Testing

  • cargo run --example animated_mesh

@Zeophlite Zeophlite added A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels 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)>);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExtractComponent uses F for the marker, i think for "Foreign type" it would be nice to be consistent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 alice-i-cecile added the C-Usability A targeted quality-of-life change that makes Bevy easier to use label 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)>);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Feb 8, 2026
@Zeophlite
Copy link
Copy Markdown
Contributor Author

I went back and forth a bit on this, but ended up with using F everywhere - I think the M for Material is compelling enough to land here. Happy to change it

@Zeophlite Zeophlite 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-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Feb 9, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 9, 2026
Merged via the queue into bevyengine:main with commit 89d4a4a Feb 9, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants