From 513369ae74fbfa4ab7720bbb53a2532cc2cdec3e Mon Sep 17 00:00:00 2001 From: Nicola Papale Date: Tue, 1 Aug 2023 18:11:52 +0200 Subject: [PATCH 1/2] Make Sprite and Anchor Copy --- crates/bevy_sprite/src/sprite.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_sprite/src/sprite.rs b/crates/bevy_sprite/src/sprite.rs index cde4983ff73ec..0f3cffb552a12 100644 --- a/crates/bevy_sprite/src/sprite.rs +++ b/crates/bevy_sprite/src/sprite.rs @@ -3,7 +3,7 @@ use bevy_math::{Rect, Vec2}; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use bevy_render::color::Color; -#[derive(Component, Debug, Default, Clone, Reflect)] +#[derive(Component, Debug, Default, Clone, Copy, Reflect)] #[reflect(Component, Default)] #[repr(C)] pub struct Sprite { @@ -25,7 +25,7 @@ pub struct Sprite { /// How a sprite is positioned relative to its [`Transform`](bevy_transform::components::Transform). /// It defaults to `Anchor::Center`. -#[derive(Component, Debug, Clone, Default, Reflect)] +#[derive(Component, Debug, Clone, Copy, Default, Reflect)] #[doc(alias = "pivot")] pub enum Anchor { #[default] From 8ffbbccbe0f51ee0d0bb05faae2e66943d5e4a19 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Fri, 11 Aug 2023 13:45:44 -0700 Subject: [PATCH 2/2] Update sprite.rs --- crates/bevy_sprite/src/sprite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_sprite/src/sprite.rs b/crates/bevy_sprite/src/sprite.rs index 0f3cffb552a12..213264a2737d6 100644 --- a/crates/bevy_sprite/src/sprite.rs +++ b/crates/bevy_sprite/src/sprite.rs @@ -3,7 +3,7 @@ use bevy_math::{Rect, Vec2}; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use bevy_render::color::Color; -#[derive(Component, Debug, Default, Clone, Copy, Reflect)] +#[derive(Component, Debug, Default, Clone, Reflect)] #[reflect(Component, Default)] #[repr(C)] pub struct Sprite {