migrate bundle changes

This commit is contained in:
eugineerd 2025-07-14 18:57:47 +00:00
parent 471ef23a54
commit a225511694

View File

@ -22,6 +22,7 @@ pub(crate) struct BundleRemover<'w> {
old_and_new_table: Option<(NonNull<Table>, NonNull<Table>)>, old_and_new_table: Option<(NonNull<Table>, NonNull<Table>)>,
old_archetype: NonNull<Archetype>, old_archetype: NonNull<Archetype>,
new_archetype: NonNull<Archetype>, new_archetype: NonNull<Archetype>,
pub(crate) relationship_hook_mode: RelationshipHookMode,
} }
impl<'w> BundleRemover<'w> { impl<'w> BundleRemover<'w> {
@ -97,6 +98,7 @@ impl<'w> BundleRemover<'w> {
old_archetype: old_archetype.into(), old_archetype: old_archetype.into(),
old_and_new_table: tables, old_and_new_table: tables,
world: world.as_unsafe_world_cell(), world: world.as_unsafe_world_cell(),
relationship_hook_mode: RelationshipHookMode::Run,
}; };
if is_new_created { if is_new_created {
remover remover
@ -160,7 +162,7 @@ impl<'w> BundleRemover<'w> {
entity, entity,
bundle_components_in_archetype(), bundle_components_in_archetype(),
caller, caller,
RelationshipHookMode::Run, self.relationship_hook_mode,
); );
if self.old_archetype.as_ref().has_remove_observer() { if self.old_archetype.as_ref().has_remove_observer() {
deferred_world.trigger_observers( deferred_world.trigger_observers(