diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs index d474a52de0987..6593f70a92f71 100644 --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -256,6 +256,7 @@ unsafe impl<'w, 's, D: QueryData + 'static, F: QueryFilter + 'static> /// .build_state(&mut world) /// .build_system(|query: Vec>| {}); /// ``` +#[derive(Clone)] pub struct QueryParamBuilder(T); impl QueryParamBuilder { @@ -400,6 +401,7 @@ unsafe impl> SystemParamBuilder> /// set.for_each(|mut query| for mut health in query.iter_mut() {}); /// } /// ``` +#[derive(Debug, Default, Copy, Clone)] pub struct ParamSetBuilder(pub T); macro_rules! impl_param_set_builder_tuple { @@ -519,6 +521,7 @@ unsafe impl<'a, 'w, 's> SystemParamBuilder> for DynParamB /// }); /// # world.run_system_once(system); /// ``` +#[derive(Default, Debug, Clone)] pub struct LocalBuilder(pub T); // SAFETY: `Local` performs no world access. @@ -536,6 +539,7 @@ unsafe impl<'s, T: FromWorld + Send + 'static> SystemParamBuilder> /// A [`SystemParamBuilder`] for a [`FilteredResources`]. /// See the [`FilteredResources`] docs for examples. +#[derive(Clone)] pub struct FilteredResourcesParamBuilder(T); impl FilteredResourcesParamBuilder { @@ -599,6 +603,7 @@ unsafe impl<'w, 's, T: FnOnce(&mut FilteredResourcesBuilder)> /// A [`SystemParamBuilder`] for a [`FilteredResourcesMut`]. /// See the [`FilteredResourcesMut`] docs for examples. +#[derive(Clone)] pub struct FilteredResourcesMutParamBuilder(T); impl FilteredResourcesMutParamBuilder {