1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use crate as bevy_reflect;
use crate::prelude::ReflectDefault;
use crate::{ReflectDeserialize, ReflectSerialize};
use bevy_math::{IRect, IVec2, Rect, URect, UVec2, Vec2};
use bevy_reflect_derive::impl_reflect;

impl_reflect!(
    #[reflect(Debug, PartialEq, Hash, Serialize, Deserialize, Default)]
    #[type_path = "bevy_math"]
    struct IRect {
        min: IVec2,
        max: IVec2,
    }
);

impl_reflect!(
    #[reflect(Debug, PartialEq, Serialize, Deserialize, Default)]
    #[type_path = "bevy_math"]
    struct Rect {
        min: Vec2,
        max: Vec2,
    }
);

impl_reflect!(
    #[reflect(Debug, PartialEq, Hash, Serialize, Deserialize, Default)]
    #[type_path = "bevy_math"]
    struct URect {
        min: UVec2,
        max: UVec2,
    }
);