diff --git a/crates/bevy_ecs/src/world/component_constants.rs b/crates/bevy_ecs/src/world/component_constants.rs index ad2da3e34f9b7..92c1572b0935b 100644 --- a/crates/bevy_ecs/src/world/component_constants.rs +++ b/crates/bevy_ecs/src/world/component_constants.rs @@ -29,6 +29,7 @@ pub struct OnInsert; /// Trigger emitted when a component is replaced on an entity. See [`crate::component::ComponentHooks::on_replace`] /// for more information. #[derive(Event)] +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] pub struct OnReplace; /// Trigger emitted when a component is removed from an entity. See [`crate::component::ComponentHooks::on_remove`]