bevy/crates/bevy_hierarchy/src
ld000 e44990a48d Add ReplaceChildren and ClearChildren EntityCommands (#6035)
# Objective

Fixes #5859 

## Solution

- Add `ClearChildren` and `ReplaceChildren` commands in the `crates/bevy_hierarchy/src/child_builder.rs`

---

## Changelog

  - Added `ClearChildren` and `ReplaceChildren` struct
  - Added `clear_children(&mut self) -> &mut Self` and `replace_children(&mut self, children: &[Entity]) -> &mut Self` function in `BuildChildren` trait
  - Changed `PushChildren` `write` function body to a `push_children ` function to reused in `ReplaceChildren`
  - Added `clear_children` function
  - Added `push_and_replace_children_commands` and `push_and_clear_children_commands` test



Co-authored-by: ld000 <lidong9144@163.com>
Co-authored-by: lidong63 <lidong63@meituan.com>
2023-01-16 21:24:15 +00:00
..
components Add const Entity::PLACEHOLDER (#6761) 2022-11-28 13:40:10 +00:00
child_builder.rs Add ReplaceChildren and ClearChildren EntityCommands (#6035) 2023-01-16 21:24:15 +00:00
events.rs Add add_child, set_parent and remove_parent to EntityMut (#6926) 2022-12-25 00:23:12 +00:00
hierarchy.rs Fix various typos (#7096) 2023-01-06 00:43:30 +00:00
lib.rs bevy_scene: Add missing registration for SmallVec<[Entity; 8]> (#6578) 2022-11-14 23:08:23 +00:00
query_extension.rs Replace WorldQueryGats trait with actual gats (#6319) 2022-11-03 16:33:05 +00:00
valid_parent_check_plugin.rs Fix Link in valid_parent_check_plugin.rs (#6584) 2022-11-13 15:35:48 +00:00