@@ -328,7 +328,7 @@ pub const DESPAWN: ComponentId = ComponentId::new(4);
328
328
/// Trigger emitted when a component is inserted onto an entity that does not already have that
329
329
/// component. Runs before `Insert`.
330
330
/// See [`crate::lifecycle::ComponentHooks::on_add`] for more information.
331
- #[ derive( Event , EntityEvent , Debug ) ]
331
+ #[ derive( Event , EntityEvent , Debug , Clone ) ]
332
332
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
333
333
#[ cfg_attr( feature = "bevy_reflect" , reflect( Debug ) ) ]
334
334
#[ doc( alias = "OnAdd" ) ]
@@ -337,7 +337,7 @@ pub struct Add;
337
337
/// Trigger emitted when a component is inserted, regardless of whether or not the entity already
338
338
/// had that component. Runs after `Add`, if it ran.
339
339
/// See [`crate::lifecycle::ComponentHooks::on_insert`] for more information.
340
- #[ derive( Event , EntityEvent , Debug ) ]
340
+ #[ derive( Event , EntityEvent , Debug , Clone ) ]
341
341
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
342
342
#[ cfg_attr( feature = "bevy_reflect" , reflect( Debug ) ) ]
343
343
#[ doc( alias = "OnInsert" ) ]
@@ -348,7 +348,7 @@ pub struct Insert;
348
348
///
349
349
/// Runs before the value is replaced, so you can still access the original component data.
350
350
/// See [`crate::lifecycle::ComponentHooks::on_replace`] for more information.
351
- #[ derive( Event , EntityEvent , Debug ) ]
351
+ #[ derive( Event , EntityEvent , Debug , Clone ) ]
352
352
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
353
353
#[ cfg_attr( feature = "bevy_reflect" , reflect( Debug ) ) ]
354
354
#[ doc( alias = "OnReplace" ) ]
@@ -357,15 +357,15 @@ pub struct Replace;
357
357
/// Trigger emitted when a component is removed from an entity, and runs before the component is
358
358
/// removed, so you can still access the component data.
359
359
/// See [`crate::lifecycle::ComponentHooks::on_remove`] for more information.
360
- #[ derive( Event , EntityEvent , Debug ) ]
360
+ #[ derive( Event , EntityEvent , Debug , Clone ) ]
361
361
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
362
362
#[ cfg_attr( feature = "bevy_reflect" , reflect( Debug ) ) ]
363
363
#[ doc( alias = "OnRemove" ) ]
364
364
pub struct Remove ;
365
365
366
366
/// Trigger emitted for each component on an entity when it is despawned.
367
367
/// See [`crate::lifecycle::ComponentHooks::on_despawn`] for more information.
368
- #[ derive( Event , EntityEvent , Debug ) ]
368
+ #[ derive( Event , EntityEvent , Debug , Clone ) ]
369
369
#[ cfg_attr( feature = "bevy_reflect" , derive( Reflect ) ) ]
370
370
#[ cfg_attr( feature = "bevy_reflect" , reflect( Debug ) ) ]
371
371
#[ doc( alias = "OnDespawn" ) ]
0 commit comments