Reflect UUID (#8905)
For those who wish to be able to `#[reflect]` stuff using the `Uuid` type I'm very unfamiliar with the codebase, so please tell me if I'm missing something
This commit is contained in:
		
							parent
							
								
									284b6df0bb
								
							
						
					
					
						commit
						af4336c501
					
				
							
								
								
									
										15
									
								
								crates/bevy_reflect/src/impls/uuid.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								crates/bevy_reflect/src/impls/uuid.rs
									
									
									
									
									
										Normal file
									
								
							| @ -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); | ||||||
| @ -463,6 +463,7 @@ mod impls { | |||||||
|     mod smol_str; |     mod smol_str; | ||||||
| 
 | 
 | ||||||
|     mod std; |     mod std; | ||||||
|  |     mod uuid; | ||||||
| 
 | 
 | ||||||
|     #[cfg(feature = "glam")] |     #[cfg(feature = "glam")] | ||||||
|     pub use self::glam::*; |     pub use self::glam::*; | ||||||
| @ -471,6 +472,7 @@ mod impls { | |||||||
|     #[cfg(feature = "smallvec")] |     #[cfg(feature = "smallvec")] | ||||||
|     pub use self::smallvec::*; |     pub use self::smallvec::*; | ||||||
|     pub use self::std::*; |     pub use self::std::*; | ||||||
|  |     pub use self::uuid::*; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| mod enums; | mod enums; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Joaquín León
						Joaquín León