From 3fea726db37e545ba77eb7b33ebb3ab30efda480 Mon Sep 17 00:00:00 2001 From: zuiyu <1542844298@qq.com> Date: Thu, 18 Apr 2024 20:59:29 +0800 Subject: [PATCH] Added deref trait for Mesh2dHandle (#13002) # Added deref trait for Mesh2dHandle - Fixes #13001 ". ## Solution - Added Derive Deref for Mesh2dHandle. --- crates/bevy_sprite/src/mesh2d/mesh.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_sprite/src/mesh2d/mesh.rs b/crates/bevy_sprite/src/mesh2d/mesh.rs index 2e61072fa8..7a26b46972 100644 --- a/crates/bevy_sprite/src/mesh2d/mesh.rs +++ b/crates/bevy_sprite/src/mesh2d/mesh.rs @@ -39,7 +39,7 @@ use crate::Material2dBindGroupId; /// Component for rendering with meshes in the 2d pipeline, usually with a [2d material](crate::Material2d) such as [`ColorMaterial`](crate::ColorMaterial). /// /// It wraps a [`Handle`] to differentiate from the 3d pipelines which use the handles directly as components -#[derive(Default, Clone, Component, Debug, Reflect, PartialEq, Eq)] +#[derive(Default, Clone, Component, Debug, Reflect, PartialEq, Eq, Deref, DerefMut)] #[reflect(Default, Component)] pub struct Mesh2dHandle(pub Handle);