-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add ability to ignore field of bundle #5559
Copy link
Copy link
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy
Description
What problem does this solve or what need does it fill?
Add the ability to ignore a field of a bundle using the #[derive(Bundle)] macro, causing it to not be included in the generated list of components.
This is primarily useful when working with PhantomData.
What solution would you like?
#[derive(Bundle)]
struct GenericBundle<T>{
transform: Transform,
#[bundle(ignore)]
_phantom: PhantomData<T>,
}Modify the derive Bundle macro to accomplish this :)
Be sure to add this to the Bundle docs as a doc test so this keeps working and can be discovered.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy