mirror of
https://github.com/bevyengine/bevy
synced 2024-09-21 06:52:04 +00:00
This commit is contained in:
parent
8101622f37
commit
3efbaca104
1 changed files with 6 additions and 1 deletions
|
@ -282,6 +282,7 @@ impl ExecutorStage {
|
|||
systems: &[Arc<Mutex<Box<dyn System>>>],
|
||||
schedule_changed: bool,
|
||||
) {
|
||||
let start_archetypes_generation = world.archetypes_generation();
|
||||
let compute_pool = resources
|
||||
.get_cloned::<bevy_tasks::ComputeTaskPool>()
|
||||
.unwrap();
|
||||
|
@ -388,7 +389,11 @@ impl ExecutorStage {
|
|||
}
|
||||
}
|
||||
|
||||
self.last_archetypes_generation = world.archetypes_generation();
|
||||
// If world's archetypes_generation is the same as it was before running any systems then
|
||||
// we can assume that all systems have correct archetype accesses.
|
||||
if start_archetypes_generation == world.archetypes_generation() {
|
||||
self.last_archetypes_generation = world.archetypes_generation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue