Skip to content

Commit

Permalink
Add Reflect to OnReplace (#14620)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #14337 

## Solution

- Add a `cfg_attr` that derives `Refect` for this type. 

## Testing

- I am going to make sure the tests pass on this PR before requesting
review, If more testing is necessary let me know some good action steps
to take.
  • Loading branch information
Lubba-64 authored Aug 6, 2024
1 parent 0caeaa2 commit 897625c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_ecs/src/world/component_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down

0 comments on commit 897625c

Please sign in to comment.