bevy/crates/bevy_hierarchy/src
ira b0bd8722f3 Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464)
`EntityMut::remove_children` does not call `self.update_location()` which is unsound.
Verified by adding the following assertion, which fails when running the tests.
```rust
let before = self.location();
self.update_location();
assert_eq!(before, self.location());
```

I also removed incorrect messages like "parent entity is not modified" and the unhelpful "Inserting a bundle in the children entities may change the parent entity's location if they were of the same archetype" which might lead people to think that's the *only* thing that can change the entity's location.

# Changelog
Added `EntityMut::world_scope`.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-11-04 17:30:40 +00:00
..
components Add methods to Query<&Children> and Query<&Parent> to iterate over descendants and ancestors (#6185) 2022-10-31 15:57:50 +00:00
child_builder.rs Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464) 2022-11-04 17:30:40 +00:00
events.rs Fix some grammatical errors in the docs (#6109) 2022-09-26 21:47:31 +00:00
hierarchy.rs Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464) 2022-11-04 17:30:40 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +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 Add warning when a hierarchy component is missing (#5590) 2022-09-19 16:12:11 +00:00