Add Reflect to OnReplace (#14620)

# 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.
This commit is contained in:
Lubba64 2024-08-05 21:31:13 -04:00 committed by GitHub
parent 0caeaa2ca9
commit 897625c899
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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`]