diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs index 7257c827e1895..7b7df57482a20 100644 --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -162,7 +162,7 @@ pub unsafe trait SystemParamBuilder: Sized { /// .build_state(&mut world) /// .build_system(my_system); /// ``` -#[derive(Default, Debug, Copy, Clone)] +#[derive(Default, Debug, Clone)] pub struct ParamBuilder; // SAFETY: Calls `SystemParam::init_state` @@ -257,6 +257,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 { @@ -401,6 +402,7 @@ unsafe impl> SystemParamBuilder> /// set.for_each(|mut query| for mut health in query.iter_mut() {}); /// } /// ``` +#[derive(Debug, Default, Clone)] pub struct ParamSetBuilder(pub T); macro_rules! impl_param_set_builder_tuple { @@ -520,6 +522,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. @@ -537,6 +540,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 { @@ -600,6 +604,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 {