Added deref trait for Mesh2dHandle (#13002)

# Added deref trait for Mesh2dHandle

- Fixes #13001 ".

## Solution

- Added Derive Deref for Mesh2dHandle.
This commit is contained in:
zuiyu 2024-04-18 20:59:29 +08:00 committed by GitHub
parent ef7bafa68e
commit 3fea726db3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<Mesh>`] 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<Mesh>);