bevy_ecs/world/
component_constants.rs1use super::*;
2use crate::{self as bevy_ecs};
3#[cfg(feature = "bevy_reflect")]
4use bevy_reflect::Reflect;
5pub const ON_ADD: ComponentId = ComponentId::new(0);
10pub const ON_INSERT: ComponentId = ComponentId::new(1);
12pub const ON_REMOVE: ComponentId = ComponentId::new(2);
14
15#[derive(Event)]
17#[cfg_attr(feature = "bevy_reflect", derive(Reflect))]
18pub struct OnAdd;
19
20#[derive(Event)]
22#[cfg_attr(feature = "bevy_reflect", derive(Reflect))]
23pub struct OnInsert;
24
25#[derive(Event)]
27#[cfg_attr(feature = "bevy_reflect", derive(Reflect))]
28pub struct OnRemove;