-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Reflect UUID #8905
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
use bevy_reflect_derive::{impl_from_reflect_value, impl_reflect_value}; | ||
use bevy_utils::Uuid; | ||
|
||
impl_reflect_value!(::bevy_utils::Uuid(Serialize, Deserialize)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also register some other traits? Namely Default
, Debug
, PartialEq
, and Hash
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -471,6 +472,7 @@ mod impls { | |||
#[cfg(feature = "smallvec")] | |||
pub use self::smallvec::*; | |||
pub use self::std::*; | |||
pub use self::uuid::*; |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks!
Thanks, happy to help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! this will help with #8624, which uses Uuid in one of the AssetId variants.
For those who wish to be able to
#[reflect]
stuff using theUuid
typeI'm very unfamiliar with the codebase, so please tell me if I'm missing something