bevy/release-content
urben1680 c6ae964709
EntityWorldMut methods do not automatically overwrite Relationship components (#19601)
# Objective

Some methods and commands carelessly overwrite `Relationship`
components. This may overwrite additional data stored at them which is
undesired.

Part of #19589

## Solution

A new private method will be used instead of insert:
`modify_or_insert_relation_with_relationship_hook_mode`.

This method behaves different to `insert` if `Relationship` is a larger
type than `Entity` and already contains this component. It will then use
the `modify_component` API and a new `Relationship::set_risky` method to
set the related entity, keeping all other data untouched.

For the `replace_related`(`_with_difference`) methods this also required
a `InsertHookMode` parameter for efficient modifications of multiple
children. The changes here are limited to the non-public methods.

I would appreciate feedback if this is all good.

# Testing

Added tests of all methods that previously could reset `Relationship`
data.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-06-22 00:22:05 +00:00
..
migration-guides EntityWorldMut methods do not automatically overwrite Relationship components (#19601) 2025-06-22 00:22:05 +00:00
release-notes Color interpolation in OKLab, OKLCH spaces for UI gradients (#19330) 2025-06-21 15:06:35 +00:00
migration_guides_template.md Make some changes to the migration guide recommendations (#18794) 2025-04-10 19:25:56 +00:00
migration_guides.md bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
README.md Fixed broken link in release content README. (#19375) 2025-05-26 19:30:03 +00:00
release_notes_template.md
release_notes.md bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00

Release Content

This directory contains drafts of documentation for the current development cycle, which will be published to the website during the next release. You can find more information in the release notes and migration guides files.