bevy/crates/bevy_ecs/macros
eugineerd 3caca428c0
allow EntityCloner to move components without Clone or Reflect (#20065)
# Objective
Fix #18079 

## Solution
- `EntityCloner` can now move components that don't have `Clone` or
`Reflect` implementation.
- Components with `ComponentCloneBehavior::Ignore` will not be moved.
- Components with `ComponentCloneBehavior::Custom` will be cloned using
their defined `ComponentCloneFn` and then removed from the source entity
to respect their `queue_deferred` logic.
- Relationships still need to be `Clone` or `Reflect` to be movable.
- Custom relationship data is now correctly preserved when cloned or
moved using `EntityCloner`.

## Testing
- Added new tests for moving components

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-14 22:33:01 +00:00
..
src allow EntityCloner to move components without Clone or Reflect (#20065) 2025-07-14 22:33:01 +00:00
Cargo.toml Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
LICENSE-APACHE Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
LICENSE-MIT Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00