Add `RelationshipHookMode` argument to `BundleWriter::write` (#24406)
# Objective I've been using `BundleScratch` for batch writing components when synchronizing entities across worlds, it's been quite nice. However currently `BundleWriter::write` doesn't allow setting `RelationshipHookMode`, which makes it less usable for this task since it requires mapping entities when inserting relationships while also preserving ordering in `RelationshipTarget`s (which becomes broken when running with the default `RelationshipHookMode::Run`) Also `BundleWriter::write` was missing `#[track_caller]`. ## Solution - Add `BundleWriter::write_with_relationship_hook_insert_mode` with `RelationshipHookMode` argument. - Annotate `BundleWriter::write` with `#[track_caller]` ## Testing - The one existing test that used `BundleWriter::write` passed
E
eugineerd committed
85a892a1b17f2059a039602f14a3cacde34189e5
Parent: 90f031f
Committed by GitHub <noreply@github.com>
on 5/29/2026, 10:26:23 PM