bevy/crates
Freyja-moth 772524b3a6 Change with_related to work with a Bundle and added with_relationships method (#18699)
# Objective

Fixes #18678

## Solution

Moved the current `with_related` method to `with_relationships` and
added a new `with_related` that uses a bundle.

I'm not entirely sold on the name just yet, if anyone has any ideas let
me know.

## Testing

I wasn't able to test these changes because it crashed my computer every
time I tried (fun). But there don't seem to be any tests that use the
old `with_related` method so it should be fine, hopefully

## Showcase

```rust
commands.spawn_empty()
    .with_related::<Relationship>(Name::new("Related thingy"))
    .with_relationships(|rel| {
        rel.spawn(Name::new("Second related thingy"));
    });
```

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2025-04-10 01:19:33 +02:00
..
bevy_a11y Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_animation Add PartialEq and Hash reflections for AnimationNodeIndex (#18718) 2025-04-04 23:16:49 +02:00
bevy_app Add Default for all schedule labels (#18731) 2025-04-09 00:21:40 +02:00
bevy_asset Add #[deprecated(since = "0.16.0", ...)] to items missing it (#18702) 2025-04-03 21:46:46 +02:00
bevy_audio Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_color Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_core_pipeline Remove WebGL padding from MotionBlur (#18727) 2025-04-09 00:21:41 +02:00
bevy_derive Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_dev_tools Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_diagnostic Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_dylib Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_ecs Change with_related to work with a Bundle and added with_relationships method (#18699) 2025-04-10 01:19:33 +02:00
bevy_encase_derive Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_gilrs Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_gizmos Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_gltf Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_image Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_input Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_input_focus Switch ChildOf back to tuple struct (#18672) 2025-04-03 21:45:43 +02:00
bevy_internal Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_log Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_macro_utils Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_math Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_mesh Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_mikktspace Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_pbr Web support for atmosphere (#18582) 2025-04-09 00:21:41 +02:00
bevy_picking Newtype hashbrown (#18694) 2025-04-09 00:21:41 +02:00
bevy_platform_support Newtype hashbrown (#18694) 2025-04-09 00:21:41 +02:00
bevy_ptr Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_reflect Add accessors to DynamicEnum for the DynamicVariant (#18693) 2025-04-09 00:21:40 +02:00
bevy_remote Add Default for all schedule labels (#18731) 2025-04-09 00:21:40 +02:00
bevy_render Add Default for all schedule labels (#18731) 2025-04-09 00:21:40 +02:00
bevy_scene Newtype hashbrown (#18694) 2025-04-09 00:21:41 +02:00
bevy_sprite Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_state Add Default for all schedule labels (#18731) 2025-04-09 00:21:40 +02:00
bevy_tasks Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_text Switch ChildOf back to tuple struct (#18672) 2025-04-03 21:45:43 +02:00
bevy_time Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_transform Switch ChildOf back to tuple struct (#18672) 2025-04-03 21:45:43 +02:00
bevy_ui Fix AccessKit node bounds (#18706) 2025-04-09 00:21:41 +02:00
bevy_utils Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_window Release 0.16.0-rc.3 2025-03-31 23:07:43 +02:00
bevy_winit Switch ChildOf back to tuple struct (#18672) 2025-04-03 21:45:43 +02:00