diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs index 97bdda0462c45..9e20c208761e7 100644 --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -137,6 +137,7 @@ impl WorldQuery for Entity { } /// The [`Fetch`] of [`Entity`]. +#[derive(Clone)] pub struct EntityFetch { entities: *const Entity, } @@ -573,6 +574,7 @@ impl WorldQuery for Option { } /// The [`Fetch`] of `Option`. +#[derive(Clone)] pub struct OptionFetch { fetch: T, matches: bool, @@ -807,6 +809,21 @@ pub struct ChangeTrackersFetch { change_tick: u32, } +impl Clone for ChangeTrackersFetch { + fn clone(&self) -> Self { + Self { + storage_type: self.storage_type, + table_ticks: self.table_ticks, + entity_table_rows: self.entity_table_rows, + entities: self.entities, + sparse_set: self.sparse_set, + marker: self.marker, + last_change_tick: self.last_change_tick, + change_tick: self.change_tick, + } + } +} + /// SAFETY: access is read only unsafe impl ReadOnlyFetch for ChangeTrackersFetch {}