From c55c69e3fcdb830561369592f17bd7f9a78789d5 Mon Sep 17 00:00:00 2001 From: tmstorey Date: Sun, 4 May 2025 18:22:57 +1000 Subject: [PATCH] Add NonNilUuid support to bevy_reflect (#18604) # Objective - If using a `NonNilUuid` in Bevy, it's difficult to reflect it. ## Solution - Adds `NonNilUuid` using `impl_reflect_opaque!`. ## Testing - Built with no issues found locally. - Essentially the same as the `Uuid` support except without `Default`. Co-authored-by: TM Storey --- crates/bevy_reflect/src/impls/uuid.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/bevy_reflect/src/impls/uuid.rs b/crates/bevy_reflect/src/impls/uuid.rs index 7385304e28..502b64c898 100644 --- a/crates/bevy_reflect/src/impls/uuid.rs +++ b/crates/bevy_reflect/src/impls/uuid.rs @@ -10,3 +10,12 @@ impl_reflect_opaque!(::uuid::Uuid( PartialEq, Hash )); + +impl_reflect_opaque!(::uuid::NonNilUuid( + Serialize, + Deserialize, + Clone, + Debug, + PartialEq, + Hash +));