bevy/crates/bevy_hierarchy
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
..
src Add ReplaceChildren and ClearChildren EntityCommands (#6035) 2023-01-16 21:24:15 +00:00
Cargo.toml Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00