bevy
bevy copied to clipboard
Run observers before hooks for `on_replace` and `on_remove`
Objective
- Fixes #16498
Solution
- Trivially swaps ordering of hooks and observers for all call sites where they are triggered for
on_replace
oron_remove
Testing
- Just CI
Migration Guide
The order of hooks and observers for on_replace
and on_remove
has been swapped. Observers are now run before hooks. This is a more natural ordering where the removal ordering is inverted compared to the insertion ordering.