Change detection in a system-less context is hard to get working
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
1ac8a476cf4ad14bd0b9bfb091dd04796652230d
## What you did
```rust
fn raw_resource_change_detection() {
let mut world = World::new();
world.insert_resource(R(0));
world.increment_change_tick();
let mut r = world.resource_mut::();
assert!(!r.is_changed(), "Resource must begin unchanged.");
}
```
## What went wrong
This test fails! To fix it, we must add:
```rust
world.clear_trackers();
```
before we fetch the resource from the `World`.
## Additional information
This was uncovered in #5373; the test there should be updated as part of the PR that fixes this.
Full credit to @maniwani for identifying the workaround.
Contributor guide
Assessment
This issue has not been assessed yet.