repo
string | pull_number
int64 | instance_id
string | issue_numbers
sequence | base_commit
string | patch
string | test_patch
string | problem_statement
string | hints_text
string | created_at
string | version
string | updated_at
string | environment_setup_commit
string | FAIL_TO_PASS
sequence | PASS_TO_PASS
sequence | FAIL_TO_FAIL
sequence | PASS_TO_FAIL
sequence | source_dir
string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bevyengine/bevy
| 15,274
|
bevyengine__bevy-15274
|
[
"10669"
] |
1bb8007dceb03f41b20317bb44fcdfec1d70513c
|
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1,12 +1,14 @@
mod parallel_scope;
use core::panic::Location;
+use std::marker::PhantomData;
use super::{Deferred, IntoObserverSystem, IntoSystem, RegisterSystem, Resource};
use crate::{
self as bevy_ecs,
bundle::{Bundle, InsertMode},
- component::{ComponentId, ComponentInfo},
+ change_detection::Mut,
+ component::{Component, ComponentId, ComponentInfo},
entity::{Entities, Entity},
event::{Event, SendEvent},
observer::{Observer, TriggerEvent, TriggerTargets},
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -906,6 +908,38 @@ impl EntityCommands<'_> {
}
}
+ /// Get an [`EntityEntryCommands`] for the [`Component`] `T`,
+ /// allowing you to modify it or insert it if it isn't already present.
+ ///
+ /// See also [`insert_if_new`](Self::insert_if_new), which lets you insert a [`Bundle`] without overwriting it.
+ ///
+ /// # Example
+ ///
+ /// ```
+ /// # use bevy_ecs::prelude::*;
+ /// # #[derive(Resource)]
+ /// # struct PlayerEntity { entity: Entity }
+ /// #[derive(Component)]
+ /// struct Level(u32);
+ ///
+ /// fn level_up_system(mut commands: Commands, player: Res<PlayerEntity>) {
+ /// commands
+ /// .entity(player.entity)
+ /// .entry::<Level>()
+ /// // Modify the component if it exists
+ /// .and_modify(|mut lvl| lvl.0 += 1)
+ /// // Otherwise insert a default value
+ /// .or_insert(Level(0));
+ /// }
+ /// # bevy_ecs::system::assert_is_system(level_up_system);
+ /// ```
+ pub fn entry<T: Component>(&mut self) -> EntityEntryCommands<T> {
+ EntityEntryCommands {
+ entity_commands: self.reborrow(),
+ marker: PhantomData,
+ }
+ }
+
/// Adds a [`Bundle`] of components to the entity.
///
/// This will overwrite any previous value(s) of the same component type.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1010,6 +1044,9 @@ impl EntityCommands<'_> {
/// components will leave the old values instead of replacing them with new
/// ones.
///
+ /// See also [`entry`](Self::entry), which lets you modify a [`Component`] if it's present,
+ /// as well as initialize it with a default value.
+ ///
/// # Panics
///
/// The command will panic when applied if the associated entity does not exist.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1417,6 +1454,113 @@ impl EntityCommands<'_> {
}
}
+/// A wrapper around [`EntityCommands`] with convenience methods for working with a specified component type.
+pub struct EntityEntryCommands<'a, T> {
+ entity_commands: EntityCommands<'a>,
+ marker: PhantomData<T>,
+}
+
+impl<'a, T: Component> EntityEntryCommands<'a, T> {
+ /// Modify the component `T` if it exists, using the the function `modify`.
+ pub fn and_modify(mut self, modify: impl FnOnce(Mut<T>) + Send + Sync + 'static) -> Self {
+ self.entity_commands = self
+ .entity_commands
+ .queue(move |mut entity: EntityWorldMut| {
+ if let Some(value) = entity.get_mut() {
+ modify(value);
+ }
+ });
+ self
+ }
+
+ /// [Insert](EntityCommands::insert) `default` into this entity, if `T` is not already present.
+ ///
+ /// See also [`or_insert_with`](Self::or_insert_with).
+ ///
+ /// # Panics
+ ///
+ /// Panics if the entity does not exist.
+ /// See [`or_try_insert`](Self::or_try_insert) for a non-panicking version.
+ #[track_caller]
+ pub fn or_insert(mut self, default: T) -> Self {
+ self.entity_commands = self
+ .entity_commands
+ .queue(insert(default, InsertMode::Keep));
+ self
+ }
+
+ /// [Insert](EntityCommands::insert) `default` into this entity, if `T` is not already present.
+ ///
+ /// Unlike [`or_insert`](Self::or_insert), this will not panic if the entity does not exist.
+ ///
+ /// See also [`or_insert_with`](Self::or_insert_with).
+ #[track_caller]
+ pub fn or_try_insert(mut self, default: T) -> Self {
+ self.entity_commands = self
+ .entity_commands
+ .queue(try_insert(default, InsertMode::Keep));
+ self
+ }
+
+ /// [Insert](EntityCommands::insert) the value returned from `default` into this entity, if `T` is not already present.
+ ///
+ /// See also [`or_insert`](Self::or_insert) and [`or_try_insert`](Self::or_try_insert).
+ ///
+ /// # Panics
+ ///
+ /// Panics if the entity does not exist.
+ /// See [`or_try_insert_with`](Self::or_try_insert_with) for a non-panicking version.
+ #[track_caller]
+ pub fn or_insert_with(self, default: impl Fn() -> T) -> Self {
+ self.or_insert(default())
+ }
+
+ /// [Insert](EntityCommands::insert) the value returned from `default` into this entity, if `T` is not already present.
+ ///
+ /// Unlike [`or_insert_with`](Self::or_insert_with), this will not panic if the entity does not exist.
+ ///
+ /// See also [`or_insert`](Self::or_insert) and [`or_try_insert`](Self::or_try_insert).
+ #[track_caller]
+ pub fn or_try_insert_with(self, default: impl Fn() -> T) -> Self {
+ self.or_try_insert(default())
+ }
+
+ /// [Insert](EntityCommands::insert) `T::default` into this entity, if `T` is not already present.
+ ///
+ /// See also [`or_insert`](Self::or_insert) and [`or_from_world`](Self::or_from_world).
+ ///
+ /// # Panics
+ ///
+ /// Panics if the entity does not exist.
+ #[track_caller]
+ pub fn or_default(self) -> Self
+ where
+ T: Default,
+ {
+ #[allow(clippy::unwrap_or_default)]
+ // FIXME: use `expect` once stable
+ self.or_insert(T::default())
+ }
+
+ /// [Insert](EntityCommands::insert) `T::from_world` into this entity, if `T` is not already present.
+ ///
+ /// See also [`or_insert`](Self::or_insert) and [`or_default`](Self::or_default).
+ ///
+ /// # Panics
+ ///
+ /// Panics if the entity does not exist.
+ #[track_caller]
+ pub fn or_from_world(mut self) -> Self
+ where
+ T: FromWorld,
+ {
+ self.entity_commands = self
+ .entity_commands
+ .queue(insert_from_world::<T>(InsertMode::Keep));
+ self
+ }
+}
+
impl<F> Command for F
where
F: FnOnce(&mut World) + Send + 'static,
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1525,6 +1669,25 @@ fn insert<T: Bundle>(bundle: T, mode: InsertMode) -> impl EntityCommand {
}
}
+/// An [`EntityCommand`] that adds the component using its `FromWorld` implementation.
+#[track_caller]
+fn insert_from_world<T: Component + FromWorld>(mode: InsertMode) -> impl EntityCommand {
+ let caller = Location::caller();
+ move |entity: Entity, world: &mut World| {
+ let value = T::from_world(world);
+ if let Some(mut entity) = world.get_entity_mut(entity) {
+ entity.insert_with_caller(
+ value,
+ mode,
+ #[cfg(feature = "track_change_detection")]
+ caller,
+ );
+ } else {
+ panic!("error[B0003]: {caller}: Could not insert a bundle (of type `{}`) for entity {:?} because it doesn't exist in this World. See: https://bevyengine.org/learn/errors/b0003", std::any::type_name::<T>(), entity);
+ }
+ }
+}
+
/// An [`EntityCommand`] that attempts to add the components in a [`Bundle`] to an entity.
/// Does nothing if the entity does not exist.
#[track_caller]
|
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1660,7 +1823,7 @@ mod tests {
self as bevy_ecs,
component::Component,
system::{Commands, Resource},
- world::{CommandQueue, World},
+ world::{CommandQueue, FromWorld, World},
};
use std::{
any::TypeId,
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1697,6 +1860,50 @@ mod tests {
world.spawn((W(0u32), W(42u64)));
}
+ impl FromWorld for W<String> {
+ fn from_world(world: &mut World) -> Self {
+ let v = world.resource::<W<usize>>();
+ Self("*".repeat(v.0))
+ }
+ }
+
+ #[test]
+ fn entity_commands_entry() {
+ let mut world = World::default();
+ let mut queue = CommandQueue::default();
+ let mut commands = Commands::new(&mut queue, &world);
+ let entity = commands.spawn_empty().id();
+ commands
+ .entity(entity)
+ .entry::<W<u32>>()
+ .and_modify(|_| unreachable!());
+ queue.apply(&mut world);
+ assert!(!world.entity(entity).contains::<W<u32>>());
+ let mut commands = Commands::new(&mut queue, &world);
+ commands
+ .entity(entity)
+ .entry::<W<u32>>()
+ .or_insert(W(0))
+ .and_modify(|mut val| {
+ val.0 = 21;
+ });
+ queue.apply(&mut world);
+ assert_eq!(21, world.get::<W<u32>>(entity).unwrap().0);
+ let mut commands = Commands::new(&mut queue, &world);
+ commands
+ .entity(entity)
+ .entry::<W<u64>>()
+ .and_modify(|_| unreachable!())
+ .or_insert(W(42));
+ queue.apply(&mut world);
+ assert_eq!(42, world.get::<W<u64>>(entity).unwrap().0);
+ world.insert_resource(W(5_usize));
+ let mut commands = Commands::new(&mut queue, &world);
+ commands.entity(entity).entry::<W<String>>().or_from_world();
+ queue.apply(&mut world);
+ assert_eq!("*****", &world.get::<W<String>>(entity).unwrap().0);
+ }
+
#[test]
fn commands() {
let mut world = World::default();
|
Add an `Entry`-style API for working with component data on `Commands`
> > Could we also get those for commands?
>
>
>
> Since commands are asynchronous, this would be more difficult: you can't insert a component and get back the same component instance in the same tick (I think).
Should be possible when we introduce a EntityEntryCommands thing like EntityCommands which you can call `or_insert`, etc. on but when executing the command we do the entry thing, right?
_Originally posted by @DasLixou in https://github.com/bevyengine/bevy/issues/10650#issuecomment-1818923854_
|
2024-09-17T21:23:31Z
|
1.79
|
2024-09-19T15:36:07Z
|
612897becd415b7b982f58bd76deb719b42c9790
|
[
"bundle::tests::component_hook_order_recursive",
"bundle::tests::component_hook_order_replace",
"change_detection::tests::change_expiration",
"entity::map_entities::tests::entity_mapper",
"bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks",
"bundle::tests::component_hook_order_recursive_multiple",
"change_detection::tests::mut_untyped_from_mut",
"bundle::tests::component_hook_order_insert_remove",
"change_detection::tests::mut_untyped_to_reflect",
"change_detection::tests::mut_new",
"entity::map_entities::tests::world_scope_reserves_generations",
"change_detection::tests::mut_from_non_send_mut",
"change_detection::tests::mut_from_res_mut",
"bundle::tests::insert_if_new",
"change_detection::tests::as_deref_mut",
"entity::map_entities::tests::dyn_entity_mapper_object_safe",
"change_detection::tests::change_tick_wraparound",
"entity::map_entities::tests::entity_mapper_iteration",
"bundle::tests::component_hook_order_spawn_despawn",
"entity::tests::entity_bits_roundtrip",
"change_detection::tests::set_if_neq",
"entity::tests::entity_comparison",
"change_detection::tests::map_mut",
"entity::tests::entity_hash_id_bitflip_affects_high_7_bits",
"event::tests::test_event_cursor_len_filled",
"event::tests::test_event_cursor_iter_len_updated",
"entity::tests::reserve_entity_len",
"event::tests::test_event_cursor_len_current",
"entity::tests::entity_const",
"change_detection::tests::change_tick_scan",
"event::tests::test_event_cursor_len_update",
"entity::tests::reserve_generations",
"entity::tests::reserve_generations_and_alloc",
"event::tests::ensure_reader_readonly",
"entity::tests::entity_display",
"event::tests::test_event_cursor_clear",
"entity::tests::entity_niche_optimization",
"event::tests::test_event_cursor_len_empty",
"event::collections::tests::iter_current_update_events_iterates_over_current_events",
"entity::tests::get_reserved_and_invalid",
"entity::tests::entity_debug",
"entity::tests::entity_hash_keeps_similar_ids_together",
"identifier::masks::tests::extract_high_value",
"identifier::tests::from_bits",
"event::tests::test_event_cursor_read",
"event::tests::test_events",
"event::tests::test_events_drain_and_read",
"identifier::masks::tests::pack_into_u64",
"event::tests::test_event_reader_iter_last",
"identifier::masks::tests::incrementing_masked_nonzero_high_is_safe",
"identifier::masks::tests::extract_kind",
"identifier::masks::tests::get_u64_parts",
"event::tests::test_events_clear_and_read",
"event::tests::test_event_cursor_read_mut",
"event::tests::test_events_update_drain",
"event::tests::test_send_events_ids",
"identifier::masks::tests::pack_kind_bits",
"event::tests::test_events_empty",
"event::tests::test_events_send_default",
"event::tests::test_event_registry_can_add_and_remove_events_to_world",
"identifier::tests::id_construction",
"intern::tests::fieldless_enum",
"event::tests::test_events_extend_impl",
"intern::tests::same_interned_content",
"identifier::tests::id_comparison",
"intern::tests::static_sub_strings",
"intern::tests::different_interned_content",
"event::tests::test_event_mutator_iter_last",
"label::tests::dyn_hash_object_safe",
"label::tests::dyn_eq_object_safe",
"query::access::tests::read_all_access_conflicts",
"query::access::tests::access_get_conflicts",
"intern::tests::zero_sized_type",
"observer::tests::observer_propagating_world",
"observer::tests::observer_no_target",
"observer::tests::observer_multiple_events",
"intern::tests::same_interned_instance",
"observer::tests::observer_order_replace",
"observer::tests::observer_entity_routing",
"observer::tests::observer_dynamic_trigger",
"query::access::tests::test_access_clone_from",
"observer::tests::observer_order_insert_remove",
"observer::tests::observer_multiple_matches",
"observer::tests::observer_multiple_listeners",
"observer::tests::observer_propagating_halt",
"observer::tests::observer_order_spawn_despawn",
"query::access::tests::test_access_filters_clone",
"query::access::tests::test_access_clone",
"query::access::tests::filtered_access_extend",
"observer::tests::observer_order_recursive",
"query::access::tests::filtered_access_extend_or",
"query::access::tests::test_filtered_access_set_from",
"query::access::tests::test_filtered_access_clone_from",
"query::access::tests::test_filtered_access_set_clone",
"query::builder::tests::builder_with_without_dynamic",
"query::iter::tests::query_iter_cursor_state_non_empty_after_next",
"query::state::tests::can_transmute_changed",
"query::access::tests::filtered_combined_access",
"query::state::tests::cannot_join_wrong_filter - should panic",
"query::state::tests::can_generalize_with_option",
"query::access::tests::test_filtered_access_clone",
"query::iter::tests::empty_query_sort_after_next_does_not_panic",
"query::fetch::tests::world_query_phantom_data",
"query::state::tests::can_transmute_to_more_general",
"query::builder::tests::builder_or",
"query::state::tests::cannot_transmute_changed_without_access - should panic",
"query::access::tests::test_access_filters_clone_from",
"query::state::tests::can_transmute_mut_fetch",
"query::builder::tests::builder_static_dense_dynamic_sparse",
"query::builder::tests::builder_transmute",
"query::builder::tests::builder_dynamic_components",
"query::builder::tests::builder_static_components",
"query::state::tests::can_transmute_empty_tuple",
"query::iter::tests::query_sorts",
"query::state::tests::can_transmute_added",
"query::state::tests::cannot_get_data_not_in_original_query",
"query::fetch::tests::world_query_struct_variants",
"query::state::tests::can_transmute_immut_fetch",
"observer::tests::observer_propagating_redundant_dispatch_same_entity",
"query::state::tests::cannot_transmute_immut_to_mut - should panic",
"query::fetch::tests::world_query_metadata_collision",
"observer::tests::observer_propagating_world_skipping",
"observer::tests::observer_propagating_join",
"query::state::tests::can_transmute_entity_mut",
"query::state::tests::transmute_from_sparse_to_dense",
"query::tests::many_entities",
"query::tests::query_iter_combinations_sparse",
"reflect::entity_commands::tests::insert_reflected_with_registry",
"observer::tests::observer_propagating_no_next",
"observer::tests::observer_propagating",
"query::builder::tests::builder_with_without_static",
"query::tests::multi_storage_query",
"query::state::tests::transmute_from_dense_to_sparse",
"query::tests::any_query",
"query::tests::has_query",
"query::state::tests::get_many_unchecked_manual_uniqueness",
"query::state::tests::join",
"query::tests::query_iter_combinations",
"query::tests::mut_to_immut_query_methods_have_immut_item",
"query::tests::query_filtered_iter_combinations",
"observer::tests::observer_multiple_components",
"query::iter::tests::query_sort_after_next_dense - should panic",
"query::state::tests::cannot_transmute_entity_ref - should panic",
"reflect::entity_commands::tests::insert_reflect_bundle",
"query::tests::query",
"query::tests::derived_worldqueries",
"event::tests::test_event_reader_iter_nth",
"query::state::tests::cannot_join_wrong_fetch - should panic",
"query::fetch::tests::read_only_field_visibility",
"event::tests::test_event_mutator_iter_nth",
"query::state::tests::right_world_get - should panic",
"observer::tests::observer_propagating_redundant_dispatch_parent_child",
"query::state::tests::transmute_with_different_world - should panic",
"schedule::condition::tests::distributive_run_if_compiles",
"reflect::entity_commands::tests::remove_reflected_bundle_with_registry",
"query::iter::tests::query_sort_after_next - should panic",
"reflect::entity_commands::tests::insert_reflected",
"query::state::tests::join_with_get",
"event::tests::test_event_cursor_par_read",
"reflect::entity_commands::tests::remove_reflected_with_registry",
"observer::tests::observer_order_insert_remove_sparse",
"reflect::entity_commands::tests::remove_reflected_bundle",
"schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents",
"schedule::condition::tests::multiple_run_conditions",
"observer::tests::observer_despawn",
"observer::tests::observer_dynamic_component",
"query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic",
"query::state::tests::right_world_get_many - should panic",
"observer::tests::observer_propagating_parallel_propagation",
"schedule::schedule::tests::no_sync_edges::system_to_system_after",
"schedule::schedule::tests::add_systems_to_non_existing_schedule",
"schedule::condition::tests::multiple_run_conditions_is_and_operation",
"schedule::condition::tests::run_condition_combinators",
"query::state::tests::can_transmute_filtered_entity",
"schedule::stepping::tests::clear_breakpoint",
"schedule::stepping::tests::clear_schedule_then_set_behavior",
"schedule::set::tests::test_derive_system_set",
"schedule::schedule::tests::no_sync_edges::set_to_system_after",
"schedule::set::tests::test_derive_schedule_label",
"schedule::schedule::tests::no_sync_edges::set_to_set_before",
"schedule::schedule::tests::merges_sync_points_into_one",
"schedule::schedule::tests::inserts_a_sync_point",
"schedule::condition::tests::run_condition",
"schedule::set::tests::test_schedule_label",
"schedule::schedule::tests::configure_set_on_existing_schedule",
"reflect::entity_commands::tests::remove_reflected",
"query::tests::self_conflicting_worldquery - should panic",
"observer::tests::observer_despawn_archetype_flags",
"schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions",
"schedule::stepping::tests::continue_never_run",
"schedule::stepping::tests::schedules",
"schedule::schedule::tests::adds_multiple_consecutive_syncs",
"schedule::stepping::tests::continue_always_run",
"schedule::stepping::tests::stepping_disabled",
"schedule::tests::conditions::mixed_conditions_and_change_detection",
"schedule::tests::schedule_build_errors::configure_system_type_set - should panic",
"schedule::tests::schedule_build_errors::ambiguity",
"schedule::schedule::tests::disable_auto_sync_points",
"schedule::tests::schedule_build_errors::hierarchy_loop - should panic",
"schedule::tests::schedule_build_errors::hierarchy_redundancy",
"schedule::stepping::tests::unknown_schedule",
"schedule::tests::system_ambiguity::ambiguous_with_label",
"query::state::tests::right_world_get_many_mut - should panic",
"event::tests::test_event_cursor_par_read_mut",
"query::state::tests::cannot_transmute_option_to_immut - should panic",
"schedule::schedule::tests::no_sync_chain::chain_first",
"reflect::entity_commands::tests::insert_reflect_bundle_with_registry",
"schedule::executor::simple::skip_automatic_sync_points",
"schedule::stepping::tests::step_run_if_false",
"schedule::schedule::tests::no_sync_edges::set_to_set_after",
"schedule::schedule::tests::no_sync_chain::only_chain_outside",
"schedule::stepping::tests::step_breakpoint",
"schedule::tests::schedule_build_errors::hierarchy_cycle",
"schedule::tests::stepping::multi_threaded_executor",
"schedule::tests::system_ambiguity::anonymous_set_name",
"schedule::schedule::tests::configure_set_on_new_schedule",
"schedule::schedule::tests::no_sync_edges::set_to_system_before",
"schedule::schedule::tests::add_systems_to_existing_schedule",
"schedule::tests::stepping::single_threaded_executor",
"schedule::stepping::tests::verify_cursor",
"schedule::stepping::tests::disabled_breakpoint",
"schedule::tests::conditions::systems_with_distributive_condition",
"schedule::tests::stepping::simple_executor",
"schedule::stepping::tests::waiting_always_run",
"schedule::tests::conditions::run_exclusive_system_with_condition",
"schedule::stepping::tests::disabled_never_run",
"schedule::stepping::tests::waiting_never_run",
"schedule::stepping::tests::clear_schedule",
"schedule::stepping::tests::waiting_breakpoint",
"schedule::tests::conditions::system_set_conditions_and_change_detection",
"query::tests::par_iter_mut_change_detection",
"schedule::tests::conditions::multiple_conditions_on_system_sets",
"schedule::stepping::tests::disabled_always_run",
"schedule::stepping::tests::remove_schedule",
"schedule::stepping::tests::clear_system",
"schedule::stepping::tests::continue_step_continue_with_breakpoint",
"schedule::stepping::tests::step_always_run",
"schedule::tests::schedule_build_errors::dependency_loop - should panic",
"schedule::stepping::tests::step_never_run",
"schedule::tests::schedule_build_errors::sets_have_order_but_intersect",
"schedule::stepping::tests::multiple_calls_per_frame_continue",
"schedule::stepping::tests::continue_breakpoint",
"schedule::tests::schedule_build_errors::system_type_set_ambiguity",
"schedule::tests::conditions::system_with_condition",
"schedule::tests::schedule_build_errors::cross_dependency",
"schedule::tests::schedule_build_errors::dependency_cycle",
"schedule::stepping::tests::multiple_calls_per_frame_step",
"schedule::schedule::tests::no_sync_chain::chain_all",
"schedule::tests::system_ambiguity::before_and_after",
"schedule::schedule::tests::no_sync_chain::chain_second",
"schedule::tests::system_ambiguity::events",
"schedule::tests::system_ambiguity::ambiguous_with_system",
"schedule::stepping::tests::step_duplicate_systems",
"schedule::tests::system_ambiguity::one_of_everything",
"schedule::tests::system_ambiguity::read_component_and_entity_mut",
"schedule::tests::system_ambiguity::ignore_all_ambiguities",
"schedule::tests::system_ambiguity::read_world",
"schedule::stepping::tests::set_behavior_then_clear_schedule",
"schedule::tests::conditions::systems_nested_in_system_sets",
"schedule::schedule::tests::no_sync_edges::system_to_system_before",
"schedule::tests::system_ambiguity::exclusive",
"storage::blob_vec::tests::blob_vec",
"storage::sparse_set::tests::sparse_sets",
"schedule::tests::system_ambiguity::write_component_and_entity_ref",
"storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic",
"storage::blob_vec::tests::blob_vec_drop_empty_capacity",
"storage::blob_vec::tests::aligned_zst",
"system::builder::tests::custom_param_builder",
"schedule::tests::system_ambiguity::shared_resource_mut_component",
"storage::blob_vec::tests::blob_vec_capacity_overflow - should panic",
"storage::table::tests::table",
"schedule::tests::system_ambiguity::resources",
"storage::blob_vec::tests::resize_test",
"schedule::tests::system_ambiguity::resource_and_entity_mut",
"system::builder::tests::local_builder",
"storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic",
"schedule::tests::conditions::multiple_conditions_on_system",
"schedule::tests::system_ambiguity::resource_mut_and_entity_ref",
"schedule::tests::system_execution::run_system",
"schedule::tests::conditions::system_conditions_and_change_detection",
"schedule::tests::system_ambiguity::components",
"schedule::tests::system_ambiguity::nonsend",
"system::builder::tests::dyn_builder",
"system::commands::tests::commands",
"system::commands::tests::insert_components",
"system::commands::tests::test_commands_are_send_and_sync",
"schedule::tests::system_ordering::order_systems",
"system::commands::tests::append",
"system::commands::tests::remove_components",
"system::builder::tests::param_set_builder",
"system::builder::tests::multi_param_builder_inference",
"system::builder::tests::query_builder_state",
"system::commands::tests::remove_components_by_id",
"system::system_name::tests::test_exclusive_closure_system_name_regular_param",
"system::system::tests::command_processing",
"system::system_param::tests::system_param_phantom_data",
"system::system_param::tests::system_param_generic_bounds",
"system::system_param::tests::system_param_private_fields",
"system::builder::tests::multi_param_builder",
"system::system_param::tests::param_set_non_send_first",
"system::system_param::tests::non_sync_local",
"schedule::tests::system_ordering::order_exclusive_systems",
"schedule::tests::system_execution::run_exclusive_system",
"system::exclusive_function_system::tests::into_system_type_id_consistency",
"system::builder::tests::query_builder",
"schedule::tests::system_ordering::add_systems_correct_order",
"system::commands::tests::remove_resources",
"storage::sparse_set::tests::sparse_set",
"system::builder::tests::vec_builder",
"system::function_system::tests::into_system_type_id_consistency",
"system::builder::tests::param_set_vec_builder",
"system::observer_system::tests::test_piped_observer_systems_no_input",
"system::system_name::tests::test_system_name_regular_param",
"system::system_param::tests::system_param_const_generics",
"system::system_param::tests::system_param_flexibility",
"system::exclusive_system_param::tests::test_exclusive_system_params",
"system::system_name::tests::test_closure_system_name_regular_param",
"system::system::tests::run_system_once",
"system::system_param::tests::system_param_name_collision",
"system::system_param::tests::system_param_invariant_lifetime",
"system::system::tests::non_send_resources",
"system::system_param::tests::system_param_struct_variants",
"system::system::tests::run_two_systems",
"system::system_param::tests::param_set_non_send_second",
"system::observer_system::tests::test_piped_observer_systems_with_inputs",
"system::system_name::tests::test_system_name_exclusive_param",
"system::system_param::tests::system_param_field_limit",
"system::system_param::tests::system_param_where_clause",
"schedule::tests::system_ambiguity::correct_ambiguities",
"system::system_registry::tests::exclusive_system",
"system::system_registry::tests::change_detection",
"system::tests::any_of_with_ref_and_mut - should panic",
"system::tests::any_of_with_mut_and_ref - should panic",
"system::tests::any_of_has_filter_with_when_both_have_it",
"system::system_registry::tests::nested_systems",
"system::tests::any_of_with_mut_and_option - should panic",
"system::tests::conflicting_query_immut_system - should panic",
"system::tests::any_of_and_without",
"system::tests::can_have_16_parameters",
"system::tests::conflicting_query_mut_system - should panic",
"system::tests::changed_trackers_or_conflict - should panic",
"schedule::tests::system_ordering::add_systems_correct_order_nested",
"system::tests::any_of_with_entity_and_mut",
"system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic",
"system::tests::any_of_doesnt_remove_unrelated_filter_with",
"system::tests::commands_param_set",
"system::tests::any_of_has_no_filter_with - should panic",
"system::system_registry::tests::input_values",
"system::tests::any_of_with_and_without_common",
"system::tests::changed_resource_system",
"system::system_registry::tests::output_values",
"system::system_registry::tests::nested_systems_with_inputs",
"system::tests::any_of_with_conflicting - should panic",
"system::tests::assert_systems",
"system::tests::assert_system_does_not_conflict - should panic",
"system::tests::assert_world_and_entity_mut_system_does_conflict - should panic",
"system::tests::any_of_working",
"system::tests::any_of_with_empty_and_mut",
"system::tests::get_system_conflicts",
"system::tests::or_expanded_nested_with_and_disjoint_without - should panic",
"system::system_registry::tests::local_variables",
"system::tests::assert_entity_mut_system_does_conflict - should panic",
"system::tests::long_life_test",
"system::tests::conflicting_query_sets_system - should panic",
"system::tests::with_and_disjoint_or_empty_without - should panic",
"system::tests::non_send_system",
"system::tests::write_system_state",
"tests::added_queries",
"system::tests::simple_system",
"tests::add_remove_components",
"tests::clear_entities",
"tests::despawn_mixed_storage",
"system::tests::update_archetype_component_access_works",
"tests::added_tracking",
"tests::changed_trackers_sparse",
"tests::entity_ref_and_entity_ref_query_no_panic",
"tests::changed_query",
"system::tests::disjoint_query_mut_system",
"tests::despawn_table_storage",
"tests::changed_trackers",
"system::tests::query_is_empty",
"system::tests::read_system_state",
"system::tests::test_combinator_clone",
"system::tests::world_collections_system",
"tests::dynamic_required_components",
"tests::bundle_derive",
"tests::empty_spawn",
"tests::exact_size_query",
"tests::insert_overwrite_drop",
"tests::insert_overwrite_drop_sparse",
"system::tests::immutable_mut_test",
"tests::insert_or_spawn_batch_invalid",
"system::tests::convert_mut_to_immut",
"tests::filtered_query_access",
"tests::generic_required_components",
"system::tests::local_system",
"tests::insert_or_spawn_batch",
"system::tests::nonconflicting_system_resources",
"system::tests::disjoint_query_mut_read_component_system",
"system::tests::into_iter_impl",
"system::tests::or_with_without_and_compatible_with_without",
"system::tests::or_expanded_nested_with_and_common_nested_without",
"system::tests::removal_tracking",
"tests::duplicate_components_panic - should panic",
"tests::entity_mut_and_entity_mut_query_panic - should panic",
"system::tests::system_state_invalid_world - should panic",
"system::tests::query_validates_world_id - should panic",
"system::tests::or_has_filter_with_when_both_have_it",
"system::tests::conflicting_system_resources - should panic",
"system::tests::conflicting_system_resources_multiple_mutable - should panic",
"system::tests::option_has_no_filter_with - should panic",
"tests::non_send_resource_drop_from_same_thread",
"tests::entity_ref_and_mut_query_panic - should panic",
"tests::multiple_worlds_same_query_iter - should panic",
"system::tests::conflicting_system_resources_reverse_order - should panic",
"tests::multiple_worlds_same_query_for_each - should panic",
"tests::non_send_resource",
"tests::multiple_worlds_same_query_get - should panic",
"system::tests::system_state_archetype_update",
"tests::query_all",
"system::tests::system_state_change_detection",
"tests::mut_and_mut_query_panic - should panic",
"tests::par_for_each_sparse",
"system::tests::pipe_change_detection",
"tests::mut_and_ref_query_panic - should panic",
"system::tests::conflicting_query_with_query_set_system - should panic",
"tests::query_all_for_each",
"system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic",
"system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic",
"schedule::tests::system_execution::parallel_execution",
"system::tests::non_send_option_system",
"system::tests::or_expanded_nested_with_and_without_common",
"tests::entity_ref_and_entity_mut_query_panic - should panic",
"system::tests::or_doesnt_remove_unrelated_filter_with",
"tests::non_send_resource_points_to_distinct_data",
"tests::mut_and_entity_ref_query_panic - should panic",
"system::tests::panic_inside_system - should panic",
"system::tests::or_has_no_filter_with - should panic",
"system::tests::option_doesnt_remove_unrelated_filter_with",
"system::tests::or_expanded_with_and_disjoint_nested_without - should panic",
"schedule::tests::system_ambiguity::read_only",
"tests::non_send_resource_drop_from_different_thread - should panic",
"system::tests::or_expanded_with_and_without_common",
"tests::query_optional_component_sparse_no_match",
"tests::query_sparse_component",
"tests::query_optional_component_sparse",
"tests::remove",
"tests::query_get_works_across_sparse_removal",
"tests::ref_and_mut_query_panic - should panic",
"tests::remove_tracking",
"tests::required_components_insert_existing_hooks",
"tests::random_access",
"tests::reserve_and_spawn",
"tests::resource",
"tests::required_components_spawn_nonexistent_hooks",
"tests::required_components_spawn_then_insert_no_overwrite",
"tests::remove_missing",
"tests::query_missing_component",
"tests::stateful_query_handles_new_archetype",
"tests::query_single_component_for_each",
"tests::required_components_retain_keeps_required",
"tests::required_components",
"tests::required_components_take_leaves_required",
"tests::query_single_component",
"tests::query_get",
"tests::query_optional_component_table",
"tests::take",
"tests::test_is_archetypal_size_hints",
"world::entity_ref::tests::disjoint_access",
"world::command_queue::test::test_command_queue_inner_panic_safe",
"world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id",
"tests::reserve_entities_across_worlds",
"world::entity_ref::tests::despawning_entity_updates_archetype_row",
"world::command_queue::test::test_command_is_send",
"world::command_queue::test::test_command_queue_inner_drop",
"world::command_queue::test::test_command_queue_inner",
"world::entity_ref::tests::despawning_entity_updates_table_row",
"world::entity_ref::tests::entity_mut_except",
"world::command_queue::test::test_command_queue_inner_drop_early",
"world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic",
"tests::spawn_batch",
"world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic",
"world::entity_ref::tests::entity_mut_except_doesnt_conflict",
"tests::query_filters_dont_collide_with_fetches",
"world::entity_ref::tests::entity_mut_get_by_id",
"tests::query_filter_with_sparse_for_each",
"world::command_queue::test::test_command_queue_inner_nested_panic_safe",
"tests::query_filter_with",
"tests::query_filter_without",
"tests::query_filter_with_sparse",
"tests::query_filter_with_for_each",
"schedule::tests::system_ambiguity::ignore_component_resource_ambiguities",
"system::tests::or_param_set_system",
"system::tests::query_set_system",
"world::entity_ref::tests::filtered_entity_mut_normal",
"world::entity_ref::tests::entity_mut_world_scope_panic",
"world::entity_ref::tests::inserting_dense_updates_archetype_row",
"world::entity_ref::tests::inserting_sparse_updates_archetype_row",
"world::entity_ref::tests::get_components",
"world::entity_ref::tests::filtered_entity_ref_missing",
"world::entity_ref::tests::mut_compatible_with_entity",
"world::entity_ref::tests::entity_mut_insert_bundle_by_id",
"world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic",
"world::entity_ref::tests::filtered_entity_ref_normal",
"world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic",
"world::entity_ref::tests::entity_mut_insert_by_id",
"world::entity_ref::tests::filtered_entity_mut_missing",
"system::tests::or_has_filter_with",
"tests::sparse_set_add_remove_many",
"world::entity_ref::tests::inserting_dense_updates_table_row",
"world::entity_ref::tests::sorted_remove",
"world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic",
"world::entity_ref::tests::retain_some_components",
"world::entity_ref::tests::entity_mut_remove_by_id",
"world::entity_ref::tests::entity_ref_get_by_id",
"world::tests::custom_resource_with_layout",
"world::reflect::tests::get_component_as_mut_reflect",
"tests::resource_scope",
"world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic",
"world::entity_ref::tests::entity_ref_except",
"world::entity_ref::tests::removing_dense_updates_table_row",
"world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic",
"world::entity_ref::tests::ref_compatible_with_resource",
"world::entity_ref::tests::ref_compatible",
"world::entity_ref::tests::retain_nothing",
"world::entity_ref::tests::removing_sparse_updates_archetype_row",
"world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic",
"world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic",
"world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic",
"world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id",
"world::entity_ref::tests::entity_ref_except_doesnt_conflict",
"world::tests::spawn_empty_bundle",
"world::tests::init_resource_does_not_overwrite",
"world::tests::test_verify_unique_entities",
"world::tests::iterate_entities_mut",
"world::tests::panic_while_overwriting_component",
"world::tests::get_resource_by_id",
"world::tests::init_non_send_resource_does_not_overwrite",
"world::tests::get_resource_mut_by_id",
"world::tests::inspect_entity_components",
"world::tests::iter_resources_mut",
"world::identifier::tests::world_id_exclusive_system_param",
"world::identifier::tests::world_id_system_param",
"world::tests::iter_resources",
"world::reflect::tests::get_component_as_reflect",
"world::tests::iterate_entities",
"tests::par_for_each_dense",
"world::identifier::tests::world_ids_unique",
"tests::non_send_resource_panic - should panic",
"query::tests::query_filtered_exactsizeiterator_len",
"system::tests::get_many_is_ordered",
"tests::table_add_remove_many",
"crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1015) - compile",
"crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1237) - compile",
"crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1023) - compile",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile",
"crates/bevy_ecs/src/component.rs - component::Component (line 305) - compile fail",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail",
"crates/bevy_ecs/src/component.rs - component::Component (line 89)",
"crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)",
"crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)",
"crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)",
"crates/bevy_ecs/src/lib.rs - (line 166)",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)",
"crates/bevy_ecs/src/lib.rs - (line 213)",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)",
"crates/bevy_ecs/src/component.rs - component::Component (line 315)",
"crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 69)",
"crates/bevy_ecs/src/component.rs - component::Component (line 43)",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)",
"crates/bevy_ecs/src/lib.rs - (line 33)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)",
"crates/bevy_ecs/src/component.rs - component::Component (line 245)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)",
"crates/bevy_ecs/src/lib.rs - (line 286)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)",
"crates/bevy_ecs/src/lib.rs - (line 190)",
"crates/bevy_ecs/src/component.rs - component::StorageType (line 355)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)",
"crates/bevy_ecs/src/lib.rs - (line 77)",
"crates/bevy_ecs/src/component.rs - component::Component (line 280)",
"crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 38)",
"crates/bevy_ecs/src/lib.rs - (line 238)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - compile fail",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 214) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 236) - compile fail",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1513)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)",
"crates/bevy_ecs/src/query/par_iter.rs - query::par_iter::QueryParIter<'w,'s,D,F>::for_each_init (line 49)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 184) - compile fail",
"crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 412) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 379) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)",
"crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 36)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail",
"crates/bevy_ecs/src/label.rs - label::define_label (line 65)",
"crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)",
"crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 125)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 654)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 209)",
"crates/bevy_ecs/src/lib.rs - (line 125)",
"crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)",
"crates/bevy_ecs/src/lib.rs - (line 94)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 691)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)",
"crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 205)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)",
"crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)",
"crates/bevy_ecs/src/lib.rs - (line 54)",
"crates/bevy_ecs/src/component.rs - component::Component (line 107)",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)",
"crates/bevy_ecs/src/lib.rs - (line 44)",
"crates/bevy_ecs/src/lib.rs - (line 310)",
"crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 246)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)",
"crates/bevy_ecs/src/component.rs - component::Component (line 171)",
"crates/bevy_ecs/src/component.rs - component::Component (line 127)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 105)",
"crates/bevy_ecs/src/lib.rs - (line 335)",
"crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)",
"crates/bevy_ecs/src/component.rs - component::Component (line 197)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)",
"crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)",
"crates/bevy_ecs/src/lib.rs - (line 253)",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)",
"crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)",
"crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)",
"crates/bevy_ecs/src/component.rs - component::Component (line 149)",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)",
"crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)",
"crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)",
"crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)",
"crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)",
"crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 172)",
"crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)",
"crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1022) - compile",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 140)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 556)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)",
"crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 529) - compile fail",
"crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1757) - compile fail",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 540)",
"crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1733)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)",
"crates/bevy_ecs/src/system/mod.rs - system (line 13)",
"crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)",
"crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)",
"crates/bevy_ecs/src/system/mod.rs - system (line 56)",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)",
"crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)",
"crates/bevy_ecs/src/system/mod.rs - system::In (line 233)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1131)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1249)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 964)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)",
"crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1570)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 843)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 447)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 712)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 485)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 824)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1527)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1178)",
"crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 806)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)",
"crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 129) - compile",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 131)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1284)",
"crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 185)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 348)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 412)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 500)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 377)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 445)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 202)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1791)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 273)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 955)",
"crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1421)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1563)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1865)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 833)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1474)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 847)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1648)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1589)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 80)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1814)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 609)",
"crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 802)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1871)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1619)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1707)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1767)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1674)",
"crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1846)",
"crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 313)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2486)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 696)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 421)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1055)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 924)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 574)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 539)",
"crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2263)",
"crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1161)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 744)",
"crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1797)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 466)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2508)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2585)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1734)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 455)",
"crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1962)",
"crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1258)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)",
"crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2848)"
] |
[] |
[] |
[] |
auto_2025-06-08
|
|
bevyengine/bevy
| 15,234
|
bevyengine__bevy-15234
|
[
"15106"
] |
c2d54f5f0449858dc984f498444bf9afd017a786
|
diff --git a/benches/benches/bevy_ecs/world/commands.rs b/benches/benches/bevy_ecs/world/commands.rs
--- a/benches/benches/bevy_ecs/world/commands.rs
+++ b/benches/benches/bevy_ecs/world/commands.rs
@@ -146,9 +146,9 @@ pub fn fake_commands(criterion: &mut Criterion) {
let mut commands = Commands::new(&mut command_queue, &world);
for i in 0..command_count {
if black_box(i % 2 == 0) {
- commands.add(FakeCommandA);
+ commands.queue(FakeCommandA);
} else {
- commands.add(FakeCommandB(0));
+ commands.queue(FakeCommandB(0));
}
}
command_queue.apply(&mut world);
diff --git a/benches/benches/bevy_ecs/world/commands.rs b/benches/benches/bevy_ecs/world/commands.rs
--- a/benches/benches/bevy_ecs/world/commands.rs
+++ b/benches/benches/bevy_ecs/world/commands.rs
@@ -190,7 +190,7 @@ pub fn sized_commands_impl<T: Default + Command>(criterion: &mut Criterion) {
bencher.iter(|| {
let mut commands = Commands::new(&mut command_queue, &world);
for _ in 0..command_count {
- commands.add(T::default());
+ commands.queue(T::default());
}
command_queue.apply(&mut world);
});
diff --git a/crates/bevy_ecs/src/event/writer.rs b/crates/bevy_ecs/src/event/writer.rs
--- a/crates/bevy_ecs/src/event/writer.rs
+++ b/crates/bevy_ecs/src/event/writer.rs
@@ -51,7 +51,7 @@ use bevy_ecs::{
/// //
/// // NOTE: the event won't actually be sent until commands get applied during
/// // apply_deferred.
-/// commands.add(|w: &mut World| {
+/// commands.queue(|w: &mut World| {
/// w.send_event(MyEvent);
/// });
/// }
diff --git a/crates/bevy_ecs/src/observer/runner.rs b/crates/bevy_ecs/src/observer/runner.rs
--- a/crates/bevy_ecs/src/observer/runner.rs
+++ b/crates/bevy_ecs/src/observer/runner.rs
@@ -65,7 +65,7 @@ impl Component for ObserverState {
fn register_component_hooks(hooks: &mut ComponentHooks) {
hooks.on_add(|mut world, entity, _| {
- world.commands().add(move |world: &mut World| {
+ world.commands().queue(move |world: &mut World| {
world.register_observer(entity);
});
});
diff --git a/crates/bevy_ecs/src/observer/runner.rs b/crates/bevy_ecs/src/observer/runner.rs
--- a/crates/bevy_ecs/src/observer/runner.rs
+++ b/crates/bevy_ecs/src/observer/runner.rs
@@ -78,7 +78,7 @@ impl Component for ObserverState {
.as_mut()
.descriptor,
);
- world.commands().add(move |world: &mut World| {
+ world.commands().queue(move |world: &mut World| {
world.unregister_observer(entity, descriptor);
});
});
diff --git a/crates/bevy_ecs/src/observer/runner.rs b/crates/bevy_ecs/src/observer/runner.rs
--- a/crates/bevy_ecs/src/observer/runner.rs
+++ b/crates/bevy_ecs/src/observer/runner.rs
@@ -398,7 +398,7 @@ fn hook_on_add<E: Event, B: Bundle, S: ObserverSystem<E, B>>(
entity: Entity,
_: ComponentId,
) {
- world.commands().add(move |world: &mut World| {
+ world.commands().queue(move |world: &mut World| {
let event_type = world.init_component::<E>();
let mut components = Vec::new();
B::component_ids(&mut world.components, &mut world.storages, &mut |id| {
diff --git a/crates/bevy_ecs/src/reflect/entity_commands.rs b/crates/bevy_ecs/src/reflect/entity_commands.rs
--- a/crates/bevy_ecs/src/reflect/entity_commands.rs
+++ b/crates/bevy_ecs/src/reflect/entity_commands.rs
@@ -79,7 +79,7 @@ pub trait ReflectCommandExt {
///
/// // Or even with BundleA
/// prefab.data = boxed_reflect_bundle_a;
- ///
+ ///
/// // No matter which component or bundle is in the resource and without knowing the exact type, you can
/// // use the insert_reflect entity command to insert that component/bundle into an entity.
/// commands
diff --git a/crates/bevy_ecs/src/reflect/entity_commands.rs b/crates/bevy_ecs/src/reflect/entity_commands.rs
--- a/crates/bevy_ecs/src/reflect/entity_commands.rs
+++ b/crates/bevy_ecs/src/reflect/entity_commands.rs
@@ -174,7 +174,7 @@ pub trait ReflectCommandExt {
impl ReflectCommandExt for EntityCommands<'_> {
fn insert_reflect(&mut self, component: Box<dyn PartialReflect>) -> &mut Self {
- self.commands.add(InsertReflect {
+ self.commands.queue(InsertReflect {
entity: self.entity,
component,
});
diff --git a/crates/bevy_ecs/src/reflect/entity_commands.rs b/crates/bevy_ecs/src/reflect/entity_commands.rs
--- a/crates/bevy_ecs/src/reflect/entity_commands.rs
+++ b/crates/bevy_ecs/src/reflect/entity_commands.rs
@@ -185,7 +185,7 @@ impl ReflectCommandExt for EntityCommands<'_> {
&mut self,
component: Box<dyn PartialReflect>,
) -> &mut Self {
- self.commands.add(InsertReflectWithRegistry::<T> {
+ self.commands.queue(InsertReflectWithRegistry::<T> {
entity: self.entity,
_t: PhantomData,
component,
diff --git a/crates/bevy_ecs/src/reflect/entity_commands.rs b/crates/bevy_ecs/src/reflect/entity_commands.rs
--- a/crates/bevy_ecs/src/reflect/entity_commands.rs
+++ b/crates/bevy_ecs/src/reflect/entity_commands.rs
@@ -194,7 +194,7 @@ impl ReflectCommandExt for EntityCommands<'_> {
}
fn remove_reflect(&mut self, component_type_path: impl Into<Cow<'static, str>>) -> &mut Self {
- self.commands.add(RemoveReflect {
+ self.commands.queue(RemoveReflect {
entity: self.entity,
component_type_path: component_type_path.into(),
});
diff --git a/crates/bevy_ecs/src/reflect/entity_commands.rs b/crates/bevy_ecs/src/reflect/entity_commands.rs
--- a/crates/bevy_ecs/src/reflect/entity_commands.rs
+++ b/crates/bevy_ecs/src/reflect/entity_commands.rs
@@ -205,7 +205,7 @@ impl ReflectCommandExt for EntityCommands<'_> {
&mut self,
component_type_name: impl Into<Cow<'static, str>>,
) -> &mut Self {
- self.commands.add(RemoveReflectWithRegistry::<T> {
+ self.commands.queue(RemoveReflectWithRegistry::<T> {
entity: self.entity,
_t: PhantomData,
component_type_name: component_type_name.into(),
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -54,7 +54,7 @@ pub use parallel_scope::*;
///
/// Each built-in command is implemented as a separate method, e.g. [`Commands::spawn`].
/// In addition to the pre-defined command methods, you can add commands with any arbitrary
-/// behavior using [`Commands::add`], which accepts any type implementing [`Command`].
+/// behavior using [`Commands::queue`], which accepts any type implementing [`Command`].
///
/// Since closures and other functions implement this trait automatically, this allows one-shot,
/// anonymous custom commands.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -63,7 +63,7 @@ pub use parallel_scope::*;
/// # use bevy_ecs::prelude::*;
/// # fn foo(mut commands: Commands) {
/// // NOTE: type inference fails here, so annotations are required on the closure.
-/// commands.add(|w: &mut World| {
+/// commands.queue(|w: &mut World| {
/// // Mutate the world however you want...
/// # todo!();
/// });
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -303,7 +303,7 @@ impl<'w, 's> Commands<'w, 's> {
/// apps, and only when they have a scheme worked out to share an ID space (which doesn't happen
/// by default).
pub fn get_or_spawn(&mut self, entity: Entity) -> EntityCommands {
- self.add(move |world: &mut World| {
+ self.queue(move |world: &mut World| {
world.get_or_spawn(entity);
});
EntityCommands {
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -503,11 +503,43 @@ impl<'w, 's> Commands<'w, 's> {
I: IntoIterator + Send + Sync + 'static,
I::Item: Bundle,
{
- self.push(spawn_batch(bundles_iter));
+ self.queue(spawn_batch(bundles_iter));
}
- /// Push a [`Command`] onto the queue.
- pub fn push<C: Command>(&mut self, command: C) {
+ /// Pushes a generic [`Command`] to the command queue.
+ ///
+ /// `command` can be a built-in command, custom struct that implements [`Command`] or a closure
+ /// that takes [`&mut World`](World) as an argument.
+ /// # Example
+ ///
+ /// ```
+ /// # use bevy_ecs::{world::Command, prelude::*};
+ /// #[derive(Resource, Default)]
+ /// struct Counter(u64);
+ ///
+ /// struct AddToCounter(u64);
+ ///
+ /// impl Command for AddToCounter {
+ /// fn apply(self, world: &mut World) {
+ /// let mut counter = world.get_resource_or_insert_with(Counter::default);
+ /// counter.0 += self.0;
+ /// }
+ /// }
+ ///
+ /// fn add_three_to_counter_system(mut commands: Commands) {
+ /// commands.queue(AddToCounter(3));
+ /// }
+ /// fn add_twenty_five_to_counter_system(mut commands: Commands) {
+ /// commands.queue(|world: &mut World| {
+ /// let mut counter = world.get_resource_or_insert_with(Counter::default);
+ /// counter.0 += 25;
+ /// });
+ /// }
+
+ /// # bevy_ecs::system::assert_is_system(add_three_to_counter_system);
+ /// # bevy_ecs::system::assert_is_system(add_twenty_five_to_counter_system);
+ /// ```
+ pub fn queue<C: Command>(&mut self, command: C) {
match &mut self.queue {
InternalQueue::CommandQueue(queue) => {
queue.push(command);
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -549,7 +581,7 @@ impl<'w, 's> Commands<'w, 's> {
I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static,
B: Bundle,
{
- self.push(insert_or_spawn_batch(bundles_iter));
+ self.queue(insert_or_spawn_batch(bundles_iter));
}
/// Pushes a [`Command`] to the queue for inserting a [`Resource`] in the [`World`] with an inferred value.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -578,7 +610,7 @@ impl<'w, 's> Commands<'w, 's> {
/// ```
#[track_caller]
pub fn init_resource<R: Resource + FromWorld>(&mut self) {
- self.push(init_resource::<R>);
+ self.queue(init_resource::<R>);
}
/// Pushes a [`Command`] to the queue for inserting a [`Resource`] in the [`World`] with a specific value.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -608,7 +640,7 @@ impl<'w, 's> Commands<'w, 's> {
/// ```
#[track_caller]
pub fn insert_resource<R: Resource>(&mut self, resource: R) {
- self.push(insert_resource(resource));
+ self.queue(insert_resource(resource));
}
/// Pushes a [`Command`] to the queue for removing a [`Resource`] from the [`World`].
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -632,7 +664,7 @@ impl<'w, 's> Commands<'w, 's> {
/// # bevy_ecs::system::assert_is_system(system);
/// ```
pub fn remove_resource<R: Resource>(&mut self) {
- self.push(remove_resource::<R>);
+ self.queue(remove_resource::<R>);
}
/// Runs the system corresponding to the given [`SystemId`].
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -658,7 +690,7 @@ impl<'w, 's> Commands<'w, 's> {
/// execution of the system happens later. To get the output of a system, use
/// [`World::run_system`] or [`World::run_system_with_input`] instead of running the system as a command.
pub fn run_system_with_input<I: 'static + Send>(&mut self, id: SystemId<I>, input: I) {
- self.push(RunSystemWithInput::new_with_input(id, input));
+ self.queue(RunSystemWithInput::new_with_input(id, input));
}
/// Registers a system and returns a [`SystemId`] so it can later be called by [`World::run_system`].
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -720,53 +752,16 @@ impl<'w, 's> Commands<'w, 's> {
system: S,
) -> SystemId<I, O> {
let entity = self.spawn_empty().id();
- self.push(RegisterSystem::new(system, entity));
+ self.queue(RegisterSystem::new(system, entity));
SystemId::from_entity(entity)
}
- /// Pushes a generic [`Command`] to the command queue.
- ///
- /// `command` can be a built-in command, custom struct that implements [`Command`] or a closure
- /// that takes [`&mut World`](World) as an argument.
- /// # Example
- ///
- /// ```
- /// # use bevy_ecs::{world::Command, prelude::*};
- /// #[derive(Resource, Default)]
- /// struct Counter(u64);
- ///
- /// struct AddToCounter(u64);
- ///
- /// impl Command for AddToCounter {
- /// fn apply(self, world: &mut World) {
- /// let mut counter = world.get_resource_or_insert_with(Counter::default);
- /// counter.0 += self.0;
- /// }
- /// }
- ///
- /// fn add_three_to_counter_system(mut commands: Commands) {
- /// commands.add(AddToCounter(3));
- /// }
- /// fn add_twenty_five_to_counter_system(mut commands: Commands) {
- /// commands.add(|world: &mut World| {
- /// let mut counter = world.get_resource_or_insert_with(Counter::default);
- /// counter.0 += 25;
- /// });
- /// }
-
- /// # bevy_ecs::system::assert_is_system(add_three_to_counter_system);
- /// # bevy_ecs::system::assert_is_system(add_twenty_five_to_counter_system);
- /// ```
- pub fn add<C: Command>(&mut self, command: C) {
- self.push(command);
- }
-
/// Sends a "global" [`Trigger`] without any targets. This will run any [`Observer`] of the `event` that
/// isn't scoped to specific targets.
///
/// [`Trigger`]: crate::observer::Trigger
pub fn trigger(&mut self, event: impl Event) {
- self.add(TriggerEvent { event, targets: () });
+ self.queue(TriggerEvent { event, targets: () });
}
/// Sends a [`Trigger`] for the given targets. This will run any [`Observer`] of the `event` that
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -778,7 +773,7 @@ impl<'w, 's> Commands<'w, 's> {
event: impl Event,
targets: impl TriggerTargets + Send + Sync + 'static,
) {
- self.add(TriggerEvent { event, targets });
+ self.queue(TriggerEvent { event, targets });
}
/// Spawns an [`Observer`] and returns the [`EntityCommands`] associated with the entity that stores the observer.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -800,7 +795,7 @@ impl<'w, 's> Commands<'w, 's> {
///
/// [`EventWriter`]: crate::event::EventWriter
pub fn send_event<E: Event>(&mut self, event: E) -> &mut Self {
- self.add(SendEvent { event });
+ self.queue(SendEvent { event });
self
}
}
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -848,8 +843,8 @@ impl<'w, 's> Commands<'w, 's> {
/// # assert_schedule.run(&mut world);
///
/// fn setup(mut commands: Commands) {
-/// commands.spawn_empty().add(count_name);
-/// commands.spawn_empty().add(count_name);
+/// commands.spawn_empty().queue(count_name);
+/// commands.spawn_empty().queue(count_name);
/// }
///
/// fn assert_names(named: Query<&Name>) {
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -965,7 +960,7 @@ impl EntityCommands<'_> {
/// ```
#[track_caller]
pub fn insert(self, bundle: impl Bundle) -> Self {
- self.add(insert(bundle, InsertMode::Replace))
+ self.queue(insert(bundle, InsertMode::Replace))
}
/// Similar to [`Self::insert`] but will only insert if the predicate returns true.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1003,7 +998,7 @@ impl EntityCommands<'_> {
F: FnOnce() -> bool,
{
if condition() {
- self.add(insert(bundle, InsertMode::Replace))
+ self.queue(insert(bundle, InsertMode::Replace))
} else {
self
}
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1021,7 +1016,7 @@ impl EntityCommands<'_> {
///
/// To avoid a panic in this case, use the command [`Self::try_insert_if_new`] instead.
pub fn insert_if_new(self, bundle: impl Bundle) -> Self {
- self.add(insert(bundle, InsertMode::Keep))
+ self.queue(insert(bundle, InsertMode::Keep))
}
/// Adds a [`Bundle`] of components to the entity without overwriting if the
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1071,7 +1066,7 @@ impl EntityCommands<'_> {
) -> Self {
let caller = Location::caller();
// SAFETY: same invariants as parent call
- self.add(unsafe {insert_by_id(component_id, value, move |entity| {
+ self.queue(unsafe {insert_by_id(component_id, value, move |entity| {
panic!("error[B0003]: {caller}: Could not insert a component {component_id:?} (with type {}) for entity {entity:?} because it doesn't exist in this World. See: https://bevyengine.org/learn/errors/b0003", std::any::type_name::<T>());
})})
}
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1090,7 +1085,7 @@ impl EntityCommands<'_> {
value: T,
) -> Self {
// SAFETY: same invariants as parent call
- self.add(unsafe { insert_by_id(component_id, value, |_| {}) })
+ self.queue(unsafe { insert_by_id(component_id, value, |_| {}) })
}
/// Tries to add a [`Bundle`] of components to the entity.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1143,7 +1138,7 @@ impl EntityCommands<'_> {
/// ```
#[track_caller]
pub fn try_insert(self, bundle: impl Bundle) -> Self {
- self.add(try_insert(bundle, InsertMode::Replace))
+ self.queue(try_insert(bundle, InsertMode::Replace))
}
/// Similar to [`Self::try_insert`] but will only try to insert if the predicate returns true.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1178,7 +1173,7 @@ impl EntityCommands<'_> {
F: FnOnce() -> bool,
{
if condition() {
- self.add(try_insert(bundle, InsertMode::Replace))
+ self.queue(try_insert(bundle, InsertMode::Replace))
} else {
self
}
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1240,7 +1235,7 @@ impl EntityCommands<'_> {
///
/// Unlike [`Self::insert_if_new`], this will not panic if the associated entity does not exist.
pub fn try_insert_if_new(self, bundle: impl Bundle) -> Self {
- self.add(try_insert(bundle, InsertMode::Keep))
+ self.queue(try_insert(bundle, InsertMode::Keep))
}
/// Removes a [`Bundle`] of components from the entity.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1282,17 +1277,17 @@ impl EntityCommands<'_> {
where
T: Bundle,
{
- self.add(remove::<T>)
+ self.queue(remove::<T>)
}
/// Removes a component from the entity.
pub fn remove_by_id(self, component_id: ComponentId) -> Self {
- self.add(remove_by_id(component_id))
+ self.queue(remove_by_id(component_id))
}
/// Removes all components associated with the entity.
pub fn clear(self) -> Self {
- self.add(clear())
+ self.queue(clear())
}
/// Despawns the entity.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1324,7 +1319,7 @@ impl EntityCommands<'_> {
/// ```
#[track_caller]
pub fn despawn(self) -> Self {
- self.add(despawn())
+ self.queue(despawn())
}
/// Pushes an [`EntityCommand`] to the queue, which will get executed for the current [`Entity`].
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1337,15 +1332,15 @@ impl EntityCommands<'_> {
/// commands
/// .spawn_empty()
/// // Closures with this signature implement `EntityCommand`.
- /// .add(|entity: EntityWorldMut| {
+ /// .queue(|entity: EntityWorldMut| {
/// println!("Executed an EntityCommand for {:?}", entity.id());
/// });
/// # }
/// # bevy_ecs::system::assert_is_system(my_system);
/// ```
#[allow(clippy::should_implement_trait)]
- pub fn add<M: 'static>(mut self, command: impl EntityCommand<M>) -> Self {
- self.commands.add(command.with_entity(self.entity));
+ pub fn queue<M: 'static>(mut self, command: impl EntityCommand<M>) -> Self {
+ self.commands.queue(command.with_entity(self.entity));
self
}
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1390,7 +1385,7 @@ impl EntityCommands<'_> {
where
T: Bundle,
{
- self.add(retain::<T>)
+ self.queue(retain::<T>)
}
/// Logs the components of the entity at the info level.
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1399,7 +1394,7 @@ impl EntityCommands<'_> {
///
/// The command will panic when applied if the associated entity does not exist.
pub fn log_components(self) -> Self {
- self.add(log_components)
+ self.queue(log_components)
}
/// Returns the underlying [`Commands`].
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1418,7 +1413,7 @@ impl EntityCommands<'_> {
/// Creates an [`Observer`] listening for a trigger of type `T` that targets this entity.
pub fn observe<E: Event, B: Bundle, M>(self, system: impl IntoObserverSystem<E, B, M>) -> Self {
- self.add(observe(system))
+ self.queue(observe(system))
}
}
diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs
--- a/crates/bevy_ecs/src/world/mod.rs
+++ b/crates/bevy_ecs/src/world/mod.rs
@@ -61,7 +61,7 @@ use unsafe_world_cell::{UnsafeEntityCell, UnsafeWorldCell};
/// A [`World`] mutation.
///
-/// Should be used with [`Commands::add`].
+/// Should be used with [`Commands::queue`].
///
/// # Usage
///
diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs
--- a/crates/bevy_ecs/src/world/mod.rs
+++ b/crates/bevy_ecs/src/world/mod.rs
@@ -83,7 +83,7 @@ use unsafe_world_cell::{UnsafeEntityCell, UnsafeWorldCell};
/// }
///
/// fn some_system(mut commands: Commands) {
-/// commands.add(AddToCounter(42));
+/// commands.queue(AddToCounter(42));
/// }
/// ```
pub trait Command: Send + 'static {
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -304,8 +304,8 @@ pub trait ChildBuild {
/// Returns the parent entity.
fn parent_entity(&self) -> Entity;
- /// Adds a command to be executed, like [`Commands::add`].
- fn add_command<C: Command>(&mut self, command: C) -> &mut Self;
+ /// Adds a command to be executed, like [`Commands::queue`].
+ fn enqueue_command<C: Command>(&mut self, command: C) -> &mut Self;
}
impl ChildBuild for ChildBuilder<'_> {
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -327,8 +327,8 @@ impl ChildBuild for ChildBuilder<'_> {
self.add_children.parent
}
- fn add_command<C: Command>(&mut self, command: C) -> &mut Self {
- self.commands.add(command);
+ fn enqueue_command<C: Command>(&mut self, command: C) -> &mut Self {
+ self.commands.queue(command);
self
}
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -439,14 +439,14 @@ impl BuildChildren for EntityCommands<'_> {
if children.children.contains(&parent) {
panic!("Entity cannot be a child of itself.");
}
- self.commands().add(children);
+ self.commands().queue(children);
self
}
fn with_child<B: Bundle>(&mut self, bundle: B) -> &mut Self {
let parent = self.id();
let child = self.commands().spawn(bundle).id();
- self.commands().add(AddChild { parent, child });
+ self.commands().queue(AddChild { parent, child });
self
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -455,7 +455,7 @@ impl BuildChildren for EntityCommands<'_> {
if children.contains(&parent) {
panic!("Cannot push entity as a child of itself.");
}
- self.commands().add(AddChildren {
+ self.commands().queue(AddChildren {
children: SmallVec::from(children),
parent,
});
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -467,7 +467,7 @@ impl BuildChildren for EntityCommands<'_> {
if children.contains(&parent) {
panic!("Cannot insert entity as a child of itself.");
}
- self.commands().add(InsertChildren {
+ self.commands().queue(InsertChildren {
children: SmallVec::from(children),
index,
parent,
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -477,7 +477,7 @@ impl BuildChildren for EntityCommands<'_> {
fn remove_children(&mut self, children: &[Entity]) -> &mut Self {
let parent = self.id();
- self.commands().add(RemoveChildren {
+ self.commands().queue(RemoveChildren {
children: SmallVec::from(children),
parent,
});
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -489,13 +489,13 @@ impl BuildChildren for EntityCommands<'_> {
if child == parent {
panic!("Cannot add entity as a child of itself.");
}
- self.commands().add(AddChild { child, parent });
+ self.commands().queue(AddChild { child, parent });
self
}
fn clear_children(&mut self) -> &mut Self {
let parent = self.id();
- self.commands().add(ClearChildren { parent });
+ self.commands().queue(ClearChildren { parent });
self
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -504,7 +504,7 @@ impl BuildChildren for EntityCommands<'_> {
if children.contains(&parent) {
panic!("Cannot replace entity as a child of itself.");
}
- self.commands().add(ReplaceChildren {
+ self.commands().queue(ReplaceChildren {
children: SmallVec::from(children),
parent,
});
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -516,13 +516,13 @@ impl BuildChildren for EntityCommands<'_> {
if child == parent {
panic!("Cannot set parent to itself");
}
- self.commands().add(AddChild { child, parent });
+ self.commands().queue(AddChild { child, parent });
self
}
fn remove_parent(&mut self) -> &mut Self {
let child = self.id();
- self.commands().add(RemoveParent { child });
+ self.commands().queue(RemoveParent { child });
self
}
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -567,7 +567,7 @@ impl ChildBuild for WorldChildBuilder<'_> {
self.parent
}
- fn add_command<C: Command>(&mut self, command: C) -> &mut Self {
+ fn enqueue_command<C: Command>(&mut self, command: C) -> &mut Self {
command.apply(self.world);
self
}
diff --git a/crates/bevy_hierarchy/src/hierarchy.rs b/crates/bevy_hierarchy/src/hierarchy.rs
--- a/crates/bevy_hierarchy/src/hierarchy.rs
+++ b/crates/bevy_hierarchy/src/hierarchy.rs
@@ -94,12 +94,12 @@ impl DespawnRecursiveExt for EntityCommands<'_> {
/// This will emit warnings for any entity that does not exist.
fn despawn_recursive(mut self) {
let entity = self.id();
- self.commands().add(DespawnRecursive { entity });
+ self.commands().queue(DespawnRecursive { entity });
}
fn despawn_descendants(&mut self) -> &mut Self {
let entity = self.id();
- self.commands().add(DespawnChildrenRecursive { entity });
+ self.commands().queue(DespawnChildrenRecursive { entity });
self
}
}
diff --git a/crates/bevy_pbr/src/light/mod.rs b/crates/bevy_pbr/src/light/mod.rs
--- a/crates/bevy_pbr/src/light/mod.rs
+++ b/crates/bevy_pbr/src/light/mod.rs
@@ -820,7 +820,7 @@ pub fn check_dir_light_mesh_visibility(
// Defer marking view visibility so this system can run in parallel with check_point_light_mesh_visibility
// TODO: use resource to avoid unnecessary memory alloc
let mut defer_queue = std::mem::take(defer_visible_entities_queue.deref_mut());
- commands.add(move |world: &mut World| {
+ commands.queue(move |world: &mut World| {
let mut query = world.query::<&mut ViewVisibility>();
for entities in defer_queue.iter_mut() {
let mut iter = query.iter_many_mut(world, entities.iter());
diff --git a/crates/bevy_state/src/commands.rs b/crates/bevy_state/src/commands.rs
--- a/crates/bevy_state/src/commands.rs
+++ b/crates/bevy_state/src/commands.rs
@@ -17,7 +17,7 @@ pub trait CommandsStatesExt {
impl CommandsStatesExt for Commands<'_, '_> {
fn set_state<S: FreelyMutableState>(&mut self, state: S) {
- self.add(move |w: &mut World| {
+ self.queue(move |w: &mut World| {
let mut next = w.resource_mut::<NextState<S>>();
if let NextState::Pending(prev) = &*next {
if *prev != state {
diff --git a/crates/bevy_state/src/state_scoped_events.rs b/crates/bevy_state/src/state_scoped_events.rs
--- a/crates/bevy_state/src/state_scoped_events.rs
+++ b/crates/bevy_state/src/state_scoped_events.rs
@@ -61,7 +61,7 @@ fn cleanup_state_scoped_event<S: FreelyMutableState>(
return;
};
- c.add(move |w: &mut World| {
+ c.queue(move |w: &mut World| {
w.resource_scope::<StateScopedEvents<S>, ()>(|w, events| {
events.cleanup(w, exited);
});
diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs
--- a/crates/bevy_transform/src/commands.rs
+++ b/crates/bevy_transform/src/commands.rs
@@ -91,13 +91,13 @@ pub trait BuildChildrenTransformExt {
impl BuildChildrenTransformExt for EntityCommands<'_> {
fn set_parent_in_place(&mut self, parent: Entity) -> &mut Self {
let child = self.id();
- self.commands().add(AddChildInPlace { child, parent });
+ self.commands().queue(AddChildInPlace { child, parent });
self
}
fn remove_parent_in_place(&mut self) -> &mut Self {
let child = self.id();
- self.commands().add(RemoveParentInPlace { child });
+ self.commands().queue(RemoveParentInPlace { child });
self
}
}
|
diff --git a/crates/bevy_ecs/src/observer/mod.rs b/crates/bevy_ecs/src/observer/mod.rs
--- a/crates/bevy_ecs/src/observer/mod.rs
+++ b/crates/bevy_ecs/src/observer/mod.rs
@@ -830,7 +830,7 @@ mod tests {
..Default::default()
});
- world.commands().add(
+ world.commands().queue(
// SAFETY: we registered `event_a` above and it matches the type of TriggerA
unsafe { EmitDynamicTrigger::new_with_id(event_a, EventA, ()) },
);
diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.rs
--- a/crates/bevy_ecs/src/system/commands/mod.rs
+++ b/crates/bevy_ecs/src/system/commands/mod.rs
@@ -1736,12 +1731,12 @@ mod tests {
let mut commands = Commands::new(&mut command_queue, &world);
// set up a simple command using a closure that adds one additional entity
- commands.add(|world: &mut World| {
+ commands.queue(|world: &mut World| {
world.spawn((W(42u32), W(0u64)));
});
// set up a simple command using a function that adds one additional entity
- commands.add(simple_command);
+ commands.queue(simple_command);
}
command_queue.apply(&mut world);
let results3 = world
diff --git a/crates/bevy_ecs/src/world/command_queue.rs b/crates/bevy_ecs/src/world/command_queue.rs
--- a/crates/bevy_ecs/src/world/command_queue.rs
+++ b/crates/bevy_ecs/src/world/command_queue.rs
@@ -479,20 +479,20 @@ mod test {
fn add_index(index: usize) -> impl Command {
move |world: &mut World| world.resource_mut::<Order>().0.push(index)
}
- world.commands().add(add_index(1));
- world.commands().add(|world: &mut World| {
- world.commands().add(add_index(2));
- world.commands().add(PanicCommand("I panic!".to_owned()));
- world.commands().add(add_index(3));
+ world.commands().queue(add_index(1));
+ world.commands().queue(|world: &mut World| {
+ world.commands().queue(add_index(2));
+ world.commands().queue(PanicCommand("I panic!".to_owned()));
+ world.commands().queue(add_index(3));
world.flush_commands();
});
- world.commands().add(add_index(4));
+ world.commands().queue(add_index(4));
let _ = panic::catch_unwind(AssertUnwindSafe(|| {
world.flush_commands();
}));
- world.commands().add(add_index(5));
+ world.commands().queue(add_index(5));
world.flush_commands();
assert_eq!(&world.resource::<Order>().0, &[1, 2, 3, 4, 5]);
}
|
Rename `EntityCommands::add` to `EntityCommands::queue`
## What problem does this solve or what need does it fill?
The difference between these two is very hard to grasp from a naming point of view:
```rust
commands
.entity(entity)
.insert(Foo)
```
```rust
commands
.entity(entity)
.add(Foo)
```
## What solution would you like?
Rename `add` to `queue`. That also reflects that the changes happen *later*, not *now*.
## What alternative(s) have you considered?
Just leave it
## Additional context
@alice-i-cecile likes this as well :P
|
Nit: I feel like `enqueue` would be more appropriate, since the method is putting something into a queue, it is not/does not return the queue itself.
imo `enqueue` is fairly obscure for nonnative English speakers, so I'd avoid it.
I've certainly read that word before, but I'm fairly sure I've never heard it in real life here in Switzerland. "To queue something" is the verb we use here.
But that's not a strong opinion, I'm sure users will manage either way :)
This is funny because I'm also a non-native english speaker and I've never heard "queue" used as a verb. I guess it depends on where you live and how you learned english.
Hehe, very good argument. I suppose this is regional then. I'll defer to what native speakers recommend in that case :D
"queue something up" is reasonably common in my dialect of Canadian English, and I think I'd prefer the shorter name to break ties :)
We also have `Commands::push` which is exactly the same as `Commands::add` (which just calls `push`). Maybe just remove it?
@Shatur huh, that's weird, you're right. Note that said duplication is *not* present on `EntityCommands`.
This will also require renaming a few other methods on other types / traits. For example, `ChildBuild::add_command` -> `ChildBuild::queue_command`.
|
2024-09-15T18:22:33Z
|
1.79
|
2024-11-10T08:01:28Z
|
612897becd415b7b982f58bd76deb719b42c9790
|
[
"change_detection::tests::change_tick_scan",
"change_detection::tests::change_tick_wraparound",
"bundle::tests::component_hook_order_spawn_despawn",
"bundle::tests::insert_if_new",
"bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks",
"change_detection::tests::mut_from_res_mut",
"entity::tests::entity_debug",
"entity::tests::entity_display",
"entity::map_entities::tests::entity_mapper",
"bundle::tests::component_hook_order_recursive",
"entity::tests::entity_hash_id_bitflip_affects_high_7_bits",
"bundle::tests::component_hook_order_recursive_multiple",
"change_detection::tests::set_if_neq",
"bundle::tests::component_hook_order_replace",
"change_detection::tests::mut_untyped_to_reflect",
"entity::tests::entity_comparison",
"entity::map_entities::tests::world_scope_reserves_generations",
"entity::map_entities::tests::entity_mapper_iteration",
"change_detection::tests::mut_untyped_from_mut",
"change_detection::tests::mut_new",
"change_detection::tests::as_deref_mut",
"entity::map_entities::tests::dyn_entity_mapper_object_safe",
"entity::tests::entity_bits_roundtrip",
"change_detection::tests::map_mut",
"bundle::tests::component_hook_order_insert_remove",
"change_detection::tests::mut_from_non_send_mut",
"entity::tests::entity_const",
"entity::tests::entity_hash_keeps_similar_ids_together",
"change_detection::tests::change_expiration",
"entity::tests::entity_niche_optimization",
"event::tests::test_event_cursor_read",
"event::tests::test_event_cursor_iter_len_updated",
"event::tests::test_events",
"event::tests::test_event_cursor_len_current",
"event::tests::test_event_cursor_len_filled",
"event::tests::test_event_cursor_len_empty",
"entity::tests::reserve_generations",
"event::tests::test_event_cursor_clear",
"entity::tests::reserve_entity_len",
"entity::tests::get_reserved_and_invalid",
"event::tests::test_event_cursor_read_mut",
"event::tests::test_events_drain_and_read",
"entity::tests::reserve_generations_and_alloc",
"event::tests::test_events_clear_and_read",
"event::tests::test_event_cursor_len_update",
"event::collections::tests::iter_current_update_events_iterates_over_current_events",
"event::tests::test_events_empty",
"identifier::tests::id_construction",
"identifier::tests::id_comparison",
"identifier::masks::tests::incrementing_masked_nonzero_high_is_safe",
"event::tests::ensure_reader_readonly",
"event::tests::test_event_mutator_iter_last",
"event::tests::test_send_events_ids",
"event::tests::test_events_extend_impl",
"event::tests::test_events_send_default",
"identifier::masks::tests::extract_high_value",
"identifier::masks::tests::get_u64_parts",
"event::tests::test_events_update_drain",
"event::tests::test_event_registry_can_add_and_remove_events_to_world",
"identifier::masks::tests::pack_kind_bits",
"intern::tests::different_interned_content",
"identifier::tests::from_bits",
"identifier::masks::tests::extract_kind",
"event::tests::test_event_reader_iter_last",
"identifier::masks::tests::pack_into_u64",
"label::tests::dyn_hash_object_safe",
"intern::tests::fieldless_enum",
"observer::tests::observer_multiple_components",
"label::tests::dyn_eq_object_safe",
"intern::tests::same_interned_instance",
"observer::tests::observer_entity_routing",
"intern::tests::same_interned_content",
"intern::tests::zero_sized_type",
"intern::tests::static_sub_strings",
"observer::tests::observer_despawn",
"observer::tests::observer_multiple_events",
"observer::tests::observer_despawn_archetype_flags",
"observer::tests::observer_order_replace",
"observer::tests::observer_order_spawn_despawn",
"observer::tests::observer_dynamic_component",
"observer::tests::observer_order_insert_remove_sparse",
"observer::tests::observer_propagating_halt",
"observer::tests::observer_propagating_join",
"observer::tests::observer_propagating_parallel_propagation",
"observer::tests::observer_propagating_redundant_dispatch_same_entity",
"observer::tests::observer_order_insert_remove",
"observer::tests::observer_propagating_redundant_dispatch_parent_child",
"observer::tests::observer_propagating_world",
"query::access::tests::test_filtered_access_clone_from",
"query::access::tests::test_access_filters_clone",
"query::access::tests::test_access_clone_from",
"observer::tests::observer_propagating",
"query::access::tests::filtered_access_extend",
"query::access::tests::test_access_clone",
"query::access::tests::filtered_combined_access",
"query::access::tests::filtered_access_extend_or",
"query::access::tests::access_get_conflicts",
"observer::tests::observer_propagating_world_skipping",
"query::access::tests::read_all_access_conflicts",
"query::access::tests::test_filtered_access_clone",
"observer::tests::observer_dynamic_trigger",
"observer::tests::observer_order_recursive",
"query::access::tests::test_access_filters_clone_from",
"observer::tests::observer_multiple_listeners",
"query::fetch::tests::world_query_phantom_data",
"observer::tests::observer_multiple_matches",
"query::state::tests::can_generalize_with_option",
"query::access::tests::test_filtered_access_set_from",
"observer::tests::observer_no_target",
"query::builder::tests::builder_static_dense_dynamic_sparse",
"query::fetch::tests::world_query_metadata_collision",
"query::builder::tests::builder_with_without_dynamic",
"query::builder::tests::builder_dynamic_components",
"query::builder::tests::builder_or",
"query::access::tests::test_filtered_access_set_clone",
"query::iter::tests::query_sort_after_next_dense - should panic",
"query::iter::tests::query_sorts",
"query::iter::tests::empty_query_sort_after_next_does_not_panic",
"query::fetch::tests::world_query_struct_variants",
"query::builder::tests::builder_static_components",
"query::iter::tests::query_iter_cursor_state_non_empty_after_next",
"query::builder::tests::builder_transmute",
"observer::tests::observer_propagating_no_next",
"query::state::tests::can_transmute_empty_tuple",
"query::iter::tests::query_sort_after_next - should panic",
"query::state::tests::can_transmute_immut_fetch",
"query::state::tests::can_transmute_to_more_general",
"query::state::tests::cannot_join_wrong_fetch - should panic",
"query::state::tests::cannot_get_data_not_in_original_query",
"query::state::tests::cannot_transmute_changed_without_access - should panic",
"query::state::tests::cannot_transmute_immut_to_mut - should panic",
"query::state::tests::cannot_transmute_option_to_immut - should panic",
"query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic",
"query::state::tests::get_many_unchecked_manual_uniqueness",
"query::state::tests::can_transmute_changed",
"query::state::tests::join",
"query::state::tests::can_transmute_filtered_entity",
"query::state::tests::can_transmute_added",
"query::state::tests::can_transmute_entity_mut",
"query::tests::any_query",
"query::state::tests::right_world_get - should panic",
"query::tests::self_conflicting_worldquery - should panic",
"query::state::tests::right_world_get_many_mut - should panic",
"query::state::tests::join_with_get",
"query::state::tests::right_world_get_many - should panic",
"query::tests::many_entities",
"reflect::entity_commands::tests::remove_reflected_with_registry",
"schedule::executor::simple::skip_automatic_sync_points",
"query::tests::multi_storage_query",
"query::tests::derived_worldqueries",
"query::tests::mut_to_immut_query_methods_have_immut_item",
"query::tests::has_query",
"query::state::tests::can_transmute_mut_fetch",
"query::state::tests::transmute_from_dense_to_sparse",
"query::builder::tests::builder_with_without_static",
"event::tests::test_event_cursor_par_read",
"schedule::condition::tests::multiple_run_conditions_is_and_operation",
"schedule::schedule::tests::no_sync_edges::set_to_system_after",
"query::tests::query_iter_combinations_sparse",
"schedule::condition::tests::run_condition",
"reflect::entity_commands::tests::remove_reflected_bundle",
"schedule::schedule::tests::add_systems_to_existing_schedule",
"query::tests::query_filtered_iter_combinations",
"query::tests::query",
"event::tests::test_event_mutator_iter_nth",
"schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions",
"reflect::entity_commands::tests::insert_reflected_with_registry",
"schedule::schedule::tests::no_sync_edges::set_to_system_before",
"reflect::entity_commands::tests::remove_reflected_bundle_with_registry",
"query::state::tests::transmute_from_sparse_to_dense",
"query::fetch::tests::read_only_field_visibility",
"query::state::tests::cannot_transmute_entity_ref - should panic",
"query::state::tests::cannot_join_wrong_filter - should panic",
"query::state::tests::transmute_with_different_world - should panic",
"schedule::schedule::tests::configure_set_on_existing_schedule",
"schedule::schedule::tests::no_sync_edges::system_to_system_before",
"schedule::schedule::tests::configure_set_on_new_schedule",
"schedule::stepping::tests::clear_schedule_then_set_behavior",
"schedule::schedule::tests::no_sync_chain::chain_first",
"schedule::schedule::tests::no_sync_chain::chain_second",
"schedule::schedule::tests::inserts_a_sync_point",
"schedule::schedule::tests::add_systems_to_non_existing_schedule",
"schedule::schedule::tests::no_sync_edges::set_to_set_after",
"schedule::set::tests::test_derive_schedule_label",
"schedule::set::tests::test_derive_system_set",
"reflect::entity_commands::tests::insert_reflect_bundle_with_registry",
"schedule::stepping::tests::clear_breakpoint",
"event::tests::test_event_reader_iter_nth",
"query::tests::query_iter_combinations",
"schedule::set::tests::test_schedule_label",
"reflect::entity_commands::tests::insert_reflect_bundle",
"schedule::schedule::tests::disable_auto_sync_points",
"schedule::schedule::tests::merges_sync_points_into_one",
"schedule::condition::tests::distributive_run_if_compiles",
"schedule::schedule::tests::adds_multiple_consecutive_syncs",
"schedule::condition::tests::multiple_run_conditions",
"schedule::stepping::tests::clear_schedule",
"event::tests::test_event_cursor_par_read_mut",
"schedule::schedule::tests::no_sync_edges::system_to_system_after",
"schedule::schedule::tests::no_sync_edges::set_to_set_before",
"schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents",
"reflect::entity_commands::tests::insert_reflected",
"schedule::stepping::tests::continue_never_run",
"schedule::stepping::tests::multiple_calls_per_frame_continue",
"schedule::stepping::tests::multiple_calls_per_frame_step",
"schedule::stepping::tests::set_behavior_then_clear_schedule",
"schedule::stepping::tests::schedules",
"schedule::stepping::tests::disabled_breakpoint",
"schedule::stepping::tests::disabled_always_run",
"schedule::stepping::tests::continue_step_continue_with_breakpoint",
"schedule::schedule::tests::no_sync_chain::only_chain_outside",
"schedule::stepping::tests::continue_always_run",
"schedule::stepping::tests::step_breakpoint",
"schedule::stepping::tests::step_duplicate_systems",
"schedule::stepping::tests::stepping_disabled",
"schedule::stepping::tests::waiting_breakpoint",
"schedule::stepping::tests::unknown_schedule",
"schedule::tests::conditions::mixed_conditions_and_change_detection",
"schedule::stepping::tests::waiting_always_run",
"schedule::tests::conditions::multiple_conditions_on_system",
"schedule::tests::conditions::run_exclusive_system_with_condition",
"schedule::tests::conditions::multiple_conditions_on_system_sets",
"schedule::tests::conditions::system_conditions_and_change_detection",
"schedule::tests::conditions::system_with_condition",
"schedule::tests::schedule_build_errors::configure_system_type_set - should panic",
"schedule::tests::schedule_build_errors::ambiguity",
"schedule::tests::conditions::system_set_conditions_and_change_detection",
"schedule::tests::schedule_build_errors::cross_dependency",
"schedule::stepping::tests::clear_system",
"schedule::stepping::tests::step_run_if_false",
"schedule::stepping::tests::step_never_run",
"schedule::stepping::tests::waiting_never_run",
"schedule::tests::schedule_build_errors::dependency_loop - should panic",
"schedule::stepping::tests::disabled_never_run",
"schedule::tests::schedule_build_errors::hierarchy_cycle",
"reflect::entity_commands::tests::remove_reflected",
"schedule::stepping::tests::continue_breakpoint",
"schedule::tests::schedule_build_errors::hierarchy_redundancy",
"schedule::stepping::tests::verify_cursor",
"schedule::tests::schedule_build_errors::sets_have_order_but_intersect",
"schedule::tests::schedule_build_errors::system_type_set_ambiguity",
"query::tests::query_filtered_exactsizeiterator_len",
"schedule::tests::stepping::simple_executor",
"schedule::tests::system_ambiguity::ambiguous_with_system",
"schedule::tests::schedule_build_errors::hierarchy_loop - should panic",
"schedule::tests::schedule_build_errors::dependency_cycle",
"schedule::tests::stepping::multi_threaded_executor",
"schedule::tests::conditions::systems_with_distributive_condition",
"schedule::tests::stepping::single_threaded_executor",
"schedule::tests::conditions::systems_nested_in_system_sets",
"schedule::tests::system_ambiguity::ambiguous_with_label",
"schedule::stepping::tests::remove_schedule",
"schedule::stepping::tests::step_always_run",
"schedule::condition::tests::run_condition_combinators",
"schedule::tests::system_ambiguity::anonymous_set_name",
"query::tests::par_iter_mut_change_detection",
"schedule::tests::system_ambiguity::events",
"schedule::tests::system_ambiguity::exclusive",
"schedule::tests::system_ambiguity::before_and_after",
"schedule::tests::system_ambiguity::ignore_component_resource_ambiguities",
"schedule::tests::system_ambiguity::correct_ambiguities",
"storage::blob_vec::tests::blob_vec",
"schedule::tests::system_ambiguity::resource_and_entity_mut",
"storage::blob_vec::tests::blob_vec_capacity_overflow - should panic",
"schedule::tests::system_ambiguity::one_of_everything",
"schedule::tests::system_execution::run_system",
"storage::blob_vec::tests::aligned_zst",
"schedule::schedule::tests::no_sync_chain::chain_all",
"schedule::tests::system_ambiguity::components",
"schedule::tests::system_ambiguity::read_only",
"storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic",
"schedule::tests::system_ordering::add_systems_correct_order_nested",
"system::system::tests::run_two_systems",
"schedule::tests::system_ambiguity::nonsend",
"system::system::tests::run_system_once",
"system::system::tests::non_send_resources",
"schedule::tests::system_ambiguity::read_world",
"schedule::tests::system_ambiguity::read_component_and_entity_mut",
"schedule::tests::system_ordering::order_exclusive_systems",
"schedule::tests::system_execution::run_exclusive_system",
"schedule::tests::system_ambiguity::resource_mut_and_entity_ref",
"system::system::tests::command_processing",
"schedule::tests::system_ordering::add_systems_correct_order",
"schedule::tests::system_ambiguity::shared_resource_mut_component",
"schedule::tests::system_ambiguity::ignore_all_ambiguities",
"storage::sparse_set::tests::sparse_set",
"storage::sparse_set::tests::sparse_sets",
"storage::table::tests::table",
"system::builder::tests::custom_param_builder",
"storage::blob_vec::tests::blob_vec_drop_empty_capacity",
"system::builder::tests::vec_builder",
"system::builder::tests::dyn_builder",
"system::commands::tests::append",
"storage::blob_vec::tests::resize_test",
"system::commands::tests::commands",
"system::commands::tests::insert_components",
"system::commands::tests::remove_components",
"system::commands::tests::remove_components_by_id",
"system::commands::tests::remove_resources",
"system::system_name::tests::test_system_name_regular_param",
"system::commands::tests::test_commands_are_send_and_sync",
"system::exclusive_function_system::tests::into_system_type_id_consistency",
"system::function_system::tests::into_system_type_id_consistency",
"system::system_param::tests::system_param_phantom_data",
"system::system_param::tests::system_param_where_clause",
"system::system_param::tests::system_param_name_collision",
"system::system_param::tests::system_param_private_fields",
"system::system_param::tests::system_param_const_generics",
"system::system_param::tests::system_param_invariant_lifetime",
"system::system_registry::tests::local_variables",
"system::observer_system::tests::test_piped_observer_systems_no_input",
"system::builder::tests::query_builder_state",
"system::system_registry::tests::exclusive_system",
"system::system_name::tests::test_exclusive_closure_system_name_regular_param",
"system::system_name::tests::test_system_name_exclusive_param",
"system::builder::tests::param_set_vec_builder",
"system::system_registry::tests::nested_systems_with_inputs",
"system::builder::tests::param_set_builder",
"system::system_param::tests::non_sync_local",
"system::exclusive_system_param::tests::test_exclusive_system_params",
"system::system_param::tests::system_param_generic_bounds",
"system::system_name::tests::test_closure_system_name_regular_param",
"system::builder::tests::query_builder",
"system::system_param::tests::system_param_struct_variants",
"system::system_registry::tests::change_detection",
"system::system_param::tests::param_set_non_send_first",
"system::observer_system::tests::test_piped_observer_systems_with_inputs",
"system::system_registry::tests::input_values",
"system::tests::any_of_has_filter_with_when_both_have_it",
"system::tests::conflicting_query_sets_system - should panic",
"system::tests::convert_mut_to_immut",
"system::builder::tests::multi_param_builder_inference",
"system::tests::conflicting_system_resources_reverse_order - should panic",
"system::builder::tests::multi_param_builder",
"system::builder::tests::local_builder",
"storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic",
"schedule::tests::system_ambiguity::write_component_and_entity_ref",
"schedule::tests::system_ambiguity::resources",
"schedule::tests::system_ordering::order_systems",
"system::system_param::tests::system_param_flexibility",
"system::tests::any_of_has_no_filter_with - should panic",
"system::system_registry::tests::output_values",
"system::system_registry::tests::nested_systems",
"system::system_param::tests::system_param_field_limit",
"system::tests::any_of_with_and_without_common",
"system::tests::any_of_with_ref_and_mut - should panic",
"system::tests::assert_world_and_entity_mut_system_does_conflict - should panic",
"system::tests::can_have_16_parameters",
"system::tests::assert_system_does_not_conflict - should panic",
"system::tests::conflicting_query_immut_system - should panic",
"schedule::tests::system_execution::parallel_execution",
"system::tests::assert_systems",
"system::tests::conflicting_query_with_query_set_system - should panic",
"system::tests::conflicting_system_resources - should panic",
"system::tests::any_of_with_mut_and_option - should panic",
"system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic",
"system::tests::conflicting_system_resources_multiple_mutable - should panic",
"system::tests::any_of_with_conflicting - should panic",
"system::tests::any_of_with_entity_and_mut",
"system::tests::any_of_with_mut_and_ref - should panic",
"system::tests::any_of_and_without",
"system::tests::changed_trackers_or_conflict - should panic",
"system::tests::assert_entity_mut_system_does_conflict - should panic",
"system::tests::any_of_with_empty_and_mut",
"system::tests::any_of_doesnt_remove_unrelated_filter_with",
"system::tests::commands_param_set",
"system::system_param::tests::param_set_non_send_second",
"system::tests::conflicting_query_mut_system - should panic",
"system::tests::or_expanded_with_and_disjoint_nested_without - should panic",
"system::tests::option_has_no_filter_with - should panic",
"system::tests::pipe_change_detection",
"system::tests::query_validates_world_id - should panic",
"system::tests::simple_system",
"system::tests::query_is_empty",
"system::tests::system_state_invalid_world - should panic",
"system::tests::into_iter_impl",
"system::tests::system_state_archetype_update",
"system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic",
"system::tests::get_system_conflicts",
"system::tests::read_system_state",
"system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic",
"system::tests::option_doesnt_remove_unrelated_filter_with",
"system::tests::system_state_change_detection",
"system::tests::or_expanded_nested_with_and_without_common",
"system::tests::disjoint_query_mut_read_component_system",
"system::tests::any_of_working",
"system::tests::or_expanded_nested_with_and_disjoint_without - should panic",
"system::tests::disjoint_query_mut_system",
"system::tests::or_doesnt_remove_unrelated_filter_with",
"system::tests::query_set_system",
"system::tests::long_life_test",
"system::tests::non_send_option_system",
"system::tests::non_send_system",
"system::tests::immutable_mut_test",
"system::tests::local_system",
"system::tests::nonconflicting_system_resources",
"system::tests::or_has_filter_with",
"system::tests::or_with_without_and_compatible_with_without",
"system::tests::or_expanded_nested_with_and_common_nested_without",
"system::tests::panic_inside_system - should panic",
"tests::entity_mut_and_entity_mut_query_panic - should panic",
"system::tests::or_param_set_system",
"system::tests::update_archetype_component_access_works",
"system::tests::write_system_state",
"tests::add_remove_components",
"system::tests::world_collections_system",
"system::tests::or_has_no_filter_with - should panic",
"system::tests::with_and_disjoint_or_empty_without - should panic",
"tests::added_queries",
"tests::added_tracking",
"tests::bundle_derive",
"tests::changed_query",
"tests::changed_trackers",
"tests::changed_trackers_sparse",
"tests::despawn_table_storage",
"tests::dynamic_required_components",
"tests::duplicate_components_panic - should panic",
"tests::despawn_mixed_storage",
"system::tests::or_expanded_with_and_without_common",
"tests::clear_entities",
"system::tests::test_combinator_clone",
"system::tests::or_has_filter_with_when_both_have_it",
"tests::filtered_query_access",
"tests::entity_ref_and_entity_mut_query_panic - should panic",
"tests::insert_overwrite_drop",
"tests::entity_ref_and_mut_query_panic - should panic",
"system::tests::removal_tracking",
"tests::exact_size_query",
"tests::mut_and_mut_query_panic - should panic",
"tests::mut_and_entity_ref_query_panic - should panic",
"tests::non_send_resource_drop_from_same_thread",
"tests::non_send_resource_points_to_distinct_data",
"tests::query_all",
"tests::query_all_for_each",
"tests::par_for_each_dense",
"tests::query_filter_with",
"tests::query_filter_with_sparse",
"tests::query_filter_with_sparse_for_each",
"tests::query_filter_with_for_each",
"tests::query_filters_dont_collide_with_fetches",
"tests::query_filter_without",
"tests::non_send_resource",
"tests::entity_ref_and_entity_ref_query_no_panic",
"tests::empty_spawn",
"tests::insert_overwrite_drop_sparse",
"tests::insert_or_spawn_batch_invalid",
"tests::multiple_worlds_same_query_iter - should panic",
"tests::query_missing_component",
"tests::multiple_worlds_same_query_for_each - should panic",
"tests::mut_and_ref_query_panic - should panic",
"tests::query_get",
"tests::query_optional_component_sparse",
"tests::query_get_works_across_sparse_removal",
"tests::multiple_worlds_same_query_get - should panic",
"tests::generic_required_components",
"tests::insert_or_spawn_batch",
"tests::required_components_insert_existing_hooks",
"tests::required_components_take_leaves_required",
"tests::reserve_and_spawn",
"system::tests::changed_resource_system",
"tests::required_components_spawn_then_insert_no_overwrite",
"tests::required_components_spawn_nonexistent_hooks",
"tests::query_optional_component_sparse_no_match",
"tests::non_send_resource_panic - should panic",
"tests::non_send_resource_drop_from_different_thread - should panic",
"tests::query_optional_component_table",
"tests::resource",
"tests::par_for_each_sparse",
"tests::reserve_entities_across_worlds",
"tests::query_single_component",
"tests::query_single_component_for_each",
"tests::query_sparse_component",
"tests::random_access",
"tests::required_components_retain_keeps_required",
"tests::ref_and_mut_query_panic - should panic",
"tests::remove",
"tests::remove_missing",
"tests::remove_tracking",
"tests::required_components",
"tests::spawn_batch",
"world::command_queue::test::test_command_queue_inner_drop_early",
"world::command_queue::test::test_command_queue_inner_drop",
"world::command_queue::test::test_command_queue_inner",
"tests::resource_scope",
"world::command_queue::test::test_command_queue_inner_panic_safe",
"world::entity_ref::tests::despawning_entity_updates_archetype_row",
"tests::take",
"tests::stateful_query_handles_new_archetype",
"world::entity_ref::tests::despawning_entity_updates_table_row",
"world::entity_ref::tests::entity_mut_get_by_id",
"world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id",
"tests::sparse_set_add_remove_many",
"tests::test_is_archetypal_size_hints",
"world::command_queue::test::test_command_is_send",
"world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id",
"world::command_queue::test::test_command_queue_inner_nested_panic_safe",
"world::entity_ref::tests::filtered_entity_mut_missing",
"world::entity_ref::tests::filtered_entity_mut_normal",
"world::entity_ref::tests::filtered_entity_ref_missing",
"world::entity_ref::tests::filtered_entity_ref_normal",
"world::entity_ref::tests::inserting_dense_updates_archetype_row",
"world::entity_ref::tests::inserting_sparse_updates_archetype_row",
"world::entity_ref::tests::get_components",
"world::entity_ref::tests::entity_mut_insert_by_id",
"world::entity_ref::tests::entity_mut_insert_bundle_by_id",
"world::entity_ref::tests::entity_mut_remove_by_id",
"world::entity_ref::tests::entity_mut_world_scope_panic",
"world::entity_ref::tests::entity_ref_get_by_id",
"world::entity_ref::tests::disjoint_access",
"world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic",
"world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic",
"world::entity_ref::tests::removing_dense_updates_table_row",
"world::entity_ref::tests::removing_sparse_updates_archetype_row",
"world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic",
"world::entity_ref::tests::mut_compatible_with_entity",
"world::identifier::tests::world_id_exclusive_system_param",
"world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic",
"world::identifier::tests::world_id_system_param",
"world::tests::get_resource_by_id",
"world::tests::init_resource_does_not_overwrite",
"world::tests::get_resource_mut_by_id",
"world::reflect::tests::get_component_as_reflect",
"world::tests::iter_resources",
"world::entity_ref::tests::ref_compatible_with_resource",
"world::tests::custom_resource_with_layout",
"world::entity_ref::tests::sorted_remove",
"world::tests::iter_resources_mut",
"world::entity_ref::tests::retain_some_components",
"world::tests::inspect_entity_components",
"world::identifier::tests::world_ids_unique",
"world::entity_ref::tests::retain_nothing",
"world::tests::iterate_entities",
"world::tests::iterate_entities_mut",
"world::tests::panic_while_overwriting_component",
"world::tests::spawn_empty_bundle",
"world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic",
"world::reflect::tests::get_component_as_mut_reflect",
"world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic",
"world::tests::init_non_send_resource_does_not_overwrite",
"world::entity_ref::tests::ref_compatible",
"world::tests::test_verify_unique_entities",
"world::entity_ref::tests::inserting_dense_updates_table_row",
"system::tests::get_many_is_ordered",
"tests::table_add_remove_many",
"crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1015) - compile",
"crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1023) - compile",
"crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1237) - compile",
"crates/bevy_ecs/src/component.rs - component::Component (line 305) - compile fail",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)",
"crates/bevy_ecs/src/component.rs - component::StorageType (line 355)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)",
"crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)",
"crates/bevy_ecs/src/component.rs - component::Component (line 89)",
"crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 69)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)",
"crates/bevy_ecs/src/component.rs - component::Component (line 245)",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)",
"crates/bevy_ecs/src/lib.rs - (line 33)",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)",
"crates/bevy_ecs/src/component.rs - component::Component (line 280)",
"crates/bevy_ecs/src/lib.rs - (line 166)",
"crates/bevy_ecs/src/lib.rs - (line 77)",
"crates/bevy_ecs/src/lib.rs - (line 213)",
"crates/bevy_ecs/src/lib.rs - (line 238)",
"crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)",
"crates/bevy_ecs/src/lib.rs - (line 190)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)",
"crates/bevy_ecs/src/component.rs - component::Component (line 43)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)",
"crates/bevy_ecs/src/component.rs - component::Component (line 315)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)",
"crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)",
"crates/bevy_ecs/src/lib.rs - (line 286)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 214) - compile fail",
"crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 184) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 379) - compile fail",
"crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 38)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - compile fail",
"crates/bevy_ecs/src/label.rs - label::define_label (line 65)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1513)",
"crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 412) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 236) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)",
"crates/bevy_ecs/src/query/par_iter.rs - query::par_iter::QueryParIter<'w,'s,D,F>::for_each_init (line 49)",
"crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 36)",
"crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 125)",
"crates/bevy_ecs/src/component.rs - component::Component (line 171)",
"crates/bevy_ecs/src/lib.rs - (line 44)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 691)",
"crates/bevy_ecs/src/component.rs - component::Component (line 197)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)",
"crates/bevy_ecs/src/lib.rs - (line 253)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 172)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)",
"crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 745)",
"crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)",
"crates/bevy_ecs/src/lib.rs - (line 335)",
"crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)",
"crates/bevy_ecs/src/component.rs - component::Component (line 107)",
"crates/bevy_ecs/src/component.rs - component::Component (line 127)",
"crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 817)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 105)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1697)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 213)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1720)",
"crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)",
"crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 201)",
"crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)",
"crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)",
"crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)",
"crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail",
"crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)",
"crates/bevy_ecs/src/lib.rs - (line 310)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 209)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)",
"crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 140)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)",
"crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)",
"crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)",
"crates/bevy_ecs/src/lib.rs - (line 94)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)",
"crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 246)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)",
"crates/bevy_ecs/src/component.rs - component::Component (line 149)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 654)",
"crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)",
"crates/bevy_ecs/src/lib.rs - (line 54)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)",
"crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)",
"crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)",
"crates/bevy_ecs/src/lib.rs - (line 125)",
"crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1393)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1022) - compile",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 556)",
"crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)",
"crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)",
"crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)",
"crates/bevy_ecs/src/system/mod.rs - system (line 13)",
"crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)",
"crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)",
"crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)",
"crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 529) - compile fail",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)",
"crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)",
"crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 540)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1757) - compile fail",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 374)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 255)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1733)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 378)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 473)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1527)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 44)",
"crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 712)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1570)",
"crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 407)",
"crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 320)",
"crates/bevy_ecs/src/system/mod.rs - system (line 56)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)",
"crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)",
"crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1284)",
"crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 431)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1131)",
"crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1249)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1178)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 824)",
"crates/bevy_ecs/src/system/mod.rs - system::In (line 233)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 806)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1865)",
"crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 129) - compile",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 412)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 847)",
"crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)",
"crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 202)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1618)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 447)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 843)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1673)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 273)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 377)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1733)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 964)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 485)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)",
"crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 313)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1562)",
"crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1870)",
"crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1421)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1588)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 574)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 348)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 80)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 955)",
"crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 185)",
"crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2263)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 131)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 421)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2486)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2508)",
"crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2848)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 445)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 924)",
"crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1962)",
"crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 466)",
"crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 500)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1790)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1647)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 744)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 696)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1845)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1474)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1766)",
"crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2585)",
"crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1161)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 609)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1706)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1258)",
"crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1813)",
"crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)",
"crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1055)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 539)",
"crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 455)",
"crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)",
"crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1797)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 802)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 833)",
"crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)",
"crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)",
"crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)"
] |
[] |
[] |
[] |
auto_2025-06-08
|
bevyengine/bevy
| 15,196
|
bevyengine__bevy-15196
|
[
"15101"
] |
b36443b6ed8a6928097e6c1d33310c5d321db3e5
|
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -19,7 +19,7 @@ fn push_events(world: &mut World, events: impl IntoIterator<Item = HierarchyEven
/// Adds `child` to `parent`'s [`Children`], without checking if it is already present there.
///
/// This might cause unexpected results when removing duplicate children.
-fn push_child_unchecked(world: &mut World, parent: Entity, child: Entity) {
+fn add_child_unchecked(world: &mut World, parent: Entity, child: Entity) {
let mut parent = world.entity_mut(parent);
if let Some(mut children) = parent.get_mut::<Children>() {
children.0.push(child);
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -161,14 +161,14 @@ fn clear_children(parent: Entity, world: &mut World) {
/// Command that adds a child to an entity.
#[derive(Debug)]
-pub struct PushChild {
+pub struct AddChild {
/// Parent entity to add the child to.
pub parent: Entity,
/// Child entity to add.
pub child: Entity,
}
-impl Command for PushChild {
+impl Command for AddChild {
fn apply(self, world: &mut World) {
world.entity_mut(self.parent).add_child(self.child);
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -192,14 +192,14 @@ impl Command for InsertChildren {
/// Command that pushes children to the end of the entity's [`Children`].
#[derive(Debug)]
-pub struct PushChildren {
+pub struct AddChildren {
parent: Entity,
children: SmallVec<[Entity; 8]>,
}
-impl Command for PushChildren {
+impl Command for AddChildren {
fn apply(self, world: &mut World) {
- world.entity_mut(self.parent).push_children(&self.children);
+ world.entity_mut(self.parent).add_children(&self.children);
}
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -236,7 +236,7 @@ pub struct ReplaceChildren {
impl Command for ReplaceChildren {
fn apply(self, world: &mut World) {
clear_children(self.parent, world);
- world.entity_mut(self.parent).push_children(&self.children);
+ world.entity_mut(self.parent).add_children(&self.children);
}
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -276,7 +276,7 @@ impl Command for RemoveParent {
/// ```
pub struct ChildBuilder<'a> {
commands: Commands<'a, 'a>,
- push_children: PushChildren,
+ add_children: AddChildren,
}
/// Trait for building children entities and adding them to a parent entity. This is used in
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -313,18 +313,18 @@ impl ChildBuild for ChildBuilder<'_> {
fn spawn(&mut self, bundle: impl Bundle) -> EntityCommands {
let e = self.commands.spawn(bundle);
- self.push_children.children.push(e.id());
+ self.add_children.children.push(e.id());
e
}
fn spawn_empty(&mut self) -> EntityCommands {
let e = self.commands.spawn_empty();
- self.push_children.children.push(e.id());
+ self.add_children.children.push(e.id());
e
}
fn parent_entity(&self) -> Entity {
- self.push_children.parent
+ self.add_children.parent
}
fn add_command<C: Command>(&mut self, command: C) -> &mut Self {
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -362,7 +362,7 @@ pub trait BuildChildren {
/// # Panics
///
/// Panics if any of the children are the same as the parent.
- fn push_children(&mut self, children: &[Entity]) -> &mut Self;
+ fn add_children(&mut self, children: &[Entity]) -> &mut Self;
/// Inserts children at the given index.
///
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -428,14 +428,14 @@ impl BuildChildren for EntityCommands<'_> {
let parent = self.id();
let mut builder = ChildBuilder {
commands: self.commands(),
- push_children: PushChildren {
+ add_children: AddChildren {
children: SmallVec::default(),
parent,
},
};
spawn_children(&mut builder);
- let children = builder.push_children;
+ let children = builder.add_children;
if children.children.contains(&parent) {
panic!("Entity cannot be a child of itself.");
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -446,16 +446,16 @@ impl BuildChildren for EntityCommands<'_> {
fn with_child<B: Bundle>(&mut self, bundle: B) -> &mut Self {
let parent = self.id();
let child = self.commands().spawn(bundle).id();
- self.commands().add(PushChild { parent, child });
+ self.commands().add(AddChild { parent, child });
self
}
- fn push_children(&mut self, children: &[Entity]) -> &mut Self {
+ fn add_children(&mut self, children: &[Entity]) -> &mut Self {
let parent = self.id();
if children.contains(&parent) {
panic!("Cannot push entity as a child of itself.");
}
- self.commands().add(PushChildren {
+ self.commands().add(AddChildren {
children: SmallVec::from(children),
parent,
});
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -489,7 +489,7 @@ impl BuildChildren for EntityCommands<'_> {
if child == parent {
panic!("Cannot add entity as a child of itself.");
}
- self.commands().add(PushChild { child, parent });
+ self.commands().add(AddChild { child, parent });
self
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -516,7 +516,7 @@ impl BuildChildren for EntityCommands<'_> {
if child == parent {
panic!("Cannot set parent to itself");
}
- self.commands().add(PushChild { child, parent });
+ self.commands().add(AddChild { child, parent });
self
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -539,7 +539,7 @@ impl ChildBuild for WorldChildBuilder<'_> {
fn spawn(&mut self, bundle: impl Bundle) -> EntityWorldMut {
let entity = self.world.spawn((bundle, Parent(self.parent))).id();
- push_child_unchecked(self.world, self.parent, entity);
+ add_child_unchecked(self.world, self.parent, entity);
push_events(
self.world,
[HierarchyEvent::ChildAdded {
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -552,7 +552,7 @@ impl ChildBuild for WorldChildBuilder<'_> {
fn spawn_empty(&mut self) -> EntityWorldMut {
let entity = self.world.spawn(Parent(self.parent)).id();
- push_child_unchecked(self.world, self.parent, entity);
+ add_child_unchecked(self.world, self.parent, entity);
push_events(
self.world,
[HierarchyEvent::ChildAdded {
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -613,7 +613,7 @@ impl BuildChildren for EntityWorldMut<'_> {
self
}
- fn push_children(&mut self, children: &[Entity]) -> &mut Self {
+ fn add_children(&mut self, children: &[Entity]) -> &mut Self {
if children.is_empty() {
return self;
}
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -691,7 +691,7 @@ impl BuildChildren for EntityWorldMut<'_> {
}
fn replace_children(&mut self, children: &[Entity]) -> &mut Self {
- self.clear_children().push_children(children)
+ self.clear_children().add_children(children)
}
}
diff --git a/crates/bevy_scene/src/scene_spawner.rs b/crates/bevy_scene/src/scene_spawner.rs
--- a/crates/bevy_scene/src/scene_spawner.rs
+++ b/crates/bevy_scene/src/scene_spawner.rs
@@ -8,7 +8,7 @@ use bevy_ecs::{
system::Resource,
world::{Command, Mut, World},
};
-use bevy_hierarchy::{BuildChildren, DespawnRecursiveExt, Parent, PushChild};
+use bevy_hierarchy::{AddChild, BuildChildren, DespawnRecursiveExt, Parent};
use bevy_utils::{tracing::error, HashMap, HashSet};
use thiserror::Error;
use uuid::Uuid;
diff --git a/crates/bevy_scene/src/scene_spawner.rs b/crates/bevy_scene/src/scene_spawner.rs
--- a/crates/bevy_scene/src/scene_spawner.rs
+++ b/crates/bevy_scene/src/scene_spawner.rs
@@ -380,7 +380,7 @@ impl SceneSpawner {
// this case shouldn't happen anyway
.unwrap_or(true)
{
- PushChild {
+ AddChild {
parent,
child: entity,
}
diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs
--- a/crates/bevy_transform/src/commands.rs
+++ b/crates/bevy_transform/src/commands.rs
@@ -7,22 +7,22 @@ use bevy_ecs::{
system::EntityCommands,
world::{Command, EntityWorldMut, World},
};
-use bevy_hierarchy::{PushChild, RemoveParent};
+use bevy_hierarchy::{AddChild, RemoveParent};
-/// Command similar to [`PushChild`], but updating the child transform to keep
+/// Command similar to [`AddChild`], but updating the child transform to keep
/// it at the same [`GlobalTransform`].
///
/// You most likely want to use [`BuildChildrenTransformExt::set_parent_in_place`]
/// method on [`EntityCommands`] instead.
-pub struct PushChildInPlace {
+pub struct AddChildInPlace {
/// Parent entity to add the child to.
pub parent: Entity,
/// Child entity to add.
pub child: Entity,
}
-impl Command for PushChildInPlace {
+impl Command for AddChildInPlace {
fn apply(self, world: &mut World) {
- let hierarchy_command = PushChild {
+ let hierarchy_command = AddChild {
child: self.child,
parent: self.parent,
};
diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs
--- a/crates/bevy_transform/src/commands.rs
+++ b/crates/bevy_transform/src/commands.rs
@@ -91,7 +91,7 @@ pub trait BuildChildrenTransformExt {
impl BuildChildrenTransformExt for EntityCommands<'_> {
fn set_parent_in_place(&mut self, parent: Entity) -> &mut Self {
let child = self.id();
- self.commands().add(PushChildInPlace { child, parent });
+ self.commands().add(AddChildInPlace { child, parent });
self
}
diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs
--- a/crates/bevy_transform/src/commands.rs
+++ b/crates/bevy_transform/src/commands.rs
@@ -105,7 +105,7 @@ impl BuildChildrenTransformExt for EntityCommands<'_> {
impl BuildChildrenTransformExt for EntityWorldMut<'_> {
fn set_parent_in_place(&mut self, parent: Entity) -> &mut Self {
let child = self.id();
- self.world_scope(|world| PushChildInPlace { child, parent }.apply(world));
+ self.world_scope(|world| AddChildInPlace { child, parent }.apply(world));
self
}
diff --git a/examples/animation/custom_skinned_mesh.rs b/examples/animation/custom_skinned_mesh.rs
--- a/examples/animation/custom_skinned_mesh.rs
+++ b/examples/animation/custom_skinned_mesh.rs
@@ -140,7 +140,7 @@ fn setup(
.id();
// Set joint_1 as a child of joint_0.
- commands.entity(joint_0).push_children(&[joint_1]);
+ commands.entity(joint_0).add_children(&[joint_1]);
// Each joint in this vector corresponds to each inverse bindpose matrix in `SkinnedMeshInverseBindposes`.
let joint_entities = vec![joint_0, joint_1];
diff --git a/examples/ui/borders.rs b/examples/ui/borders.rs
--- a/examples/ui/borders.rs
+++ b/examples/ui/borders.rs
@@ -176,7 +176,7 @@ fn setup(mut commands: Commands) {
},
..Default::default()
})
- .push_children(&[border_node, label_node])
+ .add_children(&[border_node, label_node])
.id();
commands.entity(root).add_child(container);
}
diff --git a/examples/ui/borders.rs b/examples/ui/borders.rs
--- a/examples/ui/borders.rs
+++ b/examples/ui/borders.rs
@@ -245,7 +245,7 @@ fn setup(mut commands: Commands) {
},
..Default::default()
})
- .push_children(&[border_node, label_node])
+ .add_children(&[border_node, label_node])
.id();
commands.entity(root_rounded).add_child(container);
}
diff --git a/examples/ui/text_debug.rs b/examples/ui/text_debug.rs
--- a/examples/ui/text_debug.rs
+++ b/examples/ui/text_debug.rs
@@ -229,7 +229,7 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
commands
.entity(root_uinode)
- .push_children(&[left_column, right_column]);
+ .add_children(&[left_column, right_column]);
}
fn change_text_system(
|
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -838,7 +838,7 @@ mod tests {
let [a, b, c] = std::array::from_fn(|_| world.spawn_empty().id());
- world.entity_mut(a).push_children(&[b, c]);
+ world.entity_mut(a).add_children(&[b, c]);
world.entity_mut(b).remove_parent();
assert_parent(world, b, None);
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -920,7 +920,7 @@ mod tests {
let mut queue = CommandQueue::default();
{
let mut commands = Commands::new(&mut queue, &world);
- commands.entity(entities[0]).push_children(&entities[1..3]);
+ commands.entity(entities[0]).add_children(&entities[1..3]);
}
queue.apply(&mut world);
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -981,7 +981,7 @@ mod tests {
let mut queue = CommandQueue::default();
{
let mut commands = Commands::new(&mut queue, &world);
- commands.entity(entities[0]).push_children(&entities[1..3]);
+ commands.entity(entities[0]).add_children(&entities[1..3]);
}
queue.apply(&mut world);
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1019,7 +1019,7 @@ mod tests {
let mut queue = CommandQueue::default();
{
let mut commands = Commands::new(&mut queue, &world);
- commands.entity(entities[0]).push_children(&entities[1..3]);
+ commands.entity(entities[0]).add_children(&entities[1..3]);
}
queue.apply(&mut world);
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1060,7 +1060,7 @@ mod tests {
.spawn_batch(vec![C(1), C(2), C(3), C(4), C(5)])
.collect::<Vec<Entity>>();
- world.entity_mut(entities[0]).push_children(&entities[1..3]);
+ world.entity_mut(entities[0]).add_children(&entities[1..3]);
let parent = entities[0];
let child1 = entities[1];
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1103,7 +1103,7 @@ mod tests {
.spawn_batch(vec![C(1), C(2), C(3)])
.collect::<Vec<Entity>>();
- world.entity_mut(entities[0]).push_children(&entities[1..3]);
+ world.entity_mut(entities[0]).add_children(&entities[1..3]);
let parent = entities[0];
let child1 = entities[1];
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1130,7 +1130,7 @@ mod tests {
.spawn_batch(vec![C(1), C(2), C(3), C(4), C(5)])
.collect::<Vec<Entity>>();
- world.entity_mut(entities[0]).push_children(&entities[1..3]);
+ world.entity_mut(entities[0]).add_children(&entities[1..3]);
let parent = entities[0];
let child1 = entities[1];
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1170,15 +1170,15 @@ mod tests {
let parent2 = entities[1];
let child = entities[2];
- // push child into parent1
- world.entity_mut(parent1).push_children(&[child]);
+ // add child into parent1
+ world.entity_mut(parent1).add_children(&[child]);
assert_eq!(
world.get::<Children>(parent1).unwrap().0.as_slice(),
&[child]
);
- // move only child from parent1 with `push_children`
- world.entity_mut(parent2).push_children(&[child]);
+ // move only child from parent1 with `add_children`
+ world.entity_mut(parent2).add_children(&[child]);
assert!(world.get::<Children>(parent1).is_none());
// move only child from parent2 with `insert_children`
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1204,10 +1204,10 @@ mod tests {
let mut queue = CommandQueue::default();
- // push child into parent1
+ // add child into parent1
{
let mut commands = Commands::new(&mut queue, &world);
- commands.entity(parent1).push_children(&[child]);
+ commands.entity(parent1).add_children(&[child]);
queue.apply(&mut world);
}
assert_eq!(
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1215,10 +1215,10 @@ mod tests {
&[child]
);
- // move only child from parent1 with `push_children`
+ // move only child from parent1 with `add_children`
{
let mut commands = Commands::new(&mut queue, &world);
- commands.entity(parent2).push_children(&[child]);
+ commands.entity(parent2).add_children(&[child]);
queue.apply(&mut world);
}
assert!(world.get::<Children>(parent1).is_none());
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1249,20 +1249,20 @@ mod tests {
}
#[test]
- fn regression_push_children_same_archetype() {
+ fn regression_add_children_same_archetype() {
let mut world = World::new();
let child = world.spawn_empty().id();
- world.spawn_empty().push_children(&[child]);
+ world.spawn_empty().add_children(&[child]);
}
#[test]
- fn push_children_idempotent() {
+ fn add_children_idempotent() {
let mut world = World::new();
let child = world.spawn_empty().id();
let parent = world
.spawn_empty()
- .push_children(&[child])
- .push_children(&[child])
+ .add_children(&[child])
+ .add_children(&[child])
.id();
let mut query = world.query::<&Children>();
diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs
--- a/crates/bevy_hierarchy/src/child_builder.rs
+++ b/crates/bevy_hierarchy/src/child_builder.rs
@@ -1271,9 +1271,9 @@ mod tests {
}
#[test]
- fn push_children_does_not_insert_empty_children() {
+ fn add_children_does_not_insert_empty_children() {
let mut world = World::new();
- let parent = world.spawn_empty().push_children(&[]).id();
+ let parent = world.spawn_empty().add_children(&[]).id();
let mut query = world.query::<&Children>();
let children = query.get(&world, parent);
diff --git a/crates/bevy_hierarchy/src/query_extension.rs b/crates/bevy_hierarchy/src/query_extension.rs
--- a/crates/bevy_hierarchy/src/query_extension.rs
+++ b/crates/bevy_hierarchy/src/query_extension.rs
@@ -172,8 +172,8 @@ mod tests {
let [a, b, c, d] = std::array::from_fn(|i| world.spawn(A(i)).id());
- world.entity_mut(a).push_children(&[b, c]);
- world.entity_mut(c).push_children(&[d]);
+ world.entity_mut(a).add_children(&[b, c]);
+ world.entity_mut(c).add_children(&[d]);
let mut system_state = SystemState::<(Query<&Children>, Query<&A>)>::new(world);
let (children_query, a_query) = system_state.get(world);
diff --git a/crates/bevy_hierarchy/src/query_extension.rs b/crates/bevy_hierarchy/src/query_extension.rs
--- a/crates/bevy_hierarchy/src/query_extension.rs
+++ b/crates/bevy_hierarchy/src/query_extension.rs
@@ -191,8 +191,8 @@ mod tests {
let [a, b, c] = std::array::from_fn(|i| world.spawn(A(i)).id());
- world.entity_mut(a).push_children(&[b]);
- world.entity_mut(b).push_children(&[c]);
+ world.entity_mut(a).add_children(&[b]);
+ world.entity_mut(b).add_children(&[c]);
let mut system_state = SystemState::<(Query<&Parent>, Query<&A>)>::new(world);
let (parent_query, a_query) = system_state.get(world);
diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs
--- a/crates/bevy_render/src/view/visibility/mod.rs
+++ b/crates/bevy_render/src/view/visibility/mod.rs
@@ -565,13 +565,13 @@ mod test {
app.world_mut()
.entity_mut(root1)
- .push_children(&[root1_child1, root1_child2]);
+ .add_children(&[root1_child1, root1_child2]);
app.world_mut()
.entity_mut(root1_child1)
- .push_children(&[root1_child1_grandchild1]);
+ .add_children(&[root1_child1_grandchild1]);
app.world_mut()
.entity_mut(root1_child2)
- .push_children(&[root1_child2_grandchild1]);
+ .add_children(&[root1_child2_grandchild1]);
let root2 = app.world_mut().spawn(VisibilityBundle::default()).id();
let root2_child1 = app.world_mut().spawn(VisibilityBundle::default()).id();
diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs
--- a/crates/bevy_render/src/view/visibility/mod.rs
+++ b/crates/bevy_render/src/view/visibility/mod.rs
@@ -584,13 +584,13 @@ mod test {
app.world_mut()
.entity_mut(root2)
- .push_children(&[root2_child1, root2_child2]);
+ .add_children(&[root2_child1, root2_child2]);
app.world_mut()
.entity_mut(root2_child1)
- .push_children(&[root2_child1_grandchild1]);
+ .add_children(&[root2_child1_grandchild1]);
app.world_mut()
.entity_mut(root2_child2)
- .push_children(&[root2_child2_grandchild1]);
+ .add_children(&[root2_child2_grandchild1]);
app.update();
diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs
--- a/crates/bevy_render/src/view/visibility/mod.rs
+++ b/crates/bevy_render/src/view/visibility/mod.rs
@@ -662,13 +662,13 @@ mod test {
app.world_mut()
.entity_mut(root1)
- .push_children(&[root1_child1, root1_child2]);
+ .add_children(&[root1_child1, root1_child2]);
app.world_mut()
.entity_mut(root1_child1)
- .push_children(&[root1_child1_grandchild1]);
+ .add_children(&[root1_child1_grandchild1]);
app.world_mut()
.entity_mut(root1_child2)
- .push_children(&[root1_child2_grandchild1]);
+ .add_children(&[root1_child2_grandchild1]);
app.update();
diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs
--- a/crates/bevy_render/src/view/visibility/mod.rs
+++ b/crates/bevy_render/src/view/visibility/mod.rs
@@ -714,13 +714,13 @@ mod test {
let id1 = world.spawn(VisibilityBundle::default()).id();
let id2 = world.spawn(VisibilityBundle::default()).id();
- world.entity_mut(id1).push_children(&[id2]);
+ world.entity_mut(id1).add_children(&[id2]);
let id3 = world.spawn(visibility_bundle(Visibility::Hidden)).id();
- world.entity_mut(id2).push_children(&[id3]);
+ world.entity_mut(id2).add_children(&[id3]);
let id4 = world.spawn(VisibilityBundle::default()).id();
- world.entity_mut(id3).push_children(&[id4]);
+ world.entity_mut(id3).add_children(&[id4]);
// Test the hierarchy.
diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs
--- a/crates/bevy_render/src/view/visibility/mod.rs
+++ b/crates/bevy_render/src/view/visibility/mod.rs
@@ -787,7 +787,7 @@ mod test {
let parent = world.spawn(()).id();
let child = world.spawn(VisibilityBundle::default()).id();
- world.entity_mut(parent).push_children(&[child]);
+ world.entity_mut(parent).add_children(&[child]);
schedule.run(&mut world);
world.clear_trackers();
diff --git a/crates/bevy_scene/src/dynamic_scene.rs b/crates/bevy_scene/src/dynamic_scene.rs
--- a/crates/bevy_scene/src/dynamic_scene.rs
+++ b/crates/bevy_scene/src/dynamic_scene.rs
@@ -213,7 +213,7 @@ mod tests {
use bevy_ecs::reflect::{ReflectMapEntitiesResource, ReflectResource};
use bevy_ecs::system::Resource;
use bevy_ecs::{reflect::AppTypeRegistry, world::Command, world::World};
- use bevy_hierarchy::{Parent, PushChild};
+ use bevy_hierarchy::{AddChild, Parent};
use bevy_reflect::Reflect;
use crate::dynamic_scene_builder::DynamicSceneBuilder;
diff --git a/crates/bevy_scene/src/dynamic_scene.rs b/crates/bevy_scene/src/dynamic_scene.rs
--- a/crates/bevy_scene/src/dynamic_scene.rs
+++ b/crates/bevy_scene/src/dynamic_scene.rs
@@ -284,7 +284,7 @@ mod tests {
.register::<Parent>();
let original_parent_entity = world.spawn_empty().id();
let original_child_entity = world.spawn_empty().id();
- PushChild {
+ AddChild {
parent: original_parent_entity,
child: original_child_entity,
}
diff --git a/crates/bevy_scene/src/dynamic_scene.rs b/crates/bevy_scene/src/dynamic_scene.rs
--- a/crates/bevy_scene/src/dynamic_scene.rs
+++ b/crates/bevy_scene/src/dynamic_scene.rs
@@ -305,7 +305,7 @@ mod tests {
// We then add the parent from the scene as a child of the original child
// Hierarchy should look like:
// Original Parent <- Original Child <- Scene Parent <- Scene Child
- PushChild {
+ AddChild {
parent: original_child_entity,
child: from_scene_parent_entity,
}
diff --git a/crates/bevy_transform/src/systems.rs b/crates/bevy_transform/src/systems.rs
--- a/crates/bevy_transform/src/systems.rs
+++ b/crates/bevy_transform/src/systems.rs
@@ -477,7 +477,7 @@ mod test {
app.world_mut()
.spawn(TransformBundle::IDENTITY)
- .push_children(&[child]);
+ .add_children(&[child]);
std::mem::swap(
&mut *app.world_mut().get_mut::<Parent>(child).unwrap(),
&mut *temp.get_mut::<Parent>(grandchild).unwrap(),
|
`add_child` and `push_children` are inconsistently named
> Could be interesting to mention in docs that `push_children` is the plural version of `add_child`, or improve naming
_Originally posted by @mockersf in https://github.com/bevyengine/bevy/pull/15096#pullrequestreview-2288560335_
|
I don't particularly care which way this goes: `push` is clearer about the behavior (added to the back of the list) but `add` sounds nicer.
`push_child/ren` seems like the clearer and more intuitive of the two to me, but `add` is probably okay. Whatever everything should be homogenized the whole way down, there is `push_child_unchecked` also and `add_child` itself queues the command `PushChild`. And then the docs for `PushChild` describe it as a "Command that adds a child to an entity." and its apply function calls `add_child` on the `EntityWorldMut` 😕
Personally when I hear `push` I think of queues and stacks and wonder where the `pop` is.
Should the order of children matter in most instances? If so, I'd favor something like append. If not, I'd prefer add for simplicity.
|
2024-09-14T08:28:08Z
|
1.79
|
2024-09-16T23:33:15Z
|
612897becd415b7b982f58bd76deb719b42c9790
|
[
"child_builder::tests::add_child",
"child_builder::tests::build_children",
"child_builder::tests::build_child",
"child_builder::tests::children_removed_when_empty_commands",
"child_builder::tests::push_and_clear_children_commands",
"child_builder::tests::children_removed_when_empty_world",
"child_builder::tests::push_and_insert_and_clear_children_world",
"child_builder::tests::push_and_insert_and_remove_children_world",
"child_builder::tests::push_and_insert_and_remove_children_commands",
"child_builder::tests::push_and_replace_children_commands",
"child_builder::tests::push_and_replace_children_world",
"child_builder::tests::remove_parent",
"child_builder::tests::set_parent_of_orphan",
"child_builder::tests::set_parent",
"child_builder::tests::with_child",
"hierarchy::tests::despawn_descendants",
"hierarchy::tests::spawn_children_after_despawn_descendants",
"query_extension::tests::ancestor_iter",
"hierarchy::tests::despawn_recursive",
"query_extension::tests::descendant_iter",
"crates/bevy_hierarchy/src/child_builder.rs - child_builder::ChildBuilder (line 261)",
"crates/bevy_hierarchy/src/query_extension.rs - query_extension::HierarchyQueryExt::iter_descendants (line 20)",
"crates/bevy_hierarchy/src/query_extension.rs - query_extension::HierarchyQueryExt::iter_ancestors (line 42)"
] |
[] |
[] |
[] |
auto_2025-06-08
|
bevyengine/bevy
| 15,180
|
bevyengine__bevy-15180
|
[
"14438"
] |
e567669c311893fc7a4fc54614ab58f2c2918f73
| "diff --git a/crates/bevy_reflect/src/path/mod.rs b/crates/bevy_reflect/src/path/mod.rs\n--- a/crate(...TRUNCATED)
| "diff --git a/crates/bevy_reflect/src/path/mod.rs b/crates/bevy_reflect/src/path/mod.rs\n--- a/crate(...TRUNCATED)
| "Implement FromStr and TryFrom for ParsedPath\n## What problem does this solve or what need does it (...TRUNCATED)
| "I think `FromStr` is my preference, but I'd be curious to hear more about which one is idiomatic an(...TRUNCATED)
|
2024-09-13T00:44:41Z
|
1.79
|
2024-09-13T17:52:33Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["array::tests::next_index_increment","attributes::tests::should_allow_unit_struct_attribute_values"(...TRUNCATED)
|
[] |
[] |
[] |
auto_2025-06-08
|
bevyengine/bevy
| 15,174
|
bevyengine__bevy-15174
|
[
"10284",
"10284"
] |
1fd478277e55f31df18d02023c003935579b3864
| "diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs\n--- a/c(...TRUNCATED)
| "diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs\n--- a/crates/bevy_ref(...TRUNCATED)
| "Cannot Deserialize Camera2dBundle because of the OrthographicProjection component\n## Bevy version\(...TRUNCATED)
| "it seems that the OrthographicProjection component inside the camer2dbundle is causing the error yo(...TRUNCATED)
|
2024-09-12T15:03:13Z
|
1.79
|
2024-09-21T19:17:56Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["tests::glam::quat_serialization","tests::glam::quat_deserialization","tests::glam::vec3_serializat(...TRUNCATED)
| ["array::tests::next_index_increment","attributes::tests::should_allow_unit_struct_attribute_values"(...TRUNCATED)
|
[] |
[] |
auto_2025-06-08
|
bevyengine/bevy
| 15,166
|
bevyengine__bevy-15166
|
[
"15105",
"15105"
] |
8bfe635c3e119fa9324ba738ac11d30e7b988ac1
| "diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.r(...TRUNCATED)
| "diff --git a/crates/bevy_ecs/src/system/commands/mod.rs b/crates/bevy_ecs/src/system/commands/mod.r(...TRUNCATED)
| "Add missing insert APIs for predicates\n## What problem does this solve or what need does it fill?\(...TRUNCATED)
|
2024-09-11T20:27:48Z
|
1.79
|
2024-09-16T23:16:19Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["change_detection::tests::as_deref_mut","change_detection::tests::mut_from_non_send_mut","bundle::t(...TRUNCATED)
|
[] |
[] |
[] |
auto_2025-06-08
|
|
bevyengine/bevy
| 14,982
|
bevyengine__bevy-14982
|
[
"14969"
] |
f2cf02408ff8766ef53ad7fa2e42fd30d2f0f8e5
| "diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml\n--- a/crates/bevy_ref(...TRUNCATED)
| "diff --git a/crates/bevy_reflect/src/impls/smol_str.rs b/crates/bevy_reflect/src/impls/smol_str.rs\(...TRUNCATED)
| "SmolStr doesn't have ReflectDeserialize\n## What problem does this solve or what need does it fill?(...TRUNCATED)
|
2024-08-30T01:11:09Z
|
1.79
|
2024-09-02T22:50:58Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["array::tests::next_index_increment","attributes::tests::should_allow_unit_struct_attribute_values"(...TRUNCATED)
|
[] |
[] |
[] |
auto_2025-06-08
|
|
bevyengine/bevy
| 14,978
|
bevyengine__bevy-14978
|
[
"14974"
] |
9e784334276669295f0d1c83727868ec0086cdf7
| "diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs\n--- a/crates/bevy_app/src/app(...TRUNCATED)
| "diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs\n--- a/crates/be(...TRUNCATED)
| "Replace `NonZero*` type usage with `NonZero<T>` variant\n## What problem does this solve or what ne(...TRUNCATED)
|
2024-08-29T23:39:52Z
|
1.79
|
2024-08-30T02:53:22Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["bundle::tests::component_hook_order_recursive","bundle::tests::component_hook_order_spawn_despawn"(...TRUNCATED)
| ["attributes::tests::should_debug_custom_attributes","enums::tests::dynamic_enum_should_change_varia(...TRUNCATED)
|
[] |
[] |
auto_2025-06-08
|
|
bevyengine/bevy
| 14,894
|
bevyengine__bevy-14894
|
[
"14888"
] |
3ded59ed47985b346ea12db2abc73138e2e893b4
| "diff --git a/crates/bevy_ecs/src/observer/mod.rs b/crates/bevy_ecs/src/observer/mod.rs\n--- a/crate(...TRUNCATED)
| "diff --git a/crates/bevy_ecs/src/observer/mod.rs b/crates/bevy_ecs/src/observer/mod.rs\n--- a/crate(...TRUNCATED)
| "World::trigger variant that takes a &mut impl Event\n## What problem does this solve or what need d(...TRUNCATED)
|
2024-08-23T16:33:20Z
|
1.79
|
2024-09-23T17:22:06Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["change_detection::tests::mut_from_non_send_mut","change_detection::tests::map_mut","change_detecti(...TRUNCATED)
|
[] |
[] |
[] |
auto_2025-06-08
|
|
bevyengine/bevy
| 14,881
|
bevyengine__bevy-14881
|
[
"14873"
] |
9054d9dacb2bfb90ed3cd4e0d9efdb3bf0c233d9
| "diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs\n--- a/crates/bevy_app/src/lib(...TRUNCATED)
| "diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs\n--- a/cra(...TRUNCATED)
| "Bevy has no clear schedule for updating a camera's `Transform` when using a fixed time step\n## Wha(...TRUNCATED)
| "I'm a bit loathe to add more schedules with the current approach, but I see the pain here. \r\n\r\n(...TRUNCATED)
|
2024-08-22T20:15:58Z
|
1.79
|
2024-08-23T16:45:56Z
|
612897becd415b7b982f58bd76deb719b42c9790
| ["app::tests::app_exit_size","app::tests::test_derive_app_label","plugin_group::tests::add_after","p(...TRUNCATED)
|
[] |
[] |
[] |
auto_2025-06-08
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 1