diff --git a/crates/bevy_hierarchy/src/components/children.rs b/crates/bevy_hierarchy/src/components/children.rs index 5a53462d82c58..ee2fb5578a8cf 100644 --- a/crates/bevy_hierarchy/src/components/children.rs +++ b/crates/bevy_hierarchy/src/components/children.rs @@ -1,5 +1,5 @@ #[cfg(feature = "reflect")] -use bevy_ecs::reflect::{ReflectComponent, ReflectMapEntities}; +use bevy_ecs::reflect::{ReflectComponent, ReflectFromWorld, ReflectMapEntities}; use bevy_ecs::{ component::Component, entity::{Entity, EntityMapper, MapEntities}, @@ -25,7 +25,7 @@ use std::ops::Deref; /// [`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children #[derive(Component, Debug)] #[cfg_attr(feature = "reflect", derive(bevy_reflect::Reflect))] -#[cfg_attr(feature = "reflect", reflect(Component, MapEntities))] +#[cfg_attr(feature = "reflect", reflect(Component, MapEntities, Debug, FromWorld))] pub struct Children(pub(crate) SmallVec<[Entity; 8]>); impl MapEntities for Children { diff --git a/crates/bevy_hierarchy/src/components/parent.rs b/crates/bevy_hierarchy/src/components/parent.rs index 99d8e45460a8d..ce7e061ab4fa5 100644 --- a/crates/bevy_hierarchy/src/components/parent.rs +++ b/crates/bevy_hierarchy/src/components/parent.rs @@ -1,5 +1,5 @@ #[cfg(feature = "reflect")] -use bevy_ecs::reflect::{ReflectComponent, ReflectMapEntities}; +use bevy_ecs::reflect::{ReflectComponent, ReflectFromWorld, ReflectMapEntities}; use bevy_ecs::{ component::Component, entity::{Entity, EntityMapper, MapEntities}, @@ -23,7 +23,10 @@ use std::ops::Deref; /// [`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children #[derive(Component, Debug, Eq, PartialEq)] #[cfg_attr(feature = "reflect", derive(bevy_reflect::Reflect))] -#[cfg_attr(feature = "reflect", reflect(Component, MapEntities, PartialEq))] +#[cfg_attr( + feature = "reflect", + reflect(Component, MapEntities, PartialEq, Debug, FromWorld) +)] pub struct Parent(pub(crate) Entity); impl Parent {