Open
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.