only use unique type UUIDs (#3579)
Out of curiosity I ran `rg -F -I '#[uuid = "' | sort` to see if there were any duplicate UUIDs, and they were. Now there aren't any.
This commit is contained in:
parent
62329f7fda
commit
d305e4f026
@ -1,10 +1,9 @@
|
|||||||
use bevy_ecs::component::Component;
|
use bevy_ecs::component::Component;
|
||||||
use bevy_math::Vec2;
|
use bevy_math::Vec2;
|
||||||
use bevy_reflect::{Reflect, TypeUuid};
|
use bevy_reflect::Reflect;
|
||||||
use bevy_render::color::Color;
|
use bevy_render::color::Color;
|
||||||
|
|
||||||
#[derive(Component, Debug, Default, Clone, TypeUuid, Reflect)]
|
#[derive(Component, Debug, Default, Clone, Reflect)]
|
||||||
#[uuid = "7233c597-ccfa-411f-bd59-9af349432ada"]
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct Sprite {
|
pub struct Sprite {
|
||||||
/// The sprite's color tint
|
/// The sprite's color tint
|
||||||
|
@ -21,8 +21,7 @@ pub struct TextureAtlas {
|
|||||||
pub texture_handles: Option<HashMap<Handle<Image>, usize>>,
|
pub texture_handles: Option<HashMap<Handle<Image>, usize>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Component, Debug, Clone, TypeUuid, Reflect)]
|
#[derive(Component, Debug, Clone, Reflect)]
|
||||||
#[uuid = "7233c597-ccfa-411f-bd59-9af349432ada"]
|
|
||||||
pub struct TextureAtlasSprite {
|
pub struct TextureAtlasSprite {
|
||||||
pub color: Color,
|
pub color: Color,
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
|
@ -48,7 +48,7 @@ fn setup(
|
|||||||
|
|
||||||
// This is the struct that will be passed to your shader
|
// This is the struct that will be passed to your shader
|
||||||
#[derive(Debug, Clone, TypeUuid)]
|
#[derive(Debug, Clone, TypeUuid)]
|
||||||
#[uuid = "4ee9c363-1124-4113-890e-199d81b00281"]
|
#[uuid = "f690fdae-d598-45ab-8225-97e2a3f056e0"]
|
||||||
pub struct CustomMaterial {
|
pub struct CustomMaterial {
|
||||||
color: Color,
|
color: Color,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user