Skip to content

Commit cffef5b

Browse files
authored
implement Clone for IsDefaultUiCamera (#24729)
I noticed that `IsDefaultUiCamera` is not allowed atm inside of the `bsn!` macro. ``` | |_____^ the trait `Clone` is not implemented for `bevy::prelude::IsDefaultUiCamera` | = help: the following other types implement trait `FromTemplate`: AnimationGraphHandle Atmosphere AudioPlayer<Source> CustomCursor CustomCursorImage DirectionalLightTexture DynamicWorldRoot EnvironmentMapLight and 34 others = note: required for `bevy::prelude::IsDefaultUiCamera` to implement `FromTemplate` = note: this error originates in the macro `bsn` (in Nightly builds, run with -Z macro-backtrace for more info) ``` This PR adds the `Clone` and `Copy` (it's a unit struct so it shouldn't hurt) derives to the component.
1 parent 6e93c2e commit cffef5b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/bevy_ui/src/ui_node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2970,7 +2970,7 @@ impl UiTargetCamera {
29702970
/// ));
29712971
/// }
29722972
/// ```
2973-
#[derive(Component, Default, Reflect)]
2973+
#[derive(Component, Default, Clone, Copy, Reflect)]
29742974
#[reflect(Component, Default)]
29752975
pub struct IsDefaultUiCamera;
29762976

0 commit comments

Comments
 (0)