-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
What you did
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::<R>();
assert!(!r.is_changed(), "Resource must begin unchanged.");
}What went wrong
This test fails! To fix it, we must add:
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.
CGMossa
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior