bevy/crates/bevy_ecs/src
Joel Singh 12ad7479a0
Add insert_child and remove_child methods (#19622)
# Objective

- `remove_child` was mentioned missing in #19556 and I realized that
`insert_child` was also missing.
- Removes the need to wrap a single entity with `&[]` with
`remove_children` and `insert_children`
- Would have also added `despawn_children` but #19283 does so. 

## Solution

- Simple wrapper around `remove_related`

## Testing

- Added `insert_child` and `remove_child` tests analgous to
`insert_children` and `remove_children` and then ran `cargo run -p ci --
test`
2025-06-15 16:52:25 +00:00
..
entity System::check_change_tick and similar methods take CheckChangeTicks (#19600) 2025-06-13 19:24:27 +00:00
error More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
event Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
observer Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
query Mention Mut in QueryData docs, clarify behaviour of Mut vs &mut in Mut docs (#19254) 2025-06-09 19:21:04 +00:00
reflect bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
relationship Preserve extra data in RelationshipTarget with replace_related(_with_difference) (#19588) 2025-06-15 16:41:28 +00:00
schedule Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
storage System::check_change_tick and similar methods take CheckChangeTicks (#19600) 2025-06-13 19:24:27 +00:00
system Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
world Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
archetype.rs Rename Trigger to On (#19596) 2025-06-12 18:22:33 +00:00
batching.rs Nonmax all rows (#19132) 2025-05-26 17:39:55 +00:00
bundle.rs Rename Trigger to On (#19596) 2025-06-12 18:22:33 +00:00
change_detection.rs Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
component.rs System::check_change_tick and similar methods take CheckChangeTicks (#19600) 2025-06-13 19:24:27 +00:00
entity_disabling.rs
hierarchy.rs Add insert_child and remove_child methods (#19622) 2025-06-15 16:52:25 +00:00
intern.rs
label.rs
lib.rs Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
lifecycle.rs Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
name.rs
never.rs
resource.rs refactor(utils): move SyncCell and SyncUnsafeCell to bevy_platform (#19305) 2025-05-27 04:57:26 +00:00
spawn.rs
traversal.rs Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00