Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect UUID #8905

Merged
merged 4 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions crates/bevy_reflect/src/impls/uuid.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate as bevy_reflect;

use crate::{std_traits::ReflectDefault, ReflectDeserialize, ReflectSerialize};
use bevy_reflect_derive::{impl_from_reflect_value, impl_reflect_value};
use bevy_utils::Uuid;

impl_reflect_value!(::bevy_utils::Uuid(
Serialize,
Deserialize,
Default,
Debug,
PartialEq,
Hash
));
impl_from_reflect_value!(Uuid);
2 changes: 2 additions & 0 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ mod impls {
mod smol_str;

mod std;
mod uuid;

#[cfg(feature = "glam")]
pub use self::glam::*;
Expand All @@ -471,6 +472,7 @@ mod impls {
#[cfg(feature = "smallvec")]
pub use self::smallvec::*;
pub use self::std::*;
pub use self::uuid::*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Is this needed? In fact, are any of these needed (since I'm pretty sure none of them export anything)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just followed what I saw

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, we can leave it for now.

}

mod enums;
Expand Down