diff --git a/crates/bevy_reflect/src/impls/smallvec.rs b/crates/bevy_reflect/src/impls/smallvec.rs index 61d507986b15a..161e0312049b2 100644 --- a/crates/bevy_reflect/src/impls/smallvec.rs +++ b/crates/bevy_reflect/src/impls/smallvec.rs @@ -3,7 +3,8 @@ use std::any::Any; use crate::utility::GenericTypeInfoCell; use crate::{ - Array, ArrayIter, FromReflect, List, ListInfo, Reflect, ReflectMut, ReflectRef, TypeInfo, Typed, + Array, ArrayIter, FromReflect, FromType, GetTypeRegistration, List, ListInfo, Reflect, + ReflectFromPtr, ReflectMut, ReflectRef, TypeInfo, TypeRegistration, Typed, }; impl Array for SmallVec @@ -139,3 +140,14 @@ where } } } + +impl GetTypeRegistration for SmallVec +where + T::Item: FromReflect + Clone, +{ + fn get_type_registration() -> TypeRegistration { + let mut registration = TypeRegistration::of::>(); + registration.insert::(FromType::>::from_type()); + registration + } +}