-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
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-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Description
What problem does this solve or what need does it fill?
commands.spawn((
children![],
children![],
));
currently crash with has duplicate components: bevy_ecs::hierarchy::Children
What solution would you like?
Allow multiple bevy_ecs::hierarchy::Children
and merge them.
maybe some component can have a "merge strategy" instead of panic.
or maybe it will be solved as part of bsn?
What alternative(s) have you considered?
Additional context
I want to have this:
pub fn children_opt<T: Bundle>(opt: Option<T>) -> impl Bundle {
Children::spawn(
SpawnIter(opt.into_iter())
)
}
pub fn two_opt_children_bundle(
) -> impl Bundle {
(
children_opt(Some(Name::new("c1"))),
children_opt(Some(Name::new("c2")))
)
}
Also if we can do this then it gives an alternative solution to #18953, you can have the cfg outside one children!
marco, and have another one.
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-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished