diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs index da60e73875..de42d0ca3f 100644 --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -80,6 +80,7 @@ impl_reflect_value!(isize( impl_reflect_value!(f32(Debug, PartialEq, Serialize, Deserialize, Default)); impl_reflect_value!(f64(Debug, PartialEq, Serialize, Deserialize, Default)); impl_type_path!(str); +impl_type_path!(::bevy_utils::EntityHash); impl_reflect_value!(::alloc::string::String( Debug, Hash, @@ -1513,8 +1514,8 @@ mod tests { Enum, FromReflect, Reflect, ReflectSerialize, TypeInfo, TypeRegistry, Typed, VariantInfo, VariantType, }; - use bevy_utils::HashMap; use bevy_utils::{Duration, Instant}; + use bevy_utils::{EntityHashMap, HashMap}; use std::f32::consts::{PI, TAU}; use std::path::Path; @@ -1723,4 +1724,12 @@ mod tests { let output = <&'static Path as FromReflect>::from_reflect(&path).unwrap(); assert_eq!(path, output); } + + #[test] + fn entity_hashmap_should_impl_reflect() { + let entity_map = bevy_utils::EntityHashMap::::default(); + let entity_map_type_info = + as Reflect>::get_represented_type_info(&entity_map); + assert!(entity_map_type_info.is_some()); + } }