repo
string
pull_number
int64
instance_id
string
issue_numbers
list
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
list
PASS_TO_PASS
list
FAIL_TO_FAIL
list
PASS_TO_FAIL
list
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 --- a/crates/bevy_reflect/src/path/mod.rs +++ b/crates/bevy_reflect/src/path/mod.rs @@ -478,6 +478,13 @@ impl<const N: usize> From<[Access<'static>; N]> for ParsedPath { } } +impl<'a> TryFrom<&'a str> for ParsedPath { + type Error = ReflectPathError<'a>; + fn try_from(value: &'a str) -> Result<Self, Self::Error> { + ParsedPath::parse(value) + } +} + impl fmt::Display for ParsedPath { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for OffsetAccess { access, .. } in &self.0 {
diff --git a/crates/bevy_reflect/src/path/mod.rs b/crates/bevy_reflect/src/path/mod.rs --- a/crates/bevy_reflect/src/path/mod.rs +++ b/crates/bevy_reflect/src/path/mod.rs @@ -585,6 +592,21 @@ mod tests { }) } + #[test] + fn try_from() { + assert_eq!( + ParsedPath::try_from("w").unwrap().0, + &[offset(access_field("w"), 1)] + ); + + let r = ParsedPath::try_from("w["); + let matches = matches!(r, Err(ReflectPathError::ParseError { .. })); + assert!( + matches, + "ParsedPath::try_from did not return a ParseError for \"w[\"" + ); + } + #[test] fn parsed_path_parse() { assert_eq!(
Implement FromStr and TryFrom for ParsedPath ## What problem does this solve or what need does it fill? `ParsedPath` is parsed from strings and so can implement `FromStr` and any of the `TryFrom` string variants. This let users to use `.parse()` or library author to create functions using `TryInto<ParsedPath>` for ergonomic reasons. ## What solution would you like? Implment any of: - `FromStr` - `TryFrom<&str>` - `TryFrom<String>` - more string variants... ## What alternative(s) have you considered? Use `ParsedPath::parse()` or `ParsedPath::parse_static()` directly.
I think `FromStr` is my preference, but I'd be curious to hear more about which one is idiomatic and why. Definitely think this should exist! iirc `FromStr` only really exists as a remnant from (no pun intended) before `TryFrom<&str>` existed. i think the typical solution is to implement both but there's an argument for not implementing `FromStr` since it's the less "flexible" trait. i think `TryFrom<&str>` is the only parameter type which makes much sense considering the current `ParsedPath` api.
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", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::dynamic_enum_should_return_is_dynamic", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_apply", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "enums::variants::tests::should_return_error_on_invalid_cast", "func::args::list::tests::should_pop_args_in_reverse_order", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::args::list::tests::should_push_arguments_in_order", "func::args::list::tests::should_reindex_on_push_after_take", "func::args::list::tests::should_take_args_in_order", "func::dynamic_function::tests::should_clone_dynamic_function", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function::tests::should_overwrite_function_name", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::info::tests::should_create_anonymous_function_info", "func::info::tests::should_create_closure_info", "func::info::tests::should_create_function_info", "func::info::tests::should_create_function_pointer_info", "func::into_function::tests::should_create_dynamic_function_from_closure", "func::into_function::tests::should_create_dynamic_function_from_function", "func::into_function::tests::should_default_closure_name_to_none", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::registry::tests::should_allow_overwriting_registration", "func::registry::tests::should_debug_function_registry", "func::registry::tests::should_error_on_missing_name", "func::registry::tests::should_only_register_function_once", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_register_closure", "func::registry::tests::should_register_dynamic_closure", "func::registry::tests::should_register_dynamic_function", "func::registry::tests::should_register_function", "func::tests::should_error_on_invalid_arg_ownership", "func::tests::should_error_on_invalid_arg_type", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "list::tests::test_into_iter", "map::tests::next_index_increment", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_array_behaves_like_list", "path::tests::parsed_path_get_field", "path::tests::reflect_path", "serde::de::tests::debug_stack::should_report_context_in_errors", "set::tests::test_into_iter", "serde::de::tests::should_return_error_if_missing_type_data", "serde::ser::tests::should_return_error_if_missing_registration", "serde::ser::tests::should_return_error_if_missing_type_data", "struct_trait::tests::next_index_increment", "serde::ser::tests::debug_stack::should_report_context_in_errors", "tests::as_reflect", "tests::assert_impl_reflect_macro_on_all", "tests::docstrings::should_not_contain_docs", "tests::docstrings::fields_should_contain_docs", "tests::custom_debug_function", "serde::de::tests::should_deserialize_value", "serde::tests::should_roundtrip_proxied_dynamic", "serde::de::tests::should_deserialized_typed", "tests::docstrings::should_contain_docs", "tests::from_reflect_should_allow_ignored_unnamed_fields", "serde::tests::test_serialization_struct", "tests::from_reflect_should_use_default_variant_field_attributes", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "tests::from_reflect_should_use_default_container_attribute", "tests::docstrings::variants_should_contain_docs", "tests::from_reflect_should_use_default_field_attributes", "serde::tests::test_serialization_tuple_struct", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "serde::de::tests::enum_should_deserialize", "tests::multiple_reflect_lists", "tests::glam::vec3_apply_dynamic", "tests::glam::quat_serialization", "serde::ser::tests::should_serialize_dynamic_option", "tests::multiple_reflect_value_lists", "serde::ser::tests::enum_should_serialize", "serde::de::tests::should_deserialize_non_self_describing_binary", "tests::into_reflect", "serde::de::tests::should_deserialize_self_describing_binary", "serde::de::tests::should_deserialize_option", "tests::dynamic_types_debug_format", "serde::ser::tests::should_serialize_self_describing_binary", "tests::can_opt_out_type_path", "serde::ser::tests::should_serialize_option", "tests::reflect_downcast", "tests::reflect_ignore", "serde::de::tests::should_deserialize", "serde::ser::tests::should_serialize_non_self_describing_binary", "tests::glam::quat_deserialization", "tests::glam::vec3_serialization", "tests::recursive_typed_storage_does_not_hang", "tests::reflect_map", "tests::reflect_struct", "tests::reflect_take", "tests::not_dynamic_names", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::reflect_complex_patch", "tests::glam::vec3_deserialization", "tests::should_allow_dynamic_fields", "tests::should_allow_empty_custom_where", "tests::recursive_registration_does_not_hang", "tests::should_allow_custom_where_with_assoc_type", "serde::ser::tests::should_serialize", "tests::reflect_type_path", "tests::should_drain_fields", "tests::reflect_type_info", "tests::should_permit_higher_ranked_lifetimes", "tests::should_allow_multiple_custom_where", "tests::reflect_map_no_hash_dynamic_representing - should panic", "tests::reflect_map_no_hash_dynamic - should panic", "tests::reflect_map_no_hash - should panic", "tests::should_not_auto_register_existing_types", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_reflect_nested_remote_enum", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_call_from_reflect_dynamically", "tests::should_reflect_remote_type_from_module", "tests::should_reflect_nested_remote_type", "tests::should_take_nested_remote_type", "tests::should_take_remote_type", "tests::should_auto_register_fields", "tests::try_apply_should_detect_kinds", "tests::should_reflect_remote_value_type", "tests::should_try_take_remote_type", "tuple::tests::next_index_increment", "tests::should_reflect_remote_enum", "tests::should_reflect_remote_type", "tuple_struct::tests::next_index_increment", "tests::should_reflect_debug", "serde::de::tests::should_reserialize", "type_info::tests::should_return_error_on_invalid_cast", "tests::std_type_paths", "type_registry::test::test_reflect_from_ptr", "tests::reflect_serialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 32)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 68)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 58)", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 14)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 24)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 76)", "crates/bevy_reflect/src/lib.rs - (line 343)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 30)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 233)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 321)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 28)", "crates/bevy_reflect/src/lib.rs - (line 154)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 486)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 26)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 39)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 180)", "crates/bevy_reflect/src/lib.rs - (line 204)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 47)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 96)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 124)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 10)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 114)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 500)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 252)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 47)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 62)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 345)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 128)", "crates/bevy_reflect/src/list.rs - list::List (line 38)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 24)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 36)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/set.rs - set::set_debug (line 422)", "crates/bevy_reflect/src/lib.rs - (line 190)", "crates/bevy_reflect/src/type_info.rs - type_info::Type (line 318)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 161)", "crates/bevy_reflect/src/lib.rs - (line 322)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 544)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 456)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 110)", "crates/bevy_reflect/src/func/mod.rs - func (line 102)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 142)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 151)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 452)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 162)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 187)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 217)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 208)", "crates/bevy_reflect/src/func/info.rs - func::info::TypedFunction (line 191)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 333)", "crates/bevy_reflect/src/lib.rs - (line 263)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 152)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::ReflectSerializer (line 31)", "crates/bevy_reflect/src/lib.rs - (line 294)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 150)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 25)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 271)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/lib.rs - (line 224)", "crates/bevy_reflect/src/array.rs - array::Array (line 31)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 187)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 507)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 181)", "crates/bevy_reflect/src/set.rs - set::Set (line 28)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 75)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 205)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 149)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 379)", "crates/bevy_reflect/src/lib.rs - (line 132)", "crates/bevy_reflect/src/lib.rs - (line 238)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::TypedReflectSerializer (line 109)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 82)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 83)", "crates/bevy_reflect/src/lib.rs - (line 362)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 101)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 165)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::TypedReflectDeserializer (line 181)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::ReflectDeserializer (line 48)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 450)", "crates/bevy_reflect/src/lib.rs - (line 405)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 650)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)" ]
[]
[]
[]
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 --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -1,10 +1,10 @@ use crate as bevy_reflect; -use crate::prelude::ReflectDefault; +use crate::{std_traits::ReflectDefault, ReflectDeserialize, ReflectSerialize}; use bevy_reflect_derive::{impl_reflect, impl_reflect_value}; use glam::*; impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct IVec2 { x: i32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -12,7 +12,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct IVec3 { x: i32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -21,7 +21,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct IVec4 { x: i32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -32,7 +32,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct I64Vec2 { x: i64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -41,7 +41,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct I64Vec3 { x: i64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -51,7 +51,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct I64Vec4 { x: i64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -62,7 +62,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct UVec2 { x: u32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -70,7 +70,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct UVec3 { x: u32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -79,7 +79,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct UVec4 { x: u32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -90,7 +90,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct U64Vec2 { x: u64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -98,7 +98,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct U64Vec3 { x: u64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -107,7 +107,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, Hash, PartialEq, Default)] + #[reflect(Debug, Hash, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct U64Vec4 { x: u64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -118,7 +118,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Vec2 { x: f32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -126,7 +126,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Vec3 { x: f32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -135,7 +135,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Vec3A { x: f32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -144,7 +144,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Vec4 { x: f32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -155,7 +155,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct BVec2 { x: bool, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -163,7 +163,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct BVec3 { x: bool, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -172,7 +172,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct BVec4 { x: bool, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -183,7 +183,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DVec2 { x: f64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -191,7 +191,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DVec3 { x: f64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -200,7 +200,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DVec4 { x: f64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -211,7 +211,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Mat2 { x_axis: Vec2, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -219,7 +219,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Mat3 { x_axis: Vec3, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -228,7 +228,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Mat3A { x_axis: Vec3A, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -237,7 +237,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Mat4 { x_axis: Vec4, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -248,7 +248,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DMat2 { x_axis: DVec2, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -256,7 +256,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DMat3 { x_axis: DVec3, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -265,7 +265,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DMat4 { x_axis: DVec4, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -276,7 +276,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Affine2 { matrix2: Mat2, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -284,7 +284,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Affine3A { matrix3: Mat3A, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -293,7 +293,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DAffine2 { matrix2: DMat2, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -301,7 +301,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DAffine3 { matrix3: DMat3, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -310,7 +310,7 @@ impl_reflect!( ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct Quat { x: f32, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -320,7 +320,7 @@ impl_reflect!( } ); impl_reflect!( - #[reflect(Debug, PartialEq, Default)] + #[reflect(Debug, PartialEq, Default, Deserialize, Serialize)] #[type_path = "glam"] struct DQuat { x: f64, diff --git a/crates/bevy_reflect/src/impls/glam.rs b/crates/bevy_reflect/src/impls/glam.rs --- a/crates/bevy_reflect/src/impls/glam.rs +++ b/crates/bevy_reflect/src/impls/glam.rs @@ -330,6 +330,6 @@ impl_reflect!( } ); -impl_reflect_value!(::glam::EulerRot(Debug, Default)); -impl_reflect_value!(::glam::BVec3A(Debug, Default)); -impl_reflect_value!(::glam::BVec4A(Debug, Default)); +impl_reflect_value!(::glam::EulerRot(Debug, Default, Deserialize, Serialize)); +impl_reflect_value!(::glam::BVec3A(Debug, Default, Deserialize, Serialize)); +impl_reflect_value!(::glam::BVec4A(Debug, Default, Deserialize, Serialize)); diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -6,7 +6,7 @@ use bevy_ecs::{ reflect::{AppTypeRegistry, ReflectComponent, ReflectResource}, world::World, }; -use bevy_reflect::PartialReflect; +use bevy_reflect::{PartialReflect, ReflectFromReflect}; use bevy_utils::default; use std::collections::BTreeMap; diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -274,11 +274,22 @@ impl<'w> DynamicSceneBuilder<'w> { return None; } - let component = type_registry - .get(type_id)? + let type_registration = type_registry.get(type_id)?; + + let component = type_registration .data::<ReflectComponent>()? .reflect(original_entity)?; - entry.components.push(component.clone_value()); + + // Clone via `FromReflect`. Unlike `PartialReflect::clone_value` this + // retains the original type and `ReflectSerialize` type data which is needed to + // deserialize. + let component = type_registration + .data::<ReflectFromReflect>() + .and_then(|fr| fr.from_reflect(component.as_partial_reflect())) + .map(PartialReflect::into_partial_reflect) + .unwrap_or_else(|| component.clone_value()); + + entry.components.push(component); Some(()) }; extract_and_push(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -3,11 +3,11 @@ use crate::{DynamicEntity, DynamicScene}; use bevy_ecs::entity::Entity; use bevy_reflect::serde::{TypedReflectDeserializer, TypedReflectSerializer}; -use bevy_reflect::PartialReflect; use bevy_reflect::{ serde::{ReflectDeserializer, TypeRegistrationDeserializer}, TypeRegistry, }; +use bevy_reflect::{PartialReflect, ReflectFromReflect}; use bevy_utils::HashSet; use serde::ser::SerializeMap; use serde::{ diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -471,9 +471,19 @@ impl<'a, 'de> Visitor<'de> for SceneMapVisitor<'a> { ))); } - entries.push( - map.next_value_seed(TypedReflectDeserializer::new(registration, self.registry))?, - ); + let value = + map.next_value_seed(TypedReflectDeserializer::new(registration, self.registry))?; + + // Attempt to convert using FromReflect. + let value = self + .registry + .get(registration.type_id()) + .and_then(|tr| tr.data::<ReflectFromReflect>()) + .and_then(|fr| fr.from_reflect(value.as_partial_reflect())) + .map(PartialReflect::into_partial_reflect) + .unwrap_or(value); + + entries.push(value); } Ok(entries)
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -2943,12 +2943,7 @@ bevy_reflect::tests::Test { let output = to_string_pretty(&ser, config).unwrap(); let expected = r#" { - "glam::Quat": ( - x: 1.0, - y: 2.0, - z: 3.0, - w: 4.0, - ), + "glam::Quat": (1.0, 2.0, 3.0, 4.0), }"#; assert_eq!(expected, format!("\n{output}")); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -2958,12 +2953,7 @@ bevy_reflect::tests::Test { fn quat_deserialization() { let data = r#" { - "glam::Quat": ( - x: 1.0, - y: 2.0, - z: 3.0, - w: 4.0, - ), + "glam::Quat": (1.0, 2.0, 3.0, 4.0), }"#; let mut registry = TypeRegistry::default(); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -3002,11 +2992,7 @@ bevy_reflect::tests::Test { let output = to_string_pretty(&ser, config).unwrap(); let expected = r#" { - "glam::Vec3": ( - x: 12.0, - y: 3.0, - z: -6.9, - ), + "glam::Vec3": (12.0, 3.0, -6.9), }"#; assert_eq!(expected, format!("\n{output}")); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -3016,11 +3002,7 @@ bevy_reflect::tests::Test { fn vec3_deserialization() { let data = r#" { - "glam::Vec3": ( - x: 12.0, - y: 3.0, - z: -6.9, - ), + "glam::Vec3": (12.0, 3.0, -6.9), }"#; let mut registry = TypeRegistry::default(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -491,10 +501,10 @@ mod tests { use bevy_ecs::query::{With, Without}; use bevy_ecs::reflect::{AppTypeRegistry, ReflectMapEntities}; use bevy_ecs::world::FromWorld; - use bevy_reflect::{Reflect, ReflectSerialize}; + use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; use bincode::Options; use serde::de::DeserializeSeed; - use serde::Serialize; + use serde::{Deserialize, Serialize}; use std::io::BufReader; #[derive(Component, Reflect, Default)] diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -507,6 +517,30 @@ mod tests { #[reflect(Component)] struct Baz(i32); + // De/serialize as hex. + mod qux { + use serde::{de::Error, Deserialize, Deserializer, Serializer}; + + pub fn serialize<S>(value: &u32, serializer: S) -> Result<S::Ok, S::Error> + where + S: Serializer, + { + serializer.serialize_str(&format!("{:X}", value)) + } + + pub fn deserialize<'de, D>(deserializer: D) -> Result<u32, D::Error> + where + D: Deserializer<'de>, + { + u32::from_str_radix(<&str as Deserialize>::deserialize(deserializer)?, 16) + .map_err(Error::custom) + } + } + + #[derive(Component, Copy, Clone, Reflect, Debug, PartialEq, Serialize, Deserialize)] + #[reflect(Component, Serialize, Deserialize)] + struct Qux(#[serde(with = "qux")] u32); + #[derive(Component, Reflect, Default)] #[reflect(Component)] struct MyComponent { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -555,6 +589,7 @@ mod tests { registry.register::<Foo>(); registry.register::<Bar>(); registry.register::<Baz>(); + registry.register::<Qux>(); registry.register::<MyComponent>(); registry.register::<MyEnum>(); registry.register::<String>(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -679,6 +714,18 @@ mod tests { assert_eq!(1, dst_world.query::<&Baz>().iter(&dst_world).count()); } + fn roundtrip_ron(world: &World) -> (DynamicScene, DynamicScene) { + let scene = DynamicScene::from_world(world); + let registry = world.resource::<AppTypeRegistry>().read(); + let serialized = scene.serialize(&registry).unwrap(); + let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); + let scene_deserializer = SceneDeserializer { + type_registry: &registry, + }; + let deserialized_scene = scene_deserializer.deserialize(&mut deserializer).unwrap(); + (scene, deserialized_scene) + } + #[test] fn should_roundtrip_with_later_generations_and_obsolete_references() { let mut world = create_world(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -690,19 +737,7 @@ mod tests { world.despawn(a); world.spawn(MyEntityRef(foo)).insert(Bar(123)); - let registry = world.resource::<AppTypeRegistry>(); - - let scene = DynamicScene::from_world(&world); - - let serialized = scene - .serialize(&world.resource::<AppTypeRegistry>().read()) - .unwrap(); - let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); - let scene_deserializer = SceneDeserializer { - type_registry: &registry.0.read(), - }; - - let deserialized_scene = scene_deserializer.deserialize(&mut deserializer).unwrap(); + let (scene, deserialized_scene) = roundtrip_ron(&world); let mut map = EntityHashMap::default(); let mut dst_world = create_world(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -730,6 +765,24 @@ mod tests { .all(|r| world.get_entity(r.0).is_none())); } + #[test] + fn should_roundtrip_with_custom_serialization() { + let mut world = create_world(); + let qux = Qux(42); + world.spawn(qux); + + let (scene, deserialized_scene) = roundtrip_ron(&world); + + assert_eq!(1, deserialized_scene.entities.len()); + assert_scene_eq(&scene, &deserialized_scene); + + let mut world = create_world(); + deserialized_scene + .write_to_world(&mut world, &mut EntityHashMap::default()) + .unwrap(); + assert_eq!(&qux, world.query::<&Qux>().single(&world)); + } + #[test] fn should_roundtrip_postcard() { let mut world = create_world();
Cannot Deserialize Camera2dBundle because of the OrthographicProjection component ## Bevy version 0.11.3 ## \[Optional\] Relevant system information AdapterInfo { name: "AMD JUNIPER (DRM 2.50.0 / 6.5.6-arch2-1, LLVM 16.0.6)", vendor: 65541, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl } ## What you did i saved and loaded a camerabundle2d : ``` use bevy::prelude::*; use std::fs::File; use bevy::tasks::IoTaskPool; use std::io::Write; fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, setup_save) // run once to generate save then comment and uncomment the line below to load //.add_systems(Startup, setup_load) .add_systems(Update, save) .add_systems(Update, load) .run(); } #[derive(Component,Reflect,Default)] pub struct Load; #[derive(Component,Reflect)] pub struct Save(Entity); fn setup_save( mut commands : Commands ){ let ent = commands.spawn(Camera2dBundle::default()).id(); commands.spawn(Save(ent)); println!("setup"); } fn setup_load( mut commands : Commands ){ commands.spawn(Load); println!("setup load"); } fn save( world: &World, query : Query<(&Save)>, mut commands : Commands ) { for s in query.iter(){ let savegame_save_path : &str = "assets/savegame.scn.ron"; let mut entity_array = vec![s.0]; let mut scene_builder = DynamicSceneBuilder::from_world(world); scene_builder.allow_all(); scene_builder.deny::<ComputedVisibility>();// cant currently serialize with ComputedVisibilityFlags scene_builder.extract_entities(entity_array.into_iter()); let scene = scene_builder.build(); let type_registry = world.resource::<AppTypeRegistry>().clone(); let serialized_scene = scene.serialize_ron(&type_registry).unwrap(); #[cfg(not(target_arch = "wasm32"))] IoTaskPool::get() .spawn(async move { File::create(savegame_save_path) .and_then(|mut file| file.write(serialized_scene.as_bytes())) .expect("Error while writing scene to file"); }) .detach(); println!("save"); commands.entity(s.0).despawn_recursive(); } } fn load( loaded_query : Query<&Load>, mut commands : Commands, asset_server: Res<AssetServer>, ) { for i in loaded_query.iter(){ println!("load"); let save_path : &str = "savegame.scn.ron"; let scenehandle = asset_server.load(save_path); commands.spawn(DynamicSceneBundle { scene: scenehandle, ..default() }); } } ``` ## What went wrong it wont load instead it will print an error like this: WARN bevy_asset::asset_server: encountered an error while loading an asset: Expected float at savegame.scn.ron:25:15 which points to : `x: -640.0,` Cannot Deserialize Camera2dBundle because of the OrthographicProjection component ## Bevy version 0.11.3 ## \[Optional\] Relevant system information AdapterInfo { name: "AMD JUNIPER (DRM 2.50.0 / 6.5.6-arch2-1, LLVM 16.0.6)", vendor: 65541, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl } ## What you did i saved and loaded a camerabundle2d : ``` use bevy::prelude::*; use std::fs::File; use bevy::tasks::IoTaskPool; use std::io::Write; fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, setup_save) // run once to generate save then comment and uncomment the line below to load //.add_systems(Startup, setup_load) .add_systems(Update, save) .add_systems(Update, load) .run(); } #[derive(Component,Reflect,Default)] pub struct Load; #[derive(Component,Reflect)] pub struct Save(Entity); fn setup_save( mut commands : Commands ){ let ent = commands.spawn(Camera2dBundle::default()).id(); commands.spawn(Save(ent)); println!("setup"); } fn setup_load( mut commands : Commands ){ commands.spawn(Load); println!("setup load"); } fn save( world: &World, query : Query<(&Save)>, mut commands : Commands ) { for s in query.iter(){ let savegame_save_path : &str = "assets/savegame.scn.ron"; let mut entity_array = vec![s.0]; let mut scene_builder = DynamicSceneBuilder::from_world(world); scene_builder.allow_all(); scene_builder.deny::<ComputedVisibility>();// cant currently serialize with ComputedVisibilityFlags scene_builder.extract_entities(entity_array.into_iter()); let scene = scene_builder.build(); let type_registry = world.resource::<AppTypeRegistry>().clone(); let serialized_scene = scene.serialize_ron(&type_registry).unwrap(); #[cfg(not(target_arch = "wasm32"))] IoTaskPool::get() .spawn(async move { File::create(savegame_save_path) .and_then(|mut file| file.write(serialized_scene.as_bytes())) .expect("Error while writing scene to file"); }) .detach(); println!("save"); commands.entity(s.0).despawn_recursive(); } } fn load( loaded_query : Query<&Load>, mut commands : Commands, asset_server: Res<AssetServer>, ) { for i in loaded_query.iter(){ println!("load"); let save_path : &str = "savegame.scn.ron"; let scenehandle = asset_server.load(save_path); commands.spawn(DynamicSceneBundle { scene: scenehandle, ..default() }); } } ``` ## What went wrong it wont load instead it will print an error like this: WARN bevy_asset::asset_server: encountered an error while loading an asset: Expected float at savegame.scn.ron:25:15 which points to : `x: -640.0,`
it seems that the OrthographicProjection component inside the camer2dbundle is causing the error you can just spawn OrthographicProjection instead of the camerbundle and get the same error. i tested all the other components inside the camer2dbundle and they all can be loaded Related issue: #9060. But it seems like this might be a separate thing. I am seeing the same `Expected float` error with bevy main after migrating your example. it seems that the OrthographicProjection component inside the camer2dbundle is causing the error you can just spawn OrthographicProjection instead of the camerbundle and get the same error. i tested all the other components inside the camer2dbundle and they all can be loaded Related issue: #9060. But it seems like this might be a separate thing. I am seeing the same `Expected float` error with bevy main after migrating your example.
2024-09-12T15:03:13Z
1.79
2024-09-21T19:17:56Z
612897becd415b7b982f58bd76deb719b42c9790
[ "tests::glam::quat_serialization", "tests::glam::quat_deserialization", "tests::glam::vec3_serialization", "tests::glam::vec3_deserialization" ]
[ "array::tests::next_index_increment", "attributes::tests::should_allow_unit_struct_attribute_values", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_return_is_dynamic", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_apply", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "enums::variants::tests::should_return_error_on_invalid_cast", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::args::list::tests::should_pop_args_in_reverse_order", "func::args::list::tests::should_push_arguments_in_order", "func::args::list::tests::should_reindex_on_push_after_take", "func::args::list::tests::should_take_args_in_order", "func::dynamic_function::tests::should_clone_dynamic_function", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "func::dynamic_function::tests::should_overwrite_function_name", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::info::tests::should_create_anonymous_function_info", "func::info::tests::should_create_closure_info", "func::info::tests::should_create_function_info", "func::info::tests::should_create_function_pointer_info", "func::into_function::tests::should_create_dynamic_function_from_closure", "func::into_function::tests::should_create_dynamic_function_from_function", "func::into_function::tests::should_default_closure_name_to_none", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::registry::tests::should_allow_overwriting_registration", "func::registry::tests::should_debug_function_registry", "func::registry::tests::should_error_on_missing_name", "func::registry::tests::should_only_register_function_once", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_register_closure", "func::registry::tests::should_register_dynamic_closure", "func::registry::tests::should_register_dynamic_function", "func::registry::tests::should_register_function", "func::tests::should_error_on_invalid_arg_ownership", "func::tests::should_error_on_invalid_arg_type", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::can_serialize_duration", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "list::tests::test_into_iter", "map::tests::next_index_increment", "map::tests::test_into_iter", "map::tests::test_map_get_at_mut", "map::tests::test_map_get_at", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "set::tests::test_into_iter", "tests::as_reflect", "struct_trait::tests::next_index_increment", "tests::assert_impl_reflect_macro_on_all", "serde::ser::tests::should_return_error_if_missing_registration", "serde::ser::tests::should_return_error_if_missing_type_data", "tests::docstrings::fields_should_contain_docs", "tests::custom_debug_function", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "tests::docstrings::should_contain_docs", "tests::docstrings::should_not_contain_docs", "tests::can_opt_out_type_path", "serde::de::tests::should_return_error_if_missing_type_data", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "serde::de::tests::debug_stack::should_report_context_in_errors", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::from_reflect_should_use_default_container_attribute", "tests::from_reflect_should_use_default_field_attributes", "serde::tests::should_roundtrip_proxied_dynamic", "serde::ser::tests::should_serialize_dynamic_option", "serde::ser::tests::debug_stack::should_report_context_in_errors", "tests::docstrings::variants_should_contain_docs", "serde::tests::test_serialization_tuple_struct", "serde::de::tests::should_deserialize_value", "serde::ser::tests::enum_should_serialize", "tests::glam::vec3_apply_dynamic", "serde::de::tests::should_deserialized_typed", "tests::into_reflect", "serde::tests::test_serialization_struct", "tests::dynamic_types_debug_format", "serde::ser::tests::should_serialize", "tests::multiple_reflect_value_lists", "serde::de::tests::enum_should_deserialize", "tests::multiple_reflect_lists", "serde::ser::tests::should_serialize_option", "tests::reflect_ignore", "serde::de::tests::should_deserialize_non_self_describing_binary", "tests::reflect_map", "tests::not_dynamic_names", "tests::reflect_downcast", "serde::ser::tests::should_serialize_non_self_describing_binary", "tests::reflect_struct", "tests::reflect_complex_patch", "tests::recursive_typed_storage_does_not_hang", "tests::reflect_map_no_hash - should panic", "tests::reflect_take", "tests::recursive_registration_does_not_hang", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::reflect_type_path", "serde::ser::tests::should_serialize_self_describing_binary", "tests::reflect_map_no_hash_dynamic - should panic", "tests::should_allow_dynamic_fields", "tests::should_allow_empty_custom_where", "serde::de::tests::should_deserialize_option", "tests::should_allow_custom_where_with_assoc_type", "tests::reflect_type_info", "tests::should_allow_multiple_custom_where", "tests::reflect_map_no_hash_dynamic_representing - should panic", "tests::should_permit_higher_ranked_lifetimes", "tests::should_drain_fields", "tests::should_not_auto_register_existing_types", "tests::should_permit_valid_represented_type_for_dynamic", "serde::de::tests::should_deserialize_self_describing_binary", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_reflect_nested_remote_enum", "tests::should_auto_register_fields", "tests::should_reflect_remote_type_from_module", "serde::de::tests::should_deserialize", "tests::should_reflect_nested_remote_type", "tests::should_reflect_remote_type", "tests::should_reflect_remote_enum", "tests::should_call_from_reflect_dynamically", "tests::should_take_nested_remote_type", "tests::should_take_remote_type", "tests::should_reflect_debug", "tests::std_type_paths", "tests::try_apply_should_detect_kinds", "tuple::tests::next_index_increment", "tests::should_try_take_remote_type", "tests::should_reflect_remote_value_type", "type_info::tests::should_return_error_on_invalid_cast", "tuple_struct::tests::next_index_increment", "type_registry::test::test_reflect_from_ptr", "tests::reflect_serialize", "serde::de::tests::should_reserialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 24)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 14)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 68)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 32)", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 76)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 58)", "crates/bevy_reflect/src/lib.rs - (line 343)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 30)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/lib.rs - (line 190)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 149)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 180)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 271)", "crates/bevy_reflect/src/list.rs - list::List (line 38)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/array.rs - array::Array (line 31)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 500)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 507)", "crates/bevy_reflect/src/type_info.rs - type_info::Type (line 318)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 39)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 486)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 62)", "crates/bevy_reflect/src/lib.rs - (line 294)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 162)", "crates/bevy_reflect/src/func/info.rs - func::info::TypedFunction (line 191)", "crates/bevy_reflect/src/lib.rs - (line 238)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/lib.rs - (line 322)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 187)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 321)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 25)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 26)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 75)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 142)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 205)", "crates/bevy_reflect/src/lib.rs - (line 224)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 28)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 24)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 345)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 152)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 456)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 114)", "crates/bevy_reflect/src/set.rs - set::Set (line 28)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 650)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 128)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 47)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 47)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 150)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 101)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 10)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 181)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 544)", "crates/bevy_reflect/src/lib.rs - (line 263)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/set.rs - set::set_debug (line 422)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 217)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 151)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 333)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::TypedReflectDeserializer (line 181)", "crates/bevy_reflect/src/lib.rs - (line 132)", "crates/bevy_reflect/src/lib.rs - (line 154)", "crates/bevy_reflect/src/lib.rs - (line 204)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 82)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 233)", "crates/bevy_reflect/src/func/mod.rs - func (line 102)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 208)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 36)", "crates/bevy_reflect/src/lib.rs - (line 362)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 96)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 110)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 452)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 161)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 124)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 187)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 83)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 165)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 252)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::TypedReflectSerializer (line 109)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::ReflectSerializer (line 31)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::ReflectDeserializer (line 48)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 379)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 450)", "crates/bevy_reflect/src/lib.rs - (line 405)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)" ]
[]
[]
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.rs --- a/crates/bevy_ecs/src/system/commands/mod.rs +++ b/crates/bevy_ecs/src/system/commands/mod.rs @@ -1017,13 +1017,36 @@ impl EntityCommands<'_> { /// /// # Panics /// + /// The command will panic when applied if the associated entity does not exist. + /// + /// 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)) + } + + /// Adds a [`Bundle`] of components to the entity without overwriting if the + /// predicate returns true. + /// + /// This is the same as [`EntityCommands::insert_if`], but in case of duplicate + /// components will leave the old values instead of replacing them with new + /// ones. + /// + /// # Panics + /// /// The command will panic when applied if the associated entity does not /// exist. /// /// 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)) + pub fn insert_if_new_and<F>(self, bundle: impl Bundle, condition: F) -> Self + where + F: FnOnce() -> bool, + { + if condition() { + self.insert_if_new(bundle) + } else { + self + } } /// Adds a dynamic component to an 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 @@ -1161,6 +1184,52 @@ impl EntityCommands<'_> { } } + /// Tries to add a [`Bundle`] of components to the entity without overwriting if the + /// predicate returns true. + /// + /// This is the same as [`EntityCommands::try_insert_if`], but in case of duplicate + /// components will leave the old values instead of replacing them with new + /// ones. + /// + /// # Note + /// + /// Unlike [`Self::insert_if_new_and`], this will not panic if the associated entity does + /// not exist. + /// + /// # Example + /// + /// ``` + /// # use bevy_ecs::prelude::*; + /// # #[derive(Resource)] + /// # struct PlayerEntity { entity: Entity } + /// # impl PlayerEntity { fn is_spectator(&self) -> bool { true } } + /// #[derive(Component)] + /// struct StillLoadingStats; + /// #[derive(Component)] + /// struct Health(u32); + /// + /// fn add_health_system(mut commands: Commands, player: Res<PlayerEntity>) { + /// commands.entity(player.entity) + /// .try_insert_if(Health(10), || player.is_spectator()) + /// .remove::<StillLoadingStats>(); + /// + /// commands.entity(player.entity) + /// // This will not panic nor will it overwrite the component + /// .try_insert_if_new_and(Health(5), || player.is_spectator()); + /// } + /// # bevy_ecs::system::assert_is_system(add_health_system); + /// ``` + pub fn try_insert_if_new_and<F>(self, bundle: impl Bundle, condition: F) -> Self + where + F: FnOnce() -> bool, + { + if condition() { + self.try_insert_if_new(bundle) + } else { + self + } + } + /// Tries to add a [`Bundle`] of components to the entity without overwriting. /// /// This is the same as [`EntityCommands::try_insert`], but in case of duplicate
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 @@ -1684,6 +1753,45 @@ mod tests { assert_eq!(results3, vec![(42u32, 0u64), (0u32, 42u64)]); } + #[test] + fn insert_components() { + let mut world = World::default(); + let mut command_queue1 = CommandQueue::default(); + + // insert components + let entity = Commands::new(&mut command_queue1, &world) + .spawn(()) + .insert_if(W(1u8), || true) + .insert_if(W(2u8), || false) + .insert_if_new(W(1u16)) + .insert_if_new(W(2u16)) + .insert_if_new_and(W(1u32), || false) + .insert_if_new_and(W(2u32), || true) + .insert_if_new_and(W(3u32), || true) + .id(); + command_queue1.apply(&mut world); + + let results = world + .query::<(&W<u8>, &W<u16>, &W<u32>)>() + .iter(&world) + .map(|(a, b, c)| (a.0, b.0, c.0)) + .collect::<Vec<_>>(); + assert_eq!(results, vec![(1u8, 1u16, 2u32)]); + + // try to insert components after despawning entity + // in another command queue + Commands::new(&mut command_queue1, &world) + .entity(entity) + .try_insert_if_new_and(W(1u64), || true); + + let mut command_queue2 = CommandQueue::default(); + Commands::new(&mut command_queue2, &world) + .entity(entity) + .despawn(); + command_queue2.apply(&mut world); + command_queue1.apply(&mut world); + } + #[test] fn remove_components() { let mut world = World::default();
Add missing insert APIs for predicates ## What problem does this solve or what need does it fill? For consistency, we are missing the following methods: - `insert_if_new_and` (`insert_if_new` + `insert_if`) - `try_insert_if_new_and` (`try_insert` +`insert_if_new` + `insert_if`) ## Additional context https://github.com/bevyengine/bevy/pull/14897 added the predicate methods, and we decided to leave these out for some naming bikeshed. This bikeshed happened on [Discord](https://discord.com/channels/691052431525675048/749335865876021248/1282499667619217529). This is a rather uncontroversial result that does not require any big changes. Add missing insert APIs for predicates ## What problem does this solve or what need does it fill? For consistency, we are missing the following methods: - `insert_if_new_and` (`insert_if_new` + `insert_if`) - `try_insert_if_new_and` (`try_insert` +`insert_if_new` + `insert_if`) ## Additional context https://github.com/bevyengine/bevy/pull/14897 added the predicate methods, and we decided to leave these out for some naming bikeshed. This bikeshed happened on [Discord](https://discord.com/channels/691052431525675048/749335865876021248/1282499667619217529). This is a rather uncontroversial result that does not require any big changes.
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::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_new", "bundle::tests::insert_if_new", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_recursive", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_expiration", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_const", "entity::tests::entity_comparison", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_multiple_events", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "observer::tests::observer_dynamic_component", "query::access::tests::filtered_access_extend", "observer::tests::observer_despawn_archetype_flags", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_access_clone", "observer::tests::observer_no_target", "query::access::tests::access_get_conflicts", "observer::tests::observer_multiple_components", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_clone_from", "query::access::tests::read_all_access_conflicts", "observer::tests::observer_order_replace", "observer::tests::observer_multiple_listeners", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_world", "observer::tests::observer_multiple_matches", "observer::tests::observer_propagating", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_halt", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_order_insert_remove", "observer::tests::observer_order_recursive", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_static_components", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_propagating_world_skipping", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_propagating_parallel_propagation", "query::builder::tests::builder_or", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_added", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_entity_mut", "query::iter::tests::query_sort_after_next - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_to_more_general", "query::state::tests::transmute_from_dense_to_sparse", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::state::tests::join_with_get", "query::tests::has_query", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::query", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "query::tests::multi_storage_query", "query::state::tests::join", "reflect::entity_commands::tests::insert_reflect_bundle", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle", "query::tests::many_entities", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::clear_breakpoint", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::stepping::tests::continue_never_run", "event::tests::test_event_mutator_iter_nth", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::stepping::tests::clear_system", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::stepping::tests::disabled_never_run", "event::tests::test_event_reader_iter_nth", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::continue_breakpoint", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::set::tests::test_schedule_label", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::schedules", "schedule::stepping::tests::step_run_if_false", "schedule::stepping::tests::waiting_always_run", "schedule::condition::tests::run_condition_combinators", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::remove_schedule", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::stepping::tests::disabled_always_run", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::stepping::single_threaded_executor", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::tests::stepping::simple_executor", "schedule::condition::tests::run_condition", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::step_breakpoint", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::stepping::tests::step_always_run", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::stepping::tests::stepping_disabled", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::merges_sync_points_into_one", "schedule::stepping::tests::disabled_breakpoint", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::system_ambiguity::nonsend", "schedule::stepping::tests::step_never_run", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::stepping::tests::unknown_schedule", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::stepping::tests::waiting_never_run", "schedule::tests::system_ambiguity::events", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_execution::run_system", "system::builder::tests::custom_param_builder", "system::builder::tests::dyn_builder", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_vec::tests::resize_test", "schedule::tests::system_execution::run_exclusive_system", "storage::table::tests::table", "system::builder::tests::local_builder", "system::commands::tests::append", "event::tests::test_event_cursor_par_read_mut", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::query_builder", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::commands", "system::builder::tests::vec_builder", "system::function_system::tests::into_system_type_id_consistency", "system::builder::tests::param_set_vec_builder", "system::builder::tests::param_set_builder", "system::commands::tests::remove_components", "query::tests::par_iter_mut_change_detection", "system::builder::tests::query_builder_state", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::commands::tests::test_commands_are_send_and_sync", "schedule::tests::system_ordering::order_exclusive_systems", "system::commands::tests::remove_resources", "event::tests::test_event_cursor_par_read", "system::system::tests::run_two_systems", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system::tests::non_send_resources", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_system_name_exclusive_param", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system::tests::run_system_once", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_flexibility", "system::commands::tests::remove_components_by_id", "system::system_param::tests::non_sync_local", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::exclusive_system", "schedule::tests::system_ambiguity::read_only", "system::system_registry::tests::change_detection", "system::system_registry::tests::input_values", "system::system_registry::tests::local_variables", "schedule::stepping::tests::verify_cursor", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::output_values", "system::system_registry::tests::nested_systems", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_and_without", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_and_without_common", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_working", "system::tests::assert_entity_mut_system_does_conflict - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::assert_systems", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_immut_system - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::commands_param_set", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::changed_resource_system", "system::tests::immutable_mut_test", "system::tests::long_life_test", "system::tests::disjoint_query_mut_read_component_system", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::into_iter_impl", "system::tests::non_send_option_system", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::local_system", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_with_and_without_common", "system::tests::or_has_filter_with", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::query_validates_world_id - should panic", "system::tests::query_is_empty", "system::tests::or_with_without_and_compatible_with_without", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::panic_inside_system - should panic", "system::tests::or_param_set_system", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::query_set_system", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::changed_query", "system::tests::test_combinator_clone", "tests::added_tracking", "tests::add_remove_components", "tests::bundle_derive", "tests::clear_entities", "system::tests::world_collections_system", "tests::duplicate_components_panic - should panic", "tests::despawn_mixed_storage", "tests::dynamic_required_components", "system::tests::removal_tracking", "tests::despawn_table_storage", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::empty_spawn", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::changed_trackers_sparse", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::changed_trackers", "tests::exact_size_query", "tests::generic_required_components", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_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::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::par_for_each_dense", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_sparse", "tests::query_filter_with_sparse", "tests::query_filter_without", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::remove_missing", "tests::remove", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::remove_tracking", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_retain_keeps_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::reserve_and_spawn", "tests::resource", "tests::required_components_take_leaves_required", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner", "query::tests::query_filtered_exactsizeiterator_len", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "tests::test_is_archetypal_size_hints", "world::command_queue::test::test_command_queue_inner_panic_safe", "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", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "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_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_reflect", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::inspect_entity_components", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "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::Component (line 305) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1237) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 69)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 787)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1513)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 214) - 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::nor (line 266) - compile fail", "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 412) - compile fail", "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::xnor (line 379) - 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 (line 24)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail", "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/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "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 127)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 209)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1721)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 201)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 172)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 105)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)", "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::Without (line 229)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 812)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 140)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 246)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1698)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 213)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 817)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "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 (line 34)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 745)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "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::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "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::Condition::and (line 82)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)", "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::not (line 1040)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1393)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "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>::iter_combinations (line 518)", "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::Condition (line 58)", "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::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 378)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 431)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 620)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 982)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 529) - compile fail", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 320)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 255)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 927)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 44)", "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_batch (line 473)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 733)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 678)", "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 41)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1733)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 891)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 565)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 592)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 712)", "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 (line 843)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1757) - compile fail", "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>::is_empty (line 1249)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "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>::iter (line 447)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 812)", "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 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "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<'w>::world_mut (line 129) - compile", "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>::par_iter_mut (line 806)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 485)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)", "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>::join (line 1415)", "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>::get_single_mut (line 1208)", "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::ParamSet (line 348)", "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::DynSystemParam (line 1865)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 131)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 824)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 377)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 202)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 273)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 847)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 445)", "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::EntityWorldMut<'w>::world_scope (line 1421)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1618)", "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_from_set_mut (line 833)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1845)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1588)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1673)", "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::last_change_tick_scope (line 2263)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 539)", "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::Deferred (line 955)", "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_mut (line 696)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 744)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 466)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1733)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 455)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)", "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::component_id (line 313)", "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 2508)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 609)", "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/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1790)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2486)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 500)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)", "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::Entry<'w,'a,T>::and_modify (line 1562)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1706)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1797)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 924)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1766)", "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::get (line 1055)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1870)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1474)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1962)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1258)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2848)" ]
[]
[]
[]
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 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -37,7 +37,7 @@ smallvec = { version = "1.11", optional = true } glam = { version = "0.28", features = ["serde"], optional = true } petgraph = { version = "0.6", features = ["serde-1"], optional = true } -smol_str = { version = "0.2.0", optional = true } +smol_str = { version = "0.2.0", features = ["serde"], optional = true } uuid = { version = "1.0", optional = true, features = ["v4", "serde"] } [dev-dependencies]
diff --git a/crates/bevy_reflect/src/impls/smol_str.rs b/crates/bevy_reflect/src/impls/smol_str.rs --- a/crates/bevy_reflect/src/impls/smol_str.rs +++ b/crates/bevy_reflect/src/impls/smol_str.rs @@ -1,8 +1,15 @@ -use crate::std_traits::ReflectDefault; use crate::{self as bevy_reflect}; +use crate::{std_traits::ReflectDefault, ReflectDeserialize, ReflectSerialize}; use bevy_reflect_derive::impl_reflect_value; -impl_reflect_value!(::smol_str::SmolStr(Debug, Hash, PartialEq, Default)); +impl_reflect_value!(::smol_str::SmolStr( + Debug, + Hash, + PartialEq, + Default, + Serialize, + Deserialize, +)); #[cfg(test)] mod tests {
SmolStr doesn't have ReflectDeserialize ## What problem does this solve or what need does it fill? - Deserializing structs via reflection that have `SmolStr` in them. ## What solution would you like? Add `ReflectDeserialize` to `SmolStr`. ## What alternative(s) have you considered? Workaround from `Giooschi` on discord: "As a workaround for now you can call `app.register_type_data::<SmolStr, ReflectDeserialize>()` or the equivalent method on `TypeRegistry`" ## Additional context The error I encountered was: `"the TypeRegistration for smol_str::SmolStr doesn't have ReflectDeserialize"`.
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", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::dynamic_enum_should_return_is_dynamic", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_apply", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "enums::variants::tests::should_return_error_on_invalid_cast", "func::args::list::tests::should_pop_args_in_reverse_order", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::args::list::tests::should_push_arguments_in_order", "func::args::list::tests::should_reindex_on_push_after_take", "func::args::list::tests::should_take_args_in_order", "func::dynamic_function::tests::should_clone_dynamic_function", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function::tests::should_overwrite_function_name", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::info::tests::should_create_anonymous_function_info", "func::info::tests::should_create_closure_info", "func::info::tests::should_create_function_info", "func::info::tests::should_create_function_pointer_info", "func::into_function::tests::should_create_dynamic_function_from_closure", "func::into_function::tests::should_create_dynamic_function_from_function", "func::into_function::tests::should_default_closure_name_to_none", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::registry::tests::should_allow_overwriting_registration", "func::registry::tests::should_debug_function_registry", "func::registry::tests::should_error_on_missing_name", "func::registry::tests::should_only_register_function_once", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_register_closure", "func::registry::tests::should_register_dynamic_closure", "func::registry::tests::should_register_dynamic_function", "func::registry::tests::should_register_function", "func::tests::should_error_on_invalid_arg_ownership", "func::tests::should_error_on_invalid_arg_type", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::option_should_impl_typed", "impls::std::tests::path_should_from_reflect", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "map::tests::next_index_increment", "list::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "map::tests::test_into_iter", "path::tests::accept_leading_tokens", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::parsed_path_parse", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "serde::ser::tests::should_return_error_if_missing_type_data", "serde::ser::tests::should_return_error_if_missing_registration", "tests::assert_impl_reflect_macro_on_all", "struct_trait::tests::next_index_increment", "serde::de::tests::should_return_error_if_missing_type_data", "tests::custom_debug_function", "set::tests::test_into_iter", "tests::as_reflect", "tests::can_opt_out_type_path", "serde::de::tests::should_deserialize_value", "tests::docstrings::fields_should_contain_docs", "serde::de::tests::should_deserialized_typed", "serde::de::tests::enum_should_deserialize", "tests::glam::vec3_apply_dynamic", "tests::glam::vec3_field_access", "tests::docstrings::should_not_contain_docs", "tests::glam::vec3_path_access", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::into_reflect", "tests::from_reflect_should_use_default_field_attributes", "tests::from_reflect_should_use_default_container_attribute", "tests::docstrings::should_contain_docs", "tests::from_reflect_should_allow_ignored_unnamed_fields", "serde::ser::tests::should_serialize_dynamic_option", "serde::ser::tests::enum_should_serialize", "serde::tests::test_serialization_tuple_struct", "tests::multiple_reflect_lists", "tests::multiple_reflect_value_lists", "tests::reflect_struct", "tests::reflect_take", "serde::ser::tests::should_serialize_self_describing_binary", "tests::reflect_downcast", "tests::reflect_unit_struct", "tests::recursive_registration_does_not_hang", "tests::should_allow_custom_where", "serde::tests::should_roundtrip_proxied_dynamic", "tests::docstrings::variants_should_contain_docs", "tests::glam::vec3_serialization", "tests::should_allow_multiple_custom_where", "serde::ser::tests::should_serialize_option", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::ser::tests::should_serialize_non_self_describing_binary", "tests::dynamic_types_debug_format", "serde::de::tests::should_deserialize_option", "tests::recursive_typed_storage_does_not_hang", "tests::should_allow_custom_where_with_assoc_type", "tests::glam::quat_serialization", "serde::ser::tests::should_serialize", "tests::reflect_ignore", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "tests::should_allow_dynamic_fields", "serde::tests::test_serialization_struct", "tests::reflect_complex_patch", "serde::de::tests::should_deserialize_self_describing_binary", "tests::should_reflect_remote_type", "tests::should_take_nested_remote_type", "tests::should_try_take_remote_type", "tuple::tests::next_index_increment", "tests::reflect_map", "tests::reflect_map_no_hash_dynamic - should panic", "tests::should_reflect_debug", "tests::std_type_paths", "tests::should_permit_higher_ranked_lifetimes", "tests::should_not_auto_register_existing_types", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::reflect_map_no_hash - should panic", "tests::reflect_map_no_hash_dynamic_representing - should panic", "tests::should_drain_fields", "tests::reflect_type_info", "tests::should_permit_valid_represented_type_for_dynamic", "tests::reflect_type_path", "tests::should_auto_register_fields", "serde::de::tests::should_deserialize", "tests::should_reflect_nested_remote_type", "tests::try_apply_should_detect_kinds", "type_info::tests::should_return_error_on_invalid_cast", "tests::should_take_remote_type", "tuple_struct::tests::next_index_increment", "tests::not_dynamic_names", "tests::should_allow_empty_custom_where", "tests::should_call_from_reflect_dynamically", "tests::should_reflect_nested_remote_enum", "tests::should_reflect_remote_type_from_module", "tests::should_reflect_remote_enum", "tests::glam::quat_deserialization", "tests::glam::vec3_deserialization", "tests::should_reflect_remote_value_type", "type_registry::test::test_reflect_from_ptr", "tests::reflect_serialize", "serde::de::tests::should_reserialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 68)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 32)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 24)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 14)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 76)", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 58)", "crates/bevy_reflect/src/lib.rs - (line 343)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 30)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 110)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 39)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 180)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 26)", "crates/bevy_reflect/src/lib.rs - (line 190)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 271)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 62)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 47)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 500)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 114)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 507)", "crates/bevy_reflect/src/lib.rs - (line 263)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 486)", "crates/bevy_reflect/src/lib.rs - (line 204)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 162)", "crates/bevy_reflect/src/array.rs - array::Array (line 31)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 345)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 187)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 128)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/lib.rs - (line 238)", "crates/bevy_reflect/src/lib.rs - (line 132)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 165)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 149)", "crates/bevy_reflect/src/set.rs - set::set_debug (line 422)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 321)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 142)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 456)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 152)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 124)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 379)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 10)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 208)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 28)", "crates/bevy_reflect/src/list.rs - list::List (line 38)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 36)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 205)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 101)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 333)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 83)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 161)", "crates/bevy_reflect/src/lib.rs - (line 154)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 252)", "crates/bevy_reflect/src/lib.rs - (line 362)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 454)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 217)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 47)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 75)", "crates/bevy_reflect/src/set.rs - set::Set (line 28)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/func/info.rs - func::info::TypedFunction (line 191)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 544)", "crates/bevy_reflect/src/type_info.rs - type_info::Type (line 314)", "crates/bevy_reflect/src/lib.rs - (line 224)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 24)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 150)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 233)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 181)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 157)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 650)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 151)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 79)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 82)", "crates/bevy_reflect/src/lib.rs - (line 294)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 25)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 452)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 96)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 187)", "crates/bevy_reflect/src/lib.rs - (line 322)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 450)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/lib.rs - (line 405)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 321)" ]
[]
[]
[]
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 --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -18,7 +18,7 @@ use std::{ process::{ExitCode, Termination}, }; use std::{ - num::NonZeroU8, + num::NonZero, panic::{catch_unwind, resume_unwind, AssertUnwindSafe}, }; use thiserror::Error; diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1061,14 +1061,14 @@ pub enum AppExit { Success, /// The [`App`] experienced an unhandleable error. /// Holds the exit code we expect our app to return. - Error(NonZeroU8), + Error(NonZero<u8>), } impl AppExit { /// Creates a [`AppExit::Error`] with a error code of 1. #[must_use] pub const fn error() -> Self { - Self::Error(NonZeroU8::MIN) + Self::Error(NonZero::<u8>::MIN) } /// Returns `true` if `self` is a [`AppExit::Success`]. diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1089,7 +1089,7 @@ impl AppExit { /// [`AppExit::Error`] is constructed. #[must_use] pub const fn from_code(code: u8) -> Self { - match NonZeroU8::new(code) { + match NonZero::<u8>::new(code) { Some(code) => Self::Error(code), None => Self::Success, } diff --git a/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs b/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs --- a/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs +++ b/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs @@ -10,7 +10,7 @@ use bevy_render::{ texture::Image, view::ViewUniform, }; -use std::num::NonZeroU64; +use std::num::NonZero; #[derive(Resource)] pub struct AutoExposurePipeline { diff --git a/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs b/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs --- a/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs +++ b/crates/bevy_core_pipeline/src/auto_exposure/pipeline.rs @@ -64,8 +64,8 @@ impl FromWorld for AutoExposurePipeline { texture_2d(TextureSampleType::Float { filterable: false }), texture_1d(TextureSampleType::Float { filterable: false }), uniform_buffer::<AutoExposureCompensationCurveUniform>(false), - storage_buffer_sized(false, NonZeroU64::new(HISTOGRAM_BIN_COUNT * 4)), - storage_buffer_sized(false, NonZeroU64::new(4)), + storage_buffer_sized(false, NonZero::<u64>::new(HISTOGRAM_BIN_COUNT * 4)), + storage_buffer_sized(false, NonZero::<u64>::new(4)), storage_buffer::<ViewUniform>(true), ), ), diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -59,7 +59,7 @@ use crate::{ }; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; -use std::{fmt, hash::Hash, mem, num::NonZeroU32, sync::atomic::Ordering}; +use std::{fmt, hash::Hash, mem, num::NonZero, sync::atomic::Ordering}; #[cfg(target_has_atomic = "64")] use std::sync::atomic::AtomicI64 as AtomicIdCursor; diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -157,7 +157,7 @@ pub struct Entity { // to make this struct equivalent to a u64. #[cfg(target_endian = "little")] index: u32, - generation: NonZeroU32, + generation: NonZero<u32>, #[cfg(target_endian = "big")] index: u32, } diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -223,7 +223,7 @@ impl Entity { /// Construct an [`Entity`] from a raw `index` value and a non-zero `generation` value. /// Ensure that the generation value is never greater than `0x7FFF_FFFF`. #[inline(always)] - pub(crate) const fn from_raw_and_generation(index: u32, generation: NonZeroU32) -> Entity { + pub(crate) const fn from_raw_and_generation(index: u32, generation: NonZero<u32>) -> Entity { debug_assert!(generation.get() <= HIGH_MASK); Self { index, generation } diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -279,7 +279,7 @@ impl Entity { /// a component. #[inline(always)] pub const fn from_raw(index: u32) -> Entity { - Self::from_raw_and_generation(index, NonZeroU32::MIN) + Self::from_raw_and_generation(index, NonZero::<u32>::MIN) } /// Convert to a form convenient for passing outside of rust. diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -722,7 +722,7 @@ impl Entities { meta.generation = IdentifierMask::inc_masked_high_by(meta.generation, 1); - if meta.generation == NonZeroU32::MIN { + if meta.generation == NonZero::<u32>::MIN { warn!( "Entity({}) generation wrapped on Entities::free, aliasing may occur", entity.index diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -949,7 +949,7 @@ impl Entities { #[repr(C)] struct EntityMeta { /// The current generation of the [`Entity`]. - pub generation: NonZeroU32, + pub generation: NonZero<u32>, /// The current location of the [`Entity`] pub location: EntityLocation, } diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -957,7 +957,7 @@ struct EntityMeta { impl EntityMeta { /// meta for **pending entity** const EMPTY: EntityMeta = EntityMeta { - generation: NonZeroU32::MIN, + generation: NonZero::<u32>::MIN, location: EntityLocation::INVALID, }; } diff --git a/crates/bevy_ecs/src/identifier/masks.rs b/crates/bevy_ecs/src/identifier/masks.rs --- a/crates/bevy_ecs/src/identifier/masks.rs +++ b/crates/bevy_ecs/src/identifier/masks.rs @@ -1,4 +1,4 @@ -use std::num::NonZeroU32; +use std::num::NonZero; use super::kinds::IdKind; diff --git a/crates/bevy_ecs/src/identifier/masks.rs b/crates/bevy_ecs/src/identifier/masks.rs --- a/crates/bevy_ecs/src/identifier/masks.rs +++ b/crates/bevy_ecs/src/identifier/masks.rs @@ -61,7 +61,7 @@ impl IdentifierMask { /// Will never be greater than [`HIGH_MASK`] or less than `1`, and increments are masked to /// never be greater than [`HIGH_MASK`]. #[inline(always)] - pub(crate) const fn inc_masked_high_by(lhs: NonZeroU32, rhs: u32) -> NonZeroU32 { + pub(crate) const fn inc_masked_high_by(lhs: NonZero<u32>, rhs: u32) -> NonZero<u32> { let lo = (lhs.get() & HIGH_MASK).wrapping_add(rhs & HIGH_MASK); // Checks high 32 bit for whether we have overflowed 31 bits. let overflowed = lo >> 31; diff --git a/crates/bevy_ecs/src/identifier/masks.rs b/crates/bevy_ecs/src/identifier/masks.rs --- a/crates/bevy_ecs/src/identifier/masks.rs +++ b/crates/bevy_ecs/src/identifier/masks.rs @@ -70,7 +70,7 @@ impl IdentifierMask { // - Adding the overflow flag will offset overflows to start at 1 instead of 0 // - The sum of `0x7FFF_FFFF` + `u32::MAX` + 1 (overflow) == `0x7FFF_FFFF` // - If the operation doesn't overflow at 31 bits, no offsetting takes place - unsafe { NonZeroU32::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) } + unsafe { NonZero::<u32>::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) } } } diff --git a/crates/bevy_ecs/src/identifier/mod.rs b/crates/bevy_ecs/src/identifier/mod.rs --- a/crates/bevy_ecs/src/identifier/mod.rs +++ b/crates/bevy_ecs/src/identifier/mod.rs @@ -7,7 +7,7 @@ use bevy_reflect::Reflect; use self::{error::IdentifierError, kinds::IdKind, masks::IdentifierMask}; -use std::{hash::Hash, num::NonZeroU32}; +use std::{hash::Hash, num::NonZero}; pub mod error; pub(crate) mod kinds; diff --git a/crates/bevy_ecs/src/identifier/mod.rs b/crates/bevy_ecs/src/identifier/mod.rs --- a/crates/bevy_ecs/src/identifier/mod.rs +++ b/crates/bevy_ecs/src/identifier/mod.rs @@ -28,7 +28,7 @@ pub struct Identifier { // to make this struct equivalent to a u64. #[cfg(target_endian = "little")] low: u32, - high: NonZeroU32, + high: NonZero<u32>, #[cfg(target_endian = "big")] low: u32, } diff --git a/crates/bevy_ecs/src/identifier/mod.rs b/crates/bevy_ecs/src/identifier/mod.rs --- a/crates/bevy_ecs/src/identifier/mod.rs +++ b/crates/bevy_ecs/src/identifier/mod.rs @@ -56,7 +56,7 @@ impl Identifier { unsafe { Ok(Self { low, - high: NonZeroU32::new_unchecked(packed_high), + high: NonZero::<u32>::new_unchecked(packed_high), }) } } diff --git a/crates/bevy_ecs/src/identifier/mod.rs b/crates/bevy_ecs/src/identifier/mod.rs --- a/crates/bevy_ecs/src/identifier/mod.rs +++ b/crates/bevy_ecs/src/identifier/mod.rs @@ -71,7 +71,7 @@ impl Identifier { /// Returns the value of the high segment of the [`Identifier`]. This /// does not apply any masking. #[inline(always)] - pub const fn high(self) -> NonZeroU32 { + pub const fn high(self) -> NonZero<u32> { self.high } diff --git a/crates/bevy_ecs/src/identifier/mod.rs b/crates/bevy_ecs/src/identifier/mod.rs --- a/crates/bevy_ecs/src/identifier/mod.rs +++ b/crates/bevy_ecs/src/identifier/mod.rs @@ -114,7 +114,7 @@ impl Identifier { /// This method is the fallible counterpart to [`Identifier::from_bits`]. #[inline(always)] pub const fn try_from_bits(value: u64) -> Result<Self, IdentifierError> { - let high = NonZeroU32::new(IdentifierMask::get_high(value)); + let high = NonZero::<u32>::new(IdentifierMask::get_high(value)); match high { Some(high) => Ok(Self { diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -1,7 +1,7 @@ use std::{ alloc::{handle_alloc_error, Layout}, cell::UnsafeCell, - num::NonZeroUsize, + num::NonZero, ptr::NonNull, }; diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -56,7 +56,7 @@ impl BlobVec { drop: Option<unsafe fn(OwningPtr<'_>)>, capacity: usize, ) -> BlobVec { - let align = NonZeroUsize::new(item_layout.align()).expect("alignment must be > 0"); + let align = NonZero::<usize>::new(item_layout.align()).expect("alignment must be > 0"); let data = bevy_ptr::dangling_with_align(align); if item_layout.size() == 0 { BlobVec { diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -119,7 +119,8 @@ impl BlobVec { let available_space = self.capacity - self.len; if available_space < additional { // SAFETY: `available_space < additional`, so `additional - available_space > 0` - let increment = unsafe { NonZeroUsize::new_unchecked(additional - available_space) }; + let increment = + unsafe { NonZero::<usize>::new_unchecked(additional - available_space) }; self.grow_exact(increment); } } diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -132,7 +133,7 @@ impl BlobVec { #[cold] fn do_reserve(slf: &mut BlobVec, additional: usize) { let increment = slf.capacity.max(additional - (slf.capacity - slf.len)); - let increment = NonZeroUsize::new(increment).unwrap(); + let increment = NonZero::<usize>::new(increment).unwrap(); slf.grow_exact(increment); } diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -148,7 +149,7 @@ impl BlobVec { /// Panics if the new capacity overflows `usize`. /// For ZST it panics unconditionally because ZST `BlobVec` capacity /// is initialized to `usize::MAX` and always stays that way. - fn grow_exact(&mut self, increment: NonZeroUsize) { + fn grow_exact(&mut self, increment: NonZero<usize>) { let new_capacity = self .capacity .checked_add(increment.get()) diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -1,6 +1,6 @@ //! Spatial clustering of objects, currently just point and spot lights. -use std::num::NonZeroU64; +use std::num::NonZero; use bevy_core_pipeline::core_3d::Camera3d; use bevy_ecs::{ diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -468,7 +468,7 @@ impl GpuClusterableObjects { } } - pub fn min_size(buffer_binding_type: BufferBindingType) -> NonZeroU64 { + pub fn min_size(buffer_binding_type: BufferBindingType) -> NonZero<u64> { match buffer_binding_type { BufferBindingType::Storage { .. } => GpuClusterableObjectsStorage::min_size(), BufferBindingType::Uniform => GpuClusterableObjectsUniform::min_size(), diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -749,7 +749,7 @@ impl ViewClusterBindings { pub fn min_size_clusterable_object_index_lists( buffer_binding_type: BufferBindingType, - ) -> NonZeroU64 { + ) -> NonZero<u64> { match buffer_binding_type { BufferBindingType::Storage { .. } => GpuClusterableObjectIndexListsStorage::min_size(), BufferBindingType::Uniform => GpuClusterableObjectIndexListsUniform::min_size(), diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -758,7 +758,7 @@ impl ViewClusterBindings { pub fn min_size_cluster_offsets_and_counts( buffer_binding_type: BufferBindingType, - ) -> NonZeroU64 { + ) -> NonZero<u64> { match buffer_binding_type { BufferBindingType::Storage { .. } => GpuClusterOffsetsAndCountsStorage::min_size(), BufferBindingType::Uniform => GpuClusterOffsetsAndCountsUniform::min_size(), diff --git a/crates/bevy_pbr/src/light_probe/environment_map.rs b/crates/bevy_pbr/src/light_probe/environment_map.rs --- a/crates/bevy_pbr/src/light_probe/environment_map.rs +++ b/crates/bevy_pbr/src/light_probe/environment_map.rs @@ -65,7 +65,7 @@ use bevy_render::{ texture::{FallbackImage, GpuImage, Image}, }; -use std::num::NonZeroU32; +use std::num::NonZero; use std::ops::Deref; use crate::{ diff --git a/crates/bevy_pbr/src/light_probe/environment_map.rs b/crates/bevy_pbr/src/light_probe/environment_map.rs --- a/crates/bevy_pbr/src/light_probe/environment_map.rs +++ b/crates/bevy_pbr/src/light_probe/environment_map.rs @@ -217,7 +217,7 @@ pub(crate) fn get_bind_group_layout_entries( binding_types::texture_cube(TextureSampleType::Float { filterable: true }); if binding_arrays_are_usable(render_device) { texture_cube_binding = - texture_cube_binding.count(NonZeroU32::new(MAX_VIEW_LIGHT_PROBES as _).unwrap()); + texture_cube_binding.count(NonZero::<u32>::new(MAX_VIEW_LIGHT_PROBES as _).unwrap()); } [ diff --git a/crates/bevy_pbr/src/light_probe/irradiance_volume.rs b/crates/bevy_pbr/src/light_probe/irradiance_volume.rs --- a/crates/bevy_pbr/src/light_probe/irradiance_volume.rs +++ b/crates/bevy_pbr/src/light_probe/irradiance_volume.rs @@ -142,7 +142,7 @@ use bevy_render::{ renderer::RenderDevice, texture::{FallbackImage, GpuImage, Image}, }; -use std::{num::NonZeroU32, ops::Deref}; +use std::{num::NonZero, ops::Deref}; use bevy_asset::{AssetId, Handle}; use bevy_reflect::Reflect; diff --git a/crates/bevy_pbr/src/light_probe/irradiance_volume.rs b/crates/bevy_pbr/src/light_probe/irradiance_volume.rs --- a/crates/bevy_pbr/src/light_probe/irradiance_volume.rs +++ b/crates/bevy_pbr/src/light_probe/irradiance_volume.rs @@ -306,7 +306,7 @@ pub(crate) fn get_bind_group_layout_entries( binding_types::texture_3d(TextureSampleType::Float { filterable: true }); if binding_arrays_are_usable(render_device) { texture_3d_binding = - texture_3d_binding.count(NonZeroU32::new(MAX_VIEW_LIGHT_PROBES as _).unwrap()); + texture_3d_binding.count(NonZero::<u32>::new(MAX_VIEW_LIGHT_PROBES as _).unwrap()); } [ diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -35,7 +35,7 @@ use bevy_render::{ use bevy_utils::tracing::error; use std::marker::PhantomData; use std::sync::atomic::{AtomicU32, Ordering}; -use std::{hash::Hash, num::NonZeroU32}; +use std::{hash::Hash, num::NonZero}; use self::{irradiance_volume::IrradianceVolume, prelude::EnvironmentMapLight}; diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -978,7 +978,7 @@ impl AtomicMaterialBindGroupId { /// See also: [`AtomicU32::store`]. pub fn set(&self, id: MaterialBindGroupId) { let id = if let Some(id) = id.0 { - NonZeroU32::from(id).get() + NonZero::<u32>::from(id).get() } else { 0 }; diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -990,7 +990,9 @@ impl AtomicMaterialBindGroupId { /// /// See also: [`AtomicU32::load`]. pub fn get(&self) -> MaterialBindGroupId { - MaterialBindGroupId(NonZeroU32::new(self.0.load(Ordering::Relaxed)).map(BindGroupId::from)) + MaterialBindGroupId( + NonZero::<u32>::new(self.0.load(Ordering::Relaxed)).map(BindGroupId::from), + ) } } diff --git a/crates/bevy_pbr/src/meshlet/persistent_buffer.rs b/crates/bevy_pbr/src/meshlet/persistent_buffer.rs --- a/crates/bevy_pbr/src/meshlet/persistent_buffer.rs +++ b/crates/bevy_pbr/src/meshlet/persistent_buffer.rs @@ -6,7 +6,7 @@ use bevy_render::{ renderer::{RenderDevice, RenderQueue}, }; use range_alloc::RangeAllocator; -use std::{num::NonZeroU64, ops::Range}; +use std::{num::NonZero, ops::Range}; /// Wrapper for a GPU buffer holding a large amount of data that persists across frames. pub struct PersistentGpuBuffer<T: PersistentGpuBufferable> { diff --git a/crates/bevy_pbr/src/meshlet/persistent_buffer.rs b/crates/bevy_pbr/src/meshlet/persistent_buffer.rs --- a/crates/bevy_pbr/src/meshlet/persistent_buffer.rs +++ b/crates/bevy_pbr/src/meshlet/persistent_buffer.rs @@ -66,7 +66,8 @@ impl<T: PersistentGpuBufferable> PersistentGpuBuffer<T> { let queue_count = self.write_queue.len(); for (data, metadata, buffer_slice) in self.write_queue.drain(..) { - let buffer_slice_size = NonZeroU64::new(buffer_slice.end - buffer_slice.start).unwrap(); + let buffer_slice_size = + NonZero::<u64>::new(buffer_slice.end - buffer_slice.start).unwrap(); let mut buffer_view = render_queue .write_buffer_with(&self.buffer, buffer_slice.start, buffer_slice_size) .unwrap(); diff --git a/crates/bevy_pbr/src/render/gpu_preprocess.rs b/crates/bevy_pbr/src/render/gpu_preprocess.rs --- a/crates/bevy_pbr/src/render/gpu_preprocess.rs +++ b/crates/bevy_pbr/src/render/gpu_preprocess.rs @@ -6,7 +6,7 @@ //! [`MeshInputUniform`]s instead and use the GPU to calculate the remaining //! derived fields in [`MeshUniform`]. -use std::num::NonZeroU64; +use std::num::NonZero; use bevy_app::{App, Plugin}; use bevy_asset::{load_internal_asset, Handle}; diff --git a/crates/bevy_pbr/src/render/gpu_preprocess.rs b/crates/bevy_pbr/src/render/gpu_preprocess.rs --- a/crates/bevy_pbr/src/render/gpu_preprocess.rs +++ b/crates/bevy_pbr/src/render/gpu_preprocess.rs @@ -408,7 +408,7 @@ pub fn prepare_preprocess_bind_groups( // Don't use `as_entire_binding()` here; the shader reads the array // length and the underlying buffer may be longer than the actual size // of the vector. - let index_buffer_size = NonZeroU64::try_from( + let index_buffer_size = NonZero::<u64>::try_from( index_buffer_vec.buffer.len() as u64 * u64::from(PreprocessWorkItem::min_size()), ) .ok(); diff --git a/crates/bevy_pbr/src/render/mesh_view_bindings.rs b/crates/bevy_pbr/src/render/mesh_view_bindings.rs --- a/crates/bevy_pbr/src/render/mesh_view_bindings.rs +++ b/crates/bevy_pbr/src/render/mesh_view_bindings.rs @@ -1,4 +1,4 @@ -use std::{array, num::NonZeroU64, sync::Arc}; +use std::{array, num::NonZero, sync::Arc}; use bevy_core_pipeline::{ core_3d::ViewTransmissionTexture, diff --git a/crates/bevy_pbr/src/render/mesh_view_bindings.rs b/crates/bevy_pbr/src/render/mesh_view_bindings.rs --- a/crates/bevy_pbr/src/render/mesh_view_bindings.rs +++ b/crates/bevy_pbr/src/render/mesh_view_bindings.rs @@ -164,7 +164,7 @@ impl From<Option<&ViewPrepassTextures>> for MeshPipelineViewLayoutKey { fn buffer_layout( buffer_binding_type: BufferBindingType, has_dynamic_offset: bool, - min_binding_size: Option<NonZeroU64>, + min_binding_size: Option<NonZero<u64>>, ) -> BindGroupLayoutEntryBuilder { match buffer_binding_type { BufferBindingType::Uniform => uniform_buffer_sized(has_dynamic_offset, min_binding_size), diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -12,7 +12,7 @@ use core::{ fmt::{self, Formatter, Pointer}, marker::PhantomData, mem::{align_of, ManuallyDrop}, - num::NonZeroUsize, + num::NonZero, ptr::NonNull, }; diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -535,10 +535,10 @@ impl<'a, T> From<&'a [T]> for ThinSlicePtr<'a, T> { /// Creates a dangling pointer with specified alignment. /// See [`NonNull::dangling`]. -pub fn dangling_with_align(align: NonZeroUsize) -> NonNull<u8> { +pub fn dangling_with_align(align: NonZero<usize>) -> NonNull<u8> { debug_assert!(align.is_power_of_two(), "Alignment must be power of two."); // SAFETY: The pointer will not be null, since it was created - // from the address of a `NonZeroUsize`. + // from the address of a `NonZero<usize>`. unsafe { NonNull::new_unchecked(align.get() as *mut u8) } } diff --git a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs --- a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs +++ b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs @@ -8,7 +8,7 @@ use encase::{ ShaderType, }; use nonmax::NonMaxU32; -use std::{marker::PhantomData, num::NonZeroU64}; +use std::{marker::PhantomData, num::NonZero}; use wgpu::{BindingResource, Limits}; // 1MB else we will make really large arrays on macOS which reports very large diff --git a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs --- a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs +++ b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs @@ -69,7 +69,7 @@ impl<T: GpuArrayBufferable> BatchedUniformBuffer<T> { } #[inline] - pub fn size(&self) -> NonZeroU64 { + pub fn size(&self) -> NonZero<u64> { self.temp.size() } diff --git a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs --- a/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs +++ b/crates/bevy_render/src/render_resource/batched_uniform_buffer.rs @@ -141,7 +141,7 @@ where const METADATA: Metadata<Self::ExtraMetadata> = T::METADATA; - fn size(&self) -> NonZeroU64 { + fn size(&self) -> NonZero<u64> { Self::METADATA.stride().mul(self.1.max(1) as u64).0 } } diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -1,5 +1,5 @@ use bevy_utils::all_tuples_with_size; -use std::num::NonZeroU32; +use std::num::NonZero; use wgpu::{BindGroupLayoutEntry, BindingType, ShaderStages}; /// Helper for constructing bind group layouts. diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -130,7 +130,7 @@ use wgpu::{BindGroupLayoutEntry, BindingType, ShaderStages}; pub struct BindGroupLayoutEntryBuilder { ty: BindingType, visibility: Option<ShaderStages>, - count: Option<NonZeroU32>, + count: Option<NonZero<u32>>, } impl BindGroupLayoutEntryBuilder { diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -139,7 +139,7 @@ impl BindGroupLayoutEntryBuilder { self } - pub fn count(mut self, count: NonZeroU32) -> Self { + pub fn count(mut self, count: NonZero<u32>) -> Self { self.count = Some(count); self } diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -353,7 +353,7 @@ pub mod binding_types { BufferBindingType, SamplerBindingType, TextureSampleType, TextureViewDimension, }; use encase::ShaderType; - use std::num::NonZeroU64; + use std::num::NonZero; use wgpu::{StorageTextureAccess, TextureFormat}; use super::*; diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -364,7 +364,7 @@ pub mod binding_types { pub fn storage_buffer_sized( has_dynamic_offset: bool, - min_binding_size: Option<NonZeroU64>, + min_binding_size: Option<NonZero<u64>>, ) -> BindGroupLayoutEntryBuilder { BindingType::Buffer { ty: BufferBindingType::Storage { read_only: false }, diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -382,7 +382,7 @@ pub mod binding_types { pub fn storage_buffer_read_only_sized( has_dynamic_offset: bool, - min_binding_size: Option<NonZeroU64>, + min_binding_size: Option<NonZero<u64>>, ) -> BindGroupLayoutEntryBuilder { BindingType::Buffer { ty: BufferBindingType::Storage { read_only: true }, diff --git a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs --- a/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout_entries.rs @@ -398,7 +398,7 @@ pub mod binding_types { pub fn uniform_buffer_sized( has_dynamic_offset: bool, - min_binding_size: Option<NonZeroU64>, + min_binding_size: Option<NonZero<u64>>, ) -> BindGroupLayoutEntryBuilder { BindingType::Buffer { ty: BufferBindingType::Uniform, diff --git a/crates/bevy_render/src/render_resource/resource_macros.rs b/crates/bevy_render/src/render_resource/resource_macros.rs --- a/crates/bevy_render/src/render_resource/resource_macros.rs +++ b/crates/bevy_render/src/render_resource/resource_macros.rs @@ -149,7 +149,7 @@ macro_rules! render_resource_wrapper { macro_rules! define_atomic_id { ($atomic_id_type:ident) => { #[derive(Copy, Clone, Hash, Eq, PartialEq, PartialOrd, Ord, Debug)] - pub struct $atomic_id_type(core::num::NonZeroU32); + pub struct $atomic_id_type(core::num::NonZero<u32>); // We use new instead of default to indicate that each ID created will be unique. #[allow(clippy::new_without_default)] diff --git a/crates/bevy_render/src/render_resource/resource_macros.rs b/crates/bevy_render/src/render_resource/resource_macros.rs --- a/crates/bevy_render/src/render_resource/resource_macros.rs +++ b/crates/bevy_render/src/render_resource/resource_macros.rs @@ -160,7 +160,7 @@ macro_rules! define_atomic_id { static COUNTER: AtomicU32 = AtomicU32::new(1); let counter = COUNTER.fetch_add(1, Ordering::Relaxed); - Self(core::num::NonZeroU32::new(counter).unwrap_or_else(|| { + Self(core::num::NonZero::<u32>::new(counter).unwrap_or_else(|| { panic!( "The system ran out of unique `{}`s.", stringify!($atomic_id_type) diff --git a/crates/bevy_render/src/render_resource/resource_macros.rs b/crates/bevy_render/src/render_resource/resource_macros.rs --- a/crates/bevy_render/src/render_resource/resource_macros.rs +++ b/crates/bevy_render/src/render_resource/resource_macros.rs @@ -169,14 +169,14 @@ macro_rules! define_atomic_id { } } - impl From<$atomic_id_type> for core::num::NonZeroU32 { + impl From<$atomic_id_type> for core::num::NonZero<u32> { fn from(value: $atomic_id_type) -> Self { value.0 } } - impl From<core::num::NonZeroU32> for $atomic_id_type { - fn from(value: core::num::NonZeroU32) -> Self { + impl From<core::num::NonZero<u32>> for $atomic_id_type { + fn from(value: core::num::NonZero<u32>) -> Self { Self(value) } } diff --git a/crates/bevy_render/src/render_resource/uniform_buffer.rs b/crates/bevy_render/src/render_resource/uniform_buffer.rs --- a/crates/bevy_render/src/render_resource/uniform_buffer.rs +++ b/crates/bevy_render/src/render_resource/uniform_buffer.rs @@ -1,4 +1,4 @@ -use std::{marker::PhantomData, num::NonZeroU64}; +use std::{marker::PhantomData, num::NonZero}; use crate::{ render_resource::Buffer, diff --git a/crates/bevy_render/src/render_resource/uniform_buffer.rs b/crates/bevy_render/src/render_resource/uniform_buffer.rs --- a/crates/bevy_render/src/render_resource/uniform_buffer.rs +++ b/crates/bevy_render/src/render_resource/uniform_buffer.rs @@ -309,7 +309,7 @@ impl<T: ShaderType + WriteInto> DynamicUniformBuffer<T> { if let Some(buffer) = self.buffer.as_deref() { let buffer_view = queue - .write_buffer_with(buffer, 0, NonZeroU64::new(buffer.size())?) + .write_buffer_with(buffer, 0, NonZero::<u64>::new(buffer.size())?) .unwrap(); Some(DynamicUniformBufferWriter { buffer: encase::DynamicUniformBuffer::new_with_alignment( diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -13,7 +13,7 @@ use bevy_window::{ }; use bevy_winit::CustomCursorCache; use std::{ - num::NonZeroU32, + num::NonZero, ops::{Deref, DerefMut}, }; use wgpu::{ diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -63,7 +63,7 @@ pub struct ExtractedWindow { pub physical_width: u32, pub physical_height: u32, pub present_mode: PresentMode, - pub desired_maximum_frame_latency: Option<NonZeroU32>, + pub desired_maximum_frame_latency: Option<NonZero<u32>>, /// Note: this will not always be the swap chain texture view. When taking a screenshot, /// this will point to an alternative texture instead to allow for copying the render result /// to CPU memory. diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -395,7 +395,7 @@ pub fn create_surfaces( }, desired_maximum_frame_latency: window .desired_maximum_frame_latency - .map(NonZeroU32::get) + .map(NonZero::<u32>::get) .unwrap_or(DEFAULT_DESIRED_MAXIMUM_FRAME_LATENCY), alpha_mode: match window.alpha_mode { CompositeAlphaMode::Auto => wgpu::CompositeAlphaMode::Auto, diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -55,7 +55,7 @@ pub mod prelude { }; } -use std::num::NonZeroUsize; +use std::num::NonZero; /// Gets the logical CPU core count available to the current process. /// diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -65,6 +65,6 @@ use std::num::NonZeroUsize; /// This will always return at least 1. pub fn available_parallelism() -> usize { std::thread::available_parallelism() - .map(NonZeroUsize::get) + .map(NonZero::<usize>::get) .unwrap_or(1) } diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -12,7 +12,7 @@ use bevy_transform::prelude::GlobalTransform; use bevy_utils::warn_once; use bevy_window::{PrimaryWindow, WindowRef}; use smallvec::SmallVec; -use std::num::{NonZeroI16, NonZeroU16}; +use std::num::NonZero; use thiserror::Error; /// Base component for a UI node, which also provides the computed size of the node. diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1481,15 +1481,15 @@ pub struct GridPlacement { /// Lines are 1-indexed. /// Negative indexes count backwards from the end of the grid. /// Zero is not a valid index. - pub(crate) start: Option<NonZeroI16>, + pub(crate) start: Option<NonZero<i16>>, /// How many grid tracks the item should span. /// Defaults to 1. - pub(crate) span: Option<NonZeroU16>, + pub(crate) span: Option<NonZero<u16>>, /// The grid line at which the item should end. /// Lines are 1-indexed. /// Negative indexes count backwards from the end of the grid. /// Zero is not a valid index. - pub(crate) end: Option<NonZeroI16>, + pub(crate) end: Option<NonZero<i16>>, } impl GridPlacement { diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1497,7 +1497,7 @@ impl GridPlacement { pub const DEFAULT: Self = Self { start: None, // SAFETY: This is trivially safe as 1 is non-zero. - span: Some(unsafe { NonZeroU16::new_unchecked(1) }), + span: Some(unsafe { NonZero::<u16>::new_unchecked(1) }), end: None, }; diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1614,17 +1614,17 @@ impl GridPlacement { /// Returns the grid line at which the item should start, or `None` if not set. pub fn get_start(self) -> Option<i16> { - self.start.map(NonZeroI16::get) + self.start.map(NonZero::<i16>::get) } /// Returns the grid line at which the item should end, or `None` if not set. pub fn get_end(self) -> Option<i16> { - self.end.map(NonZeroI16::get) + self.end.map(NonZero::<i16>::get) } /// Returns span for this grid item, or `None` if not set. pub fn get_span(self) -> Option<u16> { - self.span.map(NonZeroU16::get) + self.span.map(NonZero::<u16>::get) } } diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1634,17 +1634,17 @@ impl Default for GridPlacement { } } -/// Convert an `i16` to `NonZeroI16`, fails on `0` and returns the `InvalidZeroIndex` error. -fn try_into_grid_index(index: i16) -> Result<Option<NonZeroI16>, GridPlacementError> { +/// Convert an `i16` to `NonZero<i16>`, fails on `0` and returns the `InvalidZeroIndex` error. +fn try_into_grid_index(index: i16) -> Result<Option<NonZero<i16>>, GridPlacementError> { Ok(Some( - NonZeroI16::new(index).ok_or(GridPlacementError::InvalidZeroIndex)?, + NonZero::<i16>::new(index).ok_or(GridPlacementError::InvalidZeroIndex)?, )) } -/// Convert a `u16` to `NonZeroU16`, fails on `0` and returns the `InvalidZeroSpan` error. -fn try_into_grid_span(span: u16) -> Result<Option<NonZeroU16>, GridPlacementError> { +/// Convert a `u16` to `NonZero<u16>`, fails on `0` and returns the `InvalidZeroSpan` error. +fn try_into_grid_span(span: u16) -> Result<Option<NonZero<u16>>, GridPlacementError> { Ok(Some( - NonZeroU16::new(span).ok_or(GridPlacementError::InvalidZeroSpan)?, + NonZero::<u16>::new(span).ok_or(GridPlacementError::InvalidZeroSpan)?, )) } diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -1,4 +1,4 @@ -use std::num::NonZeroU32; +use std::num::NonZero; use bevy_ecs::{ entity::{Entity, EntityMapper, MapEntities}, diff --git a/examples/app/headless_renderer.rs b/examples/app/headless_renderer.rs --- a/examples/app/headless_renderer.rs +++ b/examples/app/headless_renderer.rs @@ -381,7 +381,7 @@ impl render_graph::Node for ImageCopyDriver { layout: ImageDataLayout { offset: 0, bytes_per_row: Some( - std::num::NonZeroU32::new(padded_bytes_per_row as u32) + std::num::NonZero::<u32>::new(padded_bytes_per_row as u32) .unwrap() .into(), ), diff --git a/examples/shader/texture_binding_array.rs b/examples/shader/texture_binding_array.rs --- a/examples/shader/texture_binding_array.rs +++ b/examples/shader/texture_binding_array.rs @@ -17,7 +17,7 @@ use bevy::{ RenderApp, }, }; -use std::{num::NonZeroU32, process::exit}; +use std::{num::NonZero, process::exit}; /// This example uses a shader source file from the assets subdirectory const SHADER_ASSET_PATH: &str = "shaders/texture_binding_array.wgsl"; diff --git a/examples/shader/texture_binding_array.rs b/examples/shader/texture_binding_array.rs --- a/examples/shader/texture_binding_array.rs +++ b/examples/shader/texture_binding_array.rs @@ -166,7 +166,7 @@ impl AsBindGroup for BindlessMaterial { ( 0, texture_2d(TextureSampleType::Float { filterable: true }) - .count(NonZeroU32::new(MAX_TEXTURE_COUNT as u32).unwrap()), + .count(NonZero::<u32>::new(MAX_TEXTURE_COUNT as u32).unwrap()), ), // Sampler // diff --git a/examples/shader/texture_binding_array.rs b/examples/shader/texture_binding_array.rs --- a/examples/shader/texture_binding_array.rs +++ b/examples/shader/texture_binding_array.rs @@ -177,7 +177,7 @@ impl AsBindGroup for BindlessMaterial { // // ``` // sampler(SamplerBindingType::Filtering) - // .count(NonZeroU32::new(MAX_TEXTURE_COUNT as u32).unwrap()), + // .count(NonZero::<u32>::new(MAX_TEXTURE_COUNT as u32).unwrap()), // ``` // // One may need to pay attention to the limit of sampler binding
diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -1014,7 +1014,8 @@ mod tests { #[test] fn entity_bits_roundtrip() { // Generation cannot be greater than 0x7FFF_FFFF else it will be an invalid Entity id - let e = Entity::from_raw_and_generation(0xDEADBEEF, NonZeroU32::new(0x5AADF00D).unwrap()); + let e = + Entity::from_raw_and_generation(0xDEADBEEF, NonZero::<u32>::new(0x5AADF00D).unwrap()); assert_eq!(Entity::from_bits(e.to_bits()), e); } diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -1091,65 +1092,65 @@ mod tests { #[allow(clippy::nonminimal_bool)] // This is intentionally testing `lt` and `ge` as separate functions. fn entity_comparison() { assert_eq!( - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()), - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()), + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) ); assert_ne!( - Entity::from_raw_and_generation(123, NonZeroU32::new(789).unwrap()), - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(789).unwrap()), + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) ); assert_ne!( - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()), - Entity::from_raw_and_generation(123, NonZeroU32::new(789).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()), + Entity::from_raw_and_generation(123, NonZero::<u32>::new(789).unwrap()) ); assert_ne!( - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()), - Entity::from_raw_and_generation(456, NonZeroU32::new(123).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()), + Entity::from_raw_and_generation(456, NonZero::<u32>::new(123).unwrap()) ); // ordering is by generation then by index assert!( - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) - >= Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) + >= Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) ); assert!( - Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) - <= Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) + Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) + <= Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) ); assert!( - !(Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) - < Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap())) + !(Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) + < Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap())) ); assert!( - !(Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap()) - > Entity::from_raw_and_generation(123, NonZeroU32::new(456).unwrap())) + !(Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap()) + > Entity::from_raw_and_generation(123, NonZero::<u32>::new(456).unwrap())) ); assert!( - Entity::from_raw_and_generation(9, NonZeroU32::new(1).unwrap()) - < Entity::from_raw_and_generation(1, NonZeroU32::new(9).unwrap()) + Entity::from_raw_and_generation(9, NonZero::<u32>::new(1).unwrap()) + < Entity::from_raw_and_generation(1, NonZero::<u32>::new(9).unwrap()) ); assert!( - Entity::from_raw_and_generation(1, NonZeroU32::new(9).unwrap()) - > Entity::from_raw_and_generation(9, NonZeroU32::new(1).unwrap()) + Entity::from_raw_and_generation(1, NonZero::<u32>::new(9).unwrap()) + > Entity::from_raw_and_generation(9, NonZero::<u32>::new(1).unwrap()) ); assert!( - Entity::from_raw_and_generation(1, NonZeroU32::new(1).unwrap()) - < Entity::from_raw_and_generation(2, NonZeroU32::new(1).unwrap()) + Entity::from_raw_and_generation(1, NonZero::<u32>::new(1).unwrap()) + < Entity::from_raw_and_generation(2, NonZero::<u32>::new(1).unwrap()) ); assert!( - Entity::from_raw_and_generation(1, NonZeroU32::new(1).unwrap()) - <= Entity::from_raw_and_generation(2, NonZeroU32::new(1).unwrap()) + Entity::from_raw_and_generation(1, NonZero::<u32>::new(1).unwrap()) + <= Entity::from_raw_and_generation(2, NonZero::<u32>::new(1).unwrap()) ); assert!( - Entity::from_raw_and_generation(2, NonZeroU32::new(2).unwrap()) - > Entity::from_raw_and_generation(1, NonZeroU32::new(2).unwrap()) + Entity::from_raw_and_generation(2, NonZero::<u32>::new(2).unwrap()) + > Entity::from_raw_and_generation(1, NonZero::<u32>::new(2).unwrap()) ); assert!( - Entity::from_raw_and_generation(2, NonZeroU32::new(2).unwrap()) - >= Entity::from_raw_and_generation(1, NonZeroU32::new(2).unwrap()) + Entity::from_raw_and_generation(2, NonZero::<u32>::new(2).unwrap()) + >= Entity::from_raw_and_generation(1, NonZero::<u32>::new(2).unwrap()) ); } diff --git a/crates/bevy_ecs/src/identifier/masks.rs b/crates/bevy_ecs/src/identifier/masks.rs --- a/crates/bevy_ecs/src/identifier/masks.rs +++ b/crates/bevy_ecs/src/identifier/masks.rs @@ -166,68 +166,68 @@ mod tests { // Adding from lowest value with lowest to highest increment // No result should ever be greater than 0x7FFF_FFFF or HIGH_MASK assert_eq!( - NonZeroU32::MIN, - IdentifierMask::inc_masked_high_by(NonZeroU32::MIN, 0) + NonZero::<u32>::MIN, + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MIN, 0) ); assert_eq!( - NonZeroU32::new(2).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MIN, 1) + NonZero::<u32>::new(2).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MIN, 1) ); assert_eq!( - NonZeroU32::new(3).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MIN, 2) + NonZero::<u32>::new(3).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MIN, 2) ); assert_eq!( - NonZeroU32::MIN, - IdentifierMask::inc_masked_high_by(NonZeroU32::MIN, HIGH_MASK) + NonZero::<u32>::MIN, + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MIN, HIGH_MASK) ); assert_eq!( - NonZeroU32::MIN, - IdentifierMask::inc_masked_high_by(NonZeroU32::MIN, u32::MAX) + NonZero::<u32>::MIN, + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MIN, u32::MAX) ); // Adding from absolute highest value with lowest to highest increment // No result should ever be greater than 0x7FFF_FFFF or HIGH_MASK assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MAX, 0) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MAX, 0) ); assert_eq!( - NonZeroU32::MIN, - IdentifierMask::inc_masked_high_by(NonZeroU32::MAX, 1) + NonZero::<u32>::MIN, + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MAX, 1) ); assert_eq!( - NonZeroU32::new(2).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MAX, 2) + NonZero::<u32>::new(2).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MAX, 2) ); assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MAX, HIGH_MASK) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MAX, HIGH_MASK) ); assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::MAX, u32::MAX) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::MAX, u32::MAX) ); // Adding from actual highest value with lowest to highest increment // No result should ever be greater than 0x7FFF_FFFF or HIGH_MASK assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::new(HIGH_MASK).unwrap(), 0) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::new(HIGH_MASK).unwrap(), 0) ); assert_eq!( - NonZeroU32::MIN, - IdentifierMask::inc_masked_high_by(NonZeroU32::new(HIGH_MASK).unwrap(), 1) + NonZero::<u32>::MIN, + IdentifierMask::inc_masked_high_by(NonZero::<u32>::new(HIGH_MASK).unwrap(), 1) ); assert_eq!( - NonZeroU32::new(2).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::new(HIGH_MASK).unwrap(), 2) + NonZero::<u32>::new(2).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::new(HIGH_MASK).unwrap(), 2) ); assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::new(HIGH_MASK).unwrap(), HIGH_MASK) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::new(HIGH_MASK).unwrap(), HIGH_MASK) ); assert_eq!( - NonZeroU32::new(HIGH_MASK).unwrap(), - IdentifierMask::inc_masked_high_by(NonZeroU32::new(HIGH_MASK).unwrap(), u32::MAX) + NonZero::<u32>::new(HIGH_MASK).unwrap(), + IdentifierMask::inc_masked_high_by(NonZero::<u32>::new(HIGH_MASK).unwrap(), u32::MAX) ); } } diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -88,7 +88,7 @@ mod tests { }; use bevy_tasks::{ComputeTaskPool, TaskPool}; use bevy_utils::HashSet; - use std::num::NonZeroU32; + use std::num::NonZero; use std::{ any::TypeId, marker::PhantomData, diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1659,7 +1659,7 @@ mod tests { ); let e4_mismatched_generation = - Entity::from_raw_and_generation(3, NonZeroU32::new(2).unwrap()); + Entity::from_raw_and_generation(3, NonZero::<u32>::new(2).unwrap()); assert!( world_b.get_or_spawn(e4_mismatched_generation).is_none(), "attempting to spawn on top of an entity with a mismatched entity generation fails" diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1754,7 +1754,8 @@ mod tests { let e0 = world.spawn(A(0)).id(); let e1 = Entity::from_raw(1); let e2 = world.spawn_empty().id(); - let invalid_e2 = Entity::from_raw_and_generation(e2.index(), NonZeroU32::new(2).unwrap()); + let invalid_e2 = + Entity::from_raw_and_generation(e2.index(), NonZero::<u32>::new(2).unwrap()); let values = vec![(e0, (B(0), C)), (e1, (B(1), C)), (invalid_e2, (B(2), C))]; diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -2444,11 +2444,11 @@ mod tests { #[test] fn nonzero_usize_impl_reflect_from_reflect() { - let a: &dyn PartialReflect = &std::num::NonZeroUsize::new(42).unwrap(); - let b: &dyn PartialReflect = &std::num::NonZeroUsize::new(42).unwrap(); + let a: &dyn PartialReflect = &std::num::NonZero::<usize>::new(42).unwrap(); + let b: &dyn PartialReflect = &std::num::NonZero::<usize>::new(42).unwrap(); assert!(a.reflect_partial_eq(b).unwrap_or_default()); - let forty_two: std::num::NonZeroUsize = FromReflect::from_reflect(a).unwrap(); - assert_eq!(forty_two, std::num::NonZeroUsize::new(42).unwrap()); + let forty_two: std::num::NonZero<usize> = FromReflect::from_reflect(a).unwrap(); + assert_eq!(forty_two, std::num::NonZero::<usize>::new(42).unwrap()); } #[test] diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -279,7 +279,7 @@ pub struct Window { /// /// [`wgpu::SurfaceConfiguration::desired_maximum_frame_latency`]: /// https://docs.rs/wgpu/latest/wgpu/type.SurfaceConfiguration.html#structfield.desired_maximum_frame_latency - pub desired_maximum_frame_latency: Option<NonZeroU32>, + pub desired_maximum_frame_latency: Option<NonZero<u32>>, /// Sets whether this window recognizes [`PinchGesture`](https://docs.rs/bevy/latest/bevy/input/gestures/struct.PinchGesture.html) /// /// ## Platform-specific
Replace `NonZero*` type usage with `NonZero<T>` variant ## What problem does this solve or what need does it fill? Newly introduced in Rust `1.79.0`, [`NonZero<T>`](https://doc.rust-lang.org/std/num/struct.NonZero.html) is a generic variant of the `NonZero*` types. Unfortunately, this doesn't allow usage as a wrapper for custom types, as [`ZeroablePrimitive`](https://doc.rust-lang.org/stable/core/num/trait.ZeroablePrimitive.html) is currently unstable. Some usages might be blocked on https://github.com/rust-lang/rust/issues/84186, but that is to be discovered. ## What solution would you like? Replace all usages of `NonZero*` with `NonZero<T>`, such as `NonZeroU32` with `NonZero<u32>`. ## What alternative(s) have you considered? Continue as-is.
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", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_recursive_multiple", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::as_deref_mut", "entity::tests::reserve_generations_and_alloc", "bundle::tests::insert_if_new", "entity::tests::get_reserved_and_invalid", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "entity::tests::entity_comparison", "event::tests::test_event_cursor_iter_len_updated", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_from_non_send_mut", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::reserve_entity_len", "bundle::tests::component_hook_order_replace", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_event_cursor_clear", "change_detection::tests::mut_from_res_mut", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_niche_optimization", "change_detection::tests::change_expiration", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "entity::tests::reserve_generations", "change_detection::tests::mut_new", "entity::map_entities::tests::entity_mapper_iteration", "change_detection::tests::map_mut", "event::tests::test_event_cursor_read", "change_detection::tests::set_if_neq", "change_detection::tests::mut_untyped_to_reflect", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_len_empty", "entity::map_entities::tests::entity_mapper", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_drain_and_read", "event::tests::ensure_reader_readonly", "change_detection::tests::change_tick_scan", "entity::tests::entity_const", "entity::tests::entity_bits_roundtrip", "change_detection::tests::change_tick_wraparound", "event::tests::test_events", "event::tests::test_events_send_default", "event::tests::test_event_cursor_len_current", "event::tests::test_send_events_ids", "event::tests::test_events_update_drain", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::extract_kind", "event::tests::test_event_mutator_iter_last", "intern::tests::same_interned_instance", "observer::tests::observer_no_target", "identifier::tests::id_comparison", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "event::tests::test_event_reader_iter_last", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "observer::tests::observer_dynamic_component", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_no_next", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_propagating", "observer::tests::observer_propagating_world", "query::access::tests::test_access_clone_from", "observer::tests::observer_propagating_world_skipping", "query::access::tests::test_access_filters_clone", "query::access::tests::filtered_combined_access", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_filtered_access_clone_from", "label::tests::dyn_eq_object_safe", "observer::tests::observer_order_recursive", "identifier::masks::tests::extract_high_value", "observer::tests::observer_multiple_events", "query::access::tests::filtered_access_extend_or", "identifier::tests::from_bits", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "observer::tests::observer_order_replace", "observer::tests::observer_multiple_components", "event::tests::test_event_mutator_iter_nth", "event::tests::test_event_reader_iter_nth", "query::builder::tests::builder_dynamic_components", "intern::tests::same_interned_content", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "identifier::tests::id_construction", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "intern::tests::static_sub_strings", "query::access::tests::test_access_clone", "event::tests::test_event_cursor_par_read_mut", "event::tests::test_event_cursor_par_read", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_static", "query::iter::tests::query_sort_after_next_dense - should panic", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_transmute", "query::state::tests::can_transmute_filtered_entity", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_changed", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_mut_fetch", "query::fetch::tests::world_query_metadata_collision", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_added", "query::state::tests::join_with_get", "query::state::tests::get_many_unchecked_manual_uniqueness", "schedule::condition::tests::multiple_run_conditions", "query::state::tests::transmute_from_dense_to_sparse", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "query::state::tests::can_transmute_to_more_general", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::has_query", "query::fetch::tests::world_query_phantom_data", "query::state::tests::can_transmute_empty_tuple", "schedule::schedule::tests::add_systems_to_existing_schedule", "reflect::entity_commands::tests::remove_reflected", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::insert_reflected", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations_sparse", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::multi_storage_query", "query::state::tests::join", "query::tests::many_entities", "query::tests::any_query", "observer::tests::observer_order_insert_remove_sparse", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "schedule::condition::tests::run_condition_combinators", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "query::state::tests::cannot_get_data_not_in_original_query", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::read_only_field_visibility", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::stepping::tests::clear_schedule", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::set::tests::test_schedule_label", "query::tests::query_filtered_exactsizeiterator_len", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::right_world_get - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::right_world_get_many_mut - should panic", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::merges_sync_points_into_one", "observer::tests::observer_multiple_listeners", "query::builder::tests::builder_static_components", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_matches", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query", "schedule::stepping::tests::clear_system", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "query::state::tests::can_transmute_immut_fetch", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::state::tests::cannot_transmute_entity_ref - should panic", "schedule::stepping::tests::continue_always_run", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::self_conflicting_worldquery - should panic", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::step_always_run", "observer::tests::observer_order_insert_remove", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::waiting_breakpoint", "query::tests::par_iter_mut_change_detection", "schedule::condition::tests::run_condition", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::verify_cursor", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::stepping::tests::stepping_disabled", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::stepping::tests::disabled_breakpoint", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::stepping::simple_executor", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::events", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::schedules", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::conditions::system_with_condition", "schedule::stepping::tests::clear_breakpoint", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::stepping::tests::step_breakpoint", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::conditions::mixed_conditions_and_change_detection", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::read_only", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::system_execution::run_system", "schedule::tests::stepping::multi_threaded_executor", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "storage::blob_vec::tests::blob_vec", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::sparse_set::tests::sparse_set", "system::builder::tests::local_builder", "storage::blob_vec::tests::resize_test", "system::builder::tests::query_builder", "system::builder::tests::query_builder_state", "system::commands::tests::append", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::builder::tests::multi_param_builder", "system::commands::tests::commands", "storage::table::tests::table", "system::builder::tests::vec_builder", "system::builder::tests::param_set_vec_builder", "system::builder::tests::param_set_builder", "system::commands::tests::remove_components", "system::commands::tests::remove_components_by_id", "system::commands::tests::remove_resources", "system::commands::tests::test_commands_are_send_and_sync", "system::system_name::tests::test_system_name_regular_param", "system::system_name::tests::test_system_name_exclusive_param", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system_param::tests::system_param_phantom_data", "system::function_system::tests::into_system_type_id_consistency", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_param::tests::system_param_flexibility", "system::system::tests::command_processing", "system::system_param::tests::system_param_const_generics", "system::system::tests::run_system_once", "system::system::tests::run_two_systems", "system::builder::tests::dyn_builder", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ordering::add_systems_correct_order", "system::builder::tests::custom_param_builder", "system::builder::tests::multi_param_builder_inference", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system_registry::tests::change_detection", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system::tests::non_send_resources", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::nested_systems", "system::tests::any_of_with_conflicting - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_and_without", "system::system_registry::tests::output_values", "system::system_param::tests::system_param_field_limit", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::system_param::tests::system_param_invariant_lifetime", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::immutable_mut_test", "system::tests::assert_systems", "system::system_param::tests::system_param_name_collision", "system::tests::non_send_system", "system::tests::non_send_option_system", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::changed_resource_system", "system::tests::convert_mut_to_immut", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::into_iter_impl", "system::tests::get_system_conflicts", "system::tests::local_system", "system::tests::nonconflicting_system_resources", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::long_life_test", "system::tests::any_of_working", "system::tests::conflicting_query_immut_system - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::disjoint_query_mut_read_component_system", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "system::tests::conflicting_query_sets_system - should panic", "system::system_registry::tests::exclusive_system", "system::system_param::tests::non_sync_local", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::commands_param_set", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_system", "system::tests::any_of_with_and_without_common", "system::system_registry::tests::input_values", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::query_is_empty", "system::tests::pipe_change_detection", "system::tests::or_has_no_filter_with - should panic", "system::system_registry::tests::local_variables", "system::system_param::tests::system_param_generic_bounds", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::query_set_system", "system::tests::simple_system", "system::tests::query_validates_world_id - should panic", "system::tests::system_state_archetype_update", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::panic_inside_system - should panic", "system::tests::read_system_state", "system::tests::or_with_without_and_compatible_with_without", "system::tests::conflicting_query_mut_system - should panic", "system::tests::system_state_change_detection", "system::tests::conflicting_system_resources - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "tests::added_queries", "tests::bundle_derive", "tests::empty_spawn", "system::tests::system_state_invalid_world - should panic", "system::tests::write_system_state", "tests::clear_entities", "tests::despawn_mixed_storage", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::system_param::tests::param_set_non_send_second", "system::tests::can_have_16_parameters", "system::tests::any_of_with_entity_and_mut", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::tests::or_param_set_system", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with", "system::tests::or_expanded_with_and_without_common", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::changed_trackers_sparse", "tests::mut_and_mut_query_panic - should panic", "system::tests::world_collections_system", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_same_thread", "schedule::tests::system_ordering::order_systems", "tests::despawn_table_storage", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_without", "tests::mut_and_entity_ref_query_panic - should panic", "tests::query_filter_with_for_each", "tests::multiple_worlds_same_query_iter - should panic", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_filter_with_sparse_for_each", "tests::query_missing_component", "tests::insert_overwrite_drop_sparse", "system::tests::update_archetype_component_access_works", "tests::query_filter_with_sparse", "tests::non_send_resource_panic - should panic", "tests::duplicate_components_panic - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::query_optional_component_sparse", "system::tests::test_combinator_clone", "tests::add_remove_components", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::changed_trackers", "tests::changed_query", "tests::filtered_query_access", "tests::added_tracking", "tests::insert_or_spawn_batch_invalid", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::exact_size_query", "tests::entity_ref_and_mut_query_panic - should panic", "tests::generic_required_components", "tests::par_for_each_dense", "tests::par_for_each_sparse", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::dynamic_required_components", "system::tests::removal_tracking", "tests::remove_tracking", "tests::ref_and_mut_query_panic - should panic", "world::command_queue::test::test_command_is_send", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_take_leaves_required", "tests::query_sparse_component", "tests::random_access", "tests::remove", "tests::query_single_component_for_each", "tests::required_components_retain_keeps_required", "tests::resource", "world::command_queue::test::test_command_queue_inner", "world::entity_ref::tests::entity_mut_world_scope_panic", "tests::query_optional_component_table", "tests::resource_scope", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::entity_mut_get_by_id", "tests::required_components_spawn_then_insert_no_overwrite", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "tests::reserve_entities_across_worlds", "world::entity_ref::tests::mut_compatible_with_entity", "world::command_queue::test::test_command_queue_inner_panic_safe", "tests::test_is_archetypal_size_hints", "tests::remove_missing", "tests::query_single_component", "tests::spawn_batch", "tests::sparse_set_add_remove_many", "tests::required_components_insert_existing_hooks", "tests::reserve_and_spawn", "tests::take", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner_drop_early", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::command_queue::test::test_command_queue_inner_drop", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "tests::required_components", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::entity_ref_get_by_id", "tests::query_optional_component_sparse_no_match", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_id_system_param", "world::entity_ref::tests::sorted_remove", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::entity_ref::tests::retain_some_components", "world::tests::iterate_entities", "world::tests::inspect_entity_components", "world::tests::get_resource_mut_by_id", "world::tests::get_resource_by_id", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_reflect", "world::tests::init_resource_does_not_overwrite", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::removing_dense_updates_table_row", "world::reflect::tests::get_component_as_mut_reflect", "system::tests::get_many_is_ordered", "world::tests::spawn_empty_bundle", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::iter_resources", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - 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/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/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "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/query/filter.rs - query::filter::Added (line 565)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1491)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1477)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "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/lib.rs - (line 33)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "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::xnor (line 412) - compile fail", "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::EntityMapper (line 60)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - 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::xnor (line 379) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 184) - compile fail", "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::Condition (line 24)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 223)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 337)", "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/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 589)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1698)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 201)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 588)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 752)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/component.rs - component::Component (line 127)", "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/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/lib.rs - (line 335)", "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 (line 82)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1721)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 817)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 802)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "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::Condition (line 34)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 213)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 920) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1031) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 654)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 334)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1402)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 745)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 556)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "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 529) - compile fail", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 540)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1733)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)", "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_unstable (line 496)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 473)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 431)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "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/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1083)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1424)", "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>::iter_mut (line 485)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 927)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1536)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 620)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1265)", "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 (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1187)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1289)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 691)", "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>::get (line 852)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1181)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 565)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 733)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1865)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 500)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 973)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 646)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 273)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 815)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 377)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 378)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1131)", "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>::is_empty (line 1258)", "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::SystemParam (line 80)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1293)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1579)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 255)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 592)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 128) - compile", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 320)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1140)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 49)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 445)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1241)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 891)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 982)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 824)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 678)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1425)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 712)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 313)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 412)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 202)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 955)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1762)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1336)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1715)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 696)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 847)", "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>::get_single_mut (line 1217)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1622)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1596)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1112)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1567)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1055)", "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::ParamSet (line 348)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "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>::insert (line 1739)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1372)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 812)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 924)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1682)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1655)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1511)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1819)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1537)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 455)", "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 (line 412)", "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 (line 574)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2263)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1962)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1794)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 421)", "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_mut (line 744)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 609)", "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::schedule_scope (line 2848)", "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 2486)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2508)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 539)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2585)", "window::tests::cursor_position_not_within_window_bounds", "window::tests::cursor_position_within_window_bounds", "crates/bevy_window/src/window.rs - window::Window (line 110)" ]
[ "attributes::tests::should_debug_custom_attributes", "enums::tests::dynamic_enum_should_change_variant", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "enums::tests::enum_should_set", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_return_is_dynamic", "func::args::list::tests::should_pop_args_in_reverse_order", "enums::tests::enum_should_return_correct_variant_type", "enums::enum_trait::tests::next_index_increment", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_derive_custom_attributes_on_struct_container", "array::tests::next_index_increment", "attributes::tests::should_get_custom_attribute_dynamically", "attributes::tests::should_allow_unit_struct_attribute_values", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_partial_eq", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::applying_non_enum_should_panic - should panic", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_enum_container", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::registry::tests::should_error_on_missing_name", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "enums::tests::enum_should_apply", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "func::info::tests::should_create_closure_info", "enums::tests::enum_should_iterate_fields", "enums::tests::should_skip_ignored_fields", "func::args::list::tests::should_push_arguments_in_order", "enums::tests::enum_should_allow_nesting_enums", "func::tests::should_error_on_invalid_arg_type", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::variants::tests::should_return_error_on_invalid_cast", "enums::tests::enum_should_allow_struct_fields", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::args::list::tests::should_take_args_in_order", "func::args::list::tests::should_reindex_on_push_after_take", "func::info::tests::should_create_anonymous_function_info", "func::info::tests::should_create_function_info", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "func::tests::should_error_on_invalid_arg_ownership", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::into_function::tests::should_default_closure_name_to_none", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_allow_overwriting_registration", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::dynamic_function::tests::should_overwrite_function_name", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "enums::tests::enum_should_allow_generics", "enums::tests::should_get_enum_type_info", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "impls::std::tests::can_serialize_duration", "impls::std::tests::instant_should_from_reflect", "func::registry::tests::should_register_dynamic_closure", "func::registry::tests::should_debug_function_registry", "impls::smol_str::tests::smolstr_should_from_reflect", "func::registry::tests::should_register_function", "func::registry::tests::should_register_dynamic_function", "func::dynamic_function::tests::should_clone_dynamic_function", "func::into_function::tests::should_create_dynamic_function_from_closure", "impls::smol_str::tests::should_partial_eq_smolstr", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::info::tests::should_create_function_pointer_info", "func::registry::tests::should_only_register_function_once", "func::into_function::tests::should_create_dynamic_function_from_function", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "impls::std::tests::should_partial_eq_char", "path::tests::parsed_path_parse", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_vec", "func::registry::tests::should_register_closure", "path::tests::reflect_path", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_string", "impls::std::tests::path_should_from_reflect", "impls::std::tests::static_str_should_from_reflect", "serde::de::tests::should_return_error_if_missing_type_data", "serde::ser::tests::should_return_error_if_missing_type_data", "list::tests::test_into_iter", "list::tests::next_index_increment", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_hash_map", "map::tests::next_index_increment", "path::tests::reflect_array_behaves_like_list", "path::parse::test::parse_invalid", "map::tests::test_into_iter", "impls::std::tests::type_id_should_from_reflect", "path::tests::accept_leading_tokens", "path::tests::parsed_path_get_field", "serde::ser::tests::should_return_error_if_missing_registration", "serde::de::tests::should_deserialize_self_describing_binary", "serde::de::tests::enum_should_deserialize", "serde::de::tests::should_deserialize", "path::tests::reflect_array_behaves_like_list_mut", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "tests::docstrings::variants_should_contain_docs", "serde::tests::test_serialization_struct", "tests::from_reflect_should_use_default_field_attributes", "tests::assert_impl_reflect_macro_on_all", "serde::tests::test_serialization_tuple_struct", "tests::docstrings::should_not_contain_docs", "tests::from_reflect_should_use_default_container_attribute", "struct_trait::tests::next_index_increment", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::as_reflect", "tests::docstrings::fields_should_contain_docs", "set::tests::test_into_iter", "tests::can_opt_out_type_path", "tests::dynamic_types_debug_format", "tests::docstrings::should_contain_docs", "tests::into_reflect", "tests::glam::vec3_serialization", "tests::glam::quat_serialization", "tests::glam::vec3_field_access", "tests::glam::quat_deserialization", "tests::glam::vec3_apply_dynamic", "tests::glam::vec3_path_access", "tests::glam::vec3_deserialization", "tests::custom_debug_function", "serde::ser::tests::should_serialize_dynamic_option", "serde::ser::tests::enum_should_serialize", "tests::reflect_downcast", "serde::de::tests::should_deserialize_value", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::de::tests::should_deserialize_option", "tests::reflect_map", "tests::recursive_typed_storage_does_not_hang", "tests::multiple_reflect_lists", "tests::reflect_map_no_hash_dynamic - should panic", "tests::reflect_complex_patch", "tests::reflect_map_no_hash_dynamic_representing - should panic", "tests::not_dynamic_names", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::should_allow_multiple_custom_where", "tests::reflect_unit_struct", "tests::reflect_take", "serde::ser::tests::should_serialize_self_describing_binary", "tests::reflect_ignore", "serde::de::tests::should_deserialized_typed", "tests::should_reflect_remote_type_from_module", "tests::should_take_remote_type", "tests::should_permit_valid_represented_type_for_dynamic", "type_registry::test::test_reflect_from_ptr", "tests::try_apply_should_detect_kinds", "tests::should_auto_register_fields", "tests::reflect_type_path", "tests::should_allow_custom_where", "tests::should_call_from_reflect_dynamically", "tests::should_allow_custom_where_with_assoc_type", "tests::recursive_registration_does_not_hang", "tests::should_allow_dynamic_fields", "tests::should_not_auto_register_existing_types", "tests::should_allow_empty_custom_where", "tests::should_permit_higher_ranked_lifetimes", "tests::should_drain_fields", "tests::reflect_map_no_hash - should panic", "tests::reflect_struct", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "serde::ser::tests::should_serialize_option", "serde::ser::tests::should_serialize", "tests::should_try_take_remote_type", "tests::std_type_paths", "tuple_struct::tests::next_index_increment", "type_info::tests::should_return_error_on_invalid_cast", "tests::should_take_nested_remote_type", "tests::should_reflect_remote_type", "tests::should_reflect_remote_enum", "tests::should_reflect_nested_remote_enum", "tests::should_reflect_remote_value_type", "tuple::tests::next_index_increment", "tests::should_reflect_debug", "tests::should_reflect_nested_remote_type", "tests::reflect_serialize", "serde::tests::should_roundtrip_proxied_dynamic", "serde::de::tests::should_reserialize", "tests::multiple_reflect_value_lists", "tests::reflect_type_info", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 14)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 24)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 68)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 32)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 58)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 25)", "crates/bevy_reflect/src/lib.rs - (line 343)", "crates/bevy_reflect/src/lib.rs - (line 405)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 30)", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 76)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 26)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 110)", "crates/bevy_reflect/src/type_info.rs - type_info::Type (line 314)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 252)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 114)", "crates/bevy_reflect/src/lib.rs - (line 263)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 187)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 24)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 486)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 205)", "crates/bevy_reflect/src/lib.rs - (line 132)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 96)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 456)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 152)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 47)", "crates/bevy_reflect/src/lib.rs - (line 238)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 233)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 507)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 450)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 151)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 142)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 650)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 181)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 124)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 345)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 452)", "crates/bevy_reflect/src/lib.rs - (line 190)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 500)", "crates/bevy_reflect/src/lib.rs - (line 224)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 47)", "crates/bevy_reflect/src/lib.rs - (line 204)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 208)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 217)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 62)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 82)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 180)", "crates/bevy_reflect/src/lib.rs - (line 294)", "crates/bevy_reflect/src/lib.rs - (line 362)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 28)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 150)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 83)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 149)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/array.rs - array::Array (line 31)", "crates/bevy_reflect/src/lib.rs - (line 322)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 544)", "crates/bevy_reflect/src/func/info.rs - func::info::TypedFunction (line 191)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 128)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 162)", "crates/bevy_reflect/src/list.rs - list::List (line 38)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 75)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 36)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 10)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 321)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 101)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 161)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 379)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 333)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 271)", "crates/bevy_reflect/src/set.rs - set::set_debug (line 422)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 165)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 187)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 157)", "crates/bevy_reflect/src/set.rs - set::Set (line 28)", "crates/bevy_reflect/src/lib.rs - (line 154)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 79)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 39)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 454)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 321)" ]
[]
[]
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 --- a/crates/bevy_ecs/src/observer/mod.rs +++ b/crates/bevy_ecs/src/observer/mod.rs @@ -311,16 +311,41 @@ impl World { self.spawn(Observer::new(system)) } - /// Triggers the given `event`, which will run any observers watching for it. + /// Triggers the given [`Event`], which will run any [`Observer`]s watching for it. + /// + /// While event types commonly implement [`Copy`], + /// those that don't will be consumed and will no longer be accessible. + /// If you need to use the event after triggering it, use [`World::trigger_ref`] instead. pub fn trigger(&mut self, event: impl Event) { TriggerEvent { event, targets: () }.trigger(self); } - /// Triggers the given `event` for the given `targets`, which will run any observers watching for it. + /// Triggers the given [`Event`] as a mutable reference, which will run any [`Observer`]s watching for it. + /// + /// Compared to [`World::trigger`], this method is most useful when it's necessary to check + /// or use the event after it has been modified by observers. + pub fn trigger_ref(&mut self, event: &mut impl Event) { + TriggerEvent { event, targets: () }.trigger_ref(self); + } + + /// Triggers the given [`Event`] for the given `targets`, which will run any [`Observer`]s watching for it. + /// + /// While event types commonly implement [`Copy`], + /// those that don't will be consumed and will no longer be accessible. + /// If you need to use the event after triggering it, use [`World::trigger_targets_ref`] instead. pub fn trigger_targets(&mut self, event: impl Event, targets: impl TriggerTargets) { TriggerEvent { event, targets }.trigger(self); } + /// Triggers the given [`Event`] as a mutable reference for the given `targets`, + /// which will run any [`Observer`]s watching for it. + /// + /// Compared to [`World::trigger_targets`], this method is most useful when it's necessary to check + /// or use the event after it has been modified by observers. + pub fn trigger_targets_ref(&mut self, event: &mut impl Event, targets: impl TriggerTargets) { + TriggerEvent { event, targets }.trigger_ref(self); + } + /// Register an observer to the cache, called when an observer is created pub(crate) fn register_observer(&mut self, observer_entity: Entity) { // SAFETY: References do not alias. diff --git a/crates/bevy_ecs/src/observer/trigger_event.rs b/crates/bevy_ecs/src/observer/trigger_event.rs --- a/crates/bevy_ecs/src/observer/trigger_event.rs +++ b/crates/bevy_ecs/src/observer/trigger_event.rs @@ -21,6 +21,13 @@ impl<E: Event, Targets: TriggerTargets> TriggerEvent<E, Targets> { } } +impl<E: Event, Targets: TriggerTargets> TriggerEvent<&mut E, Targets> { + pub(super) fn trigger_ref(self, world: &mut World) { + let event_type = world.init_component::<E>(); + trigger_event(world, event_type, self.event, self.targets); + } +} + impl<E: Event, Targets: TriggerTargets + Send + Sync + 'static> Command for TriggerEvent<E, Targets> {
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 @@ -454,6 +479,11 @@ mod tests { #[derive(Event)] struct EventA; + #[derive(Event)] + struct EventWithData { + counter: usize, + } + #[derive(Resource, Default)] struct R(usize); 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 @@ -586,6 +616,39 @@ mod tests { assert_eq!(4, world.resource::<R>().0); } + #[test] + fn observer_trigger_ref() { + let mut world = World::new(); + + world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 1); + world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 2); + world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 4); + // This flush is required for the last observer to be called when triggering the event, + // due to `World::observe` returning `WorldEntityMut`. + world.flush(); + + let mut event = EventWithData { counter: 0 }; + world.trigger_ref(&mut event); + assert_eq!(7, event.counter); + } + + #[test] + fn observer_trigger_targets_ref() { + let mut world = World::new(); + + world.observe(|mut trigger: Trigger<EventWithData, A>| trigger.event_mut().counter += 1); + world.observe(|mut trigger: Trigger<EventWithData, B>| trigger.event_mut().counter += 2); + world.observe(|mut trigger: Trigger<EventWithData, A>| trigger.event_mut().counter += 4); + // This flush is required for the last observer to be called when triggering the event, + // due to `World::observe` returning `WorldEntityMut`. + world.flush(); + + let mut event = EventWithData { counter: 0 }; + let component_a = world.init_component::<A>(); + world.trigger_targets_ref(&mut event, component_a); + assert_eq!(5, event.counter); + } + #[test] fn observer_multiple_listeners() { let mut world = World::new();
World::trigger variant that takes a &mut impl Event ## What problem does this solve or what need does it fill? I want to perform cleanup after `Observer`s have been triggered with an event, given they are passed into observer systems as `&mut Event`, i.e.: ```rust let mut foo: FooEvent = FooEvent { /* ... */ }; world.trigger_ref_mut(&mut foo); // then do something with the modified `FooEvent`. ``` ## What solution would you like? ```rust impl World { pub fn trigger_ref_mut(&mut self, event: &mut impl Event); pub fn trigger_ref_mut(&mut self, event: &mut impl Event, targets: impl TriggerTargets); } ``` ## What alternative(s) have you considered? Getting commands ordered in specific ways for applying. ## Additional context I believe this ability is required for a possible "deferred egui" model that I'm ruminating on.
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_detection::tests::mut_new", "change_detection::tests::mut_from_res_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_recursive", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::set_if_neq", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_events", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_construction", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "label::tests::dyn_eq_object_safe", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone", "query::access::tests::test_access_clone_from", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_multiple_components", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_listeners", "observer::tests::observer_propagating_no_next", "observer::tests::observer_multiple_matches", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_world", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_multiple_events", "query::builder::tests::builder_or", "observer::tests::observer_entity_routing", "observer::tests::observer_no_target", "observer::tests::observer_order_replace", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_dynamic", "observer::tests::observer_propagating", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_with_without_static", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_join", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::iter::tests::query_sorts", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_order_spawn_despawn", "query::state::tests::can_transmute_added", "observer::tests::observer_order_recursive", "query::state::tests::can_transmute_changed", "query::state::tests::can_generalize_with_option", "query::fetch::tests::world_query_phantom_data", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::cannot_get_data_not_in_original_query", "observer::tests::observer_order_insert_remove_sparse", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::join_with_get", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::tests::any_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "observer::tests::observer_order_insert_remove", "query::tests::many_entities", "query::tests::has_query", "query::tests::multi_storage_query", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::state::tests::join", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "schedule::set::tests::test_derive_schedule_label", "schedule::executor::simple::skip_automatic_sync_points", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "schedule::set::tests::test_derive_system_set", "query::tests::derived_worldqueries", "query::tests::query_filtered_iter_combinations", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::step_always_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::step_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::verify_cursor", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::components", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::resources", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::sparse_set::tests::sparse_sets", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::table::tests::table", "storage::blob_vec::tests::resize_test", "system::builder::tests::local_builder", "system::builder::tests::multi_param_builder", "system::builder::tests::query_builder", "system::builder::tests::param_set_builder", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "system::commands::tests::append", "system::builder::tests::query_builder_state", "system::commands::tests::remove_resources", "system::function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::system::tests::run_system_once", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::exclusive_function_system::tests::into_system_type_id_consistency", "event::tests::test_event_mutator_iter_nth", "system::system_name::tests::test_system_name_exclusive_param", "system::system::tests::command_processing", "event::tests::test_event_reader_iter_nth", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::commands::tests::commands", "system::system::tests::run_two_systems", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::conditions::systems_nested_in_system_sets", "system::commands::tests::test_commands_are_send_and_sync", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::stepping::tests::step_run_if_false", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_flexibility", "schedule::tests::conditions::multiple_conditions_on_system", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_phantom_data", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_registry::tests::change_detection", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::system_registry::tests::input_values", "schedule::schedule::tests::disable_auto_sync_points", "schedule::tests::system_ambiguity::read_only", "system::system_registry::tests::local_variables", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_param::tests::system_param_field_limit", "system::system_registry::tests::output_values", "system::system_param::tests::param_set_non_send_first", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::conditions::systems_with_distributive_condition", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_invariant_lifetime", "system::commands::tests::remove_components_by_id", "system::system_param::tests::system_param_private_fields", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::exclusive_system", "system::tests::any_of_with_conflicting - should panic", "system::system_param::tests::system_param_struct_variants", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system::tests::non_send_resources", "system::commands::tests::remove_components", "system::system_param::tests::param_set_non_send_second", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::system_param::tests::non_sync_local", "system::tests::any_of_has_no_filter_with - should panic", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_with_condition", "system::tests::any_of_and_without", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::set::tests::test_schedule_label", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::condition::tests::run_condition", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::condition::tests::multiple_run_conditions", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_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_with_mut_and_option - should panic", "schedule::schedule::tests::inserts_a_sync_point", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_with_and_without_common", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::tests::assert_system_does_not_conflict - should panic", "schedule::condition::tests::run_condition_combinators", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::assert_systems", "query::tests::par_iter_mut_change_detection", "system::tests::conflicting_query_immut_system - should panic", "system::tests::any_of_working", "system::tests::conflicting_query_mut_system - should panic", "system::tests::long_life_test", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::immutable_mut_test", "system::tests::changed_trackers_or_conflict - should panic", "schedule::tests::system_ordering::order_systems", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::can_have_16_parameters", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::commands_param_set", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::changed_resource_system", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_read_component_system", "system::tests::disjoint_query_mut_system", "system::tests::nonconflicting_system_resources", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::convert_mut_to_immut", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::system_state_change_detection", "system::tests::into_iter_impl", "system::tests::pipe_change_detection", "system::tests::or_expanded_with_and_without_common", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::non_send_option_system", "system::tests::non_send_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_has_filter_with", "system::tests::local_system", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::system_state_archetype_update", "system::tests::query_validates_world_id - should panic", "system::tests::panic_inside_system - should panic", "system::tests::or_param_set_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::system_state_invalid_world - should panic", "system::tests::read_system_state", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::query_is_empty", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::query_set_system", "event::tests::test_event_cursor_par_read_mut", "tests::added_tracking", "system::tests::update_archetype_component_access_works", "tests::bundle_derive", "tests::despawn_mixed_storage", "tests::duplicate_components_panic - should panic", "tests::changed_query", "tests::added_queries", "tests::entity_mut_and_entity_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::entity_ref_and_entity_mut_query_panic - should panic", "system::tests::world_collections_system", "tests::despawn_table_storage", "tests::clear_entities", "tests::add_remove_components", "tests::filtered_query_access", "system::tests::test_combinator_clone", "event::tests::test_event_cursor_par_read", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::changed_trackers_sparse", "tests::insert_overwrite_drop", "tests::entity_ref_and_mut_query_panic - should panic", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_for_each - should panic", "query::tests::query_filtered_exactsizeiterator_len", "tests::empty_spawn", "tests::exact_size_query", "tests::changed_trackers", "tests::insert_or_spawn_batch", "tests::multiple_worlds_same_query_get - should panic", "tests::non_send_resource", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::mut_and_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::query_filter_with", "tests::query_all_for_each", "tests::query_filter_with_sparse", "tests::par_for_each_sparse", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::non_send_resource_panic - should panic", "tests::query_filter_with_for_each", "tests::par_for_each_dense", "tests::query_filters_dont_collide_with_fetches", "tests::query_missing_component", "tests::query_get", "tests::query_optional_component_sparse", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_table", "tests::query_optional_component_sparse_no_match", "tests::query_single_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::remove_missing", "tests::remove", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::remove_tracking", "tests::sparse_set_add_remove_many", "tests::reserve_entities_across_worlds", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "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::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::entity_ref::tests::removing_dense_updates_table_row", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::init_non_send_resource_does_not_overwrite", "world::reflect::tests::get_component_as_reflect", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iter_resources", "world::tests::iterate_entities_mut", "world::tests::spawn_empty_bundle", "world::tests::inspect_entity_components", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "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::Component (line 166) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1072) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1023) - 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/lib.rs - (line 33)", "crates/bevy_ecs/src/component.rs - component::Component (line 141)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/component.rs - component::Component (line 106)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 208)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/component.rs - component::Component (line 176)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1088)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 565)", "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::xnor (line 412) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1470)", "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::nand (line 184) - compile fail", "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/query/iter.rs - query::iter::QueryCombinationIter (line 1484)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 379) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "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/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 589)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 802)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1721)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 691)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 844)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 588)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 245)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 806)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 654)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 213)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 337)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1698)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1384)", "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::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 223)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 727)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 334)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 799)", "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>::many (line 920) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1031) - compile", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 496)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 752)", "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::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "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>::reborrow (line 416)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 439) - compile fail", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1534) - compile fail", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 450)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1510)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 45)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 44)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 735)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 320)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 380)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 567)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 255)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 680)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 622)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 433)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1258)", "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 1217)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 878)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1151)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 594)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "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/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1175)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1536)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 475)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 664)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 799)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1336)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 646)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 914)", "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 (line 852)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1091)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1198)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 815)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1031)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1112)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 128) - compile", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 757)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 327)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 973)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 734)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 298)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1293)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1579)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 410)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 362)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1424)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 79)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 49)", "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 (line 82)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1140)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 865)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1379)", "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::EntityMut (line 257)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 185)", "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/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1514)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1432)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2263)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1540)", "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::VacantEntry<'w,'a,T>::insert (line 1797)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1685)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1658)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1161)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1625)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1765)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1570)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1718)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 313)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 574)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 455)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 696)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 609)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1742)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1599)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 744)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1822)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1258)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 539)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2486)", "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::resource_scope (line 1962)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1055)", "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::spawn (line 924)", "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::iter_resources (line 2508)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 421)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2848)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)" ]
[]
[]
[]
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 --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -34,7 +34,8 @@ pub mod prelude { app::{App, AppExit}, main_schedule::{ First, FixedFirst, FixedLast, FixedPostUpdate, FixedPreUpdate, FixedUpdate, Last, Main, - PostStartup, PostUpdate, PreStartup, PreUpdate, SpawnScene, Startup, Update, + PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, + RunFixedMainLoopSystem, SpawnScene, Startup, Update, }, sub_app::SubApp, Plugin, PluginGroup, diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -1,6 +1,9 @@ use crate::{App, Plugin}; use bevy_ecs::{ - schedule::{ExecutorKind, InternedScheduleLabel, Schedule, ScheduleLabel}, + schedule::{ + ExecutorKind, InternedScheduleLabel, IntoSystemSetConfigs, Schedule, ScheduleLabel, + SystemSet, + }, system::{Local, Resource}, world::{Mut, World}, }; diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -75,6 +78,11 @@ pub struct First; pub struct PreUpdate; /// Runs the [`FixedMain`] schedule in a loop according until all relevant elapsed time has been "consumed". +/// If you need to order your variable timestep systems +/// before or after the fixed update logic, use the [`RunFixedMainLoopSystem`] system set. +/// +/// Note that in contrast to most other Bevy schedules, systems added directly to +/// [`RunFixedMainLoop`] will *not* be parallelized between each other. /// /// See the [`Main`] schedule for some details about how schedules are run. #[derive(ScheduleLabel, Clone, Debug, PartialEq, Eq, Hash)] diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -288,7 +296,16 @@ impl Plugin for MainSchedulePlugin { .init_resource::<MainScheduleOrder>() .init_resource::<FixedMainScheduleOrder>() .add_systems(Main, Main::run_main) - .add_systems(FixedMain, FixedMain::run_fixed_main); + .add_systems(FixedMain, FixedMain::run_fixed_main) + .configure_sets( + RunFixedMainLoop, + ( + RunFixedMainLoopSystem::BeforeFixedMainLoop, + RunFixedMainLoopSystem::FixedMainLoop, + RunFixedMainLoopSystem::AfterFixedMainLoop, + ) + .chain(), + ); #[cfg(feature = "bevy_debug_stepping")] { diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -234,13 +234,15 @@ impl AppGizmoBuilder for App { .init_resource::<GizmoStorage<Config, Swap<Fixed>>>() .add_systems( RunFixedMainLoop, - start_gizmo_context::<Config, Fixed>.before(bevy_time::run_fixed_main_schedule), + start_gizmo_context::<Config, Fixed> + .in_set(bevy_app::RunFixedMainLoopSystem::BeforeFixedMainLoop), ) .add_systems(FixedFirst, clear_gizmo_context::<Config, Fixed>) .add_systems(FixedLast, collect_requested_gizmos::<Config, Fixed>) .add_systems( RunFixedMainLoop, - end_gizmo_context::<Config, Fixed>.after(bevy_time::run_fixed_main_schedule), + end_gizmo_context::<Config, Fixed> + .in_set(bevy_app::RunFixedMainLoopSystem::AfterFixedMainLoop), ) .add_systems( Last, diff --git a/crates/bevy_time/src/fixed.rs b/crates/bevy_time/src/fixed.rs --- a/crates/bevy_time/src/fixed.rs +++ b/crates/bevy_time/src/fixed.rs @@ -233,8 +233,10 @@ impl Default for Fixed { } /// Runs [`FixedMain`] zero or more times based on delta of -/// [`Time<Virtual>`](Virtual) and [`Time::overstep`] -pub fn run_fixed_main_schedule(world: &mut World) { +/// [`Time<Virtual>`](Virtual) and [`Time::overstep`]. +/// You can order your systems relative to this by using +/// [`RunFixedMainLoopSystem`](bevy_app::prelude::RunFixedMainLoopSystem). +pub(super) fn run_fixed_main_schedule(world: &mut World) { let delta = world.resource::<Time<Virtual>>().delta(); world.resource_mut::<Time<Fixed>>().accumulate(delta); diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -70,7 +70,10 @@ impl Plugin for TimePlugin { .in_set(TimeSystem) .ambiguous_with(event_update_system), ) - .add_systems(RunFixedMainLoop, run_fixed_main_schedule); + .add_systems( + RunFixedMainLoop, + run_fixed_main_schedule.in_set(RunFixedMainLoopSystem::FixedMainLoop), + ); // Ensure the events are not dropped until `FixedMain` systems can observe them app.add_systems(FixedPostUpdate, signal_event_update_system); diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -53,16 +53,22 @@ //! //! ## Implementation //! +//! - The player's inputs since the last physics update are stored in the `AccumulatedInput` component. //! - The player's velocity is stored in a `Velocity` component. This is the speed in units per second. //! - The player's current position in the physics simulation is stored in a `PhysicalTranslation` component. //! - The player's previous position in the physics simulation is stored in a `PreviousPhysicalTranslation` component. //! - The player's visual representation is stored in Bevy's regular `Transform` component. //! - Every frame, we go through the following steps: +//! - Accumulate the player's input and set the current speed in the `handle_input` system. +//! This is run in the `RunFixedMainLoop` schedule, ordered in `RunFixedMainLoopSystem::BeforeFixedMainLoop`, +//! which runs before the fixed timestep loop. This is run every frame. //! - Advance the physics simulation by one fixed timestep in the `advance_physics` system. -//! This is run in the `FixedUpdate` schedule, which runs before the `Update` schedule. -//! - Update the player's visual representation in the `update_rendered_transform` system. +//! Accumulated input is consumed here. +//! This is run in the `FixedUpdate` schedule, which runs zero or multiple times per frame. +//! - Update the player's visual representation in the `interpolate_rendered_transform` system. //! This interpolates between the player's previous and current position in the physics simulation. -//! - Update the player's velocity based on the player's input in the `handle_input` system. +//! It is run in the `RunFixedMainLoop` schedule, ordered in `RunFixedMainLoopSystem::AfterFixedMainLoop`, +//! which runs after the fixed timestep loop. This is run every frame. //! //! //! ## Controls diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -80,13 +86,31 @@ fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, (spawn_text, spawn_player)) - // `FixedUpdate` runs before `Update`, so the physics simulation is advanced before the player's visual representation is updated. + // Advance the physics simulation using a fixed timestep. .add_systems(FixedUpdate, advance_physics) - .add_systems(Update, (update_rendered_transform, handle_input).chain()) + .add_systems( + // The `RunFixedMainLoop` schedule allows us to schedule systems to run before and after the fixed timestep loop. + RunFixedMainLoop, + ( + // The physics simulation needs to know the player's input, so we run this before the fixed timestep loop. + // Note that if we ran it in `Update`, it would be too late, as the physics simulation would already have been advanced. + // If we ran this in `FixedUpdate`, it would sometimes not register player input, as that schedule may run zero times per frame. + handle_input.in_set(RunFixedMainLoopSystem::BeforeFixedMainLoop), + // The player's visual representation needs to be updated after the physics simulation has been advanced. + // This could be run in `Update`, but if we run it here instead, the systems in `Update` + // will be working with the `Transform` that will actually be shown on screen. + interpolate_rendered_transform.in_set(RunFixedMainLoopSystem::AfterFixedMainLoop), + ), + ) .run(); } -/// How many units per second the player should move. +/// A vector representing the player's input, accumulated over all frames that ran +/// since the last time the physics simulation was advanced. +#[derive(Debug, Component, Clone, Copy, PartialEq, Default, Deref, DerefMut)] +struct AccumulatedInput(Vec2); + +/// A vector representing the player's velocity in the physics simulation. #[derive(Debug, Component, Clone, Copy, PartialEq, Default, Deref, DerefMut)] struct Velocity(Vec3); diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -100,7 +124,7 @@ struct Velocity(Vec3); struct PhysicalTranslation(Vec3); /// The value [`PhysicalTranslation`] had in the last fixed timestep. -/// Used for interpolation in the `update_rendered_transform` system. +/// Used for interpolation in the `interpolate_rendered_transform` system. #[derive(Debug, Component, Clone, Copy, PartialEq, Default, Deref, DerefMut)] struct PreviousPhysicalTranslation(Vec3); diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -114,6 +138,7 @@ fn spawn_player(mut commands: Commands, asset_server: Res<AssetServer>) { transform: Transform::from_scale(Vec3::splat(0.3)), ..default() }, + AccumulatedInput::default(), Velocity::default(), PhysicalTranslation::default(), PreviousPhysicalTranslation::default(), diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -143,31 +168,35 @@ fn spawn_text(mut commands: Commands) { }); } -/// Handle keyboard input to move the player. -fn handle_input(keyboard_input: Res<ButtonInput<KeyCode>>, mut query: Query<&mut Velocity>) { +/// Handle keyboard input and accumulate it in the `AccumulatedInput` component. +/// There are many strategies for how to handle all the input that happened since the last fixed timestep. +/// This is a very simple one: we just accumulate the input and average it out by normalizing it. +fn handle_input( + keyboard_input: Res<ButtonInput<KeyCode>>, + mut query: Query<(&mut AccumulatedInput, &mut Velocity)>, +) { /// Since Bevy's default 2D camera setup is scaled such that /// one unit is one pixel, you can think of this as /// "How many pixels per second should the player move?" const SPEED: f32 = 210.0; - for mut velocity in query.iter_mut() { - velocity.0 = Vec3::ZERO; - + for (mut input, mut velocity) in query.iter_mut() { if keyboard_input.pressed(KeyCode::KeyW) { - velocity.y += 1.0; + input.y += 1.0; } if keyboard_input.pressed(KeyCode::KeyS) { - velocity.y -= 1.0; + input.y -= 1.0; } if keyboard_input.pressed(KeyCode::KeyA) { - velocity.x -= 1.0; + input.x -= 1.0; } if keyboard_input.pressed(KeyCode::KeyD) { - velocity.x += 1.0; + input.x += 1.0; } // Need to normalize and scale because otherwise // diagonal movement would be faster than horizontal or vertical movement. - velocity.0 = velocity.normalize_or_zero() * SPEED; + // This effectively averages the accumulated input. + velocity.0 = input.extend(0.0).normalize_or_zero() * SPEED; } } diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -180,18 +209,26 @@ fn advance_physics( mut query: Query<( &mut PhysicalTranslation, &mut PreviousPhysicalTranslation, + &mut AccumulatedInput, &Velocity, )>, ) { - for (mut current_physical_translation, mut previous_physical_translation, velocity) in - query.iter_mut() + for ( + mut current_physical_translation, + mut previous_physical_translation, + mut input, + velocity, + ) in query.iter_mut() { previous_physical_translation.0 = current_physical_translation.0; current_physical_translation.0 += velocity.0 * fixed_time.delta_seconds(); + + // Reset the input accumulator, as we are currently consuming all input that happened since the last fixed timestep. + input.0 = Vec2::ZERO; } } -fn update_rendered_transform( +fn interpolate_rendered_transform( fixed_time: Res<Time<Fixed>>, mut query: Query<( &mut Transform,
diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -126,8 +134,8 @@ pub struct FixedLast; /// The schedule that contains systems which only run after a fixed period of time has elapsed. /// -/// The exclusive `run_fixed_main_schedule` system runs this schedule. -/// This is run by the [`RunFixedMainLoop`] schedule. +/// This is run by the [`RunFixedMainLoop`] schedule. If you need to order your variable timestep systems +/// before or after the fixed update logic, use the [`RunFixedMainLoopSystem`] system set. /// /// Frequency of execution is configured by inserting `Time<Fixed>` resource, 64 Hz by default. /// See [this example](https://github.com/bevyengine/bevy/blob/latest/examples/time/time.rs). diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -352,3 +369,96 @@ impl FixedMain { }); } } + +/// Set enum for the systems that want to run inside [`RunFixedMainLoop`], +/// but before or after the fixed update logic. Systems in this set +/// will run exactly once per frame, regardless of the number of fixed updates. +/// They will also run under a variable timestep. +/// +/// This is useful for handling things that need to run every frame, but +/// also need to be read by the fixed update logic. See the individual variants +/// for examples of what kind of systems should be placed in each. +/// +/// Note that in contrast to most other Bevy schedules, systems added directly to +/// [`RunFixedMainLoop`] will *not* be parallelized between each other. +#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone, SystemSet)] +pub enum RunFixedMainLoopSystem { + /// Runs before the fixed update logic. + /// + /// A good example of a system that fits here + /// is camera movement, which needs to be updated in a variable timestep, + /// as you want the camera to move with as much precision and updates as + /// the frame rate allows. A physics system that needs to read the camera + /// position and orientation, however, should run in the fixed update logic, + /// as it needs to be deterministic and run at a fixed rate for better stability. + /// Note that we are not placing the camera movement system in `Update`, as that + /// would mean that the physics system already ran at that point. + /// + /// # Example + /// ``` + /// # use bevy_app::prelude::*; + /// # use bevy_ecs::prelude::*; + /// App::new() + /// .add_systems( + /// RunFixedMainLoop, + /// update_camera_rotation.in_set(RunFixedMainLoopSystem::BeforeFixedMainLoop)) + /// .add_systems(FixedUpdate, update_physics); + /// + /// # fn update_camera_rotation() {} + /// # fn update_physics() {} + /// ``` + BeforeFixedMainLoop, + /// Contains the fixed update logic. + /// Runs [`FixedMain`] zero or more times based on delta of + /// [`Time<Virtual>`] and [`Time::overstep`]. + /// + /// Don't place systems here, use [`FixedUpdate`] and friends instead. + /// Use this system instead to order your systems to run specifically inbetween the fixed update logic and all + /// other systems that run in [`RunFixedMainLoopSystem::BeforeFixedMainLoop`] or [`RunFixedMainLoopSystem::AfterFixedMainLoop`]. + /// + /// [`Time<Virtual>`]: https://docs.rs/bevy/latest/bevy/prelude/struct.Virtual.html + /// [`Time::overstep`]: https://docs.rs/bevy/latest/bevy/time/struct.Time.html#method.overstep + /// # Example + /// ``` + /// # use bevy_app::prelude::*; + /// # use bevy_ecs::prelude::*; + /// App::new() + /// .add_systems(FixedUpdate, update_physics) + /// .add_systems( + /// RunFixedMainLoop, + /// ( + /// // This system will be called before all interpolation systems + /// // that third-party plugins might add. + /// prepare_for_interpolation + /// .after(RunFixedMainLoopSystem::FixedMainLoop) + /// .before(RunFixedMainLoopSystem::AfterFixedMainLoop), + /// ) + /// ); + /// + /// # fn prepare_for_interpolation() {} + /// # fn update_physics() {} + /// ``` + FixedMainLoop, + /// Runs after the fixed update logic. + /// + /// A good example of a system that fits here + /// is a system that interpolates the transform of an entity between the last and current fixed update. + /// See the [fixed timestep example] for more details. + /// + /// [fixed timestep example]: https://github.com/bevyengine/bevy/blob/main/examples/movement/physics_in_fixed_timestep.rs + /// + /// # Example + /// ``` + /// # use bevy_app::prelude::*; + /// # use bevy_ecs::prelude::*; + /// App::new() + /// .add_systems(FixedUpdate, update_physics) + /// .add_systems( + /// RunFixedMainLoop, + /// interpolate_transforms.in_set(RunFixedMainLoopSystem::AfterFixedMainLoop)); + /// + /// # fn interpolate_transforms() {} + /// # fn update_physics() {} + /// ``` + AfterFixedMainLoop, +}
Bevy has no clear schedule for updating a camera's `Transform` when using a fixed time step ## What problem does this solve or what need does it fill? I'm writing primarily first-person 3D games. My physics engine of choice, Avian, has recently switched from their custom fixed update schedule that ran after `Update` to the real Bevy `FixedMain` schedule, which runs *before* `Update`. Running before update makes sense, as you want to set rendering transforms *after* running the physics. Now this results in an issue. In first person games, many things are dependent on the current camera rotation. For example, I am currently writing a plugin for picking up props. These want to be as close to the center of the screen as possible while held. This means that I need to update my camera's transform *before* running the physics. So, my order becomes: 1. Read the player's inputs 2. Rotate the camera 3. Run physics Let's think schedules. The physics need to run in fixed update. The camera rotation *could* run there as well, but ideally, if your framerate allows it, a player should be allowed to update their camera more often. So it needs to be in a variable timestep schedule before fixed update. Hmm, the only one available is `PreUpdate`. But that one also populates the resources needed to read inputs. It's also a popular place to run networking. This means we need to be really careful about our system ordering. Meh. Also, its description says the following: > [PreUpdate](https://docs.rs/bevy/latest/bevy/app/struct.PreUpdate.html) exists to do “engine/plugin preparation work” that ensures the APIs consumed in [Update](https://docs.rs/bevy/latest/bevy/app/struct.Update.html) are “ready”. [PreUpdate](https://docs.rs/bevy/latest/bevy/app/struct.PreUpdate.html) abstracts out “pre work implementation details”. The player's camera being rotated while moving the mouse is definitely more than just "pre work implemention details"! In fact, it is part of the core gameplay experience! This means that we have no good place to rotate our camera in while following best practices using a very popular camera style. ----- Bonus issue: what if our physics need to react to `just_pressed` to e.g. shoot a gun when clicking? The fixed update loop will only sometimes catch these events, as it may happen to run 0 times on the frame when we clicked. This means we need to cache the `just_pressed` event somewhere. In which schedule do we do that? `PreUpdate` is more correct for this, as it is "pre work implementation details", but we still need to be careful about ordering. ## What solution would you like? There are many possibilities. One of them is to add a new schedule between `StateTransition` and `RunFixedMainLoop` called `PreFixedMainLoop` for this use-case. See @alice-i-cecile's comment below for other options. ## What alternative(s) have you considered? Leave it as-is and force users to manually add such a schedule. This is a bit of an issue for me, as I'm trying to write minimal use-case examples for my libraries. If they happen to be first-person and use physics, I need to somehow deal with the fact that I need systems rotating the camera and reading `just_pressed` events. I can currently only handle these cleanly by introducing extremely distracting boilerplate to the example or bypassing the issue by letting everything lag one frame behind, which would be teaching the user an antipattern. ## Additional context See the discussion [started on Discord](https://discord.com/channels/691052431525675048/1124043933886976171/1275886728309375001) and the [continuation](https://discord.com/channels/691052431525675048/749335865876021248/1276190908458598401) for the full context. In particular, here is a side-by-side demonstration of what happens when you ignore all of this nuance and simply update the camera's transform in `Update`, as I think most people's instinct would be. Left is the version updating stuff correctly as described above, right is the one updating the camera in `Update`: https://github.com/user-attachments/assets/e569118b-c7fb-4093-b422-e3130b386779 The very noticeable jitter is due to the camera being "one step ahead" of the physics.
I'm a bit loathe to add more schedules with the current approach, but I see the pain here. Options: 1. Update cameras in `Update`: jittery mess and nasty footgun. 2. Update cameras in `PreUpdate`: delays during state transitions to unpause, needs to be ordered relative to input sets. 3. Update cameras in `FixedUpdate`: unidiomatic and unresponsive. 4. Add a new default schedule: messy and incurs overhead for users who don't care. 5. Encourage users to add their own schedule: annoying boilerplate, and still a footgun. 6. Move `RunFixedMainSchedule` to after `Update`: lots of implications. Might actually be correct? Fixes this footgun, and ensures that user input and so on is ready for physics. 7. Add a system inside of `RunFixedMainSchedule`: works, but a little bizarre and requires ordering. @alice-i-cecile I intentionally phrased the issue title this way to allow for any options, so I don't think this is controversial at all. There *should* be a place to put camera transforms. The camera jitter is an issue many people run into. I can edit the description to make it more clear that adding a new schedule is just one option. Edit: done For those wanting a quick and very dirty way of hacking this right now, this is option number 7 of that list above: ```rust use bevy::{app::RunFixedMainLoop, prelude::*, time::run_fixed_main_schedule}; fn main() -> AppExit { App::new() .add_plugins(DefaultPlugins) .add_systems( RunFixedMainLoop, update_camera.before(run_fixed_main_schedule), ) .add_systems(FixedUpdate, do_physics_stuff)) .run() } ``` See this pattern in the wild in LWIM: https://github.com/Leafwing-Studios/leafwing-input-manager/pull/522/files#diff-9b59ee4899ad0a5d008889ea89a124a7291316532e42f9f3d6ae842b906fb095R149-R158 Per discussion with @maniwani, #12465 would also fix this by making it safe to run camera update code inside `FixedUpdate`. I'm not sure I fully understand the issue. Why doesn't the order: - PreUpdate or FixedPreUpdate: read inputs - FixedPostUpdate: physics - Update: camera update work? Could you provide more detail about ``` In first person games, many things are dependent on the current camera rotation. For example, I am currently writing a plugin for picking up props. These want to be as close to the center of the screen as possible while held. This means that I need to update my camera's transform before running the physics. ``` You're saying that the physics systems depend on the camera transform, so physics should run only after camera transform? @cBournhonesque my physics depend on the camera position. In the video, you can see that I'm trying to make a cube follow the player's camera for a prop pickup plugin. This means that my order must be: - Read player input - Update camera `Transform` - Update physics Updating the camera transform in `FixedPreUpdate` would make it run fewer times than the refresh rate allows, which is something one should avoid with cameras. Reading the input in `PreUpdate` definitely works (if you order stuff correctly), but updating the camera there would be quite the antipattern imo. Also consider that any update in there runs before state transitions, which might make your logic invalid.
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", "plugin_group::tests::add_basic_subgroup", "plugin_group::tests::add_before", "app::tests::can_add_twice_the_same_plugin_not_unique", "app::tests::can_add_two_plugins", "app::tests::can_add_twice_the_same_plugin_with_different_type_param", "app::tests::plugin_should_not_be_added_during_build_time", "plugin_group::tests::add_conflicting_subgroup", "plugin_group::tests::basic_ordering", "app::tests::cant_add_twice_the_same_plugin - should panic", "app::tests::cant_call_app_run_from_plugin_build - should panic", "app::tests::initializing_resources_from_world", "plugin_group::tests::readd", "plugin_group::tests::readd_after", "plugin_group::tests::readd_before", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist", "app::tests::test_is_plugin_added_works_during_finish - should panic", "app::tests::events_should_be_updated_once_per_update", "app::tests::runner_returns_correct_exit_code", "app::tests::regression_test_10385", "app::tests::test_extract_sees_changes", "app::tests::test_update_clears_trackers_once", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 30) - compile", "crates/bevy_app/src/terminal_ctrl_c_handler.rs - terminal_ctrl_c_handler::TerminalCtrlCHandlerPlugin (line 14) - compile", "crates/bevy_app/src/terminal_ctrl_c_handler.rs - terminal_ctrl_c_handler::TerminalCtrlCHandlerPlugin (line 26) - compile", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 18) - compile", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 42)", "crates/bevy_app/src/plugin_group.rs - plugin_group::plugin_group (line 11)", "crates/bevy_app/src/app.rs - app::App::set_runner (line 187)", "crates/bevy_app/src/app.rs - app::App::insert_resource (line 356)", "crates/bevy_app/src/app.rs - app::App::add_plugins (line 526)", "crates/bevy_app/src/app.rs - app::App::add_event (line 331)", "crates/bevy_app/src/app.rs - app::App (line 56)", "crates/bevy_app/src/app.rs - app::App::register_function_with_name (line 727)", "crates/bevy_app/src/app.rs - app::App::register_function (line 628)", "crates/bevy_app/src/app.rs - app::App::add_systems (line 275)", "crates/bevy_app/src/app.rs - app::App::register_function_with_name (line 702)", "crates/bevy_app/src/app.rs - app::App::get_added_plugins (line 488)", "crates/bevy_app/src/app.rs - app::App::init_resource (line 382)", "crates/bevy_app/src/app.rs - app::App::register_function (line 640)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp (line 23)", "crates/bevy_app/src/app.rs - app::App::register_function (line 655)", "crates/bevy_app/src/app.rs - app::App::register_type_data (line 584)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_resource (line 917)", "crates/bevy_app/src/plugin_group.rs - plugin_group::NoopPluginGroup (line 386)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 29)", "crates/bevy_app/src/app.rs - app::App::insert_non_send_resource (line 415)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_component (line 879)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,838
bevyengine__bevy-14838
[ "7622" ]
f9d7a2ca028c9ef37e85603312eac58eb299b756
diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -1,10 +1,11 @@ +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, utility::reflect_hasher, ApplyError, MaybeTyped, PartialReflect, Reflect, - ReflectKind, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, TypePathTable, + ReflectKind, ReflectMut, ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; use bevy_reflect_derive::impl_type_path; use std::{ - any::{Any, TypeId}, + any::Any, fmt::{Debug, Formatter}, hash::{Hash, Hasher}, }; diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -77,11 +78,9 @@ pub trait Array: PartialReflect { /// A container for compile-time array info. #[derive(Clone, Debug)] pub struct ArrayInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, item_info: fn() -> Option<&'static TypeInfo>, - item_type_path: TypePathTable, - item_type_id: TypeId, + item_ty: Type, capacity: usize, #[cfg(feature = "documentation")] docs: Option<&'static str>, diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -98,11 +97,9 @@ impl ArrayInfo { capacity: usize, ) -> Self { Self { - type_path: TypePathTable::of::<TArray>(), - type_id: TypeId::of::<TArray>(), + ty: Type::of::<TArray>(), item_info: TItem::maybe_type_info, - item_type_path: TypePathTable::of::<TItem>(), - item_type_id: TypeId::of::<TItem>(), + item_ty: Type::of::<TItem>(), capacity, #[cfg(feature = "documentation")] docs: None, diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -120,32 +117,7 @@ impl ArrayInfo { self.capacity } - /// A representation of the type path of the array. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the array. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the array. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the array type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The [`TypeInfo`] of the array item. /// diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -155,21 +127,11 @@ impl ArrayInfo { (self.item_info)() } - /// A representation of the type path of the array item. + /// The [type] of the array item. /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn item_type_path_table(&self) -> &TypePathTable { - &self.item_type_path - } - - /// The [`TypeId`] of the array item. - pub fn item_type_id(&self) -> TypeId { - self.item_type_id - } - - /// Check if the given type matches the array item type. - pub fn item_is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.item_type_id + /// [type]: Type + pub fn item_ty(&self) -> Type { + self.item_ty } /// The docstring of this array, if any. diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -1,7 +1,7 @@ use crate::attributes::{impl_custom_attribute_methods, CustomAttributes}; -use crate::{DynamicEnum, PartialReflect, TypePath, TypePathTable, VariantInfo, VariantType}; +use crate::type_info::impl_type_methods; +use crate::{DynamicEnum, PartialReflect, Type, TypePath, VariantInfo, VariantType}; use bevy_utils::HashMap; -use std::any::{Any, TypeId}; use std::slice::Iter; use std::sync::Arc; diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -135,8 +135,7 @@ pub trait Enum: PartialReflect { /// A container for compile-time enum info, used by [`TypeInfo`](crate::TypeInfo). #[derive(Clone, Debug)] pub struct EnumInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, variants: Box<[VariantInfo]>, variant_names: Box<[&'static str]>, variant_indices: HashMap<&'static str, usize>, diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -162,8 +161,7 @@ impl EnumInfo { let variant_names = variants.iter().map(VariantInfo::name).collect(); Self { - type_path: TypePathTable::of::<TEnum>(), - type_id: TypeId::of::<TEnum>(), + ty: Type::of::<TEnum>(), variants: variants.to_vec().into_boxed_slice(), variant_names, variant_indices, diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -231,32 +229,7 @@ impl EnumInfo { self.variants.len() } - /// A representation of the type path of the value. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the value. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the enum. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the enum type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this enum, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -1,6 +1,6 @@ use crate::attributes::{impl_custom_attribute_methods, CustomAttributes}; -use crate::{MaybeTyped, PartialReflect, TypeInfo, TypePath, TypePathTable}; -use std::any::{Any, TypeId}; +use crate::type_info::impl_type_methods; +use crate::{MaybeTyped, PartialReflect, Type, TypeInfo, TypePath}; use std::sync::Arc; /// The named field of a reflected struct. diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -8,8 +8,7 @@ use std::sync::Arc; pub struct NamedField { name: &'static str, type_info: fn() -> Option<&'static TypeInfo>, - type_path: TypePathTable, - type_id: TypeId, + ty: Type, custom_attributes: Arc<CustomAttributes>, #[cfg(feature = "documentation")] docs: Option<&'static str>, diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -21,8 +20,7 @@ impl NamedField { Self { name, type_info: T::maybe_type_info, - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), custom_attributes: Arc::new(CustomAttributes::default()), #[cfg(feature = "documentation")] docs: None, diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -57,32 +55,7 @@ impl NamedField { (self.type_info)() } - /// A representation of the type path of the field. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the field. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the field. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the field type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this field, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -98,8 +71,7 @@ impl NamedField { pub struct UnnamedField { index: usize, type_info: fn() -> Option<&'static TypeInfo>, - type_path: TypePathTable, - type_id: TypeId, + ty: Type, custom_attributes: Arc<CustomAttributes>, #[cfg(feature = "documentation")] docs: Option<&'static str>, diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -110,8 +82,7 @@ impl UnnamedField { Self { index, type_info: T::maybe_type_info, - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), custom_attributes: Arc::new(CustomAttributes::default()), #[cfg(feature = "documentation")] docs: None, diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -146,32 +117,7 @@ impl UnnamedField { (self.type_info)() } - /// A representation of the type path of the field. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the field. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the field. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the field type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this field, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/func/args/info.rs b/crates/bevy_reflect/src/func/args/info.rs --- a/crates/bevy_reflect/src/func/args/info.rs +++ b/crates/bevy_reflect/src/func/args/info.rs @@ -1,7 +1,8 @@ use alloc::borrow::Cow; use crate::func::args::{GetOwnership, Ownership}; -use crate::TypePath; +use crate::type_info::impl_type_methods; +use crate::{Type, TypePath}; /// Type information for an [`Arg`] used in a [`DynamicFunction`] or [`DynamicFunctionMut`]. /// diff --git a/crates/bevy_reflect/src/func/args/info.rs b/crates/bevy_reflect/src/func/args/info.rs --- a/crates/bevy_reflect/src/func/args/info.rs +++ b/crates/bevy_reflect/src/func/args/info.rs @@ -16,10 +17,10 @@ pub struct ArgInfo { name: Option<Cow<'static, str>>, /// The ownership of the argument. ownership: Ownership, - /// The [type path] of the argument. + /// The [type] of the argument. /// - /// [type path]: TypePath::type_path - type_path: &'static str, + /// [type]: Type + ty: Type, } impl ArgInfo { diff --git a/crates/bevy_reflect/src/func/args/info.rs b/crates/bevy_reflect/src/func/args/info.rs --- a/crates/bevy_reflect/src/func/args/info.rs +++ b/crates/bevy_reflect/src/func/args/info.rs @@ -31,7 +32,7 @@ impl ArgInfo { index, name: None, ownership: T::ownership(), - type_path: T::type_path(), + ty: Type::of::<T>(), } } diff --git a/crates/bevy_reflect/src/func/args/info.rs b/crates/bevy_reflect/src/func/args/info.rs --- a/crates/bevy_reflect/src/func/args/info.rs +++ b/crates/bevy_reflect/src/func/args/info.rs @@ -72,12 +73,7 @@ impl ArgInfo { self.ownership } - /// The [type path] of the argument. - /// - /// [type path]: TypePath::type_path - pub fn type_path(&self) -> &'static str { - self.type_path - } + impl_type_methods!(ty); /// Get an ID representing the argument. /// diff --git a/crates/bevy_reflect/src/func/info.rs b/crates/bevy_reflect/src/func/info.rs --- a/crates/bevy_reflect/src/func/info.rs +++ b/crates/bevy_reflect/src/func/info.rs @@ -3,7 +3,8 @@ use alloc::borrow::Cow; use bevy_utils::all_tuples; use crate::func::args::{ArgInfo, GetOwnership, Ownership}; -use crate::TypePath; +use crate::type_info::impl_type_methods; +use crate::{Type, TypePath}; /// Type information for a [`DynamicFunction`] or [`DynamicFunctionMut`]. /// diff --git a/crates/bevy_reflect/src/func/info.rs b/crates/bevy_reflect/src/func/info.rs --- a/crates/bevy_reflect/src/func/info.rs +++ b/crates/bevy_reflect/src/func/info.rs @@ -140,7 +141,7 @@ impl FunctionInfo { /// [`DynamicFunctionMut`]: crate::func::DynamicFunctionMut #[derive(Debug, Clone)] pub struct ReturnInfo { - type_path: &'static str, + ty: Type, ownership: Ownership, } diff --git a/crates/bevy_reflect/src/func/info.rs b/crates/bevy_reflect/src/func/info.rs --- a/crates/bevy_reflect/src/func/info.rs +++ b/crates/bevy_reflect/src/func/info.rs @@ -148,17 +149,14 @@ impl ReturnInfo { /// Create a new [`ReturnInfo`] representing the given type, `T`. pub fn new<T: TypePath + GetOwnership>() -> Self { Self { - type_path: T::type_path(), + ty: Type::of::<T>(), ownership: T::ownership(), } } - /// The type path of the return type. - pub fn type_path(&self) -> &'static str { - self.type_path - } + impl_type_methods!(ty); - /// The ownership of the return type. + /// The ownership of this type. pub fn ownership(&self) -> Ownership { self.ownership } diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -1,13 +1,14 @@ -use std::any::{Any, TypeId}; +use std::any::Any; use std::fmt::{Debug, Formatter}; use std::hash::{Hash, Hasher}; use bevy_reflect_derive::impl_type_path; +use crate::type_info::impl_type_methods; use crate::utility::reflect_hasher; use crate::{ self as bevy_reflect, ApplyError, FromReflect, MaybeTyped, PartialReflect, Reflect, - ReflectKind, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, TypePathTable, + ReflectKind, ReflectMut, ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; /// A trait used to power [list-like] operations via [reflection]. diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -108,11 +109,9 @@ pub trait List: PartialReflect { /// A container for compile-time list info. #[derive(Clone, Debug)] pub struct ListInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, item_info: fn() -> Option<&'static TypeInfo>, - item_type_path: TypePathTable, - item_type_id: TypeId, + item_ty: Type, #[cfg(feature = "documentation")] docs: Option<&'static str>, } diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -121,11 +120,9 @@ impl ListInfo { /// Create a new [`ListInfo`]. pub fn new<TList: List + TypePath, TItem: FromReflect + MaybeTyped + TypePath>() -> Self { Self { - type_path: TypePathTable::of::<TList>(), - type_id: TypeId::of::<TList>(), + ty: Type::of::<TList>(), item_info: TItem::maybe_type_info, - item_type_path: TypePathTable::of::<TItem>(), - item_type_id: TypeId::of::<TItem>(), + item_ty: Type::of::<TItem>(), #[cfg(feature = "documentation")] docs: None, } diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -137,32 +134,7 @@ impl ListInfo { Self { docs, ..self } } - /// A representation of the type path of the list. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the list. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the list. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the list type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The [`TypeInfo`] of the list item. /// diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -172,21 +144,11 @@ impl ListInfo { (self.item_info)() } - /// A representation of the type path of the list item. + /// The [type] of the list item. /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn item_type_path_table(&self) -> &TypePathTable { - &self.item_type_path - } - - /// The [`TypeId`] of the list item. - pub fn item_type_id(&self) -> TypeId { - self.item_type_id - } - - /// Check if the given type matches the list item type. - pub fn item_is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.item_type_id + /// [type]: Type + pub fn item_ty(&self) -> Type { + self.item_ty } /// The docstring of this list, if any. diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -1,12 +1,12 @@ -use std::any::{Any, TypeId}; use std::fmt::{Debug, Formatter}; use bevy_reflect_derive::impl_type_path; use bevy_utils::{Entry, HashMap}; +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, ApplyError, MaybeTyped, PartialReflect, Reflect, ReflectKind, ReflectMut, - ReflectOwned, ReflectRef, TypeInfo, TypePath, TypePathTable, + ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; /// A trait used to power [map-like] operations via [reflection]. diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -97,14 +97,11 @@ pub trait Map: PartialReflect { /// A container for compile-time map info. #[derive(Clone, Debug)] pub struct MapInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, key_info: fn() -> Option<&'static TypeInfo>, - key_type_path: TypePathTable, - key_type_id: TypeId, + key_ty: Type, value_info: fn() -> Option<&'static TypeInfo>, - value_type_path: TypePathTable, - value_type_id: TypeId, + value_ty: Type, #[cfg(feature = "documentation")] docs: Option<&'static str>, } diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -117,14 +114,11 @@ impl MapInfo { TValue: Reflect + MaybeTyped + TypePath, >() -> Self { Self { - type_path: TypePathTable::of::<TMap>(), - type_id: TypeId::of::<TMap>(), + ty: Type::of::<TMap>(), key_info: TKey::maybe_type_info, - key_type_path: TypePathTable::of::<TKey>(), - key_type_id: TypeId::of::<TKey>(), + key_ty: Type::of::<TKey>(), value_info: TValue::maybe_type_info, - value_type_path: TypePathTable::of::<TValue>(), - value_type_id: TypeId::of::<TValue>(), + value_ty: Type::of::<TValue>(), #[cfg(feature = "documentation")] docs: None, } diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -136,32 +130,7 @@ impl MapInfo { Self { docs, ..self } } - /// A representation of the type path of the map. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the map. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the map. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the map type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The [`TypeInfo`] of the key type. /// diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -171,21 +140,11 @@ impl MapInfo { (self.key_info)() } - /// A representation of the type path of the key type. + /// The [type] of the key type. /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn key_type_path_table(&self) -> &TypePathTable { - &self.key_type_path - } - - /// The [`TypeId`] of the key. - pub fn key_type_id(&self) -> TypeId { - self.key_type_id - } - - /// Check if the given type matches the key type. - pub fn key_is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.key_type_id + /// [type]: Type + pub fn key_ty(&self) -> Type { + self.key_ty } /// The [`TypeInfo`] of the value type. diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -196,21 +155,11 @@ impl MapInfo { (self.value_info)() } - /// A representation of the type path of the value type. + /// The [type] of the value type. /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn value_type_path_table(&self) -> &TypePathTable { - &self.value_type_path - } - - /// The [`TypeId`] of the value. - pub fn value_type_id(&self) -> TypeId { - self.value_type_id - } - - /// Check if the given type matches the value type. - pub fn value_is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.value_type_id + /// [type]: Type + pub fn value_ty(&self) -> Type { + self.value_ty } /// The docstring of this map, if any. diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -730,8 +730,8 @@ impl<'a, 'de> Visitor<'de> for ArrayVisitor<'a> { { let mut vec = Vec::with_capacity(seq.size_hint().unwrap_or_default()); let registration = get_registration( - self.array_info.item_type_id(), - self.array_info.item_type_path_table().path(), + self.array_info.item_ty().id(), + self.array_info.item_ty().path(), self.registry, )?; while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -770,8 +770,8 @@ impl<'a, 'de> Visitor<'de> for ListVisitor<'a> { { let mut list = DynamicList::default(); let registration = get_registration( - self.list_info.item_type_id(), - self.list_info.item_type_path_table().path(), + self.list_info.item_ty().id(), + self.list_info.item_ty().path(), self.registry, )?; while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -802,13 +802,13 @@ impl<'a, 'de> Visitor<'de> for MapVisitor<'a> { { let mut dynamic_map = DynamicMap::default(); let key_registration = get_registration( - self.map_info.key_type_id(), - self.map_info.key_type_path_table().path(), + self.map_info.key_ty().id(), + self.map_info.key_ty().path(), self.registry, )?; let value_registration = get_registration( - self.map_info.value_type_id(), - self.map_info.value_type_path_table().path(), + self.map_info.value_ty().id(), + self.map_info.value_ty().path(), self.registry, )?; while let Some(key) = map.next_key_seed(TypedReflectDeserializer { diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -844,8 +844,8 @@ impl<'a, 'de> Visitor<'de> for SetVisitor<'a> { { let mut dynamic_set = DynamicSet::default(); let value_registration = get_registration( - self.set_info.value_type_id(), - self.set_info.value_type_path_table().path(), + self.set_info.value_ty().id(), + self.set_info.value_ty().path(), self.registry, )?; while let Some(value) = set.next_element_seed(TypedReflectDeserializer { diff --git a/crates/bevy_reflect/src/set.rs b/crates/bevy_reflect/src/set.rs --- a/crates/bevy_reflect/src/set.rs +++ b/crates/bevy_reflect/src/set.rs @@ -1,13 +1,13 @@ -use std::any::{Any, TypeId}; use std::fmt::{Debug, Formatter}; use bevy_reflect_derive::impl_type_path; use bevy_utils::hashbrown::hash_table::OccupiedEntry as HashTableOccupiedEntry; use bevy_utils::hashbrown::HashTable; +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, hash_error, ApplyError, PartialReflect, Reflect, ReflectKind, ReflectMut, - ReflectOwned, ReflectRef, TypeInfo, TypePath, TypePathTable, + ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; /// A trait used to power [set-like] operations via [reflection]. diff --git a/crates/bevy_reflect/src/set.rs b/crates/bevy_reflect/src/set.rs --- a/crates/bevy_reflect/src/set.rs +++ b/crates/bevy_reflect/src/set.rs @@ -82,10 +82,8 @@ pub trait Set: PartialReflect { /// A container for compile-time set info. #[derive(Clone, Debug)] pub struct SetInfo { - type_path: TypePathTable, - type_id: TypeId, - value_type_path: TypePathTable, - value_type_id: TypeId, + ty: Type, + value_ty: Type, #[cfg(feature = "documentation")] docs: Option<&'static str>, } diff --git a/crates/bevy_reflect/src/set.rs b/crates/bevy_reflect/src/set.rs --- a/crates/bevy_reflect/src/set.rs +++ b/crates/bevy_reflect/src/set.rs @@ -94,10 +92,8 @@ impl SetInfo { /// Create a new [`SetInfo`]. pub fn new<TSet: Set + TypePath, TValue: Reflect + TypePath>() -> Self { Self { - type_path: TypePathTable::of::<TSet>(), - type_id: TypeId::of::<TSet>(), - value_type_path: TypePathTable::of::<TValue>(), - value_type_id: TypeId::of::<TValue>(), + ty: Type::of::<TSet>(), + value_ty: Type::of::<TValue>(), #[cfg(feature = "documentation")] docs: None, } diff --git a/crates/bevy_reflect/src/set.rs b/crates/bevy_reflect/src/set.rs --- a/crates/bevy_reflect/src/set.rs +++ b/crates/bevy_reflect/src/set.rs @@ -109,48 +105,13 @@ impl SetInfo { Self { docs, ..self } } - /// A representation of the type path of the set. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the set. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the set. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the set type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); - /// A representation of the type path of the value type. + /// The [type] of the value. /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn value_type_path_table(&self) -> &TypePathTable { - &self.value_type_path - } - - /// The [`TypeId`] of the value. - pub fn value_type_id(&self) -> TypeId { - self.value_type_id - } - - /// Check if the given type matches the value type. - pub fn value_is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.value_type_id + /// [type]: Type + pub fn value_ty(&self) -> Type { + self.value_ty } /// The docstring of this set, if any. diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -1,17 +1,14 @@ use crate::attributes::{impl_custom_attribute_methods, CustomAttributes}; +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, ApplyError, NamedField, PartialReflect, Reflect, ReflectKind, ReflectMut, - ReflectOwned, ReflectRef, TypeInfo, TypePath, TypePathTable, + ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, }; use bevy_reflect_derive::impl_type_path; use bevy_utils::HashMap; use std::fmt::{Debug, Formatter}; use std::sync::Arc; -use std::{ - any::{Any, TypeId}, - borrow::Cow, - slice::Iter, -}; +use std::{borrow::Cow, slice::Iter}; /// A trait used to power [struct-like] operations via [reflection]. /// diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -78,8 +75,7 @@ pub trait Struct: PartialReflect { /// A container for compile-time named struct info. #[derive(Clone, Debug)] pub struct StructInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, fields: Box<[NamedField]>, field_names: Box<[&'static str]>, field_indices: HashMap<&'static str, usize>, diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -105,8 +101,7 @@ impl StructInfo { let field_names = fields.iter().map(NamedField::name).collect(); Self { - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), fields: fields.to_vec().into_boxed_slice(), field_names, field_indices, diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -162,32 +157,7 @@ impl StructInfo { self.fields.len() } - /// A representation of the type path of the struct. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the struct. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the struct. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the struct type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this struct, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -1,13 +1,14 @@ use bevy_reflect_derive::impl_type_path; use bevy_utils::all_tuples; +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, utility::GenericTypePathCell, ApplyError, FromReflect, - GetTypeRegistration, MaybeTyped, Reflect, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, + GetTypeRegistration, MaybeTyped, Reflect, ReflectMut, ReflectOwned, ReflectRef, Type, TypeInfo, TypePath, TypeRegistration, TypeRegistry, Typed, UnnamedField, }; -use crate::{PartialReflect, ReflectKind, TypePathTable}; -use std::any::{Any, TypeId}; +use crate::{PartialReflect, ReflectKind}; +use std::any::Any; use std::fmt::{Debug, Formatter}; use std::slice::Iter; diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -139,8 +140,7 @@ impl GetTupleField for dyn Tuple { /// A container for compile-time tuple info. #[derive(Clone, Debug)] pub struct TupleInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, fields: Box<[UnnamedField]>, #[cfg(feature = "documentation")] docs: Option<&'static str>, diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -155,8 +155,7 @@ impl TupleInfo { /// pub fn new<T: Reflect + TypePath>(fields: &[UnnamedField]) -> Self { Self { - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), fields: fields.to_vec().into_boxed_slice(), #[cfg(feature = "documentation")] docs: None, diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -184,32 +183,7 @@ impl TupleInfo { self.fields.len() } - /// A representation of the type path of the tuple. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the tuple. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the tuple. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the tuple type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this tuple, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -1,11 +1,11 @@ use bevy_reflect_derive::impl_type_path; use crate::attributes::{impl_custom_attribute_methods, CustomAttributes}; +use crate::type_info::impl_type_methods; use crate::{ self as bevy_reflect, ApplyError, DynamicTuple, PartialReflect, Reflect, ReflectKind, - ReflectMut, ReflectOwned, ReflectRef, Tuple, TypeInfo, TypePath, TypePathTable, UnnamedField, + ReflectMut, ReflectOwned, ReflectRef, Tuple, Type, TypeInfo, TypePath, UnnamedField, }; -use std::any::{Any, TypeId}; use std::fmt::{Debug, Formatter}; use std::slice::Iter; use std::sync::Arc; diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -58,8 +58,7 @@ pub trait TupleStruct: PartialReflect { /// A container for compile-time tuple struct info. #[derive(Clone, Debug)] pub struct TupleStructInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, fields: Box<[UnnamedField]>, custom_attributes: Arc<CustomAttributes>, #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -75,8 +74,7 @@ impl TupleStructInfo { /// pub fn new<T: Reflect + TypePath>(fields: &[UnnamedField]) -> Self { Self { - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), fields: fields.to_vec().into_boxed_slice(), custom_attributes: Arc::new(CustomAttributes::default()), #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -113,32 +111,7 @@ impl TupleStructInfo { self.fields.len() } - /// A representation of the type path of the struct. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the struct. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the tuple struct. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the tuple struct type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this struct, if any. #[cfg(feature = "documentation")] diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -3,8 +3,10 @@ use crate::{ DynamicTupleStruct, EnumInfo, ListInfo, MapInfo, PartialReflect, Reflect, ReflectKind, SetInfo, StructInfo, TupleInfo, TupleStructInfo, TypePath, TypePathTable, }; +use core::fmt::Formatter; use std::any::{Any, TypeId}; use std::fmt::Debug; +use std::hash::Hash; use thiserror::Error; /// A static accessor to compile-time type information. diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -178,36 +180,33 @@ pub enum TypeInfo { } impl TypeInfo { - /// The [`TypeId`] of the underlying type. - pub fn type_id(&self) -> TypeId { + /// The underlying Rust [type]. + /// + /// [type]: Type + pub fn ty(&self) -> &Type { match self { - Self::Struct(info) => info.type_id(), - Self::TupleStruct(info) => info.type_id(), - Self::Tuple(info) => info.type_id(), - Self::List(info) => info.type_id(), - Self::Array(info) => info.type_id(), - Self::Map(info) => info.type_id(), - Self::Set(info) => info.type_id(), - Self::Enum(info) => info.type_id(), - Self::Value(info) => info.type_id(), + Self::Struct(info) => info.ty(), + Self::TupleStruct(info) => info.ty(), + Self::Tuple(info) => info.ty(), + Self::List(info) => info.ty(), + Self::Array(info) => info.ty(), + Self::Map(info) => info.ty(), + Self::Set(info) => info.ty(), + Self::Enum(info) => info.ty(), + Self::Value(info) => info.ty(), } } + /// The [`TypeId`] of the underlying type. + pub fn type_id(&self) -> TypeId { + self.ty().id() + } + /// A representation of the type path of the underlying type. /// /// Provides dynamic access to all methods on [`TypePath`]. pub fn type_path_table(&self) -> &TypePathTable { - match self { - Self::Struct(info) => info.type_path_table(), - Self::TupleStruct(info) => info.type_path_table(), - Self::Tuple(info) => info.type_path_table(), - Self::List(info) => info.type_path_table(), - Self::Array(info) => info.type_path_table(), - Self::Map(info) => info.type_path_table(), - Self::Set(info) => info.type_path_table(), - Self::Enum(info) => info.type_path_table(), - Self::Value(info) => info.type_path_table(), - } + self.ty().type_path_table() } /// The [stable, full type path] of the underlying type. diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -217,12 +216,16 @@ impl TypeInfo { /// [stable, full type path]: TypePath /// [`type_path_table`]: Self::type_path_table pub fn type_path(&self) -> &'static str { - self.type_path_table().path() + self.ty().path() } - /// Check if the given type matches the underlying type. + /// Check if the given type matches this one. + /// + /// This only compares the [`TypeId`] of the types + /// and does not verify they share the same [`TypePath`] + /// (though it implies they do). pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id() + self.ty().is::<T>() } /// The docstring of the underlying type, if any. diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -287,6 +290,199 @@ impl TypeInfo { impl_cast_method!(as_value: Value => ValueInfo); } +/// The base representation of a Rust type. +/// +/// When possible, it is recommended to use [`&'static TypeInfo`] instead of this +/// as it provides more information as well as being smaller +/// (since a reference only takes the same number of bytes as a `usize`). +/// +/// However, where a static reference to [`TypeInfo`] is not possible, +/// such as with trait objects and other types that can't implement [`Typed`], +/// this type can be used instead. +/// +/// It only requires that the type implements [`TypePath`]. +/// +/// And unlike [`TypeInfo`], this type implements [`Copy`], [`Eq`], and [`Hash`], +/// making it useful as a key type. +/// +/// It's especially helpful when compared to [`TypeId`] as it can provide the +/// actual [type path] when debugging, while still having the same performance +/// as hashing/comparing [`TypeId`] directly—at the cost of a little more memory. +/// +/// # Examples +/// +/// ``` +/// use bevy_reflect::{Type, TypePath}; +/// +/// fn assert_char<T: ?Sized + TypePath>(t: &T) -> Result<(), String> { +/// let ty = Type::of::<T>(); +/// if Type::of::<char>() == ty { +/// Ok(()) +/// } else { +/// Err(format!("expected `char`, got `{}`", ty.path())) +/// } +/// } +/// +/// assert_eq!( +/// assert_char(&'a'), +/// Ok(()) +/// ); +/// assert_eq!( +/// assert_char(&String::from("Hello, world!")), +/// Err(String::from("expected `char`, got `alloc::string::String`")) +/// ); +/// ``` +/// +/// [`&'static TypeInfo`]: TypeInfo +#[derive(Copy, Clone)] +pub struct Type { + type_path_table: TypePathTable, + type_id: TypeId, +} + +impl Type { + /// Create a new [`Type`] from a type that implements [`TypePath`]. + pub fn of<T: TypePath + ?Sized>() -> Self { + Self { + type_path_table: TypePathTable::of::<T>(), + type_id: TypeId::of::<T>(), + } + } + + /// Returns the [`TypeId`] of the type. + pub fn id(&self) -> TypeId { + self.type_id + } + + /// See [`TypePath::type_path`]. + pub fn path(&self) -> &'static str { + self.type_path_table.path() + } + + /// See [`TypePath::short_type_path`]. + pub fn short_path(&self) -> &'static str { + self.type_path_table.short_path() + } + + /// See [`TypePath::type_ident`]. + pub fn ident(&self) -> Option<&'static str> { + self.type_path_table.ident() + } + + /// See [`TypePath::crate_name`]. + pub fn crate_name(&self) -> Option<&'static str> { + self.type_path_table.crate_name() + } + + /// See [`TypePath::module_path`]. + pub fn module_path(&self) -> Option<&'static str> { + self.type_path_table.module_path() + } + + /// A representation of the type path of this. + /// + /// Provides dynamic access to all methods on [`TypePath`]. + pub fn type_path_table(&self) -> &TypePathTable { + &self.type_path_table + } + + /// Check if the given type matches this one. + /// + /// This only compares the [`TypeId`] of the types + /// and does not verify they share the same [`TypePath`] + /// (though it implies they do). + pub fn is<T: Any>(&self) -> bool { + TypeId::of::<T>() == self.type_id + } +} + +/// This implementation will only output the [type path] of the type. +/// +/// If you need to include the [`TypeId`] in the output, +/// you can access it through [`Type::id`]. +/// +/// [type path]: TypePath +impl Debug for Type { + fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.type_path_table.path()) + } +} + +impl Eq for Type {} + +/// This implementation purely relies on the [`TypeId`] of the type, +/// and not on the [type path]. +/// +/// [type path]: TypePath +impl PartialEq for Type { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.type_id == other.type_id + } +} + +/// This implementation purely relies on the [`TypeId`] of the type, +/// and not on the [type path]. +/// +/// [type path]: TypePath +impl Hash for Type { + #[inline] + fn hash<H: std::hash::Hasher>(&self, state: &mut H) { + self.type_id.hash(state); + } +} + +macro_rules! impl_type_methods { + ($field:ident) => { + /// The underlying Rust [type]. + /// + /// [type]: crate::type_info::Type + pub fn ty(&self) -> &$crate::type_info::Type { + &self.$field + } + + /// The [`TypeId`] of this type. + /// + /// [`TypeId`]: std::any::TypeId + pub fn type_id(&self) -> ::std::any::TypeId { + self.$field.id() + } + + /// The [stable, full type path] of this type. + /// + /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. + /// + /// [stable, full type path]: TypePath + /// [`type_path_table`]: Self::type_path_table + pub fn type_path(&self) -> &'static str { + self.$field.path() + } + + /// A representation of the type path of this type. + /// + /// Provides dynamic access to all methods on [`TypePath`]. + /// + /// [`TypePath`]: crate::type_path::TypePath + pub fn type_path_table(&self) -> &$crate::type_path::TypePathTable { + &self.$field.type_path_table() + } + + /// Check if the given type matches this one. + /// + /// This only compares the [`TypeId`] of the types + /// and does not verify they share the same [`TypePath`] + /// (though it implies they do). + /// + /// [`TypeId`]: std::any::TypeId + /// [`TypePath`]: crate::type_path::TypePath + pub fn is<T: ::std::any::Any>(&self) -> bool { + self.$field.is::<T>() + } + }; +} + +pub(crate) use impl_type_methods; + /// A container for compile-time info related to general value types, including primitives. /// /// This typically represents a type which cannot be broken down any further. This is often diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -297,8 +493,7 @@ impl TypeInfo { /// it _as_ a struct. It therefore makes more sense to represent it as a [`ValueInfo`]. #[derive(Debug, Clone)] pub struct ValueInfo { - type_path: TypePathTable, - type_id: TypeId, + ty: Type, #[cfg(feature = "documentation")] docs: Option<&'static str>, } diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -306,8 +501,7 @@ pub struct ValueInfo { impl ValueInfo { pub fn new<T: Reflect + TypePath + ?Sized>() -> Self { Self { - type_path: TypePathTable::of::<T>(), - type_id: TypeId::of::<T>(), + ty: Type::of::<T>(), #[cfg(feature = "documentation")] docs: None, } diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -319,32 +513,7 @@ impl ValueInfo { Self { docs: doc, ..self } } - /// A representation of the type path of the value. - /// - /// Provides dynamic access to all methods on [`TypePath`]. - pub fn type_path_table(&self) -> &TypePathTable { - &self.type_path - } - - /// The [stable, full type path] of the value. - /// - /// Use [`type_path_table`] if you need access to the other methods on [`TypePath`]. - /// - /// [stable, full type path]: TypePath - /// [`type_path_table`]: Self::type_path_table - pub fn type_path(&self) -> &'static str { - self.type_path_table().path() - } - - /// The [`TypeId`] of the value. - pub fn type_id(&self) -> TypeId { - self.type_id - } - - /// Check if the given type matches the value type. - pub fn is<T: Any>(&self) -> bool { - TypeId::of::<T>() == self.type_id - } + impl_type_methods!(ty); /// The docstring of this dynamic value, if any. #[cfg(feature = "documentation")]
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1719,10 +1719,10 @@ mod tests { let info = MyList::type_info().as_list().unwrap(); assert!(info.is::<MyList>()); - assert!(info.item_is::<usize>()); + assert!(info.item_ty().is::<usize>()); assert!(info.item_info().unwrap().is::<usize>()); assert_eq!(MyList::type_path(), info.type_path()); - assert_eq!(usize::type_path(), info.item_type_path_table().path()); + assert_eq!(usize::type_path(), info.item_ty().path()); let value: &dyn Reflect = &vec![123_usize]; let info = value.get_represented_type_info().unwrap(); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1735,10 +1735,10 @@ mod tests { let info = MySmallVec::type_info().as_list().unwrap(); assert!(info.is::<MySmallVec>()); - assert!(info.item_is::<String>()); + assert!(info.item_ty().is::<String>()); assert!(info.item_info().unwrap().is::<String>()); assert_eq!(MySmallVec::type_path(), info.type_path()); - assert_eq!(String::type_path(), info.item_type_path_table().path()); + assert_eq!(String::type_path(), info.item_ty().path()); let value: MySmallVec = smallvec::smallvec![String::default(); 2]; let value: &dyn Reflect = &value; diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1751,10 +1751,10 @@ mod tests { let info = MyArray::type_info().as_array().unwrap(); assert!(info.is::<MyArray>()); - assert!(info.item_is::<usize>()); + assert!(info.item_ty().is::<usize>()); assert!(info.item_info().unwrap().is::<usize>()); assert_eq!(MyArray::type_path(), info.type_path()); - assert_eq!(usize::type_path(), info.item_type_path_table().path()); + assert_eq!(usize::type_path(), info.item_ty().path()); assert_eq!(3, info.capacity()); let value: &dyn Reflect = &[1usize, 2usize, 3usize]; diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1779,13 +1779,10 @@ mod tests { let info = MyCowSlice::type_info().as_list().unwrap(); assert!(info.is::<MyCowSlice>()); - assert!(info.item_is::<u8>()); + assert!(info.item_ty().is::<u8>()); assert!(info.item_info().unwrap().is::<u8>()); assert_eq!(std::any::type_name::<MyCowSlice>(), info.type_path()); - assert_eq!( - std::any::type_name::<u8>(), - info.item_type_path_table().path() - ); + assert_eq!(std::any::type_name::<u8>(), info.item_ty().path()); let value: &dyn Reflect = &Cow::<'static, [u8]>::Owned(vec![0, 1, 2, 3]); let info = value.get_represented_type_info().unwrap(); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1797,13 +1794,13 @@ mod tests { let info = MyMap::type_info().as_map().unwrap(); assert!(info.is::<MyMap>()); - assert!(info.key_is::<usize>()); - assert!(info.value_is::<f32>()); + assert!(info.key_ty().is::<usize>()); + assert!(info.value_ty().is::<f32>()); assert!(info.key_info().unwrap().is::<usize>()); assert!(info.value_info().unwrap().is::<f32>()); assert_eq!(MyMap::type_path(), info.type_path()); - assert_eq!(usize::type_path(), info.key_type_path_table().path()); - assert_eq!(f32::type_path(), info.value_type_path_table().path()); + assert_eq!(usize::type_path(), info.key_ty().path()); + assert_eq!(f32::type_path(), info.value_ty().path()); let value: &dyn Reflect = &MyMap::new(); let info = value.get_represented_type_info().unwrap();
Use `ValueInfo` inside structs in `bevy_reflect` # Objective - Make defining several structs in `bevy_reflect` less verbose by replacing certain fields with `ValueInfo`. Since these are private fields, no outward changes should be needed. ## Solution Replaced fields in the form: ```rust struct FooInfo { bar_name: &'static str, bar_id: TypeId, } impl FooInfo { fn new<T: BarType>() -> Self { Self { bar_name: std::any::type_name::<T>(), bar_id: TypeId::of::<T>(), } } } ``` With the following: ```rust struct FooInfo { bar_value: ValueInfo, } impl FooInfo { fn new<T: BarType>() -> Self { Self { bar_value: ValueInfo::new::<T>(), } } } ```
@myreprise1 this may need to be rebased
2024-08-20T21:19:18Z
1.79
2024-08-25T18:42:32Z
612897becd415b7b982f58bd76deb719b42c9790
[ "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_apply", "attributes::tests::should_accept_last_attribute", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function::tests::should_overwrite_function_name", "enums::tests::enum_should_allow_struct_fields", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_allow_unit_struct_attribute_values", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "func::args::list::tests::should_reindex_on_push_after_take", "enums::tests::enum_should_partial_eq", "enums::variants::tests::should_return_error_on_invalid_cast", "attributes::tests::should_get_custom_attribute", "enums::tests::enum_should_return_correct_variant_type", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "func::args::list::tests::should_push_arguments_in_order", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::dynamic_enum_should_change_variant", "enums::enum_trait::tests::next_index_increment", "attributes::tests::should_debug_custom_attributes", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::should_skip_ignored_fields", "func::args::list::tests::should_pop_args_in_reverse_order", "func::dynamic_function::tests::should_clone_dynamic_function", "attributes::tests::should_get_custom_attribute_dynamically", "func::info::tests::should_create_anonymous_function_info", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::args::list::tests::should_take_args_in_order", "enums::tests::should_get_enum_type_info", "func::info::tests::should_create_closure_info", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::dynamic_enum_should_return_is_dynamic", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_set", "func::info::tests::should_create_function_info", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::dynamic_enum_should_set_variant_fields", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "func::registry::tests::should_register_function", "func::tests::should_error_on_invalid_arg_type", "func::registry::tests::should_allow_overwriting_registration", "func::into_function::tests::should_default_closure_name_to_none", "func::info::tests::should_create_function_pointer_info", "array::tests::next_index_increment", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::into_function::tests::should_create_dynamic_function_from_function", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_register_dynamic_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::into_function::tests::should_create_dynamic_function_from_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::registry::tests::should_debug_function_registry", "func::registry::tests::should_only_register_function_once", "func::registry::tests::should_register_closure", "func::tests::should_error_on_invalid_arg_ownership", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::registry::tests::should_register_dynamic_function", "func::registry::tests::should_error_on_missing_name", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "impls::std::tests::should_partial_eq_char", "impls::std::tests::option_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::option_should_apply", "map::tests::test_map_get_at_mut", "map::tests::test_into_iter", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "map::tests::test_map_get_at", "path::tests::accept_leading_tokens", "path::parse::test::parse_invalid", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::parsed_path_get_field", "serde::ser::tests::should_return_error_if_missing_type_data", "impls::std::tests::static_str_should_from_reflect", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "list::tests::test_into_iter", "impls::std::tests::should_partial_eq_string", "map::tests::next_index_increment", "set::tests::test_into_iter", "struct_trait::tests::next_index_increment", "impls::std::tests::path_should_from_reflect", "tests::as_reflect", "impls::std::tests::instant_should_from_reflect", "path::tests::parsed_path_parse", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "serde::ser::tests::should_serialize", "path::tests::reflect_path", "serde::ser::tests::should_serialize_dynamic_option", "serde::de::tests::should_deserialize", "serde::de::tests::should_deserialize_self_describing_binary", "tests::docstrings::should_contain_docs", "tests::assert_impl_reflect_macro_on_all", "impls::std::tests::option_should_impl_enum", "impls::std::tests::should_partial_eq_hash_map", "tests::docstrings::fields_should_contain_docs", "tests::custom_debug_function", "path::tests::reflect_array_behaves_like_list", "tests::dynamic_types_debug_format", "tests::from_reflect_should_use_default_field_attributes", "serde::de::tests::should_deserialize_non_self_describing_binary", "impls::std::tests::should_partial_eq_vec", "tests::glam::vec3_field_access", "tests::glam::quat_deserialization", "tests::docstrings::variants_should_contain_docs", "tests::into_reflect", "tests::glam::vec3_serialization", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::glam::vec3_path_access", "tests::from_reflect_should_use_default_container_attribute", "tests::glam::vec3_deserialization", "tests::glam::quat_serialization", "impls::std::tests::option_should_impl_typed", "tests::docstrings::should_not_contain_docs", "serde::de::tests::should_deserialize_value", "tests::glam::vec3_apply_dynamic", "serde::de::tests::enum_should_deserialize", "serde::de::tests::should_deserialize_option", "tests::can_opt_out_type_path", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::ser::tests::should_return_error_if_missing_registration", "serde::de::tests::should_return_error_if_missing_type_data", "impls::std::tests::can_serialize_duration", "serde::tests::test_serialization_struct", "tests::reflect_downcast", "tests::reflect_map", "tests::reflect_type_info", "tests::reflect_complex_patch", "tests::multiple_reflect_lists", "tests::reflect_unit_struct", "tests::reflect_ignore", "tests::recursive_typed_storage_does_not_hang", "tests::should_allow_custom_where_with_assoc_type", "tests::should_allow_multiple_custom_where", "tests::should_allow_empty_custom_where", "tests::should_drain_fields", "tests::reflect_map_no_hash_dynamic - should panic", "tests::reflect_map_no_hash - should panic", "tests::reflect_struct", "tests::reflect_map_no_hash_dynamic_representing - should panic", "tests::reflect_take", "tests::recursive_registration_does_not_hang", "tests::multiple_reflect_value_lists", "tests::should_permit_valid_represented_type_for_dynamic", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::should_serialize_self_describing_binary", "tests::reflect_type_path", "tests::std_type_paths", "tuple::tests::next_index_increment", "tests::should_take_nested_remote_type", "tests::should_reflect_remote_type_from_module", "tests::should_try_take_remote_type", "tests::try_apply_should_detect_kinds", "tuple_struct::tests::next_index_increment", "type_info::tests::should_return_error_on_invalid_cast", "tests::should_reflect_remote_type", "tests::should_reflect_remote_enum", "tests::should_permit_higher_ranked_lifetimes", "tests::should_reflect_nested_remote_enum", "tests::not_dynamic_names", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_allow_dynamic_fields", "tests::should_allow_custom_where", "tests::reflect_serialize", "tests::should_take_remote_type", "tests::should_reflect_remote_value_type", "type_registry::test::test_reflect_from_ptr", "tests::should_reflect_debug", "serde::de::tests::should_deserialized_typed", "tests::should_call_from_reflect_dynamically", "tests::should_reflect_nested_remote_type", "serde::ser::tests::should_serialize_option", "serde::tests::test_serialization_tuple_struct", "tests::should_auto_register_fields", "tests::should_not_auto_register_existing_types", "serde::tests::should_roundtrip_proxied_dynamic", "serde::ser::tests::enum_should_serialize", "serde::de::tests::should_reserialize", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 58)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 76)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 68)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 14)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 32)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 24)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/lib.rs - (line 343)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 47)", "crates/bevy_reflect/src/lib.rs - (line 362)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 142)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 187)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 180)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 181)", "crates/bevy_reflect/src/lib.rs - (line 224)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 345)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 165)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 187)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 149)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 321)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 379)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 650)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 450)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 217)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 36)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 26)", "crates/bevy_reflect/src/lib.rs - (line 132)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 150)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 10)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 110)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 62)", "crates/bevy_reflect/src/set.rs - set::Set (line 28)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 47)", "crates/bevy_reflect/src/lib.rs - (line 294)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 39)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 271)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 161)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 454)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 252)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 151)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 75)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 233)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 205)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 152)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 82)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 333)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/lib.rs - (line 322)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 28)", "crates/bevy_reflect/src/lib.rs - (line 190)", "crates/bevy_reflect/src/lib.rs - (line 154)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 101)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 83)", "crates/bevy_reflect/src/lib.rs - (line 238)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 79)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 124)", "crates/bevy_reflect/src/lib.rs - (line 263)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 114)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 128)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/lib.rs - (line 204)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 321)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/lib.rs - (line 405)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 157)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,631
bevyengine__bevy-14631
[ "14629" ]
fc2f564c6f205163b8ba0f3a0bd40fe20739fa7a
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 @@ -375,8 +375,7 @@ fn observer_system_runner<E: Event, B: Bundle>( }; // TODO: Move this check into the observer cache to avoid dynamic dispatch - // SAFETY: We only access world metadata - let last_trigger = unsafe { world.world_metadata() }.last_trigger_id(); + let last_trigger = world.last_trigger_id(); if state.last_trigger_id == last_trigger { return; } diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -362,9 +362,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -456,9 +454,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -558,9 +554,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -626,9 +620,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -757,9 +749,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -828,9 +818,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -900,9 +888,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { let world = self.world; - let query_lens_state = self - .query_state - .transmute_filtered::<(L, Entity), F>(world.components()); + let query_lens_state = self.query_state.transmute_filtered::<(L, Entity), F>(world); // SAFETY: // `self.world` has permission to access the required components. diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1,7 +1,7 @@ use crate::{ archetype::{Archetype, ArchetypeComponentId, ArchetypeGeneration, ArchetypeId}, batching::BatchingStrategy, - component::{ComponentId, Components, Tick}, + component::{ComponentId, Tick}, entity::Entity, prelude::FromWorld, query::{ diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -476,21 +476,27 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { /// You might end up with a mix of archetypes that only matched the original query + archetypes that only match /// the new [`QueryState`]. Most of the safe methods on [`QueryState`] call [`QueryState::update_archetypes`] internally, so this /// best used through a [`Query`](crate::system::Query). - pub fn transmute<NewD: QueryData>(&self, components: &Components) -> QueryState<NewD> { - self.transmute_filtered::<NewD, ()>(components) + pub fn transmute<'a, NewD: QueryData>( + &self, + world: impl Into<UnsafeWorldCell<'a>>, + ) -> QueryState<NewD> { + self.transmute_filtered::<NewD, ()>(world.into()) } /// Creates a new [`QueryState`] with the same underlying [`FilteredAccess`], matched tables and archetypes /// as self but with a new type signature. /// /// Panics if `NewD` or `NewF` require accesses that this query does not have. - pub fn transmute_filtered<NewD: QueryData, NewF: QueryFilter>( + pub fn transmute_filtered<'a, NewD: QueryData, NewF: QueryFilter>( &self, - components: &Components, + world: impl Into<UnsafeWorldCell<'a>>, ) -> QueryState<NewD, NewF> { + let world = world.into(); + self.validate_world(world.id()); + let mut component_access = FilteredAccess::default(); - let mut fetch_state = NewD::get_state(components).expect("Could not create fetch_state, Please initialize all referenced components before transmuting."); - let filter_state = NewF::get_state(components).expect("Could not create filter_state, Please initialize all referenced components before transmuting."); + let mut fetch_state = NewD::get_state(world.components()).expect("Could not create fetch_state, Please initialize all referenced components before transmuting."); + let filter_state = NewF::get_state(world.components()).expect("Could not create filter_state, Please initialize all referenced components before transmuting."); NewD::set_access(&mut fetch_state, &self.component_access); NewD::update_component_access(&fetch_state, &mut component_access); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -542,12 +548,12 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { /// ## Panics /// /// Will panic if `NewD` contains accesses not in `Q` or `OtherQ`. - pub fn join<OtherD: QueryData, NewD: QueryData>( + pub fn join<'a, OtherD: QueryData, NewD: QueryData>( &self, - components: &Components, + world: impl Into<UnsafeWorldCell<'a>>, other: &QueryState<OtherD>, ) -> QueryState<NewD, ()> { - self.join_filtered::<_, (), NewD, ()>(components, other) + self.join_filtered::<_, (), NewD, ()>(world, other) } /// Use this to combine two queries. The data accessed will be the intersection diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -557,23 +563,28 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { /// /// Will panic if `NewD` or `NewF` requires accesses not in `Q` or `OtherQ`. pub fn join_filtered< + 'a, OtherD: QueryData, OtherF: QueryFilter, NewD: QueryData, NewF: QueryFilter, >( &self, - components: &Components, + world: impl Into<UnsafeWorldCell<'a>>, other: &QueryState<OtherD, OtherF>, ) -> QueryState<NewD, NewF> { if self.world_id != other.world_id { panic!("Joining queries initialized on different worlds is not allowed."); } + let world = world.into(); + + self.validate_world(world.id()); + let mut component_access = FilteredAccess::default(); - let mut new_fetch_state = NewD::get_state(components) + let mut new_fetch_state = NewD::get_state(world.components()) .expect("Could not create fetch_state, Please initialize all referenced components before transmuting."); - let new_filter_state = NewF::get_state(components) + let new_filter_state = NewF::get_state(world.components()) .expect("Could not create filter_state, Please initialize all referenced components before transmuting."); NewD::set_access(&mut new_fetch_state, &self.component_access); diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1368,8 +1368,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { pub fn transmute_lens_filtered<NewD: QueryData, NewF: QueryFilter>( &mut self, ) -> QueryLens<'_, NewD, NewF> { - let components = self.world.components(); - let state = self.state.transmute_filtered::<NewD, NewF>(components); + let state = self.state.transmute_filtered::<NewD, NewF>(self.world); QueryLens { world: self.world, state, diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1460,10 +1459,9 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { &mut self, other: &mut Query<OtherD, OtherF>, ) -> QueryLens<'_, NewD, NewF> { - let components = self.world.components(); let state = self .state - .join_filtered::<OtherD, OtherF, NewD, NewF>(components, other.state); + .join_filtered::<OtherD, OtherF, NewD, NewF>(self.world, other.state); QueryLens { world: self.world, state, diff --git a/crates/bevy_ecs/src/world/unsafe_world_cell.rs b/crates/bevy_ecs/src/world/unsafe_world_cell.rs --- a/crates/bevy_ecs/src/world/unsafe_world_cell.rs +++ b/crates/bevy_ecs/src/world/unsafe_world_cell.rs @@ -83,6 +83,18 @@ unsafe impl Send for UnsafeWorldCell<'_> {} // SAFETY: `&World` and `&mut World` are both `Sync` unsafe impl Sync for UnsafeWorldCell<'_> {} +impl<'w> From<&'w mut World> for UnsafeWorldCell<'w> { + fn from(value: &'w mut World) -> Self { + value.as_unsafe_world_cell() + } +} + +impl<'w> From<&'w World> for UnsafeWorldCell<'w> { + fn from(value: &'w World) -> Self { + value.as_unsafe_world_cell_readonly() + } +} + impl<'w> UnsafeWorldCell<'w> { /// Creates a [`UnsafeWorldCell`] that can be used to access everything immutably #[inline] diff --git a/crates/bevy_ecs/src/world/unsafe_world_cell.rs b/crates/bevy_ecs/src/world/unsafe_world_cell.rs --- a/crates/bevy_ecs/src/world/unsafe_world_cell.rs +++ b/crates/bevy_ecs/src/world/unsafe_world_cell.rs @@ -257,6 +269,15 @@ impl<'w> UnsafeWorldCell<'w> { unsafe { self.world_metadata() }.read_change_tick() } + /// Returns the id of the last ECS event that was fired. + /// Used internally to ensure observers don't trigger multiple times for the same event. + #[inline] + pub fn last_trigger_id(&self) -> u32 { + // SAFETY: + // - we only access world metadata + unsafe { self.world_metadata() }.last_trigger_id() + } + /// Returns the [`Tick`] indicating the last time that [`World::clear_trackers`] was called. /// /// If this `UnsafeWorldCell` was created from inside of an exclusive system (a [`System`] that
diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1779,7 +1790,7 @@ mod tests { world.spawn((A(1), B(0))); let query_state = world.query::<(&A, &B)>(); - let mut new_query_state = query_state.transmute::<&A>(world.components()); + let mut new_query_state = query_state.transmute::<&A>(&world); assert_eq!(new_query_state.iter(&world).len(), 1); let a = new_query_state.single(&world); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1793,7 +1804,7 @@ mod tests { world.spawn((A(1), B(0), C(0))); let query_state = world.query_filtered::<(&A, &B), Without<C>>(); - let mut new_query_state = query_state.transmute::<&A>(world.components()); + let mut new_query_state = query_state.transmute::<&A>(&world); // even though we change the query to not have Without<C>, we do not get the component with C. let a = new_query_state.single(&world); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1807,7 +1818,7 @@ mod tests { let entity = world.spawn(A(10)).id(); let q = world.query::<()>(); - let mut q = q.transmute::<Entity>(world.components()); + let mut q = q.transmute::<Entity>(&world); assert_eq!(q.single(&world), entity); } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1817,11 +1828,11 @@ mod tests { world.spawn(A(10)); let q = world.query::<&A>(); - let mut new_q = q.transmute::<Ref<A>>(world.components()); + let mut new_q = q.transmute::<Ref<A>>(&world); assert!(new_q.single(&world).is_added()); let q = world.query::<Ref<A>>(); - let _ = q.transmute::<&A>(world.components()); + let _ = q.transmute::<&A>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1830,8 +1841,8 @@ mod tests { world.spawn(A(0)); let q = world.query::<&mut A>(); - let _ = q.transmute::<Ref<A>>(world.components()); - let _ = q.transmute::<&A>(world.components()); + let _ = q.transmute::<Ref<A>>(&world); + let _ = q.transmute::<&A>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1840,7 +1851,7 @@ mod tests { world.spawn(A(0)); let q: QueryState<EntityMut<'_>> = world.query::<EntityMut>(); - let _ = q.transmute::<EntityRef>(world.components()); + let _ = q.transmute::<EntityRef>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1849,8 +1860,8 @@ mod tests { world.spawn((A(0), B(0))); let query_state = world.query::<(Option<&A>, &B)>(); - let _ = query_state.transmute::<Option<&A>>(world.components()); - let _ = query_state.transmute::<&B>(world.components()); + let _ = query_state.transmute::<Option<&A>>(&world); + let _ = query_state.transmute::<&B>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1864,7 +1875,7 @@ mod tests { world.spawn(A(0)); let query_state = world.query::<&A>(); - let mut _new_query_state = query_state.transmute::<(&A, &B)>(world.components()); + let mut _new_query_state = query_state.transmute::<(&A, &B)>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1876,7 +1887,7 @@ mod tests { world.spawn(A(0)); let query_state = world.query::<&A>(); - let mut _new_query_state = query_state.transmute::<&mut A>(world.components()); + let mut _new_query_state = query_state.transmute::<&mut A>(&world); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1888,7 +1899,7 @@ mod tests { world.spawn(C(0)); let query_state = world.query::<Option<&A>>(); - let mut new_query_state = query_state.transmute::<&A>(world.components()); + let mut new_query_state = query_state.transmute::<&A>(&world); let x = new_query_state.single(&world); assert_eq!(x.0, 1234); } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1902,15 +1913,15 @@ mod tests { world.init_component::<A>(); let q = world.query::<EntityRef>(); - let _ = q.transmute::<&A>(world.components()); + let _ = q.transmute::<&A>(&world); } #[test] fn can_transmute_filtered_entity() { let mut world = World::new(); let entity = world.spawn((A(0), B(1))).id(); - let query = QueryState::<(Entity, &A, &B)>::new(&mut world) - .transmute::<FilteredEntityRef>(world.components()); + let query = + QueryState::<(Entity, &A, &B)>::new(&mut world).transmute::<FilteredEntityRef>(&world); let mut query = query; // Our result is completely untyped diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1927,7 +1938,7 @@ mod tests { let entity_a = world.spawn(A(0)).id(); let mut query = QueryState::<(Entity, &A, Has<B>)>::new(&mut world) - .transmute_filtered::<(Entity, Has<B>), Added<A>>(world.components()); + .transmute_filtered::<(Entity, Has<B>), Added<A>>(&world); assert_eq!((entity_a, false), query.single(&world)); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1947,7 +1958,7 @@ mod tests { let entity_a = world.spawn(A(0)).id(); let mut detection_query = QueryState::<(Entity, &A)>::new(&mut world) - .transmute_filtered::<Entity, Changed<A>>(world.components()); + .transmute_filtered::<Entity, Changed<A>>(&world); let mut change_query = QueryState::<&mut A>::new(&mut world); assert_eq!(entity_a, detection_query.single(&world)); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1970,7 +1981,20 @@ mod tests { world.init_component::<A>(); world.init_component::<B>(); let query = QueryState::<&A>::new(&mut world); - let _new_query = query.transmute_filtered::<Entity, Changed<B>>(world.components()); + let _new_query = query.transmute_filtered::<Entity, Changed<B>>(&world); + } + + // Regression test for #14629 + #[test] + #[should_panic] + fn transmute_with_different_world() { + let mut world = World::new(); + world.spawn((A(1), B(2))); + + let mut world2 = World::new(); + world2.init_component::<B>(); + + world.query::<(&A, &B)>().transmute::<&B>(&world2); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1983,8 +2007,7 @@ mod tests { let query_1 = QueryState::<&A, Without<C>>::new(&mut world); let query_2 = QueryState::<&B, Without<C>>::new(&mut world); - let mut new_query: QueryState<Entity, ()> = - query_1.join_filtered(world.components(), &query_2); + let mut new_query: QueryState<Entity, ()> = query_1.join_filtered(&world, &query_2); assert_eq!(new_query.single(&world), entity_ab); } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1999,8 +2022,7 @@ mod tests { let query_1 = QueryState::<&A>::new(&mut world); let query_2 = QueryState::<&B, Without<C>>::new(&mut world); - let mut new_query: QueryState<Entity, ()> = - query_1.join_filtered(world.components(), &query_2); + let mut new_query: QueryState<Entity, ()> = query_1.join_filtered(&world, &query_2); assert!(new_query.get(&world, entity_ab).is_ok()); // should not be able to get entity with c. diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2016,7 +2038,7 @@ mod tests { world.init_component::<C>(); let query_1 = QueryState::<&A>::new(&mut world); let query_2 = QueryState::<&B>::new(&mut world); - let _query: QueryState<&C> = query_1.join(world.components(), &query_2); + let _query: QueryState<&C> = query_1.join(&world, &query_2); } #[test] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2030,6 +2052,6 @@ mod tests { let mut world = World::new(); let query_1 = QueryState::<&A, Without<C>>::new(&mut world); let query_2 = QueryState::<&B, Without<C>>::new(&mut world); - let _: QueryState<Entity, Changed<C>> = query_1.join_filtered(world.components(), &query_2); + let _: QueryState<Entity, Changed<C>> = query_1.join_filtered(&world, &query_2); } }
`Query::transmute`/`Query::transmute_filtered` accept any `&Components` parameter and this is unsound ## Bevy version Both 0.14.1 and c1c003d ## What you did ```rs #[derive(Component)] struct A(u32); #[derive(Component)] struct B(u32); let mut world = World::new(); world.spawn((A(1), B(2))); let mut world2 = World::new(); world2.init_component::<B>(); let mut query = world .query::<(&A, &B)>() .transmute::<&B>(world2.components()); let b = query.single(&world); assert_eq!(b.0, 2); ``` ## What went wrong I expected either the `transmute` to fail due to a `&Components` passed from the wrong `World`, or the assert to pass, since the only `B` created contains a 2. Instead the assert fails due `b` containing 1, which was the content of the `A` however. The issue is that the new query state is created using the component ids for `world2`, where `B` has the component id that `A` has in the original world. Ultimately this allows to transmute a component to another, which is obviously unsound.
2024-08-05T13:52:48Z
1.79
2024-08-06T06:15:03Z
612897becd415b7b982f58bd76deb719b42c9790
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "change_detection::tests::as_deref_mut", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_insert_remove", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "bundle::tests::component_hook_order_recursive", "change_detection::tests::set_if_neq", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_comparison", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_reader_iter_last", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::masks::tests::pack_into_u64", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "label::tests::dyn_eq_object_safe", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_dynamic_component", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "observer::tests::observer_multiple_listeners", "query::access::tests::test_access_filters_clone", "query::access::tests::filtered_combined_access", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_access_clone", "observer::tests::observer_propagating_no_next", "observer::tests::observer_multiple_matches", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_multiple_components", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_no_target", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_propagating_parallel_propagation", "query::state::tests::can_transmute_added", "observer::tests::observer_order_replace", "query::access::tests::test_access_clone_from", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "query::builder::tests::builder_transmute", "query::builder::tests::builder_with_without_dynamic", "observer::tests::observer_propagating", "query::builder::tests::builder_or", "observer::tests::observer_multiple_events", "observer::tests::observer_propagating_join", "observer::tests::observer_order_spawn_despawn", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_static_components", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_transmute_changed", "observer::tests::observer_order_insert_remove_sparse", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::iter::tests::query_sorts", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_generalize_with_option", "observer::tests::observer_order_recursive", "query::builder::tests::builder_with_without_static", "observer::tests::observer_order_insert_remove", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_to_more_general", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::join_with_get", "query::state::tests::join", "query::tests::has_query", "query::tests::multi_storage_query", "query::tests::any_query", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::tests::query", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::many_entities", "query::tests::query_iter_combinations_sparse", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::self_conflicting_worldquery - should panic", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_system_set", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::disabled_never_run", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::unknown_schedule", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::stepping_disabled", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::one_of_everything", "storage::blob_vec::tests::blob_vec", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::stepping::tests::verify_cursor", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::exclusive", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::sparse_set::tests::sparse_sets", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::resize_test", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::read_world", "system::builder::tests::local_builder", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::builder::tests::multi_param_builder", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "storage::table::tests::table", "system::commands::tests::append", "system::commands::tests::commands", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::function_system::tests::into_system_type_id_consistency", "system::builder::tests::query_builder", "system::commands::tests::remove_components", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::remove_components_by_id", "system::system::tests::non_send_resources", "system::system::tests::run_system_once", "schedule::tests::system_ambiguity::read_only", "system::system::tests::run_two_systems", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ordering::order_exclusive_systems", "event::tests::test_event_mutator_iter_nth", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::system_execution::run_exclusive_system", "system::system_name::tests::test_system_name_exclusive_param", "system::system_name::tests::test_system_name_regular_param", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::set::tests::test_schedule_label", "system::system_param::tests::system_param_flexibility", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_field_limit", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::system_param::tests::system_param_struct_variants", "schedule::schedule::tests::inserts_a_sync_point", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::non_sync_local", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::system_execution::run_system", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::system_registry::tests::input_values", "system::system_registry::tests::local_variables", "schedule::schedule::tests::configure_set_on_new_schedule", "system::system_registry::tests::output_values", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "event::tests::test_event_reader_iter_nth", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::schedule::tests::disable_auto_sync_points", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::condition::tests::multiple_run_conditions", "system::system_param::tests::param_set_non_send_first", "system::system_param::tests::system_param_private_fields", "schedule::tests::conditions::system_with_condition", "system::system_registry::tests::nested_systems", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "schedule::condition::tests::run_condition", "system::tests::any_of_and_without", "system::tests::any_of_with_empty_and_mut", "system::system_registry::tests::nested_systems_with_inputs", "system::system_param::tests::param_set_non_send_second", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::any_of_with_and_without_common", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::assert_systems", "system::tests::can_have_16_parameters", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::any_of_working", "system::tests::conflicting_query_immut_system - should panic", "schedule::tests::system_ordering::order_systems", "schedule::condition::tests::run_condition_combinators", "system::tests::conflicting_query_sets_system - should panic", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::conflicting_query_mut_system - should panic", "system::tests::commands_param_set", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::get_system_conflicts", "system::tests::long_life_test", "schedule::schedule::tests::no_sync_chain::chain_first", "query::tests::par_iter_mut_change_detection", "system::tests::immutable_mut_test", "event::tests::test_event_cursor_par_read_mut", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_read_component_system", "system::tests::disjoint_query_mut_system", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::changed_resource_system", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::local_system", "system::tests::non_send_option_system", "system::tests::into_iter_impl", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "event::tests::test_event_cursor_par_read", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_has_filter_with", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "system::tests::or_param_set_system", "system::tests::simple_system", "system::tests::panic_inside_system - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "system::tests::system_state_change_detection", "system::tests::query_set_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::system_state_invalid_world - should panic", "system::tests::write_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::added_queries", "system::tests::update_archetype_component_access_works", "tests::added_tracking", "tests::changed_query", "tests::add_remove_components", "system::tests::removal_tracking", "system::tests::test_combinator_clone", "system::tests::world_collections_system", "tests::clear_entities", "tests::bundle_derive", "tests::despawn_mixed_storage", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::despawn_table_storage", "tests::empty_spawn", "tests::changed_trackers", "tests::changed_trackers_sparse", "tests::filtered_query_access", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "query::tests::query_filtered_exactsizeiterator_len", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::par_for_each_sparse", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::non_send_resource_drop_from_same_thread", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove_missing", "tests::remove", "tests::reserve_and_spawn", "tests::remove_tracking", "tests::resource", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_by_id", "world::tests::custom_resource_with_layout", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_reflect", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::iterate_entities_mut", "world::tests::inspect_entity_components", "world::tests::spawn_empty_bundle", "world::tests::test_verify_unique_entities", "world::tests::iterate_entities", "world::tests::panic_while_overwriting_component", "schedule::tests::system_execution::parallel_execution", "system::tests::get_many_is_ordered", "tests::par_for_each_dense", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1001) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1072) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 166) - 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/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1009) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1088)", "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/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 39)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::Component (line 106)", "crates/bevy_ecs/src/component.rs - component::Component (line 141)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 208)", "crates/bevy_ecs/src/component.rs - component::Component (line 176)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 695)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 545)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 753)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1403)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - compile fail", "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::nand (line 214) - compile fail", "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::xor (line 431) - 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::nor (line 236) - compile fail", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "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 (line 24)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "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/component.rs - component::Components::resource_id (line 844)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 806)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 933)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1672)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 790)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 677)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 207)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 778)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 640)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 245)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1649)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 569)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 253)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "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::run_once (line 507)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 462) - compile fail", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1575) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 729)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1551)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 473)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 282)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 588)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 561)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 249)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1138)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 674)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 427)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 616)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1161)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1054)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 374)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 128)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 469)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 646)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 44)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 907)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 161)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 69)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1007)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 872)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 314)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "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>::single (line 1082)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 793)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 321)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 763)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 49)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 786)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 350)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 178)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "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::EntityMut (line 257)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 433)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 385)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 266)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 219)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 195)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1363)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1416)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1636)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1548)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1492)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1663)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1577)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1696)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1056)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 314)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 413)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 834)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 908)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 467)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2604)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1603)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 540)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1818)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 610)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 340)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1077)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1259)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1162)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2505)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1743)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1800)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1518)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 892)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 456)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1720)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 422)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 575)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2527)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1192)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 745)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 374)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 803)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1775)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 697)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2282)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2867)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1981)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 925)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1024)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1109)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1228)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,615
bevyengine__bevy-14615
[ "14528" ]
f06cd448db9171bda656ded1e63c68581d6e19aa
diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -1,5 +1,6 @@ use std::marker::PhantomData; +use crate::component::StorageType; use crate::{component::ComponentId, prelude::*}; use super::{FilteredAccess, QueryData, QueryFilter}; diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -68,6 +69,26 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> { } } + pub(super) fn is_dense(&self) -> bool { + // Note: `component_id` comes from the user in safe code, so we cannot trust it to + // exist. If it doesn't exist we pessimistically assume it's sparse. + let is_dense = |component_id| { + self.world() + .components() + .get_info(component_id) + .map_or(false, |info| info.storage_type() == StorageType::Table) + }; + + self.access + .access() + .component_reads_and_writes() + .all(is_dense) + && self.access.access().archetypal().all(is_dense) + && !self.access.access().has_read_all_components() + && self.access.with_filters().all(is_dense) + && self.access.without_filters().all(is_dense) + } + /// Returns a reference to the world passed to [`Self::new`]. pub fn world(&self) -> &World { self.world diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -128,7 +128,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { /// # Safety /// - all `rows` must be in `[0, table.entity_count)`. /// - `table` must match D and F - /// - Both `D::IS_DENSE` and `F::IS_DENSE` must be true. + /// - The query iteration must be dense (i.e. `self.query_state.is_dense` must be true). #[inline] pub(super) unsafe fn fold_over_table_range<B, Func>( &mut self, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -183,7 +183,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { /// # Safety /// - all `indices` must be in `[0, archetype.len())`. /// - `archetype` must match D and F - /// - Either `D::IS_DENSE` or `F::IS_DENSE` must be false. + /// - The query iteration must not be dense (i.e. `self.query_state.is_dense` must be false). #[inline] pub(super) unsafe fn fold_over_archetype_range<B, Func>( &mut self, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -252,7 +252,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { /// - all `indices` must be in `[0, archetype.len())`. /// - `archetype` must match D and F /// - `archetype` must have the same length with it's table. - /// - Either `D::IS_DENSE` or `F::IS_DENSE` must be false. + /// - The query iteration must not be dense (i.e. `self.query_state.is_dense` must be false). #[inline] pub(super) unsafe fn fold_over_dense_archetype_range<B, Func>( &mut self, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1031,20 +1031,27 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Iterator for QueryIter<'w, 's, D, F> let Some(item) = self.next() else { break }; accum = func(accum, item); } - for id in self.cursor.storage_id_iter.clone() { - if D::IS_DENSE && F::IS_DENSE { + + if self.cursor.is_dense { + for id in self.cursor.storage_id_iter.clone() { + // SAFETY: `self.cursor.is_dense` is true, so storage ids are guaranteed to be table ids. + let table_id = unsafe { id.table_id }; // SAFETY: Matched table IDs are guaranteed to still exist. - let table = unsafe { self.tables.get(id.table_id).debug_checked_unwrap() }; + let table = unsafe { self.tables.get(table_id).debug_checked_unwrap() }; + accum = // SAFETY: // - The fetched table matches both D and F // - The provided range is equivalent to [0, table.entity_count) - // - The if block ensures that D::IS_DENSE and F::IS_DENSE are both true + // - The if block ensures that the query iteration is dense unsafe { self.fold_over_table_range(accum, &mut func, table, 0..table.entity_count()) }; - } else { - let archetype = - // SAFETY: Matched archetype IDs are guaranteed to still exist. - unsafe { self.archetypes.get(id.archetype_id).debug_checked_unwrap() }; + } + } else { + for id in self.cursor.storage_id_iter.clone() { + // SAFETY: `self.cursor.is_dense` is false, so storage ids are guaranteed to be archetype ids. + let archetype_id = unsafe { id.archetype_id }; + // SAFETY: Matched archetype IDs are guaranteed to still exist. + let archetype = unsafe { self.archetypes.get(archetype_id).debug_checked_unwrap() }; // SAFETY: Matched table IDs are guaranteed to still exist. let table = unsafe { self.tables.get(archetype.table_id()).debug_checked_unwrap() }; diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1052,19 +1059,19 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Iterator for QueryIter<'w, 's, D, F> // this leverages cache locality to optimize performance. if table.entity_count() == archetype.len() { accum = - // SAFETY: - // - The fetched archetype matches both D and F - // - The provided archetype and its' table have the same length. - // - The provided range is equivalent to [0, archetype.len) - // - The if block ensures that ether D::IS_DENSE or F::IS_DENSE are false - unsafe { self.fold_over_dense_archetype_range(accum, &mut func, archetype,0..archetype.len()) }; + // SAFETY: + // - The fetched archetype matches both D and F + // - The provided archetype and its' table have the same length. + // - The provided range is equivalent to [0, archetype.len) + // - The if block ensures that the query iteration is not dense. + unsafe { self.fold_over_dense_archetype_range(accum, &mut func, archetype, 0..archetype.len()) }; } else { accum = - // SAFETY: - // - The fetched archetype matches both D and F - // - The provided range is equivalent to [0, archetype.len) - // - The if block ensures that ether D::IS_DENSE or F::IS_DENSE are false - unsafe { self.fold_over_archetype_range(accum, &mut func, archetype,0..archetype.len()) }; + // SAFETY: + // - The fetched archetype matches both D and F + // - The provided range is equivalent to [0, archetype.len) + // - The if block ensures that the query iteration is not dense. + unsafe { self.fold_over_archetype_range(accum, &mut func, archetype, 0..archetype.len()) }; } } } diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1675,6 +1682,8 @@ impl<'w, 's, D: QueryData, F: QueryFilter, const K: usize> Debug } struct QueryIterationCursor<'w, 's, D: QueryData, F: QueryFilter> { + // whether the query iteration is dense or not. Mirrors QueryState's `is_dense` field. + is_dense: bool, storage_id_iter: std::slice::Iter<'s, StorageId>, table_entities: &'w [Entity], archetype_entities: &'w [ArchetypeEntity], diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1689,6 +1698,7 @@ struct QueryIterationCursor<'w, 's, D: QueryData, F: QueryFilter> { impl<D: QueryData, F: QueryFilter> Clone for QueryIterationCursor<'_, '_, D, F> { fn clone(&self) -> Self { Self { + is_dense: self.is_dense, storage_id_iter: self.storage_id_iter.clone(), table_entities: self.table_entities, archetype_entities: self.archetype_entities, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1701,8 +1711,6 @@ impl<D: QueryData, F: QueryFilter> Clone for QueryIterationCursor<'_, '_, D, F> } impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { - const IS_DENSE: bool = D::IS_DENSE && F::IS_DENSE; - unsafe fn init_empty( world: UnsafeWorldCell<'w>, query_state: &'s QueryState<D, F>, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1732,6 +1740,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { table_entities: &[], archetype_entities: &[], storage_id_iter: query_state.matched_storage_ids.iter(), + is_dense: query_state.is_dense, current_len: 0, current_row: 0, } diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1739,6 +1748,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { fn reborrow(&mut self) -> QueryIterationCursor<'_, 's, D, F> { QueryIterationCursor { + is_dense: self.is_dense, fetch: D::shrink_fetch(self.fetch.clone()), filter: F::shrink_fetch(self.filter.clone()), table_entities: self.table_entities, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1754,7 +1764,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { unsafe fn peek_last(&mut self) -> Option<D::Item<'w>> { if self.current_row > 0 { let index = self.current_row - 1; - if Self::IS_DENSE { + if self.is_dense { let entity = self.table_entities.get_unchecked(index); Some(D::fetch( &mut self.fetch, diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1780,7 +1790,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { /// will be **the exact count of remaining values**. fn max_remaining(&self, tables: &'w Tables, archetypes: &'w Archetypes) -> usize { let ids = self.storage_id_iter.clone(); - let remaining_matched: usize = if Self::IS_DENSE { + let remaining_matched: usize = if self.is_dense { // SAFETY: The if check ensures that storage_id_iter stores TableIds unsafe { ids.map(|id| tables[id.table_id].entity_count()).sum() } } else { diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -1803,7 +1813,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIterationCursor<'w, 's, D, F> { archetypes: &'w Archetypes, query_state: &'s QueryState<D, F>, ) -> Option<D::Item<'w>> { - if Self::IS_DENSE { + if self.is_dense { loop { // we are on the beginning of the query, or finished processing a table, so skip to the next if self.current_row == self.current_len { diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -126,7 +126,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { fn get_batch_size(&self, thread_count: usize) -> usize { let max_items = || { let id_iter = self.state.matched_storage_ids.iter(); - if D::IS_DENSE && F::IS_DENSE { + if self.state.is_dense { // SAFETY: We only access table metadata. let tables = unsafe { &self.world.world_metadata().storages().tables }; id_iter diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -24,7 +24,10 @@ use super::{ /// An ID for either a table or an archetype. Used for Query iteration. /// /// Query iteration is exclusively dense (over tables) or archetypal (over archetypes) based on whether -/// both `D::IS_DENSE` and `F::IS_DENSE` are true or not. +/// the query filters are dense or not. This is represented by the [`QueryState::is_dense`] field. +/// +/// Note that `D::IS_DENSE` and `F::IS_DENSE` have no relationship with `QueryState::is_dense` and +/// any combination of their values can happen. /// /// This is a union instead of an enum as the usage is determined at compile time, as all [`StorageId`]s for /// a [`QueryState`] will be all [`TableId`]s or all [`ArchetypeId`]s, and not a mixture of both. This diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -68,6 +71,9 @@ pub struct QueryState<D: QueryData, F: QueryFilter = ()> { pub(crate) component_access: FilteredAccess<ComponentId>, // NOTE: we maintain both a bitset and a vec because iterating the vec is faster pub(super) matched_storage_ids: Vec<StorageId>, + // Represents whether this query iteration is dense or not. When this is true + // `matched_storage_ids` stores `TableId`s, otherwise it stores `ArchetypeId`s. + pub(super) is_dense: bool, pub(crate) fetch_state: D::State, pub(crate) filter_state: F::State, #[cfg(feature = "trace")] diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -194,10 +200,15 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { // properly considered in a global "cross-query" context (both within systems and across systems). component_access.extend(&filter_component_access); + // For queries without dynamic filters the dense-ness of the query is equal to the dense-ness + // of its static type parameters. + let is_dense = D::IS_DENSE && F::IS_DENSE; + Self { world_id: world.id(), archetype_generation: ArchetypeGeneration::initial(), matched_storage_ids: Vec::new(), + is_dense, fetch_state, filter_state, component_access, diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -222,6 +233,8 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { world_id: builder.world().id(), archetype_generation: ArchetypeGeneration::initial(), matched_storage_ids: Vec::new(), + // For dynamic queries the dense-ness is given by the query builder. + is_dense: builder.is_dense(), fetch_state, filter_state, component_access: builder.access().clone(), diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -450,7 +463,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { let archetype_index = archetype.id().index(); if !self.matched_archetypes.contains(archetype_index) { self.matched_archetypes.grow_and_insert(archetype_index); - if !D::IS_DENSE || !F::IS_DENSE { + if !self.is_dense { self.matched_storage_ids.push(StorageId { archetype_id: archetype.id(), }); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -459,7 +472,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { let table_index = archetype.table_id().as_usize(); if !self.matched_tables.contains(table_index) { self.matched_tables.grow_and_insert(table_index); - if D::IS_DENSE && F::IS_DENSE { + if self.is_dense { self.matched_storage_ids.push(StorageId { table_id: archetype.table_id(), }); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -560,6 +573,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { world_id: self.world_id, archetype_generation: self.archetype_generation, matched_storage_ids: self.matched_storage_ids.clone(), + is_dense: self.is_dense, fetch_state, filter_state, component_access: self.component_access.clone(), diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -653,12 +667,15 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { warn!("You have tried to join queries with different archetype_generations. This could lead to unpredictable results."); } + // the join is dense of both the queries were dense. + let is_dense = self.is_dense && other.is_dense; + // take the intersection of the matched ids let mut matched_tables = self.matched_tables.clone(); let mut matched_archetypes = self.matched_archetypes.clone(); matched_tables.intersect_with(&other.matched_tables); matched_archetypes.intersect_with(&other.matched_archetypes); - let matched_storage_ids = if NewD::IS_DENSE && NewF::IS_DENSE { + let matched_storage_ids = if is_dense { matched_tables .ones() .map(|id| StorageId { diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -678,6 +695,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { world_id: self.world_id, archetype_generation: self.archetype_generation, matched_storage_ids, + is_dense, fetch_state: new_fetch_state, filter_state: new_filter_state, component_access: joined_component_access, diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1487,7 +1505,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { let mut iter = self.iter_unchecked_manual(world, last_run, this_run); let mut accum = init_accum(); for storage_id in queue { - if D::IS_DENSE && F::IS_DENSE { + if self.is_dense { let id = storage_id.table_id; let table = &world.storages().tables.get(id).debug_checked_unwrap(); accum = iter.fold_over_table_range( diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1521,7 +1539,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { #[cfg(feature = "trace")] let _span = self.par_iter_span.enter(); let accum = init_accum(); - if D::IS_DENSE && F::IS_DENSE { + if self.is_dense { let id = storage_id.table_id; let table = world.storages().tables.get(id).debug_checked_unwrap(); self.iter_unchecked_manual(world, last_run, this_run) diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1537,7 +1555,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { }; let storage_entity_count = |storage_id: StorageId| -> usize { - if D::IS_DENSE && F::IS_DENSE { + if self.is_dense { tables[storage_id.table_id].entity_count() } else { archetypes[storage_id.archetype_id].len()
diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -396,4 +417,27 @@ mod tests { assert_eq!(1, b.deref::<B>().0); } } + + /// Regression test for issue #14348 + #[test] + fn builder_static_dense_dynamic_sparse() { + #[derive(Component)] + struct Dense; + + #[derive(Component)] + #[component(storage = "SparseSet")] + struct Sparse; + + let mut world = World::new(); + + world.spawn(Dense); + world.spawn((Dense, Sparse)); + + let mut query = QueryBuilder::<&Dense>::new(&mut world) + .with::<Sparse>() + .build(); + + let matched = query.iter(&world).count(); + assert_eq!(matched, 1); + } } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2042,6 +2060,53 @@ mod tests { world.query::<(&A, &B)>().transmute::<&B>(&world2); } + /// Regression test for issue #14528 + #[test] + fn transmute_from_sparse_to_dense() { + #[derive(Component)] + struct Dense; + + #[derive(Component)] + #[component(storage = "SparseSet")] + struct Sparse; + + let mut world = World::new(); + + world.spawn(Dense); + world.spawn((Dense, Sparse)); + + let mut query = world + .query_filtered::<&Dense, With<Sparse>>() + .transmute::<&Dense>(&world); + + let matched = query.iter(&world).count(); + assert_eq!(matched, 1); + } + #[test] + fn transmute_from_dense_to_sparse() { + #[derive(Component)] + struct Dense; + + #[derive(Component)] + #[component(storage = "SparseSet")] + struct Sparse; + + let mut world = World::new(); + + world.spawn(Dense); + world.spawn((Dense, Sparse)); + + let mut query = world + .query::<&Dense>() + .transmute_filtered::<&Dense, With<Sparse>>(&world); + + // Note: `transmute_filtered` is supposed to keep the same matched tables/archetypes, + // so it doesn't actually filter out those entities without `Sparse` and the iteration + // remains dense. + let matched = query.iter(&world).count(); + assert_eq!(matched, 2); + } + #[test] fn join() { let mut world = World::new();
Unsoundness in QueryState::transmute_filtered ## Bevy version It's unsound to transmute a query state if D::DENSE or F::DENSE changed ## What you did ```rust use bevy::prelude::*; #[derive(Component)] struct Table; #[derive(Component)] #[component(storage = "SparseSet")] struct Sparse; #[allow(unsafe_code)] fn main() { let mut world = World::new(); world.spawn(Sparse); world.spawn((Table, Sparse)); let query = QueryState::<(&Table, &Sparse)>::new(&mut world); let mut new_query = query.transmute_filtered::<(Entity, &Table), ()>(world.components()); for e in new_query.iter(&mut world) { println!("{:?}", e.0); } } ```` ## What went wrong process didn't exit successfully: `target\release\examples\hello_world.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Are you sure it's that it's because D::DENSE of F::DENSE changes? That would be surprising to me since the QueryState is completely remade. Maybe the safety requirements on `new_archetype` aren't quite correct and it's the call there that is causing the memory violation. You're not really supposed to call `QueryState::iter` on a transmuted query, because that calls `update_archetypes` internally. I wonder if we need to make `QueryState::transmute_filtered` unsafe and make the user promise not to call `update_archetypes` or any methods that call it. If you call `QueryState::iter_unchecked_manual` which avoids the call to `update_archetypes` does the access violation still happen? > Are you sure it's that it's because D::DENSE of F::DENSE changes? The initial `QueryState` is over `(&Table, &Sparse)`, which uses archetype iteration. Hence the `matched_storage_ids` field of `QueryState` holds `StorageId`s initialized with `archetype_id`s (note that `StorageId` is an `union`). In particular it should be archetype 2 (not tested), with 0 being the empty one and 1 containing only `Table`. When it gets transmuted the `matched_storage_ids` is cloned as is, but since it now uses dense iteration the `archetype_id`s are read as if the active field was `table_id` (edit: this happens because `QueryIter` internally iterates over the matches storage ids and interprets them differently based on whether `D::DENSE` or not, hence why `iter` triggers it). It should hence try to read table 2, which shouldn't exist (table 0 is the empty one while table 1 contains `Table`s and is shared between archetypes 1 and 2). This is an out of bound read which likely leads to dereferencing some uninitialized pointers and eventually lead to the `STATUS_ACCESS_VIOLATION`. Just re-creating the `matched_storage_ids` with `StorageId`s initialized with `table_id` however would not fix the issue, since the query matches only part of the table, so it would need to either drop access to those entities (likely undesiderable) or extending it to them (which is unsound). Ultimately the issue is that the dense query optimization assumes that given a dense query data and filter then the query will always iterate over full tables, but transmutes (and `QueryBuilder`) break that assumption.
2024-08-04T20:43:23Z
1.79
2024-08-28T06:24:40Z
612897becd415b7b982f58bd76deb719b42c9790
[ "query::builder::tests::builder_static_dense_dynamic_sparse", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::transmute_from_dense_to_sparse" ]
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_insert_remove", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::entity_mapper", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "change_detection::tests::change_expiration", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::set_if_neq", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_drain_and_read", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::same_interned_content", "intern::tests::fieldless_enum", "intern::tests::static_sub_strings", "intern::tests::same_interned_instance", "label::tests::dyn_eq_object_safe", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_propagating_halt", "query::access::tests::test_access_clone", "query::access::tests::test_access_clone_from", "observer::tests::observer_multiple_listeners", "query::access::tests::filtered_access_extend_or", "observer::tests::observer_dynamic_component", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::test_access_filters_clone_from", "observer::tests::observer_multiple_matches", "observer::tests::observer_propagating_parallel_propagation", "query::access::tests::test_filtered_access_clone", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "observer::tests::observer_multiple_components", "observer::tests::observer_propagating_no_next", "query::access::tests::test_access_filters_clone", "observer::tests::observer_multiple_events", "query::access::tests::access_get_conflicts", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_entity_routing", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_order_replace", "observer::tests::observer_no_target", "observer::tests::observer_propagating", "observer::tests::observer_propagating_join", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_order_recursive", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_world_skipping", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::read_only_field_visibility", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::builder::tests::builder_dynamic_components", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_static_components", "query::fetch::tests::world_query_phantom_data", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::builder::tests::builder_transmute", "query::builder::tests::builder_with_without_static", "query::iter::tests::query_sorts", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_dynamic", "query::state::tests::can_generalize_with_option", "observer::tests::observer_order_insert_remove", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_entity_mut", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::join", "query::state::tests::join_with_get", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::right_world_get - should panic", "query::tests::any_query", "query::tests::has_query", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query", "query::tests::query_iter_combinations_sparse", "query::tests::multi_storage_query", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected", "query::tests::many_entities", "reflect::entity_commands::tests::remove_reflected", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_filtered_iter_combinations", "schedule::set::tests::test_derive_schedule_label", "reflect::entity_commands::tests::remove_reflected_with_registry", "schedule::set::tests::test_derive_system_set", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::disabled_never_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::components", "schedule::stepping::tests::verify_cursor", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::resources", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::stepping::multi_threaded_executor", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_ambiguity::read_world", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::schedule::tests::inserts_a_sync_point", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "event::tests::test_event_mutator_iter_nth", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::resize_test", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::builder::tests::multi_param_builder", "event::tests::test_event_reader_iter_nth", "system::builder::tests::dyn_builder", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::system_execution::run_system", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::builder::tests::query_builder", "system::builder::tests::param_set_builder", "system::commands::tests::append", "system::commands::tests::commands", "system::commands::tests::test_commands_are_send_and_sync", "system::builder::tests::local_builder", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::conditions::system_with_condition", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "schedule::tests::conditions::system_conditions_and_change_detection", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_components_by_id", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::stepping::tests::step_run_if_false", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::set::tests::test_schedule_label", "system::builder::tests::query_builder_state", "system::builder::tests::vec_builder", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system::tests::non_send_resources", "storage::table::tests::table", "system::system::tests::run_two_systems", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::system::tests::command_processing", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::condition::tests::run_condition", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_generic_bounds", "system::system_name::tests::test_system_name_exclusive_param", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::builder::tests::param_set_vec_builder", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::condition::tests::run_condition_combinators", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_name_collision", "schedule::tests::system_execution::run_exclusive_system", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_struct_variants", "system::system::tests::run_system_once", "system::system_param::tests::system_param_const_generics", "system::system_registry::tests::exclusive_system", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_where_clause", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::system_registry::tests::change_detection", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::non_sync_local", "system::system_registry::tests::output_values", "schedule::tests::system_ambiguity::read_only", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems_with_inputs", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::local_variables", "system::tests::any_of_has_no_filter_with - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::any_of_and_without", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "event::tests::test_event_cursor_par_read_mut", "system::system_param::tests::param_set_non_send_first", "event::tests::test_event_cursor_par_read", "system::tests::any_of_with_and_without_common", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_empty_and_mut", "system::tests::assert_entity_mut_system_does_conflict - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_working", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::any_of_with_mut_and_option - should panic", "query::tests::par_iter_mut_change_detection", "system::tests::any_of_with_entity_and_mut", "system::tests::assert_systems", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::can_have_16_parameters", "system::tests::commands_param_set", "system::tests::long_life_test", "system::tests::get_system_conflicts", "system::tests::immutable_mut_test", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::disjoint_query_mut_system", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_read_component_system", "system::tests::local_system", "system::tests::changed_resource_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::into_iter_impl", "system::tests::non_send_system", "system::tests::non_send_option_system", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_filter_with", "system::tests::or_expanded_with_and_without_common", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::query_validates_world_id - should panic", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::query_is_empty", "system::tests::or_with_without_and_compatible_with_without", "system::tests::read_system_state", "system::tests::or_param_set_system", "system::tests::simple_system", "system::tests::system_state_invalid_world - should panic", "tests::added_tracking", "tests::changed_query", "system::tests::query_set_system", "system::tests::panic_inside_system - should panic", "tests::bundle_derive", "system::tests::world_collections_system", "system::tests::update_archetype_component_access_works", "tests::clear_entities", "tests::added_queries", "tests::duplicate_components_panic - should panic", "tests::add_remove_components", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::empty_spawn", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "system::tests::test_combinator_clone", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "query::tests::query_filtered_exactsizeiterator_len", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::exact_size_query", "system::tests::removal_tracking", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch_invalid", "tests::changed_trackers", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all_for_each", "tests::query_all", "tests::query_filter_with", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse", "tests::query_filter_with_for_each", "tests::non_send_resource_panic - should panic", "tests::query_filter_with_sparse_for_each", "tests::query_get", "tests::par_for_each_dense", "tests::query_missing_component", "tests::par_for_each_sparse", "tests::query_filter_without", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::query_optional_component_table", "tests::remove", "tests::remove_missing", "tests::reserve_and_spawn", "tests::remove_tracking", "tests::query_single_component_for_each", "tests::query_optional_component_sparse_no_match", "tests::resource", "tests::resource_scope", "tests::reserve_entities_across_worlds", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_queue_inner", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::disjoint_access", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "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_ref_get_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "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::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iter_resources", "world::reflect::tests::get_component_as_reflect", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::spawn_empty_bundle", "world::tests::test_verify_unique_entities", "world::tests::inspect_entity_components", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/component.rs - component::Component (line 166) - compile fail", "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 1072) - compile", "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/component.rs - component::Component (line 141)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/component.rs - component::Component (line 176)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/component.rs - component::Component (line 106)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 709)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1088)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 208)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 565)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "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 266) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "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 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::xnor (line 379) - 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::xor (line 431) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "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::remove_reflect (line 101)", "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/lib.rs - (line 44)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 947)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 245)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 806)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 691)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 223)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1698)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1721)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 844)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 589)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 62)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 804)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 337)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 654)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 213)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 802)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 588)", "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/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 752)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "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 103)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 496)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 920) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1031) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 334)", "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::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "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::resource_changed (line 715)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 480) - compile fail", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1708) - compile fail", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 565)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 491)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1684)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 733)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 320)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1250)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 473)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 876)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 912)", "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>::get_entity (line 431)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 967)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 255)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 664)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1068)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 44)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1166)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 620)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1226)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1116)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 592)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "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 1140)", "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>::get_inner (line 1536)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 797)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 447)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1274)", "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>::iter_inner (line 1579)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 852)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 678)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 973)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1217)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 173)", "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>::par_iter_mut (line 815)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 775)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 128) - compile", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 49)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 798)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 646)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 363)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1293)", "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>::is_empty (line 1258)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 328)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 396)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1112)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 80)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 299)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "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>::join (line 1424)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1336)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 906)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1379)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 185)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1816)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1685)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1514)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1570)", "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>::or_insert_with (line 1599)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1540)", "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_many_entities (line 574)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 373)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 339)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1055)", "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::Entry<'w,'a,T>::or_default (line 1625)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 451)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1108)", "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 202)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2263)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1765)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1742)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1161)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1658)", "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::get_many_entities_dynamic (line 609)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1962)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1432)", "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::OccupiedEntry<'w,'a,T>::into_mut (line 1718)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1191)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1822)", "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::VacantEntry<'w,'a,T>::insert (line 1797)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 421)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1076)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2848)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)", "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::spawn (line 924)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1258)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2508)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 466)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 891)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1797)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1023)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1227)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,539
bevyengine__bevy-14539
[ "12139" ]
ba09f354745b1c4420e6e316d80ac97c9eb37f56
diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -142,7 +142,7 @@ type IdCursor = isize; /// [`Query::get`]: crate::system::Query::get /// [`World`]: crate::world::World /// [SemVer]: https://semver.org/ -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy)] #[cfg_attr(feature = "bevy_reflect", derive(Reflect))] #[cfg_attr(feature = "bevy_reflect", reflect_value(Hash, PartialEq))] #[cfg_attr( diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -390,6 +390,42 @@ impl<'de> Deserialize<'de> for Entity { } } +/// Outputs the full entity identifier, including the index, generation, and the raw bits. +/// +/// This takes the format: `{index}v{generation}#{bits}`. +/// +/// # Usage +/// +/// Prefer to use this format for debugging and logging purposes. Because the output contains +/// the raw bits, it is easy to check it against serialized scene data. +/// +/// Example serialized scene data: +/// ```text +/// ( +/// ... +/// entities: { +/// 4294967297: ( <--- Raw Bits +/// components: { +/// ... +/// ), +/// ... +/// ) +/// ``` +impl fmt::Debug for Entity { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "{}v{}#{}", + self.index(), + self.generation(), + self.to_bits() + ) + } +} + +/// Outputs the short entity identifier, including the index and generation. +/// +/// This takes the format: `{index}v{generation}`. impl fmt::Display for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}v{}", self.index(), self.generation())
diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -1152,6 +1188,15 @@ mod tests { } } + #[test] + fn entity_debug() { + let entity = Entity::from_raw(42); + let string = format!("{:?}", entity); + assert!(string.contains("42")); + assert!(string.contains("v1")); + assert!(string.contains(format!("#{}", entity.to_bits()).as_str())); + } + #[test] fn entity_display() { let entity = Entity::from_raw(42);
Inconsistency between `Debug` and serialized representation of `Entity` ## Bevy version 0.13 ## What went wrong There is an inconsistency between the `Debug` representation of an `Entity`: ```rust impl fmt::Debug for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}v{}", self.index(), self.generation()) } } ``` And its `Serialize` representation: ```rust impl Serialize for Entity { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: serde::Serializer, { serializer.serialize_u64(self.to_bits()) } } ``` This makes it difficult to debug serialized outputs, since the serialized entity IDs cannot be easily mapped to runtime entities via human inspection. Ideally, these representations should be consistent for easier debugging. ## Additional information I wanted to just open a PR on this, but I think the issue warrants some discussion. Mainly on two points: - Which representation is "correct"? - If we swap to #v# format for serialized data, are we ok with invalidating existing scenes?
Ah: I know what we should do. The serialized representation should stay the same, optimized for information density. This is just an opaque identifier. However, we should make the debug representation more verbose, and report `index`, `generation` and `raw_bits` separately. In the future, we will be packing more information into here (e.g. entity disabling) that we want to add to the debug output, but we should avoid adding bloat (or semantic meaning) to the serialized representation. Displaying the raw bits separately gives us the best of both worlds, as users will be able to make this correspondence themselves. I like that idea. My only concern there is that the current "#v#" format for `Debug` is very compact. This makes it very useful for log messages, since the user can just do `info!("{entity:?} is a cool entity!")`. This would output something like: "2v2 is a cool entity" I'm concerned if we make the `Debug` more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. > I'm concerned if we make the Debug more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. That seems like a prime case for a `Display` impl then: "pretty, humand-readable output" is what belongs there. `Debug` should be maximally clear and helpful IMO. Just a random idea I had on this topic: If we take this approach, we could make the `Debug` impl compact as well. Maybe if we pick a format like: `#v#[raw_bits]` So then `Display` could look like `12v7`. And `Debug` could look like `12v7[12345678]` or `12v7.12345678` Alternatively, we could make `Display` use the `12v7.12345678` format, and `Debug` to be even more verbose with field names as needed. I like `12v7[12345678]` for the display impl, and then a properly verbose Debug impl :) @alice-i-cecile I want to re-open this issue. I don't think the `fmt::Debug` and `fmt::Display` implementation we proposed in the discussions here actually solves the initial problem. Additionally, it introduces a new issue that I was originally concerned about. ## The Problem The serialized output of Bevy scenes uses the raw bit representation of entities, i.e. `4294967303`. Many systems, including internal Bevy code, currently log entities using `fmt::Debug` (i.e. `{:?}`). This is because previously, `fmt::Debug` has format `#v#`, which was short and concise, _but didn't include the raw bits_. After this change, the `fmt::Debug` implementation is now derived. This means now any log that uses `{:?}` now displays: `Entity Entity { index: 16, generation: 3 } does not exist` Unless we retroactively fix existing log outputs, this is currently producing very ugly logs, not just for Bevy, but for everyone downstream! Additionally, this still doesn't fix the initial problem, because `fmt::Debug` _still doesn't include the raw bits_. I can't easily map `Entity { index: 16, generation: 3 }` to `4294967303`. ## My Proposal To me, `Entity` should not have a `fmt::Display` implementation. 99.9% of the time an entity is only being displaying for debug purposes. Because of this, I propose `fmt::Debug` should be what `fmt::Display` is now, in addition to the raw bits: i.e. `#v#[rawbits]` This not only avoids the need to retroactively fix logs, but also solves the initial problem _by including the raw bits_ into the debug output. Any specialized debugger that needs to show additional data for the entity most likely would need to format it explicitly. Trying to implement `fmt::Display` as a "pretty debug" output is not something I believe Bevy should handle. --- The only other alternative I see around this issue is that we retroactively fix existing log locations to use `{}` instead of `{:?}` and include the raw bits where appropriate. To me, this is a much more intrusive change.
2024-07-30T17:39:55Z
1.79
2024-08-04T06:18:41Z
612897becd415b7b982f58bd76deb719b42c9790
[ "entity::tests::entity_debug" ]
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_new", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_recursive", "bundle::tests::component_hook_order_recursive_multiple", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "change_detection::tests::change_tick_scan", "entity::tests::entity_comparison", "change_detection::tests::change_tick_wraparound", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_const", "change_detection::tests::change_expiration", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_kind_bits", "identifier::masks::tests::pack_into_u64", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_listeners", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_events", "observer::tests::observer_multiple_components", "query::access::tests::filtered_access_extend", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone", "query::access::tests::test_access_clone_from", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating_world_skipping", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_halt", "observer::tests::observer_multiple_matches", "observer::tests::observer_no_target", "observer::tests::observer_order_replace", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_propagating", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating_world", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_order_insert_remove_sparse", "query::builder::tests::builder_with_without_static", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_parallel_propagation", "query::builder::tests::builder_transmute", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_static_components", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_added", "query::builder::tests::builder_or", "query::iter::tests::query_sorts", "observer::tests::observer_order_insert_remove", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "observer::tests::observer_order_spawn_despawn", "query::fetch::tests::world_query_phantom_data", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::builder::tests::builder_with_without_dynamic", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "observer::tests::observer_order_recursive", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::join", "query::state::tests::join_with_get", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::has_query", "query::tests::any_query", "query::tests::multi_storage_query", "query::tests::query", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::self_conflicting_worldquery - should panic", "query::tests::query_iter_combinations_sparse", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected", "schedule::set::tests::test_derive_schedule_label", "reflect::entity_commands::tests::insert_reflected_with_registry", "schedule::set::tests::test_derive_system_set", "query::tests::query_filtered_iter_combinations", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::continue_breakpoint", "schedule::executor::simple::skip_automatic_sync_points", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::schedules", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::verify_cursor", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::components", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::stepping::single_threaded_executor", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::resize_test", "schedule::tests::system_ambiguity::events", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::read_world", "storage::sparse_set::tests::sparse_sets", "storage::sparse_set::tests::sparse_set", "system::builder::tests::local_builder", "storage::table::tests::table", "system::builder::tests::query_builder", "system::builder::tests::multi_param_builder", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::append", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::commands", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::commands::tests::remove_components_by_id", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "system::system::tests::run_system_once", "system::system::tests::non_send_resources", "system::system::tests::run_two_systems", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::conditions::system_with_condition", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::tests::system_ordering::order_exclusive_systems", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_name::tests::test_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "event::tests::test_event_mutator_iter_nth", "schedule::schedule::tests::configure_set_on_new_schedule", "event::tests::test_event_reader_iter_nth", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_struct_variants", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_name_collision", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::stepping::tests::step_run_if_false", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::system_registry::tests::change_detection", "schedule::tests::system_ambiguity::read_only", "system::system_param::tests::system_param_flexibility", "system::system_registry::tests::exclusive_system", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::systems_with_distributive_condition", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::param_set_non_send_first", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::system_execution::run_system", "system::system_registry::tests::output_values", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system_registry::tests::nested_systems_with_inputs", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::system_param::tests::non_sync_local", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::disable_auto_sync_points", "system::system_registry::tests::local_variables", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::set::tests::test_schedule_label", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "system::tests::any_of_and_without", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_with_and_without_common", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::assert_systems", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::commands_param_set", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::any_of_working", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::immutable_mut_test", "query::tests::par_iter_mut_change_detection", "schedule::condition::tests::run_condition_combinators", "schedule::condition::tests::run_condition", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::long_life_test", "system::tests::changed_resource_system", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::convert_mut_to_immut", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::disjoint_query_mut_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::non_send_option_system", "system::tests::local_system", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "event::tests::test_event_cursor_par_read_mut", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::into_iter_impl", "schedule::tests::system_ordering::order_systems", "system::tests::or_expanded_nested_with_and_common_nested_without", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_has_filter_with", "system::tests::or_expanded_with_and_without_common", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::query_validates_world_id - should panic", "system::tests::read_system_state", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::system_state_archetype_update", "system::tests::system_state_change_detection", "system::tests::query_is_empty", "system::tests::or_param_set_system", "system::tests::query_set_system", "system::tests::panic_inside_system - should panic", "system::tests::system_state_invalid_world - should panic", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "event::tests::test_event_cursor_par_read", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::changed_query", "tests::added_tracking", "system::tests::world_collections_system", "tests::add_remove_components", "tests::clear_entities", "tests::despawn_mixed_storage", "system::tests::test_combinator_clone", "tests::despawn_table_storage", "system::tests::removal_tracking", "tests::duplicate_components_panic - should panic", "tests::changed_trackers", "tests::empty_spawn", "tests::entity_ref_and_mut_query_panic - should panic", "tests::changed_trackers_sparse", "tests::filtered_query_access", "tests::exact_size_query", "tests::bundle_derive", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch", "tests::multiple_worlds_same_query_for_each - should panic", "tests::non_send_resource", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::par_for_each_sparse", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_dense", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_get", "tests::query_missing_component", "tests::query_optional_component_sparse", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::query_single_component_for_each", "tests::query_sparse_component", "tests::remove_missing", "tests::remove", "tests::reserve_and_spawn", "tests::remove_tracking", "tests::resource", "query::tests::query_filtered_exactsizeiterator_len", "tests::reserve_entities_across_worlds", "tests::resource_scope", "tests::sparse_set_add_remove_many", "tests::spawn_batch", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::take", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "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_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_reflect", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::tests::test_verify_unique_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1009) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1001) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1072) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 166) - 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 106) - compile fail", "crates/bevy_ecs/src/component.rs - component::Component (line 141)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/component.rs - component::Component (line 106)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1088)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/component.rs - component::Component (line 176)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 695)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 208)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 545)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 753)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1324)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1338)", "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::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::xnor (line 379) - compile fail", "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 (line 24)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "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/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 806)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 778)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 743)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 933)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 844)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1649)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 63)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 208)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 671)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 640)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1672)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 447)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 677)", "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 65)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/lib.rs - (line 94)", "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_changed (line 715)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 245)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 790)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 189)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 569)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 353)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "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 156)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "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 (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 462) - compile fail", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 473)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1551)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1575) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 562)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 615)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 375)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 428)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 45)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1328)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 730)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 282)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 589)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 873)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 315)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1053)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 250)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 617)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 675)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1006)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 128)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 908)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 161)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 794)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1113)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 69)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 470)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 646)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1159)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1136)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 321)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 433)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "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 (line 822)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1508)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 350)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 116) - compile", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "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::Local (line 786)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "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_mut (line 1157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 49)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 763)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 908)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1551)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 178)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 195)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1363)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1636)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1152)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1603)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1743)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1548)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1416)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 385)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 340)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 266)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1720)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1492)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1109)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1518)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 314)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1577)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 374)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 219)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 803)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2495)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2272)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1696)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1800)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1663)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 422)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 540)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1775)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1808)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 834)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 697)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 610)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1056)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 745)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 413)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 575)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1077)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 925)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2517)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1218)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 467)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 456)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2594)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2857)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1971)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1024)", "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 1249)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 892)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1182)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,380
bevyengine__bevy-14380
[ "14378" ]
a8530ebbc83f6f53751bfbcfc128db0764a5d2b3
diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -74,6 +74,11 @@ pub trait Array: PartialReflect { values: self.iter().map(PartialReflect::clone_value).collect(), } } + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_array_info(&self) -> Option<&'static ArrayInfo> { + self.get_represented_type_info()?.as_array().ok() + } } /// A container for compile-time array info. diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -133,6 +133,13 @@ pub trait Enum: PartialReflect { fn variant_path(&self) -> String { format!("{}::{}", self.reflect_type_path(), self.variant_name()) } + + /// Will return `None` if [`TypeInfo`] is not available. + /// + /// [`TypeInfo`]: crate::TypeInfo + fn get_represented_enum_info(&self) -> Option<&'static EnumInfo> { + self.get_represented_type_info()?.as_enum().ok() + } } /// A container for compile-time enum info, used by [`TypeInfo`](crate::TypeInfo). diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -109,6 +109,11 @@ pub trait List: PartialReflect { values: self.iter().map(PartialReflect::clone_value).collect(), } } + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_list_info(&self) -> Option<&'static ListInfo> { + self.get_represented_type_info()?.as_list().ok() + } } /// A container for compile-time list info. diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -99,6 +99,11 @@ pub trait Map: PartialReflect { /// If the map did not have this key present, `None` is returned. /// If the map did have this key present, the removed value is returned. fn remove(&mut self, key: &dyn PartialReflect) -> Option<Box<dyn PartialReflect>>; + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_map_info(&self) -> Option<&'static MapInfo> { + self.get_represented_type_info()?.as_map().ok() + } } /// A container for compile-time map info. diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -73,6 +73,11 @@ pub trait Struct: PartialReflect { /// Clones the struct into a [`DynamicStruct`]. fn clone_dynamic(&self) -> DynamicStruct; + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_struct_info(&self) -> Option<&'static StructInfo> { + self.get_represented_type_info()?.as_struct().ok() + } } /// A container for compile-time named struct info. diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -56,6 +56,11 @@ pub trait Tuple: PartialReflect { /// Clones the struct into a [`DynamicTuple`]. fn clone_dynamic(&self) -> DynamicTuple; + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_tuple_info(&self) -> Option<&'static TupleInfo> { + self.get_represented_type_info()?.as_tuple().ok() + } } /// An iterator over the field values of a tuple. diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -57,6 +57,11 @@ pub trait TupleStruct: PartialReflect { /// Clones the struct into a [`DynamicTupleStruct`]. fn clone_dynamic(&self) -> DynamicTupleStruct; + + /// Will return `None` if [`TypeInfo`] is not available. + fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo> { + self.get_represented_type_info()?.as_tuple_struct().ok() + } } /// A container for compile-time tuple struct info.
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1864,6 +1864,41 @@ mod tests { assert!(info.is::<MyValue>()); } + #[test] + fn get_represented_kind_info() { + #[derive(Reflect)] + struct SomeStruct; + + #[derive(Reflect)] + struct SomeTupleStruct(f32); + + #[derive(Reflect)] + enum SomeEnum { + Foo, + Bar, + } + + let dyn_struct: &dyn Struct = &SomeStruct; + let _: &StructInfo = dyn_struct.get_represented_struct_info().unwrap(); + + let dyn_map: &dyn Map = &HashMap::<(), ()>::default(); + let _: &MapInfo = dyn_map.get_represented_map_info().unwrap(); + + let dyn_array: &dyn Array = &[1, 2, 3]; + let _: &ArrayInfo = dyn_array.get_represented_array_info().unwrap(); + + let dyn_list: &dyn List = &vec![1, 2, 3]; + let _: &ListInfo = dyn_list.get_represented_list_info().unwrap(); + + let dyn_tuple_struct: &dyn TupleStruct = &SomeTupleStruct(5.0); + let _: &TupleStructInfo = dyn_tuple_struct + .get_represented_tuple_struct_info() + .unwrap(); + + let dyn_enum: &dyn Enum = &SomeEnum::Foo; + let _: &EnumInfo = dyn_enum.get_represented_enum_info().unwrap(); + } + #[test] fn should_permit_higher_ranked_lifetimes() { #[derive(Reflect)]
bevy_reflect: Consider API for getting kind info ## What problem does this solve or what need does it fill? Let's say I have this: ```rust if let bevy_reflect::ReflectMut::Struct(s) = reflected.reflect_mut() { let Some(bevy_reflect::TypeInfo::Struct(info)) = s.get_represented_type_info() else { return; } } ``` In order to get the `StructInfo` type I need to do this extra match where I specifically ask for a `StructInfo`. But since I already got `s` from `Struct(s)`, from a usage perspective it feels like it should be implied that I want a `StructInfo` and not an e.g. `EnumInfo`. ## What solution would you like? ```rust if let bevy_reflect::ReflectMut::Struct(s) = reflected.reflect_mut() { let Some(info) = s.get_kind_info() else { return; } } ``` Something along the lines of the above, but also for `MapInfo`, `ListInfo`, etc.
Seems reasonable. Want to put together a PR? Yeah this would be a good improvement. Although, rather than `get_kind_info` maybe we should call it `get_represented_kind_info` since it's the info of the represented type that we want (and for parity with the method on `Reflect`). > Seems reasonable. Want to put together a PR? Taking a look. > maybe we should call it `get_represented_kind_info` Sounds good
2024-07-18T17:37:45Z
1.81
2024-10-15T02:25:58Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "array::tests::next_index_increment", "attributes::tests::should_allow_unit_struct_attribute_values", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::dynamic_enum_should_return_is_dynamic", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_apply", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::variants::tests::should_return_error_on_invalid_cast", "enums::tests::should_skip_ignored_fields", "func::args::list::tests::should_pop_args_in_reverse_order", "func::args::list::tests::should_push_arg_with_correct_ownership", "func::args::list::tests::should_push_arguments_in_order", "func::args::list::tests::should_reindex_on_push_after_take", "func::args::list::tests::should_take_args_in_order", "func::dynamic_function::tests::should_allow_recursive_dynamic_function", "func::dynamic_function::tests::should_apply_function", "func::dynamic_function::tests::should_clone_dynamic_function", "func::dynamic_function::tests::should_convert_dynamic_function_with_into_function", "func::dynamic_function::tests::should_return_error_on_arg_count_mismatch", "func::dynamic_function::tests::should_overwrite_function_name", "func::dynamic_function_mut::tests::should_convert_dynamic_function_mut_with_into_function", "func::dynamic_function_mut::tests::should_overwrite_function_name", "func::dynamic_function_mut::tests::should_return_error_on_arg_count_mismatch", "func::function::tests::should_call_dyn_function", "func::info::tests::should_create_anonymous_function_info", "func::info::tests::should_create_closure_info", "func::info::tests::should_create_function_info", "func::info::tests::should_create_function_pointer_info", "func::into_function::tests::should_create_dynamic_function_from_closure", "func::into_function::tests::should_create_dynamic_function_from_function", "func::into_function::tests::should_default_closure_name_to_none", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_closure_with_mutable_capture", "func::into_function_mut::tests::should_create_dynamic_function_mut_from_function", "func::into_function_mut::tests::should_default_closure_name_to_none", "func::registry::tests::should_allow_overwriting_registration", "func::registry::tests::should_call_function_via_registry", "func::registry::tests::should_debug_function_registry", "func::registry::tests::should_error_on_missing_name", "func::registry::tests::should_only_register_function_once", "func::registry::tests::should_register_anonymous_function", "func::registry::tests::should_register_closure", "func::registry::tests::should_register_dynamic_closure", "func::registry::tests::should_register_dynamic_function", "func::registry::tests::should_register_function", "func::tests::should_error_on_invalid_arg_ownership", "func::tests::should_error_on_invalid_arg_type", "func::tests::should_error_on_missing_args", "func::tests::should_error_on_too_many_args", "generics::tests::should_maintain_order", "generics::tests::should_get_by_name", "generics::tests::should_store_defaults", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::static_str_should_from_reflect", "impls::glam::tests::euler_rot_serialization", "impls::glam::tests::euler_rot_deserialization", "kind::tests::should_cast_owned", "kind::tests::should_cast_ref", "list::tests::next_index_increment", "kind::tests::should_cast_mut", "map::tests::remove", "impls::std::tests::type_id_should_from_reflect", "map::tests::test_map_get_at", "path::parse::test::parse_invalid", "map::tests::test_map_get_at_mut", "list::tests::test_into_iter", "map::tests::test_into_iter", "map::tests::next_index_increment", "path::tests::accept_leading_tokens", "path::tests::reflect_array_behaves_like_list", "path::tests::parsed_path_parse", "path::tests::try_from", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "serde::de::tests::functions::should_not_deserialize_function", "serde::de::tests::should_return_error_if_missing_type_data", "serde::de::tests::should_deserialize_value", "serde::ser::tests::functions::should_not_serialize_function", "struct_trait::tests::next_index_increment", "serde::ser::tests::debug_stack::should_report_context_in_errors", "serde::ser::tests::should_return_error_if_missing_type_data", "tests::docstrings::should_not_contain_docs", "tests::docstrings::fields_should_contain_docs", "tests::as_reflect", "serde::de::tests::should_deserialize_option", "set::tests::test_into_iter", "serde::ser::tests::should_return_error_if_missing_registration", "tests::custom_debug_function", "serde::de::tests::enum_should_deserialize", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::de::tests::should_deserialized_typed", "tests::assert_impl_reflect_macro_on_all", "serde::de::tests::should_deserialize_non_self_describing_binary", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::glam::quat_deserialization", "tests::from_reflect_should_use_default_container_attribute", "tests::docstrings::variants_should_contain_docs", "serde::ser::tests::should_serialize_dynamic_option", "tests::reflect_downcast", "tests::can_opt_out_type_path", "tests::reflect_ignore", "tests::from_reflect_should_use_default_field_attributes", "tests::recursive_registration_does_not_hang", "tests::reflect_map", "tests::glam::vec3_apply_dynamic", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "tests::into_reflect", "serde::de::tests::debug_stack::should_report_context_in_errors", "tests::recursive_typed_storage_does_not_hang", "serde::tests::test_serialization_struct", "serde::ser::tests::enum_should_serialize", "serde::tests::type_data::should_serialize_with_serialize_with_registry", "serde::de::tests::should_deserialize", "tests::docstrings::should_contain_docs", "tests::not_dynamic_names", "serde::tests::should_roundtrip_proxied_dynamic", "tests::multiple_reflect_lists", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::should_allow_empty_custom_where", "tests::reflect_take", "tests::reflect_struct", "serde::tests::type_data::should_serialize_single_tuple_struct_as_newtype", "serde::ser::tests::should_serialize_self_describing_binary", "tests::glam::vec3_serialization", "tests::reflect_complex_patch", "tests::dynamic_types_debug_format", "tests::should_permit_higher_ranked_lifetimes", "tests::should_permit_valid_represented_type_for_dynamic", "tests::reflect_type_path", "tests::should_drain_fields", "serde::ser::tests::should_serialize_non_self_describing_binary", "tests::glam::vec3_deserialization", "tests::glam::quat_serialization", "tests::should_not_auto_register_existing_types", "serde::ser::tests::should_serialize_option", "serde::ser::tests::should_serialize", "tests::should_reflect_nested_remote_type", "tests::should_reflect_remote_type_from_module", "tests::should_call_from_reflect_dynamically", "tests::should_allow_multiple_custom_where", "tests::should_auto_register_fields", "serde::tests::type_data::should_deserialize_with_deserialize_with_registry", "serde::tests::test_serialization_tuple_struct", "tests::should_allow_dynamic_fields", "tests::should_reflect_remote_value_type", "tests::should_take_nested_remote_type", "tests::should_allow_custom_where_with_assoc_type", "tests::should_reflect_remote_enum", "tests::should_take_remote_type", "tests::should_try_take_remote_type", "tests::should_reflect_remote_type", "tests::should_reflect_nested_remote_enum", "tests::should_reflect_debug", "tests::try_apply_should_detect_kinds", "tests::std_type_paths", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::reflect_map_no_hash - should panic", "tests::reflect_map_no_hash_dynamic - should panic", "tests::reflect_map_no_hash_dynamic_representing - should panic", "serde::de::tests::should_deserialize_self_describing_binary", "tests::reflect_type_info", "type_registry::test::test_reflect_from_ptr", "tuple::tests::next_index_increment", "type_registry::test::type_data_iter", "type_registry::test::type_data_iter_mut", "tuple_struct::tests::next_index_increment", "type_info::tests::should_return_error_on_invalid_cast", "tests::reflect_serialize", "serde::de::tests::should_reserialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 16)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 60)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 78)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 34)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 26)", "crates/bevy_reflect/src/func/mod.rs - func (line 47)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 70)", "crates/bevy_reflect/src/func/mod.rs - func (line 60)", "crates/bevy_reflect/src/reflectable.rs - reflectable::Reflectable (line 22)", "crates/bevy_reflect/src/lib.rs - (line 86)", "crates/bevy_reflect/src/lib.rs - (line 347)", "crates/bevy_reflect/src/remote.rs - remote::ReflectRemote (line 22)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_ref (line 112)", "crates/bevy_reflect/src/func/info.rs - func::info::TypedFunction (line 193)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take (line 49)", "crates/bevy_reflect/src/lib.rs - (line 156)", "crates/bevy_reflect/src/array.rs - array::Array (line 32)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction (line 34)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_owned (line 237)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call_once (line 155)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 329)", "crates/bevy_reflect/src/func/dynamic_function.rs - func::dynamic_function::DynamicFunction<'env>::call (line 96)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 43)", "crates/bevy_reflect/src/func/function.rs - func::function::Function (line 18)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop (line 209)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_mut (line 275)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_owned (line 77)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 84)", "crates/bevy_reflect/src/lib.rs - (line 228)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 317)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_mut (line 184)", "crates/bevy_reflect/src/lib.rs - (line 242)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 161)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 83)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 147)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 34)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 124)", "crates/bevy_reflect/src/lib.rs - (line 326)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/lib.rs - (line 134)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 188)", "crates/bevy_reflect/src/map.rs - map::Map (line 31)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 28)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 139)", "crates/bevy_reflect/src/set.rs - set::set_debug (line 433)", "crates/bevy_reflect/src/lib.rs - (line 194)", "crates/bevy_reflect/src/func/mod.rs - func (line 17)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_ref (line 165)", "crates/bevy_reflect/src/set.rs - set::Set (line 31)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::TypedReflectSerializer (line 106)", "crates/bevy_reflect/src/func/reflect_fn.rs - func::reflect_fn::ReflectFn (line 39)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 341)", "crates/bevy_reflect/src/lib.rs - (line 208)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 374)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 63)", "crates/bevy_reflect/src/func/reflect_fn_mut.rs - func::reflect_fn_mut::ReflectFnMut (line 41)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 183)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 64)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::pop_ref (line 256)", "crates/bevy_reflect/src/generics.rs - generics::TypeParamInfo::default (line 139)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 49)", "crates/bevy_reflect/src/func/mod.rs - func (line 102)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 17)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList (line 14)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 27)", "crates/bevy_reflect/src/func/args/arg.rs - func::args::arg::Arg<'a>::take_mut (line 151)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register (line 84)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut<'env>::call (line 112)", "crates/bevy_reflect/src/lib.rs - (line 267)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take (line 118)", "crates/bevy_reflect/src/func/args/list.rs - func::args::list::ArgList<'a>::take_owned (line 146)", "crates/bevy_reflect/src/func/registry.rs - func::registry::FunctionRegistry::register_with_name (line 154)", "crates/bevy_reflect/src/lib.rs - (line 298)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 455)", "crates/bevy_reflect/src/list.rs - list::List (line 40)", "crates/bevy_reflect/src/func/dynamic_function_mut.rs - func::dynamic_function_mut::DynamicFunctionMut (line 29)", "crates/bevy_reflect/src/generics.rs - generics::ConstParamInfo::default (line 197)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 353)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 183)", "crates/bevy_reflect/src/lib.rs - (line 366)", "crates/bevy_reflect/src/type_info.rs - type_info::Type (line 361)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 256)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 213)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 28)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::TypedReflectDeserializer (line 180)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 68)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 27)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 746)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 133)", "crates/bevy_reflect/src/lib.rs - (line 409)", "crates/bevy_reflect/src/serde/de/deserializer.rs - serde::de::deserializer::ReflectDeserializer (line 47)", "crates/bevy_reflect/src/serde/ser/serializer.rs - serde::ser::serializer::ReflectSerializer (line 28)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,212
bevyengine__bevy-14212
[ "14202" ]
2553c3ade850bb0a80df1c6f1a447be202635a3c
diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -56,6 +56,7 @@ pub fn derive_component(input: TokenStream) -> TokenStream { let on_add = hook_register_function_call(quote! {on_add}, attrs.on_add); let on_insert = hook_register_function_call(quote! {on_insert}, attrs.on_insert); + let on_replace = hook_register_function_call(quote! {on_replace}, attrs.on_replace); let on_remove = hook_register_function_call(quote! {on_remove}, attrs.on_remove); ast.generics diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -74,6 +75,7 @@ pub fn derive_component(input: TokenStream) -> TokenStream { fn register_component_hooks(hooks: &mut #bevy_ecs_path::component::ComponentHooks) { #on_add #on_insert + #on_replace #on_remove } } diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -84,12 +86,14 @@ pub const COMPONENT: &str = "component"; pub const STORAGE: &str = "storage"; pub const ON_ADD: &str = "on_add"; pub const ON_INSERT: &str = "on_insert"; +pub const ON_REPLACE: &str = "on_replace"; pub const ON_REMOVE: &str = "on_remove"; struct Attrs { storage: StorageTy, on_add: Option<ExprPath>, on_insert: Option<ExprPath>, + on_replace: Option<ExprPath>, on_remove: Option<ExprPath>, } diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -108,6 +112,7 @@ fn parse_component_attr(ast: &DeriveInput) -> Result<Attrs> { storage: StorageTy::Table, on_add: None, on_insert: None, + on_replace: None, on_remove: None, }; diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -130,6 +135,9 @@ fn parse_component_attr(ast: &DeriveInput) -> Result<Attrs> { } else if nested.path.is_ident(ON_INSERT) { attrs.on_insert = Some(nested.value()?.parse::<ExprPath>()?); Ok(()) + } else if nested.path.is_ident(ON_REPLACE) { + attrs.on_replace = Some(nested.value()?.parse::<ExprPath>()?); + Ok(()) } else if nested.path.is_ident(ON_REMOVE) { attrs.on_remove = Some(nested.value()?.parse::<ExprPath>()?); Ok(()) diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -121,6 +121,7 @@ pub(crate) struct AddBundle { /// indicate if the component is newly added to the target archetype or if it already existed pub bundle_status: Vec<ComponentStatus>, pub added: Vec<ComponentId>, + pub mutated: Vec<ComponentId>, } /// This trait is used to report the status of [`Bundle`](crate::bundle::Bundle) components diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -205,6 +206,7 @@ impl Edges { archetype_id: ArchetypeId, bundle_status: Vec<ComponentStatus>, added: Vec<ComponentId>, + mutated: Vec<ComponentId>, ) { self.add_bundle.insert( bundle_id, diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -212,6 +214,7 @@ impl Edges { archetype_id, bundle_status, added, + mutated, }, ); } diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -317,10 +320,12 @@ bitflags::bitflags! { pub(crate) struct ArchetypeFlags: u32 { const ON_ADD_HOOK = (1 << 0); const ON_INSERT_HOOK = (1 << 1); - const ON_REMOVE_HOOK = (1 << 2); - const ON_ADD_OBSERVER = (1 << 3); - const ON_INSERT_OBSERVER = (1 << 4); - const ON_REMOVE_OBSERVER = (1 << 5); + const ON_REPLACE_HOOK = (1 << 2); + const ON_REMOVE_HOOK = (1 << 3); + const ON_ADD_OBSERVER = (1 << 4); + const ON_INSERT_OBSERVER = (1 << 5); + const ON_REPLACE_OBSERVER = (1 << 6); + const ON_REMOVE_OBSERVER = (1 << 7); } } diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -600,6 +605,12 @@ impl Archetype { self.flags().contains(ArchetypeFlags::ON_INSERT_HOOK) } + /// Returns true if any of the components in this archetype have `on_replace` hooks + #[inline] + pub fn has_replace_hook(&self) -> bool { + self.flags().contains(ArchetypeFlags::ON_REPLACE_HOOK) + } + /// Returns true if any of the components in this archetype have `on_remove` hooks #[inline] pub fn has_remove_hook(&self) -> bool { diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -622,6 +633,14 @@ impl Archetype { self.flags().contains(ArchetypeFlags::ON_INSERT_OBSERVER) } + /// Returns true if any of the components in this archetype have at least one [`OnReplace`] observer + /// + /// [`OnReplace`]: crate::world::OnReplace + #[inline] + pub fn has_replace_observer(&self) -> bool { + self.flags().contains(ArchetypeFlags::ON_REPLACE_OBSERVER) + } + /// Returns true if any of the components in this archetype have at least one [`OnRemove`] observer /// /// [`OnRemove`]: crate::world::OnRemove diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -17,7 +17,7 @@ use crate::{ prelude::World, query::DebugCheckedUnwrap, storage::{SparseSetIndex, SparseSets, Storages, Table, TableRow}, - world::{unsafe_world_cell::UnsafeWorldCell, ON_ADD, ON_INSERT}, + world::{unsafe_world_cell::UnsafeWorldCell, ON_ADD, ON_INSERT, ON_REPLACE}, }; use bevy_ptr::{ConstNonNull, OwningPtr}; diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -456,11 +456,13 @@ impl BundleInfo { let mut new_sparse_set_components = Vec::new(); let mut bundle_status = Vec::with_capacity(self.component_ids.len()); let mut added = Vec::new(); + let mut mutated = Vec::new(); let current_archetype = &mut archetypes[archetype_id]; for component_id in self.component_ids.iter().cloned() { if current_archetype.contains(component_id) { bundle_status.push(ComponentStatus::Mutated); + mutated.push(component_id); } else { bundle_status.push(ComponentStatus::Added); added.push(component_id); diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -476,7 +478,7 @@ impl BundleInfo { if new_table_components.is_empty() && new_sparse_set_components.is_empty() { let edges = current_archetype.edges_mut(); // the archetype does not change when we add this bundle - edges.insert_add_bundle(self.id, archetype_id, bundle_status, added); + edges.insert_add_bundle(self.id, archetype_id, bundle_status, added, mutated); archetype_id } else { let table_id; diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -526,6 +528,7 @@ impl BundleInfo { new_archetype_id, bundle_status, added, + mutated, ); new_archetype_id } diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -665,6 +668,30 @@ impl<'w> BundleInserter<'w> { let bundle_info = self.bundle_info.as_ref(); let add_bundle = self.add_bundle.as_ref(); let table = self.table.as_mut(); + let archetype = self.archetype.as_ref(); + + // SAFETY: All components in the bundle are guaranteed to exist in the World + // as they must be initialized before creating the BundleInfo. + unsafe { + // SAFETY: Mutable references do not alias and will be dropped after this block + let mut deferred_world = self.world.into_deferred(); + + deferred_world.trigger_on_replace( + archetype, + entity, + add_bundle.mutated.iter().copied(), + ); + if archetype.has_replace_observer() { + deferred_world.trigger_observers( + ON_REPLACE, + entity, + add_bundle.mutated.iter().copied(), + ); + } + } + + // SAFETY: Archetype gets borrowed when running the on_replace observers above, + // so this reference can only be promoted from shared to &mut down here, after they have been ran let archetype = self.archetype.as_mut(); let (new_archetype, new_location) = match &mut self.result { diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -100,6 +100,7 @@ use std::{ /// Alternatively to the example shown in [`ComponentHooks`]' documentation, hooks can be configured using following attributes: /// - `#[component(on_add = on_add_function)]` /// - `#[component(on_insert = on_insert_function)]` +/// - `#[component(on_replace = on_replace_function)]` /// - `#[component(on_remove = on_remove_function)]` /// /// ``` diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -114,8 +115,8 @@ use std::{ /// // Another possible way of configuring hooks: /// // #[component(on_add = my_on_add_hook, on_insert = my_on_insert_hook)] /// // -/// // We don't have a remove hook, so we can leave it out: -/// // #[component(on_remove = my_on_remove_hook)] +/// // We don't have a replace or remove hook, so we can leave them out: +/// // #[component(on_replace = my_on_replace_hook, on_remove = my_on_remove_hook)] /// struct ComponentA; /// /// fn my_on_add_hook(world: DeferredWorld, entity: Entity, id: ComponentId) { diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -280,6 +281,7 @@ pub type ComponentHook = for<'w> fn(DeferredWorld<'w>, Entity, ComponentId); pub struct ComponentHooks { pub(crate) on_add: Option<ComponentHook>, pub(crate) on_insert: Option<ComponentHook>, + pub(crate) on_replace: Option<ComponentHook>, pub(crate) on_remove: Option<ComponentHook>, } diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -314,6 +316,28 @@ impl ComponentHooks { .expect("Component id: {:?}, already has an on_insert hook") } + /// Register a [`ComponentHook`] that will be run when this component is about to be dropped, + /// such as being replaced (with `.insert`) or removed. + /// + /// If this component is inserted onto an entity that already has it, this hook will run before the value is replaced, + /// allowing access to the previous data just before it is dropped. + /// This hook does *not* run if the entity did not already have this component. + /// + /// An `on_replace` hook always runs before any `on_remove` hooks (if the component is being removed from the entity). + /// + /// # Warning + /// + /// The hook won't run if the component is already present and is only mutated, such as in a system via a query. + /// As a result, this is *not* an appropriate mechanism for reliably updating indexes and other caches. + /// + /// # Panics + /// + /// Will panic if the component already has an `on_replace` hook + pub fn on_replace(&mut self, hook: ComponentHook) -> &mut Self { + self.try_on_replace(hook) + .expect("Component id: {:?}, already has an on_replace hook") + } + /// Register a [`ComponentHook`] that will be run when this component is removed from an entity. /// Despawning an entity counts as removing all of its components. /// diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -351,6 +375,19 @@ impl ComponentHooks { Some(self) } + /// Attempt to register a [`ComponentHook`] that will be run when this component is replaced (with `.insert`) or removed + /// + /// This is a fallible version of [`Self::on_replace`]. + /// + /// Returns `None` if the component already has an `on_replace` hook. + pub fn try_on_replace(&mut self, hook: ComponentHook) -> Option<&mut Self> { + if self.on_replace.is_some() { + return None; + } + self.on_replace = Some(hook); + Some(self) + } + /// Attempt to register a [`ComponentHook`] that will be run when this component is removed from an entity. /// /// This is a fallible version of [`Self::on_remove`]. diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -442,6 +479,9 @@ impl ComponentInfo { if self.hooks().on_insert.is_some() { flags.insert(ArchetypeFlags::ON_INSERT_HOOK); } + if self.hooks().on_replace.is_some() { + flags.insert(ArchetypeFlags::ON_REPLACE_HOOK); + } if self.hooks().on_remove.is_some() { flags.insert(ArchetypeFlags::ON_REMOVE_HOOK); } diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -60,7 +60,8 @@ pub mod prelude { SystemParamFunction, }, world::{ - EntityMut, EntityRef, EntityWorldMut, FromWorld, OnAdd, OnInsert, OnRemove, World, + EntityMut, EntityRef, EntityWorldMut, FromWorld, OnAdd, OnInsert, OnRemove, OnReplace, + World, }, }; } 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 @@ -143,6 +143,7 @@ pub struct Observers { // Cached ECS observers to save a lookup most common triggers. on_add: CachedObservers, on_insert: CachedObservers, + on_replace: CachedObservers, on_remove: CachedObservers, // Map from trigger type to set of observers cache: HashMap<ComponentId, CachedObservers>, 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 @@ -153,6 +154,7 @@ impl Observers { match event_type { ON_ADD => &mut self.on_add, ON_INSERT => &mut self.on_insert, + ON_REPLACE => &mut self.on_replace, ON_REMOVE => &mut self.on_remove, _ => self.cache.entry(event_type).or_default(), } 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 @@ -162,6 +164,7 @@ impl Observers { match event_type { ON_ADD => Some(&self.on_add), ON_INSERT => Some(&self.on_insert), + ON_REPLACE => Some(&self.on_replace), ON_REMOVE => Some(&self.on_remove), _ => self.cache.get(&event_type), } 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 @@ -231,6 +234,7 @@ impl Observers { match event_type { ON_ADD => Some(ArchetypeFlags::ON_ADD_OBSERVER), ON_INSERT => Some(ArchetypeFlags::ON_INSERT_OBSERVER), + ON_REPLACE => Some(ArchetypeFlags::ON_REPLACE_OBSERVER), ON_REMOVE => Some(ArchetypeFlags::ON_REMOVE_OBSERVER), _ => None, } 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 @@ -244,6 +248,7 @@ impl Observers { if self.on_add.component_observers.contains_key(&component_id) { flags.insert(ArchetypeFlags::ON_ADD_OBSERVER); } + if self .on_insert .component_observers 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 @@ -251,6 +256,15 @@ impl Observers { { flags.insert(ArchetypeFlags::ON_INSERT_OBSERVER); } + + if self + .on_replace + .component_observers + .contains_key(&component_id) + { + flags.insert(ArchetypeFlags::ON_REPLACE_OBSERVER); + } + if self .on_remove .component_observers diff --git a/crates/bevy_ecs/src/world/component_constants.rs b/crates/bevy_ecs/src/world/component_constants.rs --- a/crates/bevy_ecs/src/world/component_constants.rs +++ b/crates/bevy_ecs/src/world/component_constants.rs @@ -7,8 +7,10 @@ use crate::{self as bevy_ecs}; pub const ON_ADD: ComponentId = ComponentId::new(0); /// [`ComponentId`] for [`OnInsert`] pub const ON_INSERT: ComponentId = ComponentId::new(1); +/// [`ComponentId`] for [`OnReplace`] +pub const ON_REPLACE: ComponentId = ComponentId::new(2); /// [`ComponentId`] for [`OnRemove`] -pub const ON_REMOVE: ComponentId = ComponentId::new(2); +pub const ON_REMOVE: ComponentId = ComponentId::new(3); /// Trigger emitted when a component is added to an entity. #[derive(Event)] diff --git a/crates/bevy_ecs/src/world/component_constants.rs b/crates/bevy_ecs/src/world/component_constants.rs --- a/crates/bevy_ecs/src/world/component_constants.rs +++ b/crates/bevy_ecs/src/world/component_constants.rs @@ -18,6 +20,10 @@ pub struct OnAdd; #[derive(Event)] pub struct OnInsert; +/// Trigger emitted when a component is replaced on an entity. +#[derive(Event)] +pub struct OnReplace; + /// Trigger emitted when a component is removed from an entity. #[derive(Event)] pub struct OnRemove; diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -316,6 +316,28 @@ impl<'w> DeferredWorld<'w> { } } + /// Triggers all `on_replace` hooks for [`ComponentId`] in target. + /// + /// # Safety + /// Caller must ensure [`ComponentId`] in target exist in self. + #[inline] + pub(crate) unsafe fn trigger_on_replace( + &mut self, + archetype: &Archetype, + entity: Entity, + targets: impl Iterator<Item = ComponentId>, + ) { + if archetype.has_replace_hook() { + for component_id in targets { + // SAFETY: Caller ensures that these components exist + let hooks = unsafe { self.components().get_info_unchecked(component_id) }.hooks(); + if let Some(hook) = hooks.on_replace { + hook(DeferredWorld { world: self.world }, entity, component_id); + } + } + } + } + /// Triggers all `on_remove` hooks for [`ComponentId`] in target. /// /// # Safety diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -329,9 +351,8 @@ impl<'w> DeferredWorld<'w> { ) { if archetype.has_remove_hook() { for component_id in targets { - let hooks = // SAFETY: Caller ensures that these components exist - unsafe { self.world.components().get_info_unchecked(component_id) }.hooks(); + let hooks = unsafe { self.components().get_info_unchecked(component_id) }.hooks(); if let Some(hook) = hooks.on_remove { hook(DeferredWorld { world: self.world }, entity, component_id); } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -16,7 +16,7 @@ use bevy_ptr::{OwningPtr, Ptr}; use std::{any::TypeId, marker::PhantomData}; use thiserror::Error; -use super::{unsafe_world_cell::UnsafeEntityCell, Ref, ON_REMOVE}; +use super::{unsafe_world_cell::UnsafeEntityCell, Ref, ON_REMOVE, ON_REPLACE}; /// A read-only reference to a particular [`Entity`] and all of its components. /// diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -904,7 +904,7 @@ impl<'w> EntityWorldMut<'w> { // SAFETY: all bundle components exist in World unsafe { - trigger_on_remove_hooks_and_observers( + trigger_on_replace_and_on_remove_hooks_and_observers( &mut deferred_world, old_archetype, entity, diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1085,7 +1085,7 @@ impl<'w> EntityWorldMut<'w> { // SAFETY: all bundle components exist in World unsafe { - trigger_on_remove_hooks_and_observers( + trigger_on_replace_and_on_remove_hooks_and_observers( &mut deferred_world, old_archetype, entity, diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1222,6 +1222,10 @@ impl<'w> EntityWorldMut<'w> { // SAFETY: All components in the archetype exist in world unsafe { + deferred_world.trigger_on_replace(archetype, self.entity, archetype.components()); + if archetype.has_replace_observer() { + deferred_world.trigger_observers(ON_REPLACE, self.entity, archetype.components()); + } deferred_world.trigger_on_remove(archetype, self.entity, archetype.components()); if archetype.has_remove_observer() { deferred_world.trigger_observers(ON_REMOVE, self.entity, archetype.components()); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1423,12 +1427,16 @@ impl<'w> EntityWorldMut<'w> { } /// SAFETY: all components in the archetype must exist in world -unsafe fn trigger_on_remove_hooks_and_observers( +unsafe fn trigger_on_replace_and_on_remove_hooks_and_observers( deferred_world: &mut DeferredWorld, archetype: &Archetype, entity: Entity, bundle_info: &BundleInfo, ) { + deferred_world.trigger_on_replace(archetype, entity, bundle_info.iter_components()); + if archetype.has_replace_observer() { + deferred_world.trigger_observers(ON_REPLACE, entity, bundle_info.iter_components()); + } deferred_world.trigger_on_remove(archetype, entity, bundle_info.iter_components()); if archetype.has_remove_observer() { deferred_world.trigger_observers(ON_REMOVE, entity, bundle_info.iter_components()); 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 @@ -164,6 +164,7 @@ impl World { fn bootstrap(&mut self) { assert_eq!(ON_ADD, self.init_component::<OnAdd>()); assert_eq!(ON_INSERT, self.init_component::<OnInsert>()); + assert_eq!(ON_REPLACE, self.init_component::<OnReplace>()); assert_eq!(ON_REMOVE, self.init_component::<OnRemove>()); } /// Creates a new empty [`World`]. diff --git a/examples/ecs/component_hooks.rs b/examples/ecs/component_hooks.rs --- a/examples/ecs/component_hooks.rs +++ b/examples/ecs/component_hooks.rs @@ -22,7 +22,7 @@ use std::collections::HashMap; /// using [`Component`] derive macro: /// ```no_run /// #[derive(Component)] -/// #[component(on_add = ..., on_insert = ..., on_remove = ...)] +/// #[component(on_add = ..., on_insert = ..., on_replace = ..., on_remove = ...)] /// ``` struct MyComponent(KeyCode); diff --git a/examples/ecs/component_hooks.rs b/examples/ecs/component_hooks.rs --- a/examples/ecs/component_hooks.rs +++ b/examples/ecs/component_hooks.rs @@ -59,7 +59,7 @@ fn setup(world: &mut World) { // This is to prevent overriding hooks defined in plugins and other crates as well as keeping things fast world .register_component_hooks::<MyComponent>() - // There are 3 component lifecycle hooks: `on_add`, `on_insert` and `on_remove` + // There are 4 component lifecycle hooks: `on_add`, `on_insert`, `on_replace` and `on_remove` // A hook has 3 arguments: // - a `DeferredWorld`, this allows access to resource and component data as well as `Commands` // - the entity that triggered the hook diff --git a/examples/ecs/component_hooks.rs b/examples/ecs/component_hooks.rs --- a/examples/ecs/component_hooks.rs +++ b/examples/ecs/component_hooks.rs @@ -85,6 +85,13 @@ fn setup(world: &mut World) { .on_insert(|world, _, _| { println!("Current Index: {:?}", world.resource::<MyComponentIndex>()); }) + // `on_replace` will trigger when a component is inserted onto an entity that already had it, + // and runs before the value is replaced. + // Also triggers when a component is removed from an entity, and runs before `on_remove` + .on_replace(|mut world, entity, _| { + let value = world.get::<MyComponent>(entity).unwrap().0; + world.resource_mut::<MyComponentIndex>().remove(&value); + }) // `on_remove` will trigger when a component is removed from an entity, // since it runs before the component is removed you can still access the component data .on_remove(|mut world, entity, component_id| { diff --git a/examples/ecs/component_hooks.rs b/examples/ecs/component_hooks.rs --- a/examples/ecs/component_hooks.rs +++ b/examples/ecs/component_hooks.rs @@ -93,7 +100,6 @@ fn setup(world: &mut World) { "Component: {:?} removed from: {:?} with value {:?}", component_id, entity, value ); - world.resource_mut::<MyComponentIndex>().remove(&value); // You can also issue commands through `.commands()` world.commands().entity(entity).despawn(); });
diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1132,7 +1159,7 @@ mod tests { struct A; #[derive(Component)] - #[component(on_add = a_on_add, on_insert = a_on_insert, on_remove = a_on_remove)] + #[component(on_add = a_on_add, on_insert = a_on_insert, on_replace = a_on_replace, on_remove = a_on_remove)] struct AMacroHooks; fn a_on_add(mut world: DeferredWorld, _: Entity, _: ComponentId) { diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1143,10 +1170,14 @@ mod tests { world.resource_mut::<R>().assert_order(1); } - fn a_on_remove<T1, T2>(mut world: DeferredWorld, _: T1, _: T2) { + fn a_on_replace<T1, T2>(mut world: DeferredWorld, _: T1, _: T2) { world.resource_mut::<R>().assert_order(2); } + fn a_on_remove<T1, T2>(mut world: DeferredWorld, _: T1, _: T2) { + world.resource_mut::<R>().assert_order(3); + } + #[derive(Component)] struct B; diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1173,15 +1204,14 @@ mod tests { world.init_resource::<R>(); world .register_component_hooks::<A>() - .on_add(|mut world, _, _| { - world.resource_mut::<R>().assert_order(0); - }) + .on_add(|mut world, _, _| world.resource_mut::<R>().assert_order(0)) .on_insert(|mut world, _, _| world.resource_mut::<R>().assert_order(1)) - .on_remove(|mut world, _, _| world.resource_mut::<R>().assert_order(2)); + .on_replace(|mut world, _, _| world.resource_mut::<R>().assert_order(2)) + .on_remove(|mut world, _, _| world.resource_mut::<R>().assert_order(3)); let entity = world.spawn(A).id(); world.despawn(entity); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); } #[test] diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1192,7 +1222,7 @@ mod tests { let entity = world.spawn(AMacroHooks).id(); world.despawn(entity); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); } #[test] diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1201,21 +1231,36 @@ mod tests { world.init_resource::<R>(); world .register_component_hooks::<A>() - .on_add(|mut world, _, _| { - world.resource_mut::<R>().assert_order(0); - }) - .on_insert(|mut world, _, _| { - world.resource_mut::<R>().assert_order(1); - }) - .on_remove(|mut world, _, _| { - world.resource_mut::<R>().assert_order(2); - }); + .on_add(|mut world, _, _| world.resource_mut::<R>().assert_order(0)) + .on_insert(|mut world, _, _| world.resource_mut::<R>().assert_order(1)) + .on_replace(|mut world, _, _| world.resource_mut::<R>().assert_order(2)) + .on_remove(|mut world, _, _| world.resource_mut::<R>().assert_order(3)); let mut entity = world.spawn_empty(); entity.insert(A); entity.remove::<A>(); entity.flush(); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); + } + + #[test] + fn component_hook_order_replace() { + let mut world = World::new(); + world + .register_component_hooks::<A>() + .on_replace(|mut world, _, _| world.resource_mut::<R>().assert_order(0)) + .on_insert(|mut world, _, _| { + if let Some(mut r) = world.get_resource_mut::<R>() { + r.assert_order(1); + } + }); + + let entity = world.spawn(A).id(); + world.init_resource::<R>(); + let mut entity = world.entity_mut(entity); + entity.insert(A); + entity.flush(); + assert_eq!(2, world.resource::<R>().0); } #[test] 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 @@ -391,7 +405,9 @@ mod tests { use bevy_ptr::OwningPtr; use crate as bevy_ecs; - use crate::observer::{EmitDynamicTrigger, Observer, ObserverDescriptor, ObserverState}; + use crate::observer::{ + EmitDynamicTrigger, Observer, ObserverDescriptor, ObserverState, OnReplace, + }; use crate::prelude::*; #[derive(Component)] 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 @@ -428,11 +444,12 @@ mod tests { world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<R>| res.assert_order(0)); world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<R>| res.assert_order(1)); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<R>| res.assert_order(3)); let entity = world.spawn(A).id(); world.despawn(entity); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); } #[test] 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 @@ -442,13 +459,14 @@ mod tests { world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<R>| res.assert_order(0)); world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<R>| res.assert_order(1)); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<R>| res.assert_order(3)); let mut entity = world.spawn_empty(); entity.insert(A); entity.remove::<A>(); entity.flush(); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); } #[test] 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 @@ -458,13 +476,34 @@ mod tests { world.observe(|_: Trigger<OnAdd, S>, mut res: ResMut<R>| res.assert_order(0)); world.observe(|_: Trigger<OnInsert, S>, mut res: ResMut<R>| res.assert_order(1)); - world.observe(|_: Trigger<OnRemove, S>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnReplace, S>, mut res: ResMut<R>| res.assert_order(2)); + world.observe(|_: Trigger<OnRemove, S>, mut res: ResMut<R>| res.assert_order(3)); let mut entity = world.spawn_empty(); entity.insert(S); entity.remove::<S>(); entity.flush(); - assert_eq!(3, world.resource::<R>().0); + assert_eq!(4, world.resource::<R>().0); + } + + #[test] + fn observer_order_replace() { + let mut world = World::new(); + world.init_resource::<R>(); + + let entity = world.spawn(A).id(); + + world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<R>| res.assert_order(0)); + world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<R>| res.assert_order(1)); + + // TODO: ideally this flush is not necessary, but right now observe() returns WorldEntityMut + // and therefore does not automatically flush. + world.flush(); + + let mut entity = world.entity_mut(entity); + entity.insert(A); + entity.flush(); + assert_eq!(2, world.resource::<R>().0); } #[test]
Component Lifecycle Hook for replaced values ## What problem does this solve or what need does it fill? > [Relevant Discord Discussion](https://discord.com/channels/691052431525675048/742569353878437978/1259223920825995305) There are currently three component lifecycle hooks: `on_add`, `on_insert` and `on_remove`. Of these, only `on_insert` runs when a component is replaced with a new value, e.g. with `EntityCommands::insert()`, and only the new value is accessible to the hook. This means there is no easy way to run cleanup code for the old value in this scenario, as `on_remove` by design is not ran for this operation. ## What solution would you like? I propose a new component lifecycle hook that runs in all cases that `on_remove` runs, as well as the above scenario. It can be thought of as a counterpart to `on_remove` in the same way that `on_insert` is a counterpart to `on_add`, in that they are mostly the same except for also running for replace operations. This new hook would run before the replace actually occurs, allowing it to access and perform cleanup for the old value, which is not possible with `on_insert`. The name can of course be bikeshed, but I think it should be called `on_drop`, as the intention is for it to run in any scenario that would result in the component value being dropped. If there are other ways a component value can be dropped that `on_remove` does not trigger for, this new hook should trigger for all those as well. ## What alternative(s) have you considered? One workaround that is currently possible is to create a wrapper component type that has hooks to handle adding/replacing/removing the 'actual' component type, but this adds a lot of complexity and requires unavoidably cloning the component value.
Great: I like the conceptual clarity of this. I think this should be done; just make sure to add the corresponding observer too. I think `on_replace` is the name here.
2024-07-07T21:43:13Z
1.79
2024-10-20T14:18:56Z
612897becd415b7b982f58bd76deb719b42c9790
[ "change_detection::tests::as_deref_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_from_non_send_mut", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_recursive", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_const", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_comparison", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_drain_and_read", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "label::tests::dyn_eq_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_components", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_events", "observer::tests::observer_multiple_matches", "observer::tests::observer_multiple_listeners", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_access_extend", "query::fetch::tests::read_only_field_visibility", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_dynamic_components", "query::fetch::tests::world_query_metadata_collision", "query::access::tests::filtered_combined_access", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_transmute", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_no_target", "query::iter::tests::query_sorts", "query::fetch::tests::world_query_struct_variants", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_changed", "query::state::tests::can_generalize_with_option", "query::builder::tests::builder_or", "observer::tests::observer_order_insert_remove", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_filtered_entity", "observer::tests::observer_order_insert_remove_sparse", "query::builder::tests::builder_static_components", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_to_more_general", "query::state::tests::join_with_get", "observer::tests::observer_order_recursive", "observer::tests::observer_order_spawn_despawn", "query::state::tests::join", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::tests::has_query", "query::tests::query", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::multi_storage_query", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::right_world_get_many - should panic", "query::tests::many_entities", "query::state::tests::cannot_join_wrong_fetch - should panic", "schedule::condition::tests::distributive_run_if_compiles", "schedule::set::tests::test_derive_system_set", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::tests::derived_worldqueries", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::remove_reflected_with_registry", "schedule::set::tests::test_derive_schedule_label", "query::tests::query_iter_combinations", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::stepping_disabled", "schedule::executor::simple::skip_automatic_sync_points", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::clear_system", "reflect::entity_commands::tests::insert_reflected", "schedule::stepping::tests::schedules", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_never_run", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::continue_breakpoint", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::disabled_breakpoint", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_breakpoint", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::exclusive", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::nonsend", "schedule::stepping::tests::waiting_always_run", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::events", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::one_of_everything", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::aligned_zst", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::resources", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::read_world", "storage::sparse_set::tests::sparse_sets", "system::builder::tests::multi_param_builder", "storage::blob_vec::tests::resize_test", "storage::table::tests::table", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::builder::tests::local_builder", "schedule::tests::system_ambiguity::correct_ambiguities", "system::commands::tests::append", "system::builder::tests::query_builder", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::commands::tests::commands", "system::commands::tests::remove_resources", "schedule::stepping::tests::verify_cursor", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_components", "system::system::tests::command_processing", "system::system::tests::non_send_resources", "system::system::tests::run_system_once", "system::commands::tests::remove_components_by_id", "system::system::tests::run_two_systems", "system::system_name::tests::test_system_name_exclusive_param", "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::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::system_ambiguity::read_only", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_phantom_data", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_param::tests::system_param_name_collision", "system::system_registry::tests::input_values", "system::system_param::tests::system_param_where_clause", "system::system_registry::tests::local_variables", "system::system_registry::tests::output_values", "system::system_registry::tests::nested_systems", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::assert_systems", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources - should panic", "system::tests::long_life_test", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::immutable_mut_test", "system::tests::option_has_no_filter_with - should panic", "system::tests::convert_mut_to_immut", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "schedule::tests::stepping::multi_threaded_executor", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::system_execution::run_exclusive_system", "system::tests::non_send_option_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::tests::non_send_system", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::system_param::tests::param_set_non_send_first", "system::tests::any_of_working", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "schedule::tests::system_ordering::order_exclusive_systems", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::system_param::tests::param_set_non_send_second", "system::tests::or_expanded_with_and_without_common", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::add_systems_to_existing_schedule", "system::tests::nonconflicting_system_resources", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_and_without", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::condition::tests::multiple_run_conditions", "system::tests::disjoint_query_mut_read_component_system", "system::tests::or_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_system", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "event::tests::test_event_iter_nth", "system::tests::any_of_with_entity_and_mut", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::tests::query_is_empty", "system::tests::simple_system", "system::system_param::tests::non_sync_local", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::stepping::tests::step_run_if_false", "system::tests::or_expanded_nested_with_and_without_common", "schedule::tests::system_execution::run_system", "system::tests::pipe_change_detection", "system::tests::system_state_change_detection", "system::tests::any_of_with_and_without_common", "system::tests::query_validates_world_id - should panic", "system::tests::system_state_invalid_world - should panic", "tests::added_queries", "tests::add_remove_components", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::conditions::systems_with_distributive_condition", "tests::clear_entities", "schedule::tests::conditions::system_with_condition", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::any_of_has_filter_with_when_both_have_it", "tests::changed_query", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::update_archetype_component_access_works", "tests::added_tracking", "tests::changed_trackers", "tests::bundle_derive", "system::tests::any_of_with_empty_and_mut", "tests::despawn_mixed_storage", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::tests::panic_inside_system - should panic", "system::tests::write_system_state", "schedule::schedule::tests::configure_set_on_new_schedule", "tests::empty_spawn", "tests::despawn_table_storage", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::entity_ref_and_mut_query_panic - should panic", "system::tests::commands_param_set", "tests::changed_trackers_sparse", "schedule::tests::system_ordering::add_systems_correct_order", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::filtered_query_access", "tests::multiple_worlds_same_query_get - should panic", "tests::exact_size_query", "system::tests::or_with_without_and_compatible_with_without", "system::tests::local_system", "tests::insert_overwrite_drop", "tests::multiple_worlds_same_query_iter - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "tests::non_send_resource", "tests::insert_overwrite_drop_sparse", "schedule::set::tests::test_schedule_label", "tests::non_send_resource_drop_from_same_thread", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::tests::world_collections_system", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::or_param_set_system", "tests::non_send_resource_points_to_distinct_data", "tests::multiple_worlds_same_query_for_each - should panic", "tests::duplicate_components_panic - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "system::tests::into_iter_impl", "system::tests::or_has_filter_with", "tests::mut_and_ref_query_panic - should panic", "system::tests::query_set_system", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::changed_resource_system", "tests::query_filter_with", "tests::query_all_for_each", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::inserts_a_sync_point", "system::tests::test_combinator_clone", "schedule::schedule::tests::no_sync_chain::chain_first", "tests::query_filter_with_for_each", "schedule::condition::tests::run_condition", "tests::non_send_resource_drop_from_different_thread - should panic", "schedule::tests::system_ordering::order_systems", "tests::query_all", "tests::par_for_each_dense", "system::tests::removal_tracking", "schedule::condition::tests::run_condition_combinators", "tests::query_filter_with_sparse_for_each", "tests::query_filters_dont_collide_with_fetches", "schedule::schedule::tests::no_sync_chain::chain_second", "tests::query_filter_without", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "tests::query_filter_with_sparse", "tests::query_get_works_across_sparse_removal", "tests::par_for_each_sparse", "tests::non_send_resource_panic - should panic", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_get", "tests::query_missing_component", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_single_component_for_each", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::merges_sync_points_into_one", "tests::ref_and_mut_query_panic - should panic", "event::tests::test_events_par_iter", "tests::query_sparse_component", "tests::remove", "tests::random_access", "query::tests::par_iter_mut_change_detection", "tests::resource", "tests::reserve_and_spawn", "tests::remove_missing", "tests::remove_tracking", "tests::resource_scope", "tests::spawn_batch", "query::tests::query_filtered_exactsizeiterator_len", "tests::take", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "tests::reserve_entities_across_worlds", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "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::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iter_resources", "world::tests::inspect_entity_components", "world::tests::iterate_entities_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 935) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 943) - 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/bundle.rs - bundle::Bundle (line 98)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 752)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "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 266) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 544)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/lib.rs - (line 77)", "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::nand (line 184) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1264)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1250)", "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/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::xor (line 431) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "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/lib.rs - (line 44)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 871)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1648)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/event/reader.rs - event::reader::ManualEventReader (line 129)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1625)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 57)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 568)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 735)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 615)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 202)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 189)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 353)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 39)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 671)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 625)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 447)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 958)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 718)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 587)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 1002)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 903)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "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/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 668)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 772)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 833)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 743)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 548)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 460) - compile fail", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1328)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1544) - 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::not (line 1049)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 471)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 42)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1520)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 282)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 607)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 720)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 554)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 890)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 39)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 422)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1095)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1072)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 464)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 369)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 665)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 943)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1049)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 624)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 989)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 855)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 580)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 776)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "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 1551)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1508)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 60)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 245)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "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>::contains (line 1263)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 310)", "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>::get (line 822)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 114) - compile", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 775)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 47)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 383)", "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>::par_iter_mut (line 785)", "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>::join (line 1395)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 181)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 76)", "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::Resource (line 431)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 752)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 198)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 222)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 897)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 269)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 319)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,211
bevyengine__bevy-14211
[ "14039" ]
c994c15d5eda56fcb8f6ca934aad69c691923f57
diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -20,7 +20,8 @@ pub mod prelude { //! The Bevy Core Prelude. #[doc(hidden)] pub use crate::{ - DebugName, FrameCountPlugin, Name, TaskPoolOptions, TaskPoolPlugin, TypeRegistrationPlugin, + FrameCountPlugin, Name, NameOrEntity, TaskPoolOptions, TaskPoolPlugin, + TypeRegistrationPlugin, }; } diff --git a/crates/bevy_core/src/name.rs b/crates/bevy_core/src/name.rs --- a/crates/bevy_core/src/name.rs +++ b/crates/bevy_core/src/name.rs @@ -96,7 +96,7 @@ impl std::fmt::Debug for Name { /// # use bevy_core::prelude::*; /// # use bevy_ecs::prelude::*; /// # #[derive(Component)] pub struct Score(f32); -/// fn increment_score(mut scores: Query<(DebugName, &mut Score)>) { +/// fn increment_score(mut scores: Query<(NameOrEntity, &mut Score)>) { /// for (name, mut score) in &mut scores { /// score.0 += 1.0; /// if score.0.is_nan() { diff --git a/crates/bevy_core/src/name.rs b/crates/bevy_core/src/name.rs --- a/crates/bevy_core/src/name.rs +++ b/crates/bevy_core/src/name.rs @@ -109,18 +109,18 @@ impl std::fmt::Debug for Name { /// /// # Implementation /// -/// The `Display` impl for `DebugName` returns the `Name` where there is one +/// The `Display` impl for `NameOrEntity` returns the `Name` where there is one /// or {index}v{generation} for entities without one. #[derive(QueryData)] #[query_data(derive(Debug))] -pub struct DebugName { +pub struct NameOrEntity { /// A [`Name`] that the entity might have that is displayed if available. pub name: Option<&'static Name>, /// The unique identifier of the entity as a fallback. pub entity: Entity, } -impl<'a> std::fmt::Display for DebugNameItem<'a> { +impl<'a> std::fmt::Display for NameOrEntityItem<'a> { #[inline(always)] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self.name {
diff --git a/crates/bevy_core/src/name.rs b/crates/bevy_core/src/name.rs --- a/crates/bevy_core/src/name.rs +++ b/crates/bevy_core/src/name.rs @@ -216,12 +216,12 @@ mod tests { let e1 = world.spawn_empty().id(); let name = Name::new("MyName"); let e2 = world.spawn(name.clone()).id(); - let mut query = world.query::<DebugName>(); + let mut query = world.query::<NameOrEntity>(); let d1 = query.get(&world, e1).unwrap(); let d2 = query.get(&world, e2).unwrap(); - // DebugName Display for entities without a Name should be {index}v{generation} + // NameOrEntity Display for entities without a Name should be {index}v{generation} assert_eq!(d1.to_string(), "0v1"); - // DebugName Display for entities with a Name should be the Name + // NameOrEntity Display for entities with a Name should be the Name assert_eq!(d2.to_string(), "MyName"); } }
Rename bevy_core::name::DebugName to better fit its implementation ## What problem does this solve or what need does it fill? The name of the `DebugName` struct is a bit of a misnomer: we don't have a separate struct for entity "debug names", and it just reuses the standard `Name` component, falling back to displaying the entity's ID if it doesn't have a name. We should rename `DebugName`. ## What solution would you like? I suggest `NameOrId`: it remains short to spell out, and directly reflects its intentions. Welcome to other bikeshed names!
I like `DebugLabel` personally.
2024-07-07T21:30:10Z
1.79
2024-07-15T15:38:29Z
612897becd415b7b982f58bd76deb719b42c9790
[ "serde::tests::test_serde_frame_count", "serde::tests::test_serde_name", "name::tests::test_display_of_debug_name", "tests::runs_spawn_local_tasks", "tests::frame_counter_update" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
14,148
bevyengine__bevy-14148
[ "14147" ]
57d05927d626641ebb7db166fcfcf797b880d202
diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -126,11 +126,11 @@ impl TextureSlicer { ), }, draw_size: vec2( - bl_corner.draw_size.x, - render_size.y - (bl_corner.draw_size.y + tl_corner.draw_size.y), + tl_corner.draw_size.x, + render_size.y - (tl_corner.draw_size.y + bl_corner.draw_size.y), ), offset: vec2( - -render_size.x + bl_corner.draw_size.x, + tl_corner.draw_size.x - render_size.x, bl_corner.draw_size.y - tl_corner.draw_size.y, ) / 2.0, }, diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -141,21 +141,21 @@ impl TextureSlicer { base_rect.max.x - self.border.right, base_rect.min.y + self.border.top, ), - max: vec2(base_rect.max.x, base_rect.max.y - self.border.bottom), + max: base_rect.max - vec2(0.0, self.border.bottom), }, draw_size: vec2( - br_corner.draw_size.x, - render_size.y - (br_corner.draw_size.y + tr_corner.draw_size.y), + tr_corner.draw_size.x, + render_size.y - (tr_corner.draw_size.y + br_corner.draw_size.y), ), offset: vec2( - render_size.x - br_corner.draw_size.x, + render_size.x - tr_corner.draw_size.x, br_corner.draw_size.y - tr_corner.draw_size.y, ) / 2.0, }, ] } - /// Computes the 2 vertical side slices (bottom and top borders) + /// Computes the 2 vertical side slices (top and bottom borders) #[must_use] fn vertical_side_slices( &self, diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -164,24 +164,6 @@ impl TextureSlicer { render_size: Vec2, ) -> [TextureSlice; 2] { [ - // Bottom - TextureSlice { - texture_rect: Rect { - min: vec2( - base_rect.min.x + self.border.left, - base_rect.max.y - self.border.bottom, - ), - max: vec2(base_rect.max.x - self.border.right, base_rect.max.y), - }, - draw_size: vec2( - render_size.x - (bl_corner.draw_size.x + br_corner.draw_size.x), - bl_corner.draw_size.y, - ), - offset: vec2( - (bl_corner.draw_size.x - br_corner.draw_size.x) / 2.0, - bl_corner.offset.y, - ), - }, // Top TextureSlice { texture_rect: Rect { diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -196,9 +178,27 @@ impl TextureSlicer { tl_corner.draw_size.y, ), offset: vec2( - (tl_corner.draw_size.x - tr_corner.draw_size.x) / 2.0, - tl_corner.offset.y, + tl_corner.draw_size.x - tr_corner.draw_size.x, + render_size.y - tl_corner.draw_size.y, + ) / 2.0, + }, + // Bottom + TextureSlice { + texture_rect: Rect { + min: vec2( + base_rect.min.x + self.border.left, + base_rect.max.y - self.border.bottom, + ), + max: base_rect.max - vec2(self.border.right, 0.0), + }, + draw_size: vec2( + render_size.x - (bl_corner.draw_size.x + br_corner.draw_size.x), + bl_corner.draw_size.y, ), + offset: vec2( + bl_corner.draw_size.x - br_corner.draw_size.x, + bl_corner.draw_size.y - render_size.y, + ) / 2.0, }, ] } diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -216,11 +216,8 @@ impl TextureSlicer { #[must_use] pub fn compute_slices(&self, rect: Rect, render_size: Option<Vec2>) -> Vec<TextureSlice> { let render_size = render_size.unwrap_or_else(|| rect.size()); - let rect_size = rect.size() / 2.0; - if self.border.left >= rect_size.x - || self.border.right >= rect_size.x - || self.border.top >= rect_size.y - || self.border.bottom >= rect_size.y + if self.border.left + self.border.right >= rect.size().x + || self.border.top + self.border.bottom >= rect.size().y { bevy_utils::tracing::error!( "TextureSlicer::border has out of bounds values. No slicing will be applied" diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -234,7 +231,7 @@ impl TextureSlicer { let mut slices = Vec::with_capacity(9); // Corners are in this order: [TL, TR, BL, BR] let corners = self.corner_slices(rect, render_size); - // Vertical Sides: [B, T] + // Vertical Sides: [T, B] let vertical_sides = self.vertical_side_slices(&corners, rect, render_size); // Horizontal Sides: [L, R] let horizontal_sides = self.horizontal_side_slices(&corners, rect, render_size); diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -242,19 +239,13 @@ impl TextureSlicer { let center = TextureSlice { texture_rect: Rect { min: rect.min + vec2(self.border.left, self.border.top), - max: vec2( - rect.max.x - self.border.right, - rect.max.y - self.border.bottom, - ), + max: rect.max - vec2(self.border.right, self.border.bottom), }, draw_size: vec2( - render_size.x - (corners[2].draw_size.x + corners[3].draw_size.x), - render_size.y - (corners[2].draw_size.y + corners[0].draw_size.y), - ), - offset: Vec2::new( - (corners[0].draw_size.x - corners[3].draw_size.x) / 2.0, - (corners[2].draw_size.y - corners[0].draw_size.y) / 2.0, + render_size.x - (corners[0].draw_size.x + corners[1].draw_size.x), + render_size.y - (corners[0].draw_size.y + corners[2].draw_size.y), ), + offset: vec2(vertical_sides[0].offset.x, horizontal_sides[0].offset.y), }; slices.extend(corners);
diff --git a/crates/bevy_sprite/src/texture_slice/slicer.rs b/crates/bevy_sprite/src/texture_slice/slicer.rs --- a/crates/bevy_sprite/src/texture_slice/slicer.rs +++ b/crates/bevy_sprite/src/texture_slice/slicer.rs @@ -399,7 +390,7 @@ mod test { } ); assert_eq!( - vertical_sides[1], /* top */ + vertical_sides[0], /* top */ TextureSlice { texture_rect: Rect { min: Vec2::new(5.0, 0.0),
asymmetrical 9-slicing still doesn't work if the center tile begins more than halfway from an edge ## Bevy version Bevy 0.14.0 ## What you did Used an asymmetrical 9-slice texture. ## What went wrong Texture is stretched and not sliced. ## Additional information ![asymmetrical_texture_slice_before](https://github.com/bevyengine/bevy/assets/88861660/2bd038f6-bac3-4d92-981f-c88128de6402) #13921 partially fixed this issue. I have created a pull request with the complete solution.
2024-07-05T08:43:10Z
1.79
2024-08-01T20:20:03Z
612897becd415b7b982f58bd76deb719b42c9790
[ "texture_slice::slicer::test::test_horizontal_sizes_non_uniform_smaller" ]
[ "texture_slice::slicer::test::test_horizontal_sizes_non_uniform_bigger", "texture_slice::slicer::test::test_horizontal_sizes_non_uniform_zero", "texture_slice::slicer::test::test_horizontal_sizes_uniform", "test::calculate_bounds_2d_create_aabb_for_image_sprite_entity", "test::calculate_bounds_2d_correct_aabb_for_sprite_with_custom_rect", "test::calculate_bounds_2d_update_aabb_when_sprite_custom_size_changes_to_some", "crates/bevy_sprite/src/texture_atlas_builder.rs - texture_atlas_builder::TextureAtlasBuilder<'a>::build (line 173)", "crates/bevy_sprite/src/mesh2d/material.rs - mesh2d::material::Material2d (line 54)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,158
bevyengine__bevy-8158
[ "5756", "6814" ]
f18f28874a683812dc5b8d54743b1826399897d9
diff --git a/CREDITS.md b/CREDITS.md --- a/CREDITS.md +++ b/CREDITS.md @@ -21,8 +21,15 @@ * Ground tile from [Kenney's Tower Defense Kit](https://www.kenney.nl/assets/tower-defense-kit) (CC0 1.0 Universal) * Game icons from [Kenney's Game Icons](https://www.kenney.nl/assets/game-icons) (CC0 1.0 Universal) * Space ships from [Kenny's Simple Space Kit](https://www.kenney.nl/assets/simple-space) (CC0 1.0 Universal) -* glTF animated fox from [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Fox) - * Low poly fox [by PixelMannen](https://opengameart.org/content/fox-and-shiba) (CC0 1.0 Universal) - * Rigging and animation [by @tomkranis on Sketchfab](https://sketchfab.com/models/371dea88d7e04a76af5763f2a36866bc) ([CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)) +* glTF animated fox from [glTF Sample Models][fox] + * Low poly fox [by PixelMannen] (CC0 1.0 Universal) + * Rigging and animation [by @tomkranis on Sketchfab] ([CC-BY 4.0]) * FiraMono by The Mozilla Foundation and Telefonica S.A (SIL Open Font License, Version 1.1: assets/fonts/FiraMono-LICENSE) * Barycentric from [mk_bary_gltf](https://github.com/komadori/mk_bary_gltf) (MIT OR Apache-2.0) +* `MorphStressTest.gltf`, [MorphStressTest] ([CC-BY 4.0] by Analytical Graphics, Inc, Model and textures by Ed Mackey) + +[MorphStressTest]: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/MorphStressTest +[fox]: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Fox +[by PixelMannen]: https://opengameart.org/content/fox-and-shiba +[by @tomkranis on Sketchfab]: https://sketchfab.com/models/371dea88d7e04a76af5763f2a36866bc +[CC-BY 4.0]: https://creativecommons.org/licenses/by/4.0/ diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -746,6 +746,16 @@ description = "Plays an animation from a skinned glTF" category = "Animation" wasm = true +[[example]] +name = "morph_targets" +path = "examples/animation/morph_targets.rs" + +[package.metadata.example.morph_targets] +name = "Morph Targets" +description = "Plays an animation from a glTF file with meshes with morph targets" +category = "Animation" +wasm = true + [[example]] name = "animated_transform" path = "examples/animation/animated_transform.rs" diff --git /dev/null b/assets/models/animated/MorphStressTest.gltf new file mode 100644 --- /dev/null +++ b/assets/models/animated/MorphStressTest.gltf @@ -0,0 +1,1055 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v3.6.11", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Main" + } + ], + "animations":[ + { + "channels":[ + { + "sampler":0, + "target":{ + "node":0, + "path":"weights" + } + } + ], + "name":"Individuals", + "samplers":[ + { + "input":42, + "interpolation":"LINEAR", + "output":43 + } + ] + }, + { + "channels":[ + { + "sampler":0, + "target":{ + "node":0, + "path":"weights" + } + } + ], + "name":"Pulse", + "samplers":[ + { + "input":44, + "interpolation":"LINEAR", + "output":45 + } + ] + }, + { + "channels":[ + { + "sampler":0, + "target":{ + "node":0, + "path":"weights" + } + } + ], + "name":"TheWave", + "samplers":[ + { + "input":46, + "interpolation":"LINEAR", + "output":47 + } + ] + } + ], + "materials":[ + { + "doubleSided":true, + "name":"Base", + "occlusionTexture":{ + "index":0, + "texCoord":1 + }, + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":1 + }, + "metallicFactor":0, + "roughnessFactor":0.4000000059604645 + } + }, + { + "doubleSided":true, + "name":"TestMaterial", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":2 + }, + "metallicFactor":0, + "roughnessFactor":0.5 + } + } + ], + "meshes":[ + { + "extras":{ + "targetNames":[ + "Key 1", + "Key 2", + "Key 3", + "Key 4", + "Key 5", + "Key 6", + "Key 7", + "Key 8" + ] + }, + "name":"Cube.001", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2, + "TEXCOORD_1":3 + }, + "indices":4, + "material":0, + "targets":[ + { + "POSITION":5, + "NORMAL":6 + }, + { + "POSITION":7, + "NORMAL":8 + }, + { + "POSITION":9, + "NORMAL":10 + }, + { + "POSITION":11, + "NORMAL":12 + }, + { + "POSITION":13, + "NORMAL":14 + }, + { + "POSITION":15, + "NORMAL":16 + }, + { + "POSITION":17, + "NORMAL":18 + }, + { + "POSITION":19, + "NORMAL":20 + } + ] + }, + { + "attributes":{ + "POSITION":21, + "NORMAL":22, + "TEXCOORD_0":23, + "TEXCOORD_1":24 + }, + "indices":25, + "material":1, + "targets":[ + { + "POSITION":26, + "NORMAL":27 + }, + { + "POSITION":28, + "NORMAL":29 + }, + { + "POSITION":30, + "NORMAL":31 + }, + { + "POSITION":32, + "NORMAL":33 + }, + { + "POSITION":34, + "NORMAL":35 + }, + { + "POSITION":36, + "NORMAL":37 + }, + { + "POSITION":38, + "NORMAL":39 + }, + { + "POSITION":40, + "NORMAL":41 + } + ] + } + ], + "weights":[ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ], + "textures":[ + { + "sampler":0, + "source":0 + }, + { + "sampler":0, + "source":1 + }, + { + "sampler":0, + "source":2 + } + ], + "images":[ + { + "bufferView":5, + "mimeType":"image/png", + "name":"Base_AO" + }, + { + "bufferView":6, + "mimeType":"image/png", + "name":"TinyGrid" + }, + { + "bufferView":28, + "mimeType":"image/png", + "name":"ColorSwatches" + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":24, + "max":[ + 2, + 0, + 0.5 + ], + "min":[ + -2, + -0.10000002384185791, + -0.5 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":24, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5126, + "count":24, + "type":"VEC2" + }, + { + "bufferView":4, + "componentType":5123, + "count":36, + "type":"SCALAR" + }, + { + "bufferView":7, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":8, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":9, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":10, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":11, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":12, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":13, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":14, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":15, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":16, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":17, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":18, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":19, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":20, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":21, + "componentType":5126, + "count":24, + "max":[ + 0, + 0, + 0 + ], + "min":[ + 0, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":22, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":23, + "componentType":5126, + "count":1504, + "max":[ + 1.875, + 0.5, + 0.25 + ], + "min":[ + -1.875, + 0, + -0.25 + ], + "type":"VEC3" + }, + { + "bufferView":24, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":25, + "componentType":5126, + "count":1504, + "type":"VEC2" + }, + { + "bufferView":26, + "componentType":5126, + "count":1504, + "type":"VEC2" + }, + { + "bufferView":27, + "componentType":5123, + "count":7200, + "type":"SCALAR" + }, + { + "bufferView":29, + "componentType":5126, + "count":1504, + "max":[ + 0.04999995231628418, + 1, + 0 + ], + "min":[ + -0.04999995231628418, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":30, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":31, + "componentType":5126, + "count":1504, + "max":[ + 0.04999995231628418, + 1, + 0 + ], + "min":[ + -0.04999995231628418, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":32, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":33, + "componentType":5126, + "count":1504, + "max":[ + 0.050000011920928955, + 1, + 0 + ], + "min":[ + -0.050000011920928955, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":34, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":35, + "componentType":5126, + "count":1504, + "max":[ + 0.050000011920928955, + 1, + 0 + ], + "min":[ + -0.04999999701976776, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":36, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":37, + "componentType":5126, + "count":1504, + "max":[ + 0.04999999701976776, + 1, + 0 + ], + "min":[ + -0.050000011920928955, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":38, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":39, + "componentType":5126, + "count":1504, + "max":[ + 0.050000011920928955, + 1, + 0 + ], + "min":[ + -0.050000011920928955, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":40, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":41, + "componentType":5126, + "count":1504, + "max":[ + 0.04999995231628418, + 1, + 0 + ], + "min":[ + -0.04999995231628418, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":42, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":43, + "componentType":5126, + "count":1504, + "max":[ + 0.04999995231628418, + 1, + 0 + ], + "min":[ + -0.04999995231628418, + 0, + 0 + ], + "type":"VEC3" + }, + { + "bufferView":44, + "componentType":5126, + "count":1504, + "type":"VEC3" + }, + { + "bufferView":45, + "componentType":5126, + "count":225, + "max":[ + 9.333333333333334 + ], + "min":[ + 0 + ], + "type":"SCALAR" + }, + { + "bufferView":46, + "componentType":5126, + "count":1800, + "type":"SCALAR" + }, + { + "bufferView":47, + "componentType":5126, + "count":153, + "max":[ + 6.333333333333333 + ], + "min":[ + 0 + ], + "type":"SCALAR" + }, + { + "bufferView":48, + "componentType":5126, + "count":1224, + "type":"SCALAR" + }, + { + "bufferView":49, + "componentType":5126, + "count":48, + "max":[ + 1.9583333333333333 + ], + "min":[ + 0 + ], + "type":"SCALAR" + }, + { + "bufferView":50, + "componentType":5126, + "count":384, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":288, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":288, + "target":34962 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":576, + "target":34962 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":768, + "target":34962 + }, + { + "buffer":0, + "byteLength":72, + "byteOffset":960, + "target":34963 + }, + { + "buffer":0, + "byteLength":178434, + "byteOffset":1032 + }, + { + "buffer":0, + "byteLength":186, + "byteOffset":179468 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":179656, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":179944, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":180232, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":180520, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":180808, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":181096, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":181384, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":181672, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":181960, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":182248, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":182536, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":182824, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":183112, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":183400, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":183688, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":183976, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":184264, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":202312, + "target":34962 + }, + { + "buffer":0, + "byteLength":12032, + "byteOffset":220360, + "target":34962 + }, + { + "buffer":0, + "byteLength":12032, + "byteOffset":232392, + "target":34962 + }, + { + "buffer":0, + "byteLength":14400, + "byteOffset":244424, + "target":34963 + }, + { + "buffer":0, + "byteLength":208, + "byteOffset":258824 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":259032, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":277080, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":295128, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":313176, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":331224, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":349272, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":367320, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":385368, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":403416, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":421464, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":439512, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":457560, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":475608, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":493656, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":511704, + "target":34962 + }, + { + "buffer":0, + "byteLength":18048, + "byteOffset":529752, + "target":34962 + }, + { + "buffer":0, + "byteLength":900, + "byteOffset":547800 + }, + { + "buffer":0, + "byteLength":7200, + "byteOffset":548700 + }, + { + "buffer":0, + "byteLength":612, + "byteOffset":555900 + }, + { + "buffer":0, + "byteLength":4896, + "byteOffset":556512 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":561408 + }, + { + "buffer":0, + "byteLength":1536, + "byteOffset":561600 + } + ], + "samplers":[ + { + "magFilter":9729, + "minFilter":9987 + } + ], + "buffers":[ + { + "byteLength":563136, + "uri":"data:application/octet-stream;base64,AAAAQAAAAAAAAAC/AAAAQAAAAAAAAAC/AAAAQAAAAAAAAAC/AAAAQNDMzL0AAAC/AAAAQNDMzL0AAAC/AAAAQNDMzL0AAAC/AAAAQAAAAAAAAAA/AAAAQAAAAAAAAAA/AAAAQAAAAAAAAAA/AAAAQNDMzL0AAAA/AAAAQNDMzL0AAAA/AAAAQNDMzL0AAAA/AAAAwAAAAAAAAAC/AAAAwAAAAAAAAAC/AAAAwAAAAAAAAAC/AAAAwNDMzL0AAAC/AAAAwNDMzL0AAAC/AAAAwNDMzL0AAAC/AAAAwAAAAAAAAAA/AAAAwAAAAAAAAAA/AAAAwAAAAAAAAAA/AAAAwNDMzL0AAAA/AAAAwNDMzL0AAAA/AAAAwNDMzL0AAAA/AAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAPwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAvwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAA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+j53mHv2z/v2y3856L14F1YB34Exz42AuAdvu/WX+Cp1vy7XHgz/wC3neAb89HuTf5Exx4bfqv1Z/5b8flPp/s9knBpeHHt/9/+3WSAjAIAwDw0v9/1gekQs+aFEKRMlfJogNuvdVWvbq6dNVZzdM4AQIE3gpcacI8uSIiDRNA4DSBlkt3/gHGGKctzXwIpAL71/+T3nW8F/fax+1SokpAcWmVUmIIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBA4CcCN6UL6zZT7LPzAAAAAElFTkSuQmCCAACJUE5HDQoaCgAAAA1JSERSAAAAQAAAAEAIAgAAACUL5okAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQflARUCMhu0a+d/AAAAWUlEQVRo3u3RsQ0AIAwDwYAYJqtnS9psgILuO5cnr8yMye0YHsDrTh9V5QEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAHwEXuSYC9R2TW+wAAAAASUVORK5CYIIAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAAA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w/AAAAAAAAAAAAAAAAAAAAAAAAAACxxX89DMfAPgX/Qj8AAAAAAAAAAAAAAAAAAAAAAAAAAAC/UDyevYQ+VOMlPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpWIT79YwY/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMEGcPbhUzT4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiy7E8hZyQPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnjM+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIefuD0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcjj7PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv1A7" + } + ] +} diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -15,6 +15,7 @@ bevy_asset = { path = "../bevy_asset", version = "0.11.0-dev" } bevy_core = { path = "../bevy_core", version = "0.11.0-dev" } bevy_math = { path = "../bevy_math", version = "0.11.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.11.0-dev", features = ["bevy"] } +bevy_render = { path = "../bevy_render", version = "0.11.0-dev" } bevy_time = { path = "../bevy_time", version = "0.11.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.11.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.11.0-dev" } diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -13,6 +13,7 @@ use bevy_ecs::prelude::*; use bevy_hierarchy::{Children, Parent}; use bevy_math::{Quat, Vec3}; use bevy_reflect::{FromReflect, Reflect, TypeUuid}; +use bevy_render::mesh::morph::MorphWeights; use bevy_time::Time; use bevy_transform::{prelude::Transform, TransformSystem}; use bevy_utils::{tracing::warn, HashMap}; diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -34,9 +35,18 @@ pub enum Keyframes { Translation(Vec<Vec3>), /// Keyframes for scale. Scale(Vec<Vec3>), + /// Keyframes for morph target weights. + /// + /// Note that in `.0`, each contiguous `target_count` values is a single + /// keyframe representing the weight values at given keyframe. + /// + /// This follows the [glTF design]. + /// + /// [glTF design]: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#animations + Weights(Vec<f32>), } -/// Describes how an attribute of a [`Transform`] should be animated. +/// Describes how an attribute of a [`Transform`] or [`MorphWeights`] should be animated. /// /// `keyframe_timestamps` and `keyframes` should have the same length. #[derive(Reflect, FromReflect, Clone, Debug)] diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -106,6 +116,11 @@ impl AnimationClip { self.paths.insert(path, idx); } } + + /// Whether this animation clip can run on entity with given [`Name`]. + pub fn compatible_with(&self, name: &Name) -> bool { + self.paths.keys().all(|path| &path.parts[0] == name) + } } #[derive(Reflect)] diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -270,7 +285,7 @@ impl AnimationPlayer { } } -fn find_bone( +fn entity_from_path( root: Entity, path: &EntityPath, children: &Query<&Children>, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -336,12 +351,14 @@ fn verify_no_ancestor_player( /// System that will play all animations, using any entity with a [`AnimationPlayer`] /// and a [`Handle<AnimationClip>`] as an animation root +#[allow(clippy::too_many_arguments)] pub fn animation_player( time: Res<Time>, animations: Res<Assets<AnimationClip>>, children: Query<&Children>, names: Query<&Name>, transforms: Query<&mut Transform>, + morphs: Query<&mut MorphWeights>, parents: Query<(Option<With<AnimationPlayer>>, Option<&Parent>)>, mut animation_players: Query<(Entity, Option<&Parent>, &mut AnimationPlayer)>, ) { diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -356,6 +373,7 @@ pub fn animation_player( &animations, &names, &transforms, + &morphs, maybe_parent, &parents, &children, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -371,6 +389,7 @@ fn run_animation_player( animations: &Assets<AnimationClip>, names: &Query<&Name>, transforms: &Query<&mut Transform>, + morphs: &Query<&mut MorphWeights>, maybe_parent: Option<&Parent>, parents: &Query<(Option<With<AnimationPlayer>>, Option<&Parent>)>, children: &Query<&Children>, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -392,6 +411,7 @@ fn run_animation_player( animations, names, transforms, + morphs, maybe_parent, parents, children, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -413,6 +433,7 @@ fn run_animation_player( animations, names, transforms, + morphs, maybe_parent, parents, children, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -420,6 +441,28 @@ fn run_animation_player( } } +/// Update `weights` based on weights in `keyframes` at index `key_index` +/// with a linear interpolation on `key_lerp`. +/// +/// # Panics +/// +/// When `key_index * target_count` is larger than `keyframes` +/// +/// This happens when `keyframes` is not formatted as described in +/// [`Keyframes::Weights`]. A possible cause is [`AnimationClip`] not being +/// meant to be used for the [`MorphWeights`] of the entity it's being applied to. +fn lerp_morph_weights(weights: &mut [f32], key_lerp: f32, keyframes: &[f32], key_index: usize) { + let target_count = weights.len(); + let start = target_count * key_index; + let end = target_count * (key_index + 1); + + let zipped = weights.iter_mut().zip(&keyframes[start..end]); + for (morph_weight, keyframe) in zipped { + let minus_lerp = 1.0 - key_lerp; + *morph_weight = (*morph_weight * minus_lerp) + (keyframe * key_lerp); + } +} + #[allow(clippy::too_many_arguments)] fn apply_animation( weight: f32, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -430,6 +473,7 @@ fn apply_animation( animations: &Assets<AnimationClip>, names: &Query<&Name>, transforms: &Query<&mut Transform>, + morphs: &Query<&mut MorphWeights>, maybe_parent: Option<&Parent>, parents: &Query<(Option<With<AnimationPlayer>>, Option<&Parent>)>, children: &Query<&Children>, diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -456,7 +500,7 @@ fn apply_animation( for (path, bone_id) in &animation_clip.paths { let cached_path = &mut animation.path_cache[*bone_id]; let curves = animation_clip.get_curves(*bone_id).unwrap(); - let Some(target) = find_bone(root, path, children, names, cached_path) else { continue }; + let Some(target) = entity_from_path(root, path, children, names, cached_path) else { continue }; // SAFETY: The verify_no_ancestor_player check above ensures that two animation players cannot alias // any of their descendant Transforms. // diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -470,6 +514,7 @@ fn apply_animation( // to run their animation. Any players in the children or descendants will log a warning // and do nothing. let Ok(mut transform) = (unsafe { transforms.get_unchecked(target) }) else { continue }; + let mut morphs = unsafe { morphs.get_unchecked(target) }; for curve in curves { // Some curves have only one keyframe used to set a transform if curve.keyframe_timestamps.len() == 1 { diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -484,6 +529,11 @@ fn apply_animation( Keyframes::Scale(keyframes) => { transform.scale = transform.scale.lerp(keyframes[0], weight); } + Keyframes::Weights(keyframes) => { + if let Ok(morphs) = &mut morphs { + lerp_morph_weights(morphs.weights_mut(), weight, keyframes, 0); + } + } } continue; } diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -529,6 +579,11 @@ fn apply_animation( let result = scale_start.lerp(scale_end, lerp); transform.scale = transform.scale.lerp(result, weight); } + Keyframes::Weights(keyframes) => { + if let Ok(morphs) = &mut morphs { + lerp_morph_weights(morphs.weights_mut(), weight, keyframes, step_start); + } + } } } } diff --git a/crates/bevy_core_pipeline/src/taa/mod.rs b/crates/bevy_core_pipeline/src/taa/mod.rs --- a/crates/bevy_core_pipeline/src/taa/mod.rs +++ b/crates/bevy_core_pipeline/src/taa/mod.rs @@ -131,7 +131,8 @@ pub struct TemporalAntiAliasBundle { /// /// Cannot be used with [`bevy_render::camera::OrthographicProjection`]. /// -/// Currently does not support skinned meshes. There will probably be ghosting artifacts if used with them. +/// Currently does not support skinned meshes and morph targets. +/// There will probably be ghosting artifacts if used with them. /// Does not work well with alpha-blended meshes as it requires depth writing to determine motion. /// /// It is very important that correct motion vectors are written for everything on screen. diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -39,3 +39,5 @@ thiserror = "1.0" anyhow = "1.0.4" base64 = "0.13.0" percent-encoding = "2.1" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1" diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -1,6 +1,7 @@ +use crate::{vertex_attributes::*, Gltf, GltfExtras, GltfNode}; use anyhow::Result; use bevy_asset::{ - AssetIoError, AssetLoader, AssetPath, BoxedFuture, Handle, LoadContext, LoadedAsset, + AssetIoError, AssetLoader, AssetPath, BoxedFuture, Handle, HandleId, LoadContext, LoadedAsset, }; use bevy_core::Name; use bevy_core_pipeline::prelude::Camera3dBundle; diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -16,6 +17,7 @@ use bevy_render::{ camera::{Camera, OrthographicProjection, PerspectiveProjection, Projection, ScalingMode}, color::Color, mesh::{ + morph::{MeshMorphWeights, MorphAttributes, MorphTargetImage, MorphWeights}, skinning::{SkinnedMesh, SkinnedMeshInverseBindposes}, Indices, Mesh, MeshVertexAttribute, VertexAttributeValues, }, diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -28,19 +30,17 @@ use bevy_scene::Scene; #[cfg(not(target_arch = "wasm32"))] use bevy_tasks::IoTaskPool; use bevy_transform::components::Transform; - use bevy_utils::{HashMap, HashSet}; use gltf::{ + accessor::Iter, mesh::{util::ReadIndices, Mode}, texture::{MagFilter, MinFilter, WrappingMode}, Material, Node, Primitive, }; +use serde::Deserialize; use std::{collections::VecDeque, path::Path}; use thiserror::Error; -use crate::vertex_attributes::*; -use crate::{Gltf, GltfExtras, GltfNode}; - /// An error that occurs when loading a glTF file. #[derive(Error, Debug)] pub enum GltfError { diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -64,6 +64,8 @@ pub enum GltfError { MissingAnimationSampler(usize), #[error("failed to generate tangents: {0}")] GenerateTangentsError(#[from] bevy_render::mesh::GenerateTangentsError), + #[error("failed to generate morph targets: {0}")] + MorphTarget(#[from] bevy_render::mesh::morph::MorphBuildError), } /// Loads glTF files with all of their data as their corresponding bevy representations. diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -132,6 +134,8 @@ async fn load_gltf<'a, 'b>( #[cfg(feature = "bevy_animation")] let (animations, named_animations, animation_roots) = { + use bevy_animation::Keyframes; + use gltf::animation::util::ReadOutputs; let mut animations = vec![]; let mut named_animations = HashMap::default(); let mut animation_roots = HashSet::default(); diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -162,20 +166,17 @@ async fn load_gltf<'a, 'b>( let keyframes = if let Some(outputs) = reader.read_outputs() { match outputs { - gltf::animation::util::ReadOutputs::Translations(tr) => { - bevy_animation::Keyframes::Translation(tr.map(Vec3::from).collect()) + ReadOutputs::Translations(tr) => { + Keyframes::Translation(tr.map(Vec3::from).collect()) } - gltf::animation::util::ReadOutputs::Rotations(rots) => { - bevy_animation::Keyframes::Rotation( - rots.into_f32().map(bevy_math::Quat::from_array).collect(), - ) + ReadOutputs::Rotations(rots) => Keyframes::Rotation( + rots.into_f32().map(bevy_math::Quat::from_array).collect(), + ), + ReadOutputs::Scales(scale) => { + Keyframes::Scale(scale.map(Vec3::from).collect()) } - gltf::animation::util::ReadOutputs::Scales(scale) => { - bevy_animation::Keyframes::Scale(scale.map(Vec3::from).collect()) - } - gltf::animation::util::ReadOutputs::MorphTargetWeights(_) => { - warn!("Morph animation property not yet supported"); - continue; + ReadOutputs::MorphTargetWeights(weights) => { + Keyframes::Weights(weights.into_f32().collect()) } } } else { diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -215,10 +216,10 @@ async fn load_gltf<'a, 'b>( let mut meshes = vec![]; let mut named_meshes = HashMap::default(); - for mesh in gltf.meshes() { + for gltf_mesh in gltf.meshes() { let mut primitives = vec![]; - for primitive in mesh.primitives() { - let primitive_label = primitive_label(&mesh, &primitive); + for primitive in gltf_mesh.primitives() { + let primitive_label = primitive_label(&gltf_mesh, &primitive); let primitive_topology = get_primitive_topology(primitive.mode())?; let mut mesh = Mesh::new(primitive_topology); diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -246,6 +247,29 @@ async fn load_gltf<'a, 'b>( })); }; + { + let morph_target_reader = reader.read_morph_targets(); + if morph_target_reader.len() != 0 { + let morph_targets_label = morph_targets_label(&gltf_mesh, &primitive); + let morph_target_image = MorphTargetImage::new( + morph_target_reader.map(PrimitiveMorphAttributesIter), + mesh.count_vertices(), + )?; + let handle = load_context.set_labeled_asset( + &morph_targets_label, + LoadedAsset::new(morph_target_image.0), + ); + + mesh.set_morph_targets(handle); + let extras = gltf_mesh.extras().as_ref(); + if let Option::<MorphTargetNames>::Some(names) = + extras.and_then(|extras| serde_json::from_str(extras.get()).ok()) + { + mesh.set_morph_target_names(names.target_names); + } + } + } + if mesh.attribute(Mesh::ATTRIBUTE_NORMAL).is_none() && matches!(mesh.primitive_topology(), PrimitiveTopology::TriangleList) { diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -295,13 +319,13 @@ async fn load_gltf<'a, 'b>( } let handle = load_context.set_labeled_asset( - &mesh_label(&mesh), + &mesh_label(&gltf_mesh), LoadedAsset::new(super::GltfMesh { primitives, - extras: get_gltf_extras(mesh.extras()), + extras: get_gltf_extras(gltf_mesh.extras()), }), ); - if let Some(name) = mesh.name() { + if let Some(name) = gltf_mesh.name() { named_meshes.insert(name.to_string(), handle.clone()); } meshes.push(handle); diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -731,6 +755,19 @@ fn load_node( // Map node index to entity node_index_to_entity_map.insert(gltf_node.index(), node.id()); + if let Some(mesh) = gltf_node.mesh() { + if let Some(weights) = mesh.weights() { + let first_mesh = if let Some(primitive) = mesh.primitives().next() { + let primitive_label = primitive_label(&mesh, &primitive); + let path = AssetPath::new_ref(load_context.path(), Some(&primitive_label)); + Some(Handle::weak(HandleId::from(path))) + } else { + None + }; + node.insert(MorphWeights::new(weights.to_vec(), first_mesh)?); + } + }; + node.with_children(|parent| { if let Some(mesh) = gltf_node.mesh() { // append primitives diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -752,27 +789,40 @@ fn load_node( let material_asset_path = AssetPath::new_ref(load_context.path(), Some(&material_label)); - let mut mesh_entity = parent.spawn(PbrBundle { + let mut primitive_entity = parent.spawn(PbrBundle { mesh: load_context.get_handle(mesh_asset_path), material: load_context.get_handle(material_asset_path), ..Default::default() }); - mesh_entity.insert(Aabb::from_min_max( + let target_count = primitive.morph_targets().len(); + if target_count != 0 { + let weights = match mesh.weights() { + Some(weights) => weights.to_vec(), + None => vec![0.0; target_count], + }; + // unwrap: the parent's call to `MeshMorphWeights::new` + // means this code doesn't run if it returns an `Err`. + // According to https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#morph-targets + // they should all have the same length. + // > All morph target accessors MUST have the same count as + // > the accessors of the original primitive. + primitive_entity.insert(MeshMorphWeights::new(weights).unwrap()); + } + primitive_entity.insert(Aabb::from_min_max( Vec3::from_slice(&bounds.min), Vec3::from_slice(&bounds.max), )); if let Some(extras) = primitive.extras() { - mesh_entity.insert(super::GltfExtras { + primitive_entity.insert(super::GltfExtras { value: extras.get().to_string(), }); } - if let Some(name) = mesh.name() { - mesh_entity.insert(Name::new(name.to_string())); - } + + primitive_entity.insert(Name::new(primitive_name(&mesh, &primitive))); // Mark for adding skinned mesh if let Some(skin) = gltf_node.skin() { - entity_to_skin_index_map.insert(mesh_entity.id(), skin.index()); + entity_to_skin_index_map.insert(primitive_entity.id(), skin.index()); } } } diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -885,6 +935,24 @@ fn primitive_label(mesh: &gltf::Mesh, primitive: &Primitive) -> String { format!("Mesh{}/Primitive{}", mesh.index(), primitive.index()) } +fn primitive_name(mesh: &gltf::Mesh, primitive: &Primitive) -> String { + let mesh_name = mesh.name().unwrap_or("Mesh"); + if mesh.primitives().len() > 1 { + format!("{}.{}", mesh_name, primitive.index()) + } else { + mesh_name.to_string() + } +} + +/// Returns the label for the morph target of `primitive`. +fn morph_targets_label(mesh: &gltf::Mesh, primitive: &Primitive) -> String { + format!( + "Mesh{}/Primitive{}/MorphTargets", + mesh.index(), + primitive.index() + ) +} + /// Returns the label for the `material`. fn material_label(material: &gltf::Material) -> String { if let Some(index) = material.index() { diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -473,6 +473,9 @@ pub fn queue_material_meshes<M: Material>( let mut mesh_key = MeshPipelineKey::from_primitive_topology(mesh.primitive_topology) | view_key; + if mesh.morph_targets.is_some() { + mesh_key |= MeshPipelineKey::MORPH_TARGETS; + } match material.properties.alpha_mode { AlphaMode::Blend => { mesh_key |= MeshPipelineKey::BLEND_ALPHA; diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -45,9 +45,9 @@ use bevy_transform::prelude::GlobalTransform; use bevy_utils::tracing::error; use crate::{ - prepare_lights, AlphaMode, DrawMesh, Material, MaterialPipeline, MaterialPipelineKey, - MeshPipeline, MeshPipelineKey, MeshUniform, RenderMaterials, SetMaterialBindGroup, - SetMeshBindGroup, MAX_CASCADES_PER_LIGHT, MAX_DIRECTIONAL_LIGHTS, + prepare_lights, setup_morph_and_skinning_defs, AlphaMode, DrawMesh, Material, MaterialPipeline, + MaterialPipelineKey, MeshLayouts, MeshPipeline, MeshPipelineKey, MeshUniform, RenderMaterials, + SetMaterialBindGroup, SetMeshBindGroup, MAX_CASCADES_PER_LIGHT, MAX_DIRECTIONAL_LIGHTS, }; use std::{hash::Hash, marker::PhantomData}; diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -219,8 +219,7 @@ pub fn update_mesh_previous_global_transforms( pub struct PrepassPipeline<M: Material> { pub view_layout_motion_vectors: BindGroupLayout, pub view_layout_no_motion_vectors: BindGroupLayout, - pub mesh_layout: BindGroupLayout, - pub skinned_mesh_layout: BindGroupLayout, + pub mesh_layouts: MeshLayouts, pub material_layout: BindGroupLayout, pub material_vertex_shader: Option<Handle<Shader>>, pub material_fragment_shader: Option<Handle<Shader>>, diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -307,8 +306,7 @@ impl<M: Material> FromWorld for PrepassPipeline<M> { PrepassPipeline { view_layout_motion_vectors, view_layout_no_motion_vectors, - mesh_layout: mesh_pipeline.mesh_layout.clone(), - skinned_mesh_layout: mesh_pipeline.skinned_mesh_layout.clone(), + mesh_layouts: mesh_pipeline.mesh_layouts.clone(), material_vertex_shader: match M::prepass_vertex_shader() { ShaderRef::Default => None, ShaderRef::Handle(handle) => Some(handle), diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -416,16 +414,15 @@ where shader_defs.push("PREPASS_FRAGMENT".into()); } - if layout.contains(Mesh::ATTRIBUTE_JOINT_INDEX) - && layout.contains(Mesh::ATTRIBUTE_JOINT_WEIGHT) - { - shader_defs.push("SKINNED".into()); - vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_INDEX.at_shader_location(4)); - vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_WEIGHT.at_shader_location(5)); - bind_group_layouts.insert(2, self.skinned_mesh_layout.clone()); - } else { - bind_group_layouts.insert(2, self.mesh_layout.clone()); - } + let bind_group = setup_morph_and_skinning_defs( + &self.mesh_layouts, + layout, + 4, + &key.mesh_key, + &mut shader_defs, + &mut vertex_attributes, + ); + bind_group_layouts.insert(2, bind_group); let vertex_buffer_layout = layout.get_layout(&vertex_attributes)?; diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -806,6 +803,9 @@ pub fn queue_prepass_material_meshes<M: Material>( let mut mesh_key = MeshPipelineKey::from_primitive_topology(mesh.primitive_topology) | view_key; + if mesh.morph_targets.is_some() { + mesh_key |= MeshPipelineKey::MORPH_TARGETS; + } let alpha_mode = material.properties.alpha_mode; match alpha_mode { AlphaMode::Opaque => {} diff --git a/crates/bevy_pbr/src/prepass/prepass.wgsl b/crates/bevy_pbr/src/prepass/prepass.wgsl --- a/crates/bevy_pbr/src/prepass/prepass.wgsl +++ b/crates/bevy_pbr/src/prepass/prepass.wgsl @@ -21,6 +21,10 @@ struct Vertex { @location(4) joint_indices: vec4<u32>, @location(5) joint_weights: vec4<f32>, #endif // SKINNED + +#ifdef MORPH_TARGETS + @builtin(vertex_index) index: u32, +#endif // MORPH_TARGETS } struct VertexOutput { diff --git a/crates/bevy_pbr/src/prepass/prepass.wgsl b/crates/bevy_pbr/src/prepass/prepass.wgsl --- a/crates/bevy_pbr/src/prepass/prepass.wgsl +++ b/crates/bevy_pbr/src/prepass/prepass.wgsl @@ -43,10 +47,37 @@ struct VertexOutput { #endif // MOTION_VECTOR_PREPASS } +#ifdef MORPH_TARGETS +fn morph_vertex(vertex_in: Vertex) -> Vertex { + var vertex = vertex_in; + let weight_count = layer_count(); + for (var i: u32 = 0u; i < weight_count; i ++) { + let weight = weight_at(i); + if weight == 0.0 { + continue; + } + vertex.position += weight * morph(vertex.index, position_offset, i); +#ifdef VERTEX_NORMALS + vertex.normal += weight * morph(vertex.index, normal_offset, i); +#endif +#ifdef VERTEX_TANGENTS + vertex.tangent += vec4(weight * morph(vertex.index, tangent_offset, i), 0.0); +#endif + } + return vertex; +} +#endif + @vertex -fn vertex(vertex: Vertex) -> VertexOutput { +fn vertex(vertex_no_morph: Vertex) -> VertexOutput { var out: VertexOutput; +#ifdef MORPH_TARGETS + var vertex = morph_vertex(vertex_no_morph); +#else + var vertex = vertex_no_morph; +#endif + #ifdef SKINNED var model = skin_model(vertex.joint_indices, vertex.joint_weights); #else // SKINNED diff --git a/crates/bevy_pbr/src/prepass/prepass_bindings.wgsl b/crates/bevy_pbr/src/prepass/prepass_bindings.wgsl --- a/crates/bevy_pbr/src/prepass/prepass_bindings.wgsl +++ b/crates/bevy_pbr/src/prepass/prepass_bindings.wgsl @@ -23,3 +23,11 @@ var<uniform> mesh: Mesh; var<uniform> joint_matrices: SkinnedMesh; #import bevy_pbr::skinning #endif + +#ifdef MORPH_TARGETS +@group(2) @binding(2) +var<uniform> morph_weights: MorphWeights; +@group(2) @binding(3) +var morph_targets: texture_3d<f32>; +#import bevy_pbr::morph +#endif diff --git a/crates/bevy_pbr/src/render/light.rs b/crates/bevy_pbr/src/render/light.rs --- a/crates/bevy_pbr/src/render/light.rs +++ b/crates/bevy_pbr/src/render/light.rs @@ -1603,6 +1603,9 @@ pub fn queue_shadows<M: Material>( let mut mesh_key = MeshPipelineKey::from_primitive_topology(mesh.primitive_topology) | MeshPipelineKey::DEPTH_PREPASS; + if mesh.morph_targets.is_some() { + mesh_key |= MeshPipelineKey::MORPH_TARGETS; + } if is_directional_light { mesh_key |= MeshPipelineKey::DEPTH_CLAMP_ORTHO; } diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -6,7 +6,7 @@ use crate::{ MAX_CASCADES_PER_LIGHT, MAX_DIRECTIONAL_LIGHTS, }; use bevy_app::Plugin; -use bevy_asset::{load_internal_asset, Assets, Handle, HandleUntyped}; +use bevy_asset::{load_internal_asset, Assets, Handle, HandleId, HandleUntyped}; use bevy_core_pipeline::{ prepass::ViewPrepassTextures, tonemapping::{ diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -25,7 +25,8 @@ use bevy_render::{ globals::{GlobalsBuffer, GlobalsUniform}, mesh::{ skinning::{SkinnedMesh, SkinnedMeshInverseBindposes}, - GpuBufferInfo, Mesh, MeshVertexBufferLayout, + GpuBufferInfo, InnerMeshVertexBufferLayout, Mesh, MeshVertexBufferLayout, + VertexAttributeDescriptor, }, prelude::Msaa, render_asset::RenderAssets, diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -40,7 +41,12 @@ use bevy_render::{ Extract, ExtractSchedule, Render, RenderApp, RenderSet, }; use bevy_transform::components::GlobalTransform; -use std::num::NonZeroU64; +use bevy_utils::{tracing::error, HashMap, Hashed}; + +use crate::render::{ + morph::{extract_morphs, prepare_morphs, MorphIndex, MorphUniform}, + MeshLayouts, +}; #[derive(Default)] pub struct MeshRenderPlugin; diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -65,6 +71,8 @@ pub const MESH_SHADER_HANDLE: HandleUntyped = HandleUntyped::weak_from_u64(Shader::TYPE_UUID, 3252377289100772450); pub const SKINNING_HANDLE: HandleUntyped = HandleUntyped::weak_from_u64(Shader::TYPE_UUID, 13215291596265391738); +pub const MORPH_HANDLE: HandleUntyped = + HandleUntyped::weak_from_u64(Shader::TYPE_UUID, 970982813587607345); impl Plugin for MeshRenderPlugin { fn build(&self, app: &mut bevy_app::App) { diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -101,17 +109,24 @@ impl Plugin for MeshRenderPlugin { ); load_internal_asset!(app, MESH_SHADER_HANDLE, "mesh.wgsl", Shader::from_wgsl); load_internal_asset!(app, SKINNING_HANDLE, "skinning.wgsl", Shader::from_wgsl); + load_internal_asset!(app, MORPH_HANDLE, "morph.wgsl", Shader::from_wgsl); app.add_plugins(UniformComponentPlugin::<MeshUniform>::default()); if let Ok(render_app) = app.get_sub_app_mut(RenderApp) { render_app .init_resource::<SkinnedMeshUniform>() - .add_systems(ExtractSchedule, (extract_meshes, extract_skinned_meshes)) + .init_resource::<MeshBindGroups>() + .init_resource::<MorphUniform>() + .add_systems( + ExtractSchedule, + (extract_meshes, extract_skinned_meshes, extract_morphs), + ) .add_systems( Render, ( prepare_skinned_meshes.in_set(RenderSet::Prepare), + prepare_morphs.in_set(RenderSet::Prepare), queue_mesh_bind_group.in_set(RenderSet::Queue), queue_mesh_view_bind_groups.in_set(RenderSet::Queue), ), diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -236,6 +251,7 @@ impl SkinnedMeshJoints { }) } + /// Updated index to be in address space based on [`SkinnedMeshUniform`] size. pub fn to_buffer_index(mut self) -> Self { self.index *= std::mem::size_of::<Mat4>() as u32; self diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -280,11 +296,11 @@ pub fn extract_skinned_meshes( pub struct MeshPipeline { pub view_layout: BindGroupLayout, pub view_layout_multisampled: BindGroupLayout, - pub mesh_layout: BindGroupLayout, - pub skinned_mesh_layout: BindGroupLayout, // This dummy white texture is to be used in place of optional StandardMaterial textures pub dummy_white_gpu_image: GpuImage, pub clustered_forward_buffer_binding_type: BufferBindingType, + + pub mesh_layouts: MeshLayouts, } impl FromWorld for MeshPipeline { diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -478,40 +494,6 @@ impl FromWorld for MeshPipeline { entries: &layout_entries(clustered_forward_buffer_binding_type, true), }); - let mesh_binding = BindGroupLayoutEntry { - binding: 0, - visibility: ShaderStages::VERTEX | ShaderStages::FRAGMENT, - ty: BindingType::Buffer { - ty: BufferBindingType::Uniform, - has_dynamic_offset: true, - min_binding_size: Some(MeshUniform::min_size()), - }, - count: None, - }; - - let mesh_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { - entries: &[mesh_binding], - label: Some("mesh_layout"), - }); - - let skinned_mesh_layout = - render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { - entries: &[ - mesh_binding, - BindGroupLayoutEntry { - binding: 1, - visibility: ShaderStages::VERTEX, - ty: BindingType::Buffer { - ty: BufferBindingType::Uniform, - has_dynamic_offset: true, - min_binding_size: BufferSize::new(JOINT_BUFFER_SIZE as u64), - }, - count: None, - }, - ], - label: Some("skinned_mesh_layout"), - }); - // A 1x1x1 'all 1.0' texture to use as a dummy texture to use in place of optional StandardMaterial textures let dummy_white_gpu_image = { let image = Image::default(); diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -555,10 +537,9 @@ impl FromWorld for MeshPipeline { MeshPipeline { view_layout, view_layout_multisampled, - mesh_layout, - skinned_mesh_layout, clustered_forward_buffer_binding_type, dummy_white_gpu_image, + mesh_layouts: MeshLayouts::new(&render_device), } } } diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -600,6 +581,7 @@ bitflags::bitflags! { const SCREEN_SPACE_AMBIENT_OCCLUSION = (1 << 8); const DEPTH_CLAMP_ORTHO = (1 << 9); const TAA = (1 << 10); + const MORPH_TARGETS = (1 << 11); const BLEND_RESERVED_BITS = Self::BLEND_MASK_BITS << Self::BLEND_SHIFT_BITS; // ← Bitmask reserving bits for the blend state const BLEND_OPAQUE = (0 << Self::BLEND_SHIFT_BITS); // ← Values are just sequential within the mask, and can range from 0 to 3 const BLEND_PREMULTIPLIED_ALPHA = (1 << Self::BLEND_SHIFT_BITS); // diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -671,6 +653,41 @@ impl MeshPipelineKey { } } +fn is_skinned(layout: &Hashed<InnerMeshVertexBufferLayout>) -> bool { + layout.contains(Mesh::ATTRIBUTE_JOINT_INDEX) && layout.contains(Mesh::ATTRIBUTE_JOINT_WEIGHT) +} +pub fn setup_morph_and_skinning_defs( + mesh_layouts: &MeshLayouts, + layout: &Hashed<InnerMeshVertexBufferLayout>, + offset: u32, + key: &MeshPipelineKey, + shader_defs: &mut Vec<ShaderDefVal>, + vertex_attributes: &mut Vec<VertexAttributeDescriptor>, +) -> BindGroupLayout { + let mut add_skin_data = || { + shader_defs.push("SKINNED".into()); + vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_INDEX.at_shader_location(offset)); + vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_WEIGHT.at_shader_location(offset + 1)); + }; + let is_morphed = key.intersects(MeshPipelineKey::MORPH_TARGETS); + match (is_skinned(layout), is_morphed) { + (true, false) => { + add_skin_data(); + mesh_layouts.skinned.clone() + } + (true, true) => { + add_skin_data(); + shader_defs.push("MORPH_TARGETS".into()); + mesh_layouts.morphed_skinned.clone() + } + (false, true) => { + shader_defs.push("MORPH_TARGETS".into()); + mesh_layouts.morphed.clone() + } + (false, false) => mesh_layouts.model_only.clone(), + } +} + impl SpecializedMeshPipeline for MeshPipeline { type Key = MeshPipelineKey; diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -724,16 +741,14 @@ impl SpecializedMeshPipeline for MeshPipeline { } }; - if layout.contains(Mesh::ATTRIBUTE_JOINT_INDEX) - && layout.contains(Mesh::ATTRIBUTE_JOINT_WEIGHT) - { - shader_defs.push("SKINNED".into()); - vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_INDEX.at_shader_location(5)); - vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_WEIGHT.at_shader_location(6)); - bind_group_layout.push(self.skinned_mesh_layout.clone()); - } else { - bind_group_layout.push(self.mesh_layout.clone()); - }; + bind_group_layout.push(setup_morph_and_skinning_defs( + &self.mesh_layouts, + layout, + 5, + &key, + &mut shader_defs, + &mut vertex_attributes, + )); if key.contains(MeshPipelineKey::SCREEN_SPACE_AMBIENT_OCCLUSION) { shader_defs.push("SCREEN_SPACE_AMBIENT_OCCLUSION".into()); diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -888,53 +903,61 @@ impl SpecializedMeshPipeline for MeshPipeline { } } -#[derive(Resource)] -pub struct MeshBindGroup { - pub normal: BindGroup, - pub skinned: Option<BindGroup>, +/// Bind groups for meshes currently loaded. +#[derive(Resource, Default)] +pub struct MeshBindGroups { + model_only: Option<BindGroup>, + skinned: Option<BindGroup>, + morph_targets: HashMap<HandleId, BindGroup>, +} +impl MeshBindGroups { + pub fn reset(&mut self) { + self.model_only = None; + self.skinned = None; + self.morph_targets.clear(); + } + /// Get the `BindGroup` for `GpuMesh` with given `handle_id`. + pub fn get(&self, handle_id: HandleId, is_skinned: bool, morph: bool) -> Option<&BindGroup> { + match (is_skinned, morph) { + (_, true) => self.morph_targets.get(&handle_id), + (true, false) => self.skinned.as_ref(), + (false, false) => self.model_only.as_ref(), + } + } } pub fn queue_mesh_bind_group( - mut commands: Commands, + meshes: Res<RenderAssets<Mesh>>, + mut groups: ResMut<MeshBindGroups>, mesh_pipeline: Res<MeshPipeline>, render_device: Res<RenderDevice>, mesh_uniforms: Res<ComponentUniforms<MeshUniform>>, skinned_mesh_uniform: Res<SkinnedMeshUniform>, + weights_uniform: Res<MorphUniform>, ) { - if let Some(mesh_binding) = mesh_uniforms.uniforms().binding() { - let mut mesh_bind_group = MeshBindGroup { - normal: render_device.create_bind_group(&BindGroupDescriptor { - entries: &[BindGroupEntry { - binding: 0, - resource: mesh_binding.clone(), - }], - label: Some("mesh_bind_group"), - layout: &mesh_pipeline.mesh_layout, - }), - skinned: None, - }; + groups.reset(); + let layouts = &mesh_pipeline.mesh_layouts; + let Some(model) = mesh_uniforms.buffer() else { + return; + }; + groups.model_only = Some(layouts.model_only(&render_device, model)); - if let Some(skinned_joints_buffer) = skinned_mesh_uniform.buffer.buffer() { - mesh_bind_group.skinned = Some(render_device.create_bind_group(&BindGroupDescriptor { - entries: &[ - BindGroupEntry { - binding: 0, - resource: mesh_binding, - }, - BindGroupEntry { - binding: 1, - resource: BindingResource::Buffer(BufferBinding { - buffer: skinned_joints_buffer, - offset: 0, - size: Some(NonZeroU64::new(JOINT_BUFFER_SIZE as u64).unwrap()), - }), - }, - ], - label: Some("skinned_mesh_bind_group"), - layout: &mesh_pipeline.skinned_mesh_layout, - })); + let skin = skinned_mesh_uniform.buffer.buffer(); + if let Some(skin) = skin { + groups.skinned = Some(layouts.skinned(&render_device, model, skin)); + } + + if let Some(weights) = weights_uniform.buffer.buffer() { + for (id, gpu_mesh) in meshes.iter() { + if let Some(targets) = gpu_mesh.morph_targets.as_ref() { + let group = if let Some(skin) = skin.filter(|_| is_skinned(&gpu_mesh.layout)) { + layouts.morphed_skinned(&render_device, model, skin, weights, targets) + } else { + layouts.morphed(&render_device, model, weights, targets) + }; + groups.morph_targets.insert(id.id(), group); + } } - commands.insert_resource(mesh_bind_group); } } diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -1170,33 +1193,43 @@ impl<P: PhaseItem, const I: usize> RenderCommand<P> for SetMeshViewBindGroup<I> pub struct SetMeshBindGroup<const I: usize>; impl<P: PhaseItem, const I: usize> RenderCommand<P> for SetMeshBindGroup<I> { - type Param = SRes<MeshBindGroup>; + type Param = SRes<MeshBindGroups>; type ViewWorldQuery = (); type ItemWorldQuery = ( + Read<Handle<Mesh>>, Read<DynamicUniformIndex<MeshUniform>>, Option<Read<SkinnedMeshJoints>>, + Option<Read<MorphIndex>>, ); + #[inline] fn render<'w>( _item: &P, _view: (), - (mesh_index, skinned_mesh_joints): ROQueryItem<'_, Self::ItemWorldQuery>, - mesh_bind_group: SystemParamItem<'w, '_, Self::Param>, + (mesh, mesh_index, skin_index, morph_index): ROQueryItem<Self::ItemWorldQuery>, + bind_groups: SystemParamItem<'w, '_, Self::Param>, pass: &mut TrackedRenderPass<'w>, ) -> RenderCommandResult { - if let Some(joints) = skinned_mesh_joints { - pass.set_bind_group( - I, - mesh_bind_group.into_inner().skinned.as_ref().unwrap(), - &[mesh_index.index(), joints.index], + let bind_groups = bind_groups.into_inner(); + let is_skinned = skin_index.is_some(); + let is_morphed = morph_index.is_some(); + + let Some(bind_group) = bind_groups.get(mesh.id(), is_skinned, is_morphed) else { + error!( + "The MeshBindGroups resource wasn't set in the render phase. \ + It should be set by the queue_mesh_bind_group system.\n\ + This is a bevy bug! Please open an issue." ); - } else { - pass.set_bind_group( - I, - &mesh_bind_group.into_inner().normal, - &[mesh_index.index()], - ); - } + return RenderCommandResult::Failure; + }; + let mut set_bind_group = |indices: &[u32]| pass.set_bind_group(I, bind_group, indices); + let mesh_index = mesh_index.index(); + match (skin_index, morph_index) { + (None, None) => set_bind_group(&[mesh_index]), + (Some(skin), None) => set_bind_group(&[mesh_index, skin.index]), + (None, Some(morph)) => set_bind_group(&[mesh_index, morph.index]), + (Some(skin), Some(morph)) => set_bind_group(&[mesh_index, skin.index, morph.index]), + }; RenderCommandResult::Success } } diff --git a/crates/bevy_pbr/src/render/mesh.wgsl b/crates/bevy_pbr/src/render/mesh.wgsl --- a/crates/bevy_pbr/src/render/mesh.wgsl +++ b/crates/bevy_pbr/src/render/mesh.wgsl @@ -24,6 +24,9 @@ struct Vertex { @location(5) joint_indices: vec4<u32>, @location(6) joint_weights: vec4<f32>, #endif +#ifdef MORPH_TARGETS + @builtin(vertex_index) index: u32, +#endif }; struct VertexOutput { diff --git a/crates/bevy_pbr/src/render/mesh.wgsl b/crates/bevy_pbr/src/render/mesh.wgsl --- a/crates/bevy_pbr/src/render/mesh.wgsl +++ b/crates/bevy_pbr/src/render/mesh.wgsl @@ -31,10 +34,37 @@ struct VertexOutput { #import bevy_pbr::mesh_vertex_output }; +#ifdef MORPH_TARGETS +fn morph_vertex(vertex_in: Vertex) -> Vertex { + var vertex = vertex_in; + let weight_count = layer_count(); + for (var i: u32 = 0u; i < weight_count; i ++) { + let weight = weight_at(i); + if weight == 0.0 { + continue; + } + vertex.position += weight * morph(vertex.index, position_offset, i); +#ifdef VERTEX_NORMALS + vertex.normal += weight * morph(vertex.index, normal_offset, i); +#endif +#ifdef VERTEX_TANGENTS + vertex.tangent += vec4(weight * morph(vertex.index, tangent_offset, i), 0.0); +#endif + } + return vertex; +} +#endif + @vertex -fn vertex(vertex: Vertex) -> VertexOutput { +fn vertex(vertex_no_morph: Vertex) -> VertexOutput { var out: VertexOutput; +#ifdef MORPH_TARGETS + var vertex = morph_vertex(vertex_no_morph); +#else + var vertex = vertex_no_morph; +#endif + #ifdef SKINNED var model = skin_model(vertex.joint_indices, vertex.joint_weights); #else diff --git /dev/null b/crates/bevy_pbr/src/render/mesh_bindings.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_pbr/src/render/mesh_bindings.rs @@ -0,0 +1,224 @@ +//! Bind group layout related definitions for the mesh pipeline. + +use bevy_render::{ + mesh::morph::MAX_MORPH_WEIGHTS, + render_resource::{ + BindGroup, BindGroupDescriptor, BindGroupLayout, BindGroupLayoutDescriptor, Buffer, + TextureView, + }, + renderer::RenderDevice, +}; + +const MORPH_WEIGHT_SIZE: usize = std::mem::size_of::<f32>(); +pub const MORPH_BUFFER_SIZE: usize = MAX_MORPH_WEIGHTS * MORPH_WEIGHT_SIZE; + +/// Individual layout entries. +mod layout_entry { + use super::MORPH_BUFFER_SIZE; + use crate::render::mesh::JOINT_BUFFER_SIZE; + use crate::MeshUniform; + use bevy_render::render_resource::{ + BindGroupLayoutEntry, BindingType, BufferBindingType, BufferSize, ShaderStages, ShaderType, + TextureSampleType, TextureViewDimension, + }; + + fn buffer(binding: u32, size: u64, visibility: ShaderStages) -> BindGroupLayoutEntry { + BindGroupLayoutEntry { + binding, + visibility, + count: None, + ty: BindingType::Buffer { + ty: BufferBindingType::Uniform, + has_dynamic_offset: true, + min_binding_size: BufferSize::new(size), + }, + } + } + pub(super) fn model(binding: u32) -> BindGroupLayoutEntry { + let size = MeshUniform::min_size().get(); + buffer(binding, size, ShaderStages::VERTEX | ShaderStages::FRAGMENT) + } + pub(super) fn skinning(binding: u32) -> BindGroupLayoutEntry { + buffer(binding, JOINT_BUFFER_SIZE as u64, ShaderStages::VERTEX) + } + pub(super) fn weights(binding: u32) -> BindGroupLayoutEntry { + buffer(binding, MORPH_BUFFER_SIZE as u64, ShaderStages::VERTEX) + } + pub(super) fn targets(binding: u32) -> BindGroupLayoutEntry { + BindGroupLayoutEntry { + binding, + visibility: ShaderStages::VERTEX, + ty: BindingType::Texture { + view_dimension: TextureViewDimension::D3, + sample_type: TextureSampleType::Float { filterable: false }, + multisampled: false, + }, + count: None, + } + } +} +/// Individual [`BindGroupEntry`](bevy_render::render_resource::BindGroupEntry) +/// for bind groups. +mod entry { + use super::MORPH_BUFFER_SIZE; + use crate::render::mesh::JOINT_BUFFER_SIZE; + use crate::MeshUniform; + use bevy_render::render_resource::{ + BindGroupEntry, BindingResource, Buffer, BufferBinding, BufferSize, ShaderType, TextureView, + }; + + fn entry(binding: u32, size: u64, buffer: &Buffer) -> BindGroupEntry { + BindGroupEntry { + binding, + resource: BindingResource::Buffer(BufferBinding { + buffer, + offset: 0, + size: Some(BufferSize::new(size).unwrap()), + }), + } + } + pub(super) fn model(binding: u32, buffer: &Buffer) -> BindGroupEntry { + entry(binding, MeshUniform::min_size().get(), buffer) + } + pub(super) fn skinning(binding: u32, buffer: &Buffer) -> BindGroupEntry { + entry(binding, JOINT_BUFFER_SIZE as u64, buffer) + } + pub(super) fn weights(binding: u32, buffer: &Buffer) -> BindGroupEntry { + entry(binding, MORPH_BUFFER_SIZE as u64, buffer) + } + pub(super) fn targets(binding: u32, texture: &TextureView) -> BindGroupEntry { + BindGroupEntry { + binding, + resource: BindingResource::TextureView(texture), + } + } +} + +/// All possible [`BindGroupLayout`]s in bevy's default mesh shader (`mesh.wgsl`). +#[derive(Clone)] +pub struct MeshLayouts { + /// The mesh model uniform (transform) and nothing else. + pub model_only: BindGroupLayout, + + /// Also includes the uniform for skinning + pub skinned: BindGroupLayout, + + /// Also includes the uniform and [`MorphAttributes`] for morph targets. + /// + /// [`MorphAttributes`]: bevy_render::mesh::morph::MorphAttributes + pub morphed: BindGroupLayout, + + /// Also includes both uniforms for skinning and morph targets, also the + /// morph target [`MorphAttributes`] binding. + /// + /// [`MorphAttributes`]: bevy_render::mesh::morph::MorphAttributes + pub morphed_skinned: BindGroupLayout, +} + +impl MeshLayouts { + /// Prepare the layouts used by the default bevy [`Mesh`]. + /// + /// [`Mesh`]: bevy_render::prelude::Mesh + pub fn new(render_device: &RenderDevice) -> Self { + MeshLayouts { + model_only: Self::model_only_layout(render_device), + skinned: Self::skinned_layout(render_device), + morphed: Self::morphed_layout(render_device), + morphed_skinned: Self::morphed_skinned_layout(render_device), + } + } + + // ---------- create individual BindGroupLayouts ---------- + + fn model_only_layout(render_device: &RenderDevice) -> BindGroupLayout { + render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { + entries: &[layout_entry::model(0)], + label: Some("mesh_layout"), + }) + } + fn skinned_layout(render_device: &RenderDevice) -> BindGroupLayout { + render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { + entries: &[layout_entry::model(0), layout_entry::skinning(1)], + label: Some("skinned_mesh_layout"), + }) + } + fn morphed_layout(render_device: &RenderDevice) -> BindGroupLayout { + render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { + entries: &[ + layout_entry::model(0), + layout_entry::weights(2), + layout_entry::targets(3), + ], + label: Some("morphed_mesh_layout"), + }) + } + fn morphed_skinned_layout(render_device: &RenderDevice) -> BindGroupLayout { + render_device.create_bind_group_layout(&BindGroupLayoutDescriptor { + entries: &[ + layout_entry::model(0), + layout_entry::skinning(1), + layout_entry::weights(2), + layout_entry::targets(3), + ], + label: Some("morphed_skinned_mesh_layout"), + }) + } + + // ---------- BindGroup methods ---------- + + pub fn model_only(&self, render_device: &RenderDevice, model: &Buffer) -> BindGroup { + render_device.create_bind_group(&BindGroupDescriptor { + entries: &[entry::model(0, model)], + layout: &self.model_only, + label: Some("model_only_mesh_bind_group"), + }) + } + pub fn skinned( + &self, + render_device: &RenderDevice, + model: &Buffer, + skin: &Buffer, + ) -> BindGroup { + render_device.create_bind_group(&BindGroupDescriptor { + entries: &[entry::model(0, model), entry::skinning(1, skin)], + layout: &self.skinned, + label: Some("skinned_mesh_bind_group"), + }) + } + pub fn morphed( + &self, + render_device: &RenderDevice, + model: &Buffer, + weights: &Buffer, + targets: &TextureView, + ) -> BindGroup { + render_device.create_bind_group(&BindGroupDescriptor { + entries: &[ + entry::model(0, model), + entry::weights(2, weights), + entry::targets(3, targets), + ], + layout: &self.morphed, + label: Some("morphed_mesh_bind_group"), + }) + } + pub fn morphed_skinned( + &self, + render_device: &RenderDevice, + model: &Buffer, + skin: &Buffer, + weights: &Buffer, + targets: &TextureView, + ) -> BindGroup { + render_device.create_bind_group(&BindGroupDescriptor { + entries: &[ + entry::model(0, model), + entry::skinning(1, skin), + entry::weights(2, weights), + entry::targets(3, targets), + ], + layout: &self.morphed_skinned, + label: Some("morphed_skinned_mesh_bind_group"), + }) + } +} diff --git a/crates/bevy_pbr/src/render/mesh_bindings.wgsl b/crates/bevy_pbr/src/render/mesh_bindings.wgsl --- a/crates/bevy_pbr/src/render/mesh_bindings.wgsl +++ b/crates/bevy_pbr/src/render/mesh_bindings.wgsl @@ -4,8 +4,17 @@ @group(2) @binding(0) var<uniform> mesh: Mesh; + #ifdef SKINNED @group(2) @binding(1) var<uniform> joint_matrices: SkinnedMesh; #import bevy_pbr::skinning #endif + +#ifdef MORPH_TARGETS +@group(2) @binding(2) +var<uniform> morph_weights: MorphWeights; +@group(2) @binding(3) +var morph_targets: texture_3d<f32>; +#import bevy_pbr::morph +#endif diff --git a/crates/bevy_pbr/src/render/mesh_types.wgsl b/crates/bevy_pbr/src/render/mesh_types.wgsl --- a/crates/bevy_pbr/src/render/mesh_types.wgsl +++ b/crates/bevy_pbr/src/render/mesh_types.wgsl @@ -14,6 +14,12 @@ struct SkinnedMesh { }; #endif +#ifdef MORPH_TARGETS +struct MorphWeights { + weights: array<vec4<f32>, 16u>, // 16 = 64 / 4 (64 = MAX_MORPH_WEIGHTS) +}; +#endif + const MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 1u; // 2^31 - if the flag is set, the sign is positive, else it is negative const MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT: u32 = 2147483648u; diff --git a/crates/bevy_pbr/src/render/mod.rs b/crates/bevy_pbr/src/render/mod.rs --- a/crates/bevy_pbr/src/render/mod.rs +++ b/crates/bevy_pbr/src/render/mod.rs @@ -1,7 +1,10 @@ mod fog; mod light; -mod mesh; +pub(crate) mod mesh; +mod mesh_bindings; +mod morph; pub use fog::*; pub use light::*; pub use mesh::*; +pub use mesh_bindings::MeshLayouts; diff --git /dev/null b/crates/bevy_pbr/src/render/morph.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_pbr/src/render/morph.rs @@ -0,0 +1,96 @@ +use std::{iter, mem}; + +use bevy_ecs::prelude::*; +use bevy_render::{ + mesh::morph::{MeshMorphWeights, MAX_MORPH_WEIGHTS}, + render_resource::{BufferUsages, BufferVec}, + renderer::{RenderDevice, RenderQueue}, + view::ComputedVisibility, + Extract, +}; +use bytemuck::Pod; + +#[derive(Component)] +pub struct MorphIndex { + pub(super) index: u32, +} +#[derive(Resource)] +pub struct MorphUniform { + pub buffer: BufferVec<f32>, +} +impl Default for MorphUniform { + fn default() -> Self { + Self { + buffer: BufferVec::new(BufferUsages::UNIFORM), + } + } +} + +pub fn prepare_morphs( + device: Res<RenderDevice>, + queue: Res<RenderQueue>, + mut uniform: ResMut<MorphUniform>, +) { + if uniform.buffer.is_empty() { + return; + } + let buffer = &mut uniform.buffer; + buffer.reserve(buffer.len(), &device); + buffer.write_buffer(&device, &queue); +} + +const fn can_align(step: usize, target: usize) -> bool { + step % target == 0 || target % step == 0 +} +const WGPU_MIN_ALIGN: usize = 256; + +/// Align a [`BufferVec`] to `N` bytes by padding the end with `T::default()` values. +fn add_to_alignment<T: Pod + Default>(buffer: &mut BufferVec<T>) { + let n = WGPU_MIN_ALIGN; + let t_size = mem::size_of::<T>(); + if !can_align(n, t_size) { + // This panic is stripped at compile time, due to n, t_size and can_align being const + panic!( + "BufferVec should contain only types with a size multiple or divisible by {n}, \ + {} has a size of {t_size}, which is neiter multiple or divisible by {n}", + std::any::type_name::<T>() + ); + } + + let buffer_size = buffer.len(); + let byte_size = t_size * buffer_size; + let bytes_over_n = byte_size % n; + if bytes_over_n == 0 { + return; + } + let bytes_to_add = n - bytes_over_n; + let ts_to_add = bytes_to_add / t_size; + buffer.extend(iter::repeat_with(T::default).take(ts_to_add)); +} + +pub fn extract_morphs( + mut commands: Commands, + mut previous_len: Local<usize>, + mut uniform: ResMut<MorphUniform>, + query: Extract<Query<(Entity, &ComputedVisibility, &MeshMorphWeights)>>, +) { + uniform.buffer.clear(); + + let mut values = Vec::with_capacity(*previous_len); + + for (entity, computed_visibility, morph_weights) in &query { + if !computed_visibility.is_visible() { + continue; + } + let start = uniform.buffer.len(); + let weights = morph_weights.weights(); + let legal_weights = weights.iter().take(MAX_MORPH_WEIGHTS).copied(); + uniform.buffer.extend(legal_weights); + add_to_alignment::<f32>(&mut uniform.buffer); + + let index = (start * mem::size_of::<f32>()) as u32; + values.push((entity, MorphIndex { index })); + } + *previous_len = values.len(); + commands.insert_or_spawn_batch(values); +} diff --git /dev/null b/crates/bevy_pbr/src/render/morph.wgsl new file mode 100644 --- /dev/null +++ b/crates/bevy_pbr/src/render/morph.wgsl @@ -0,0 +1,45 @@ +// If using this WGSL snippet as an #import, the following should be in scope: +// +// - the `morph_weigths` uniform of type `MorphWeights` +// - the `morph_targets` 3d texture +// +// They are defined in `mesh_types.wgsl` and `mesh_bindings.wgsl`. + +#define_import_path bevy_pbr::morph + +// NOTE: Those are the "hardcoded" values found in `MorphAttributes` struct +// in crates/bevy_render/src/mesh/morph/visitors.rs +// In an ideal world, the offsets are established dynamically and passed as #defines +// to the shader, but it's out of scope for the initial implementation of morph targets. +const position_offset: u32 = 0u; +const normal_offset: u32 = 3u; +const tangent_offset: u32 = 6u; +const total_component_count: u32 = 9u; + +fn layer_count() -> u32 { + let dimensions = textureDimensions(morph_targets); + return u32(dimensions.z); +} +fn component_texture_coord(vertex_index: u32, component_offset: u32) -> vec2<u32> { + let width = u32(textureDimensions(morph_targets).x); + let component_index = total_component_count * vertex_index + component_offset; + return vec2<u32>(component_index % width, component_index / width); +} +fn weight_at(weight_index: u32) -> f32 { + let i = weight_index; + return morph_weights.weights[i / 4u][i % 4u]; +} +fn morph_pixel(vertex: u32, component: u32, weight: u32) -> f32 { + let coord = component_texture_coord(vertex, component); + // Due to https://gpuweb.github.io/gpuweb/wgsl/#texel-formats + // While the texture stores a f32, the textureLoad returns a vec4<>, where + // only the first component is set. + return textureLoad(morph_targets, vec3(coord, weight), 0).r; +} +fn morph(vertex_index: u32, component_offset: u32, weight_index: u32) -> vec3<f32> { + return vec3<f32>( + morph_pixel(vertex_index, component_offset, weight_index), + morph_pixel(vertex_index, component_offset + 1u, weight_index), + morph_pixel(vertex_index, component_offset + 2u, weight_index), + ); +} diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -63,6 +63,7 @@ codespan-reporting = "0.11.0" naga = { version = "0.12.0", features = ["wgsl-in"] } serde = { version = "1", features = ["derive"] } bitflags = "2.3" +bytemuck = { version = "1.5", features = ["derive"] } smallvec = { version = "1.6", features = ["union", "const_generics"] } once_cell = "1.4.1" # TODO: replace once_cell with std equivalent if/when this lands: https://github.com/rust-lang/rfcs/pull/2788 downcast-rs = "1.2.0" diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -32,7 +32,7 @@ pub mod prelude { pub use crate::{ camera::{Camera, OrthographicProjection, PerspectiveProjection, Projection}, color::Color, - mesh::{shape, Mesh}, + mesh::{morph::MorphWeights, shape, Mesh}, render_resource::Shader, spatial_bundle::SpatialBundle, texture::{Image, ImagePlugin}, diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -49,7 +49,7 @@ use wgpu::Instance; use crate::{ camera::CameraPlugin, - mesh::MeshPlugin, + mesh::{morph::MorphPlugin, MeshPlugin}, render_resource::{PipelineCache, Shader, ShaderLoader}, renderer::{render_system, RenderInstance}, settings::WgpuSettings, diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -336,6 +336,7 @@ impl Plugin for RenderPlugin { ViewPlugin, MeshPlugin, GlobalsPlugin, + MorphPlugin, )); app.register_type::<color::Color>() diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -3,11 +3,13 @@ pub mod skinning; pub use wgpu::PrimitiveTopology; use crate::{ + prelude::Image, primitives::Aabb, - render_asset::{PrepareAssetError, RenderAsset}, - render_resource::{Buffer, VertexBufferLayout}, + render_asset::{PrepareAssetError, RenderAsset, RenderAssets}, + render_resource::{Buffer, TextureView, VertexBufferLayout}, renderer::RenderDevice, }; +use bevy_asset::Handle; use bevy_core::cast_slice; use bevy_derive::EnumVariantMeta; use bevy_ecs::system::{lifetimeless::SRes, SystemParamItem}; diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -35,6 +37,8 @@ pub struct Mesh { /// which allows easy stable VertexBuffers (i.e. same buffer order) attributes: BTreeMap<MeshVertexAttributeId, MeshAttributeData>, indices: Option<Indices>, + morph_targets: Option<Handle<Image>>, + morph_target_names: Option<Vec<String>>, } /// Contains geometry in the form of a mesh. diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -129,6 +133,8 @@ impl Mesh { primitive_topology, attributes: Default::default(), indices: None, + morph_targets: None, + morph_target_names: None, } } diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -444,6 +450,28 @@ impl Mesh { None } + + /// Whether this mesh has morph targets. + pub fn has_morph_targets(&self) -> bool { + self.morph_targets.is_some() + } + + /// Set [morph targets] image for this mesh. This requires a "morph target image". See [`MorphTargetImage`](crate::mesh::morph::MorphTargetImage) for info. + /// + /// [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation + pub fn set_morph_targets(&mut self, morph_targets: Handle<Image>) { + self.morph_targets = Some(morph_targets); + } + + /// Sets the names of each morph target. This should correspond to the order of the morph targets in `set_morph_targets`. + pub fn set_morph_target_names(&mut self, names: Vec<String>) { + self.morph_target_names = Some(names); + } + + /// Gets a list of all morph target names, if they exist. + pub fn morph_target_names(&self) -> Option<&[String]> { + self.morph_target_names.as_deref() + } } #[derive(Debug, Clone)] diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -859,6 +887,7 @@ pub struct GpuMesh { /// Contains all attribute data for each vertex. pub vertex_buffer: Buffer, pub vertex_count: u32, + pub morph_targets: Option<TextureView>, pub buffer_info: GpuBufferInfo, pub primitive_topology: PrimitiveTopology, pub layout: MeshVertexBufferLayout, diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -879,7 +908,7 @@ pub enum GpuBufferInfo { impl RenderAsset for Mesh { type ExtractedAsset = Mesh; type PreparedAsset = GpuMesh; - type Param = SRes<RenderDevice>; + type Param = (SRes<RenderDevice>, SRes<RenderAssets<Image>>); /// Clones the mesh. fn extract_asset(&self) -> Self::ExtractedAsset { diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -889,7 +918,7 @@ impl RenderAsset for Mesh { /// Converts the extracted mesh a into [`GpuMesh`]. fn prepare_asset( mesh: Self::ExtractedAsset, - render_device: &mut SystemParamItem<Self::Param>, + (render_device, images): &mut SystemParamItem<Self::Param>, ) -> Result<Self::PreparedAsset, PrepareAssetError<Self::ExtractedAsset>> { let vertex_buffer_data = mesh.get_vertex_buffer_data(); let vertex_buffer = render_device.create_buffer_with_data(&BufferInitDescriptor { diff --git a/crates/bevy_render/src/mesh/mesh/mod.rs b/crates/bevy_render/src/mesh/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mesh/mod.rs @@ -920,6 +949,9 @@ impl RenderAsset for Mesh { buffer_info, primitive_topology: mesh.primitive_topology(), layout: mesh_vertex_buffer_layout, + morph_targets: mesh + .morph_targets + .and_then(|mt| images.get(&mt).map(|i| i.texture_view.clone())), }) } } diff --git a/crates/bevy_render/src/mesh/mod.rs b/crates/bevy_render/src/mesh/mod.rs --- a/crates/bevy_render/src/mesh/mod.rs +++ b/crates/bevy_render/src/mesh/mod.rs @@ -1,5 +1,6 @@ #[allow(clippy::module_inception)] mod mesh; +pub mod morph; /// Generation for some primitive shape meshes. pub mod shape; diff --git /dev/null b/crates/bevy_render/src/mesh/morph.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_render/src/mesh/morph.rs @@ -0,0 +1,274 @@ +use crate::{ + mesh::Mesh, + render_resource::{Extent3d, TextureDimension, TextureFormat}, + texture::Image, +}; +use bevy_app::{Plugin, PostUpdate}; +use bevy_asset::Handle; +use bevy_ecs::prelude::*; +use bevy_hierarchy::Children; +use bevy_math::Vec3; +use bevy_reflect::Reflect; +use bytemuck::{Pod, Zeroable}; +use std::{iter, mem}; +use thiserror::Error; + +const MAX_TEXTURE_WIDTH: u32 = 2048; +// NOTE: "component" refers to the element count of math objects, +// Vec3 has 3 components, Mat2 has 4 components. +const MAX_COMPONENTS: u32 = MAX_TEXTURE_WIDTH * MAX_TEXTURE_WIDTH; + +/// Max target count available for [morph targets](MorphWeights). +pub const MAX_MORPH_WEIGHTS: usize = 64; + +/// [Inherit weights](inherit_weights) from glTF mesh parent entity to direct +/// bevy mesh child entities (ie: glTF primitive). +pub struct MorphPlugin; +impl Plugin for MorphPlugin { + fn build(&self, app: &mut bevy_app::App) { + app.register_type::<MorphWeights>() + .register_type::<MeshMorphWeights>() + .add_systems(PostUpdate, inherit_weights); + } +} + +#[derive(Error, Clone, Debug)] +pub enum MorphBuildError { + #[error( + "Too many vertex×components in morph target, max is {MAX_COMPONENTS}, \ + got {vertex_count}×{component_count} = {}", + *vertex_count * *component_count as usize + )] + TooManyAttributes { + vertex_count: usize, + component_count: u32, + }, + #[error( + "Bevy only supports up to {} morph targets (individual poses), tried to \ + create a model with {target_count} morph targets", + MAX_MORPH_WEIGHTS + )] + TooManyTargets { target_count: usize }, +} + +/// An image formatted for use with [`MorphWeights`] for rendering the morph target. +#[derive(Debug)] +pub struct MorphTargetImage(pub Image); + +impl MorphTargetImage { + /// Generate textures for each morph target. + /// + /// This accepts an "iterator of [`MorphAttributes`] iterators". Each item iterated in the top level + /// iterator corresponds "the attributes of a specific morph target". + /// + /// Each pixel of the texture is a component of morph target animated + /// attributes. So a set of 9 pixels is this morph's displacement for + /// position, normal and tangents of a single vertex (each taking 3 pixels). + pub fn new( + targets: impl ExactSizeIterator<Item = impl Iterator<Item = MorphAttributes>>, + vertex_count: usize, + ) -> Result<Self, MorphBuildError> { + let max = MAX_TEXTURE_WIDTH; + let target_count = targets.len(); + if target_count > MAX_MORPH_WEIGHTS { + return Err(MorphBuildError::TooManyTargets { target_count }); + } + let component_count = (vertex_count * MorphAttributes::COMPONENT_COUNT) as u32; + let Some((Rect(width, height), padding)) = lowest_2d(component_count , max) else { + return Err(MorphBuildError::TooManyAttributes { vertex_count, component_count }); + }; + let data = targets + .flat_map(|mut attributes| { + let layer_byte_count = (padding + component_count) as usize * mem::size_of::<f32>(); + let mut buffer = Vec::with_capacity(layer_byte_count); + for _ in 0..vertex_count { + let Some(to_add) = attributes.next() else { + break; + }; + buffer.extend_from_slice(bytemuck::bytes_of(&to_add)); + } + // Pad each layer so that they fit width * height + buffer.extend(iter::repeat(0).take(padding as usize * mem::size_of::<f32>())); + debug_assert_eq!(buffer.len(), layer_byte_count); + buffer + }) + .collect(); + let extents = Extent3d { + width, + height, + depth_or_array_layers: target_count as u32, + }; + let image = Image::new(extents, TextureDimension::D3, data, TextureFormat::R32Float); + Ok(MorphTargetImage(image)) + } +} + +/// Controls the [morph targets] for all child [`Handle<Mesh>`] entities. In most cases, [`MorphWeights`] should be considered +/// the "source o[f truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`] +/// if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child +/// [`MeshMorphWeights`] values. +/// +/// This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets +/// as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material). +/// Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then +/// synchronized to child [`Handle<Mesh>`] / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective). +/// +/// Add this to the parent of one or more [`Entities`](`Entity`) with a [`Handle<Mesh>`] with a [`MeshMorphWeights`]. +/// +/// [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +#[derive(Reflect, Default, Debug, Clone, Component)] +#[reflect(Debug, Component)] +pub struct MorphWeights { + weights: Vec<f32>, + /// The first mesh primitive assigned to these weights + first_mesh: Option<Handle<Mesh>>, +} +impl MorphWeights { + pub fn new( + weights: Vec<f32>, + first_mesh: Option<Handle<Mesh>>, + ) -> Result<Self, MorphBuildError> { + if weights.len() > MAX_MORPH_WEIGHTS { + let target_count = weights.len(); + return Err(MorphBuildError::TooManyTargets { target_count }); + } + Ok(MorphWeights { + weights, + first_mesh, + }) + } + /// The first child [`Handle<Mesh>`] primitive controlled by these weights. + /// This can be used to look up metadata information such as [`Mesh::morph_target_names`]. + pub fn first_mesh(&self) -> Option<&Handle<Mesh>> { + self.first_mesh.as_ref() + } + pub fn weights(&self) -> &[f32] { + &self.weights + } + pub fn weights_mut(&mut self) -> &mut [f32] { + &mut self.weights + } +} + +/// Control a specific [`Mesh`] instance's [morph targets]. These control the weights of +/// specific "mesh primitives" in scene formats like GLTF. They can be set manually, but +/// in most cases they should "automatically" synced by setting the [`MorphWeights`] component +/// on a parent entity. +/// +/// See [`MorphWeights`] for more details on Bevy's morph target implementation. +/// +/// Add this to an [`Entity`] with a [`Handle<Mesh>`] with a [`MorphAttributes`] set +/// to control individual weights of each morph target. +/// +/// [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +#[derive(Reflect, Default, Debug, Clone, Component)] +#[reflect(Debug, Component)] +pub struct MeshMorphWeights { + weights: Vec<f32>, +} +impl MeshMorphWeights { + pub fn new(weights: Vec<f32>) -> Result<Self, MorphBuildError> { + if weights.len() > MAX_MORPH_WEIGHTS { + let target_count = weights.len(); + return Err(MorphBuildError::TooManyTargets { target_count }); + } + Ok(MeshMorphWeights { weights }) + } + pub fn weights(&self) -> &[f32] { + &self.weights + } + pub fn weights_mut(&mut self) -> &mut [f32] { + &mut self.weights + } +} + +/// Bevy meshes are gltf primitives, [`MorphWeights`] on the bevy node entity +/// should be inherited by children meshes. +/// +/// Only direct children are updated, to fulfill the expectations of glTF spec. +pub fn inherit_weights( + morph_nodes: Query<(&Children, &MorphWeights), (Without<Handle<Mesh>>, Changed<MorphWeights>)>, + mut morph_primitives: Query<&mut MeshMorphWeights, With<Handle<Mesh>>>, +) { + for (children, parent_weights) in &morph_nodes { + let mut iter = morph_primitives.iter_many_mut(children); + while let Some(mut child_weight) = iter.fetch_next() { + child_weight.weights.clear(); + child_weight.weights.extend(&parent_weights.weights); + } + } +} + +/// Attributes **differences** used for morph targets. +/// +/// See [`MorphTargetImage`] for more information. +#[derive(Copy, Clone, PartialEq, Pod, Zeroable, Default)] +#[repr(C)] +pub struct MorphAttributes { + /// The vertex position difference between base mesh and this target. + pub position: Vec3, + /// The vertex normal difference between base mesh and this target. + pub normal: Vec3, + /// The vertex tangent difference between base mesh and this target. + /// + /// Note that tangents are a `Vec4`, but only the `xyz` components are + /// animated, as the `w` component is the sign and cannot be animated. + pub tangent: Vec3, +} +impl From<[Vec3; 3]> for MorphAttributes { + fn from([position, normal, tangent]: [Vec3; 3]) -> Self { + MorphAttributes { + position, + normal, + tangent, + } + } +} +impl MorphAttributes { + /// How many components `MorphAttributes` has. + /// + /// Each `Vec3` has 3 components, we have 3 `Vec3`, for a total of 9. + pub const COMPONENT_COUNT: usize = 9; + + pub fn new(position: Vec3, normal: Vec3, tangent: Vec3) -> Self { + MorphAttributes { + position, + normal, + tangent, + } + } +} + +/// Integer division rounded up. +const fn div_ceil(lhf: u32, rhs: u32) -> u32 { + (lhf + rhs - 1) / rhs +} +struct Rect(u32, u32); + +/// Find the smallest rectangle of maximum edge size `max_edge` that contains +/// at least `min_includes` cells. `u32` is how many extra cells the rectangle +/// has. +/// +/// The following rectangle contains 27 cells, and its longest edge is 9: +/// ```text +/// ---------------------------- +/// |1 |2 |3 |4 |5 |6 |7 |8 |9 | +/// ---------------------------- +/// |2 | | | | | | | | | +/// ---------------------------- +/// |3 | | | | | | | | | +/// ---------------------------- +/// ``` +/// +/// Returns `None` if `max_edge` is too small to build a rectangle +/// containing `min_includes` cells. +fn lowest_2d(min_includes: u32, max_edge: u32) -> Option<(Rect, u32)> { + (1..=max_edge) + .filter_map(|a| { + let b = div_ceil(min_includes, a); + let diff = (a * b).checked_sub(min_includes)?; + Some((Rect(a, b), diff)) + }) + .filter_map(|(rect, diff)| (rect.1 <= max_edge).then_some((rect, diff))) + .min_by_key(|(_, diff)| *diff) +} diff --git a/examples/README.md b/examples/README.md --- a/examples/README.md +++ b/examples/README.md @@ -151,6 +151,7 @@ Example | Description [Animated Transform](../examples/animation/animated_transform.rs) | Create and play an animation defined by code that operates on the `Transform` component [Cubic Curve](../examples/animation/cubic_curve.rs) | Bezier curve example showing a cube following a cubic curve [Custom Skinned Mesh](../examples/animation/custom_skinned_mesh.rs) | Skinned mesh example with mesh and joints data defined in code +[Morph Targets](../examples/animation/morph_targets.rs) | Plays an animation from a glTF file with meshes with morph targets [glTF Skinned Mesh](../examples/animation/gltf_skinned_mesh.rs) | Skinned mesh example with mesh and joints data loaded from a glTF file ## Application diff --git /dev/null b/examples/animation/morph_targets.rs new file mode 100644 --- /dev/null +++ b/examples/animation/morph_targets.rs @@ -0,0 +1,97 @@ +//! Controls morph targets in a loaded scene. +//! +//! Illustrates: +//! +//! - How to access and modify individual morph target weights. +//! See the [`update_weights`] system for details. +//! - How to read morph target names in [`name_morphs`]. +//! - How to play morph target animations in [`setup_animations`]. + +use bevy::prelude::*; +use std::f32::consts::PI; + +fn main() { + App::new() + .add_plugins(DefaultPlugins.set(WindowPlugin { + primary_window: Some(Window { + title: "morph targets".to_string(), + ..default() + }), + ..default() + })) + .insert_resource(AmbientLight { + brightness: 1.0, + ..default() + }) + .add_systems(Startup, setup) + .add_systems(Update, (name_morphs, setup_animations)) + .run(); +} + +#[derive(Resource)] +struct MorphData { + the_wave: Handle<AnimationClip>, + mesh: Handle<Mesh>, +} + +fn setup(asset_server: Res<AssetServer>, mut commands: Commands) { + commands.insert_resource(MorphData { + the_wave: asset_server.load("models/animated/MorphStressTest.gltf#Animation2"), + mesh: asset_server.load("models/animated/MorphStressTest.gltf#Mesh0/Primitive0"), + }); + commands.spawn(SceneBundle { + scene: asset_server.load("models/animated/MorphStressTest.gltf#Scene0"), + ..default() + }); + commands.spawn(DirectionalLightBundle { + directional_light: DirectionalLight { + color: Color::WHITE, + illuminance: 19350.0, + ..default() + }, + transform: Transform::from_rotation(Quat::from_rotation_z(PI / 2.0)), + ..default() + }); + commands.spawn(Camera3dBundle { + transform: Transform::from_xyz(3.0, 2.1, 10.2).looking_at(Vec3::ZERO, Vec3::Y), + ..default() + }); +} + +/// Plays an [`AnimationClip`] from the loaded [`Gltf`] on the [`AnimationPlayer`] created by the spawned scene. +fn setup_animations( + mut has_setup: Local<bool>, + mut players: Query<(&Name, &mut AnimationPlayer)>, + morph_data: Res<MorphData>, +) { + if *has_setup { + return; + } + for (name, mut player) in &mut players { + // The name of the entity in the GLTF scene containing the AnimationPlayer for our morph targets is "Main" + if name.as_str() != "Main" { + continue; + } + player.play(morph_data.the_wave.clone()).repeat(); + *has_setup = true; + } +} + +/// You can get the target names in their corresponding [`Mesh`]. +/// They are in the order of the weights. +fn name_morphs( + mut has_printed: Local<bool>, + morph_data: Res<MorphData>, + meshes: Res<Assets<Mesh>>, +) { + if *has_printed { + return; + } + + let Some(mesh) = meshes.get(&morph_data.mesh) else { return }; + let Some(names) = mesh.morph_target_names() else { return }; + for name in names { + println!(" {name}"); + } + *has_printed = true; +} diff --git /dev/null b/examples/tools/scene_viewer/animation_plugin.rs new file mode 100644 --- /dev/null +++ b/examples/tools/scene_viewer/animation_plugin.rs @@ -0,0 +1,111 @@ +//! Control animations of entities in the loaded scene. +use bevy::{gltf::Gltf, prelude::*}; + +use crate::scene_viewer_plugin::SceneHandle; + +/// Controls animation clips for a unique entity. +#[derive(Component)] +struct Clips { + clips: Vec<Handle<AnimationClip>>, + current: usize, +} +impl Clips { + fn new(clips: Vec<Handle<AnimationClip>>) -> Self { + Clips { clips, current: 0 } + } + /// # Panics + /// + /// When no clips are present. + fn current(&self) -> Handle<AnimationClip> { + self.clips[self.current].clone_weak() + } + fn advance_to_next(&mut self) { + self.current = (self.current + 1) % self.clips.len(); + } +} + +/// Read [`AnimationClip`]s from the loaded [`Gltf`] and assign them to the +/// entities they control. [`AnimationClip`]s control specific entities, and +/// trying to play them on an [`AnimationPlayer`] controlling a different +/// entities will result in odd animations, we take extra care to store +/// animation clips for given entities in the [`Clips`] component we defined +/// earlier in this file. +fn assign_clips( + mut players: Query<(Entity, &mut AnimationPlayer, &Name)>, + scene_handle: Res<SceneHandle>, + clips: Res<Assets<AnimationClip>>, + gltf_assets: Res<Assets<Gltf>>, + mut commands: Commands, + mut setup: Local<bool>, +) { + if scene_handle.is_loaded && !*setup { + *setup = true; + } else { + return; + } + let gltf = gltf_assets.get(&scene_handle.gltf_handle).unwrap(); + let animations = &gltf.animations; + if !animations.is_empty() { + let count = animations.len(); + let plural = if count == 1 { "" } else { "s" }; + info!("Found {} animation{plural}", animations.len()); + let names: Vec<_> = gltf.named_animations.keys().collect(); + info!("Animation names: {names:?}"); + } + for (entity, mut player, name) in &mut players { + let clips = clips + .iter() + .filter_map(|(k, v)| v.compatible_with(name).then_some(k)) + .map(|id| clips.get_handle(id)) + .collect(); + let animations = Clips::new(clips); + player.play(animations.current()).repeat(); + commands.entity(entity).insert(animations); + } +} + +fn handle_inputs( + keyboard_input: Res<Input<KeyCode>>, + mut animation_player: Query<(&mut AnimationPlayer, &mut Clips, Entity, Option<&Name>)>, +) { + for (mut player, mut clips, entity, name) in &mut animation_player { + let display_entity_name = match name { + Some(name) => name.to_string(), + None => format!("entity {entity:?}"), + }; + if keyboard_input.just_pressed(KeyCode::Space) { + if player.is_paused() { + info!("resuming animation for {display_entity_name}"); + player.resume(); + } else { + info!("pausing animation for {display_entity_name}"); + player.pause(); + } + } + if clips.clips.len() <= 1 { + continue; + } + + if keyboard_input.just_pressed(KeyCode::Return) { + info!("switching to new animation for {display_entity_name}"); + + let resume = !player.is_paused(); + // set the current animation to its start and pause it to reset to its starting state + player.set_elapsed(0.0).pause(); + + clips.advance_to_next(); + let current_clip = clips.current(); + player.play(current_clip).repeat(); + if resume { + player.resume(); + } + } + } +} + +pub struct AnimationManipulationPlugin; +impl Plugin for AnimationManipulationPlugin { + fn build(&self, app: &mut App) { + app.add_systems(Update, (handle_inputs, assign_clips)); + } +} diff --git a/examples/tools/scene_viewer/main.rs b/examples/tools/scene_viewer/main.rs --- a/examples/tools/scene_viewer/main.rs +++ b/examples/tools/scene_viewer/main.rs @@ -14,10 +14,14 @@ use bevy::{ window::WindowPlugin, }; +#[cfg(feature = "animation")] +mod animation_plugin; mod camera_controller_plugin; +mod morph_viewer_plugin; mod scene_viewer_plugin; use camera_controller_plugin::{CameraController, CameraControllerPlugin}; +use morph_viewer_plugin::MorphViewerPlugin; use scene_viewer_plugin::{SceneHandle, SceneViewerPlugin}; fn main() { diff --git a/examples/tools/scene_viewer/main.rs b/examples/tools/scene_viewer/main.rs --- a/examples/tools/scene_viewer/main.rs +++ b/examples/tools/scene_viewer/main.rs @@ -42,10 +46,14 @@ fn main() { }), CameraControllerPlugin, SceneViewerPlugin, + MorphViewerPlugin, )) .add_systems(Startup, setup) .add_systems(PreUpdate, setup_scene_after_load); + #[cfg(feature = "animation")] + app.add_plugins(animation_plugin::AnimationManipulationPlugin); + app.run(); } diff --git /dev/null b/examples/tools/scene_viewer/morph_viewer_plugin.rs new file mode 100644 --- /dev/null +++ b/examples/tools/scene_viewer/morph_viewer_plugin.rs @@ -0,0 +1,287 @@ +//! Enable controls for morph targets detected in a loaded scene. +//! +//! Collect morph targets and assing keys to them, +//! shows on screen additional controls for morph targets. +//! +//! Illustrates how to access and modify individual morph target weights. +//! See the [`update_morphs`] system for details. +//! +//! Also illustrates how to read morph target names in [`detect_morphs`]. + +use crate::scene_viewer_plugin::SceneHandle; +use bevy::prelude::*; +use std::fmt; + +const WEIGHT_PER_SECOND: f32 = 0.8; +const ALL_MODIFIERS: &[KeyCode] = &[KeyCode::ShiftLeft, KeyCode::ControlLeft, KeyCode::AltLeft]; +const AVAILABLE_KEYS: [MorphKey; 56] = [ + MorphKey::new("r", &[], KeyCode::R), + MorphKey::new("t", &[], KeyCode::T), + MorphKey::new("z", &[], KeyCode::Z), + MorphKey::new("i", &[], KeyCode::I), + MorphKey::new("o", &[], KeyCode::O), + MorphKey::new("p", &[], KeyCode::P), + MorphKey::new("f", &[], KeyCode::F), + MorphKey::new("g", &[], KeyCode::G), + MorphKey::new("h", &[], KeyCode::H), + MorphKey::new("j", &[], KeyCode::J), + MorphKey::new("k", &[], KeyCode::K), + MorphKey::new("y", &[], KeyCode::Y), + MorphKey::new("x", &[], KeyCode::X), + MorphKey::new("c", &[], KeyCode::C), + MorphKey::new("v", &[], KeyCode::V), + MorphKey::new("b", &[], KeyCode::B), + MorphKey::new("n", &[], KeyCode::N), + MorphKey::new("m", &[], KeyCode::M), + MorphKey::new("0", &[], KeyCode::Key0), + MorphKey::new("1", &[], KeyCode::Key1), + MorphKey::new("2", &[], KeyCode::Key2), + MorphKey::new("3", &[], KeyCode::Key3), + MorphKey::new("4", &[], KeyCode::Key4), + MorphKey::new("5", &[], KeyCode::Key5), + MorphKey::new("6", &[], KeyCode::Key6), + MorphKey::new("7", &[], KeyCode::Key7), + MorphKey::new("8", &[], KeyCode::Key8), + MorphKey::new("9", &[], KeyCode::Key9), + MorphKey::new("lshift-R", &[KeyCode::ShiftLeft], KeyCode::R), + MorphKey::new("lshift-T", &[KeyCode::ShiftLeft], KeyCode::T), + MorphKey::new("lshift-Z", &[KeyCode::ShiftLeft], KeyCode::Z), + MorphKey::new("lshift-I", &[KeyCode::ShiftLeft], KeyCode::I), + MorphKey::new("lshift-O", &[KeyCode::ShiftLeft], KeyCode::O), + MorphKey::new("lshift-P", &[KeyCode::ShiftLeft], KeyCode::P), + MorphKey::new("lshift-F", &[KeyCode::ShiftLeft], KeyCode::F), + MorphKey::new("lshift-G", &[KeyCode::ShiftLeft], KeyCode::G), + MorphKey::new("lshift-H", &[KeyCode::ShiftLeft], KeyCode::H), + MorphKey::new("lshift-J", &[KeyCode::ShiftLeft], KeyCode::J), + MorphKey::new("lshift-K", &[KeyCode::ShiftLeft], KeyCode::K), + MorphKey::new("lshift-Y", &[KeyCode::ShiftLeft], KeyCode::Y), + MorphKey::new("lshift-X", &[KeyCode::ShiftLeft], KeyCode::X), + MorphKey::new("lshift-C", &[KeyCode::ShiftLeft], KeyCode::C), + MorphKey::new("lshift-V", &[KeyCode::ShiftLeft], KeyCode::V), + MorphKey::new("lshift-B", &[KeyCode::ShiftLeft], KeyCode::B), + MorphKey::new("lshift-N", &[KeyCode::ShiftLeft], KeyCode::N), + MorphKey::new("lshift-M", &[KeyCode::ShiftLeft], KeyCode::M), + MorphKey::new("lshift-0", &[KeyCode::ShiftLeft], KeyCode::Key0), + MorphKey::new("lshift-1", &[KeyCode::ShiftLeft], KeyCode::Key1), + MorphKey::new("lshift-2", &[KeyCode::ShiftLeft], KeyCode::Key2), + MorphKey::new("lshift-3", &[KeyCode::ShiftLeft], KeyCode::Key3), + MorphKey::new("lshift-4", &[KeyCode::ShiftLeft], KeyCode::Key4), + MorphKey::new("lshift-5", &[KeyCode::ShiftLeft], KeyCode::Key5), + MorphKey::new("lshift-6", &[KeyCode::ShiftLeft], KeyCode::Key6), + MorphKey::new("lshift-7", &[KeyCode::ShiftLeft], KeyCode::Key7), + MorphKey::new("lshift-8", &[KeyCode::ShiftLeft], KeyCode::Key8), + MorphKey::new("lshift-9", &[KeyCode::ShiftLeft], KeyCode::Key9), +]; + +#[derive(Clone, Copy)] +enum WeightChange { + Increase, + Decrease, +} +impl WeightChange { + fn reverse(&mut self) { + *self = match *self { + WeightChange::Increase => WeightChange::Decrease, + WeightChange::Decrease => WeightChange::Increase, + } + } + fn sign(self) -> f32 { + match self { + WeightChange::Increase => 1.0, + WeightChange::Decrease => -1.0, + } + } + fn change_weight(&mut self, weight: f32, change: f32) -> f32 { + let mut change = change * self.sign(); + let new_weight = weight + change; + if new_weight <= 0.0 || new_weight >= 1.0 { + self.reverse(); + change = -change; + } + weight + change + } +} + +struct Target { + entity_name: Option<String>, + entity: Entity, + name: Option<String>, + index: usize, + weight: f32, + change_dir: WeightChange, +} +impl fmt::Display for Target { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match (self.name.as_ref(), self.entity_name.as_ref()) { + (None, None) => write!(f, "animation{} of {:?}", self.index, self.entity), + (None, Some(entity)) => write!(f, "animation{} of {entity}", self.index), + (Some(target), None) => write!(f, "{target} of {:?}", self.entity), + (Some(target), Some(entity)) => write!(f, "{target} of {entity}"), + }?; + write!(f, ": {}", self.weight) + } +} +impl Target { + fn text_section(&self, key: &str, style: TextStyle) -> TextSection { + TextSection::new(format!("[{key}] {self}\n"), style) + } + fn new( + entity_name: Option<&Name>, + weights: &[f32], + target_names: Option<&[String]>, + entity: Entity, + ) -> Vec<Target> { + let get_name = |i| target_names.and_then(|names| names.get(i)); + let entity_name = entity_name.map(|n| n.as_str()); + weights + .iter() + .enumerate() + .map(|(index, weight)| Target { + entity_name: entity_name.map(|n| n.to_owned()), + entity, + name: get_name(index).cloned(), + index, + weight: *weight, + change_dir: WeightChange::Increase, + }) + .collect() + } +} + +#[derive(Resource)] +struct WeightsControl { + weights: Vec<Target>, +} + +struct MorphKey { + name: &'static str, + modifiers: &'static [KeyCode], + key: KeyCode, +} +impl MorphKey { + const fn new(name: &'static str, modifiers: &'static [KeyCode], key: KeyCode) -> Self { + MorphKey { + name, + modifiers, + key, + } + } + fn active(&self, inputs: &Input<KeyCode>) -> bool { + let mut modifier = self.modifiers.iter(); + let mut non_modifier = ALL_MODIFIERS.iter().filter(|m| !self.modifiers.contains(m)); + + let key = inputs.pressed(self.key); + let modifier = modifier.all(|m| inputs.pressed(*m)); + let non_modifier = non_modifier.all(|m| !inputs.pressed(*m)); + key && modifier && non_modifier + } +} +fn update_text( + controls: Option<ResMut<WeightsControl>>, + mut text: Query<&mut Text>, + morphs: Query<&MorphWeights>, +) { + let Some(mut controls) = controls else { return; }; + for (i, target) in controls.weights.iter_mut().enumerate() { + let Ok(weights) = morphs.get(target.entity) else { + continue; + }; + let Some(&actual_weight) = weights.weights().get(target.index) else { + continue; + }; + if actual_weight != target.weight { + target.weight = actual_weight; + } + let key_name = &AVAILABLE_KEYS[i].name; + let mut text = text.single_mut(); + text.sections[i + 2].value = format!("[{key_name}] {target}\n"); + } +} +fn update_morphs( + controls: Option<ResMut<WeightsControl>>, + mut morphs: Query<&mut MorphWeights>, + input: Res<Input<KeyCode>>, + time: Res<Time>, +) { + let Some(mut controls) = controls else { return; }; + for (i, target) in controls.weights.iter_mut().enumerate() { + if !AVAILABLE_KEYS[i].active(&input) { + continue; + } + let Ok(mut weights) = morphs.get_mut(target.entity) else { + continue; + }; + // To update individual morph target weights, get the `MorphWeights` + // component and call `weights_mut` to get access to the weights. + let weights_slice = weights.weights_mut(); + let i = target.index; + let change = time.delta_seconds() * WEIGHT_PER_SECOND; + let new_weight = target.change_dir.change_weight(weights_slice[i], change); + weights_slice[i] = new_weight; + target.weight = new_weight; + } +} + +fn detect_morphs( + mut commands: Commands, + morphs: Query<(Entity, &MorphWeights, Option<&Name>)>, + meshes: Res<Assets<Mesh>>, + scene_handle: Res<SceneHandle>, + mut setup: Local<bool>, + asset_server: Res<AssetServer>, +) { + let no_morphing = morphs.iter().len() == 0; + if no_morphing { + return; + } + if scene_handle.is_loaded && !*setup { + *setup = true; + } else { + return; + } + let mut detected = Vec::new(); + + for (entity, weights, name) in &morphs { + let target_names = weights + .first_mesh() + .and_then(|h| meshes.get(h)) + .and_then(|m| m.morph_target_names()); + let targets = Target::new(name, weights.weights(), target_names, entity); + detected.extend(targets); + } + detected.truncate(AVAILABLE_KEYS.len()); + let style = TextStyle { + font: asset_server.load("assets/fonts/FiraMono-Medium.ttf"), + font_size: 13.0, + color: Color::WHITE, + }; + let mut sections = vec![ + TextSection::new("Morph Target Controls\n", style.clone()), + TextSection::new("---------------\n", style.clone()), + ]; + let target_to_text = + |(i, target): (usize, &Target)| target.text_section(AVAILABLE_KEYS[i].name, style.clone()); + sections.extend(detected.iter().enumerate().map(target_to_text)); + commands.insert_resource(WeightsControl { weights: detected }); + commands.spawn(TextBundle::from_sections(sections).with_style(Style { + position_type: PositionType::Absolute, + top: Val::Px(10.0), + left: Val::Px(10.0), + ..default() + })); +} + +pub struct MorphViewerPlugin; + +impl Plugin for MorphViewerPlugin { + fn build(&self, app: &mut App) { + app.add_systems( + Update, + ( + update_morphs, + detect_morphs, + update_text.after(update_morphs), + ), + ); + } +} diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -1,4 +1,4 @@ -//! A glTF scene viewer plugin. Provides controls for animation, directional lighting, and switching between scene cameras. +//! A glTF scene viewer plugin. Provides controls for directional lighting, and switching between scene cameras. //! To use in your own application: //! - Copy the code for the `SceneViewerPlugin` and add the plugin to your App. //! - Insert an initialized `SceneHandle` resource into your App's `AssetServer`. diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -15,10 +15,8 @@ use super::camera_controller_plugin::*; #[derive(Resource)] pub struct SceneHandle { - gltf_handle: Handle<Gltf>, + pub gltf_handle: Handle<Gltf>, scene_index: usize, - #[cfg(feature = "animation")] - animations: Vec<Handle<AnimationClip>>, instance_id: Option<InstanceId>, pub is_loaded: bool, pub has_light: bool, diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -29,8 +27,6 @@ impl SceneHandle { Self { gltf_handle, scene_index, - #[cfg(feature = "animation")] - animations: Vec::new(), instance_id: None, is_loaded: false, has_light: false, diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -38,11 +34,18 @@ impl SceneHandle { } } -impl fmt::Display for SceneHandle { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!( - f, - " +#[cfg(not(feature = "animation"))] +const INSTRUCTIONS: &str = r#" +Scene Controls: + L - animate light direction + U - toggle shadows + C - cycle through the camera controller and any cameras loaded from the scene + + compile with "--features animation" for animation controls. +"#; + +#[cfg(feature = "animation")] +const INSTRUCTIONS: &str = " Scene Controls: L - animate light direction U - toggle shadows diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -51,8 +54,11 @@ Scene Controls: Space - Play/Pause animation Enter - Cycle through animations -" - ) +"; + +impl fmt::Display for SceneHandle { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{INSTRUCTIONS}") } } diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -68,8 +74,6 @@ impl Plugin for SceneViewerPlugin { update_lights, camera_tracker, toggle_bounding_boxes.run_if(input_just_pressed(KeyCode::B)), - #[cfg(feature = "animation")] - (start_animation, keyboard_animation_control), ), ); } diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -82,7 +86,7 @@ fn toggle_bounding_boxes(mut config: ResMut<GizmoConfig>) { fn scene_load_check( asset_server: Res<AssetServer>, mut scenes: ResMut<Assets<Scene>>, - gltf_assets: ResMut<Assets<Gltf>>, + gltf_assets: Res<Assets<Gltf>>, mut scene_handle: ResMut<SceneHandle>, mut scene_spawner: ResMut<SceneSpawner>, ) { diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -123,22 +127,6 @@ fn scene_load_check( scene_handle.instance_id = Some(scene_spawner.spawn(gltf_scene_handle.clone_weak())); - #[cfg(feature = "animation")] - { - scene_handle.animations = gltf.animations.clone(); - if !scene_handle.animations.is_empty() { - info!( - "Found {} animation{}", - scene_handle.animations.len(), - if scene_handle.animations.len() == 1 { - "" - } else { - "s" - } - ); - } - } - info!("Spawning scene..."); } } diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -151,62 +139,6 @@ fn scene_load_check( Some(_) => {} } } - -#[cfg(feature = "animation")] -fn start_animation( - mut player: Query<&mut AnimationPlayer>, - mut done: Local<bool>, - scene_handle: Res<SceneHandle>, -) { - if !*done { - if let Ok(mut player) = player.get_single_mut() { - if let Some(animation) = scene_handle.animations.first() { - player.play(animation.clone_weak()).repeat(); - *done = true; - } - } - } -} - -#[cfg(feature = "animation")] -fn keyboard_animation_control( - keyboard_input: Res<Input<KeyCode>>, - mut animation_player: Query<&mut AnimationPlayer>, - scene_handle: Res<SceneHandle>, - mut current_animation: Local<usize>, - mut changing: Local<bool>, -) { - if scene_handle.animations.is_empty() { - return; - } - - if let Ok(mut player) = animation_player.get_single_mut() { - if keyboard_input.just_pressed(KeyCode::Space) { - if player.is_paused() { - player.resume(); - } else { - player.pause(); - } - } - - if *changing { - // change the animation the frame after return was pressed - *current_animation = (*current_animation + 1) % scene_handle.animations.len(); - player - .play(scene_handle.animations[*current_animation].clone_weak()) - .repeat(); - *changing = false; - } - - if keyboard_input.just_pressed(KeyCode::Return) { - // delay the animation change for one frame - *changing = true; - // set the current animation to its start and pause it to reset to its starting state - player.set_elapsed(0.0).pause(); - } - } -} - fn update_lights( key_input: Res<Input<KeyCode>>, time: Res<Time>,
diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -1121,6 +1189,38 @@ impl<'a> DataUri<'a> { } } +pub(super) struct PrimitiveMorphAttributesIter<'s>( + pub ( + Option<Iter<'s, [f32; 3]>>, + Option<Iter<'s, [f32; 3]>>, + Option<Iter<'s, [f32; 3]>>, + ), +); +impl<'s> Iterator for PrimitiveMorphAttributesIter<'s> { + type Item = MorphAttributes; + + fn next(&mut self) -> Option<Self::Item> { + let position = self.0 .0.as_mut().and_then(|p| p.next()); + let normal = self.0 .1.as_mut().and_then(|n| n.next()); + let tangent = self.0 .2.as_mut().and_then(|t| t.next()); + if position.is_none() && normal.is_none() && tangent.is_none() { + return None; + } + + Some(MorphAttributes { + position: position.map(|p| p.into()).unwrap_or(Vec3::ZERO), + normal: normal.map(|n| n.into()).unwrap_or(Vec3::ZERO), + tangent: tangent.map(|t| t.into()).unwrap_or(Vec3::ZERO), + }) + } +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct MorphTargetNames { + pub target_names: Vec<String>, +} + #[cfg(test)] mod test { use std::path::PathBuf;
GLTF Morph Targets ## What problem does this solve or what need does it fill? Bevy supports skeletal animation but not morph-target animation. Morph target animation is widely used for face animation rigs and is actually much simpler mathematically than skeletal animation, but requires a larger amount of memory. ## What solution would you like? Bevy should (in order of criticality): * Load GLTF mesh primitive's morph targets into vertex attributes CPU-side * Load the initial weights stored on GLTF Mesh nodes into a bevy mesh struct ** Morph target names tend to be stored in `"extras"."targetNames"` in GLTF files ** Providing an API for enumerating available targets would be very useful * Provide a CPU-side API for blending Meshes with morph targets (then up to users to update in the scene) ** This can be useful for raycasting and cpu-side scene exporting etc even when GPU-morphing is implemented * Provide GPU-side morph blending with the help of a shape gains uniform on Mesh objects ## What alternative(s) have you considered? An outside plugin to handle this would - as far as I understand it - require duplicating much of the work the existing GLTF loader does. Once loading is possible, CPU blending could be a third-party plugin I am sure. For integration into the rendering pipeline (GPU-side blending) and other plugins, I think Bevy having an understanding of morph targets right down in it's Mesh primitives will prove very valuable. ## Additional context I'd be quite interested to have a tinker into some work on this front - however guidance into the intended APIs around Mesh/SkinnedMesh would help me be confident to open a PR for at least part of this work. I don't think I have the knowledge or time to try and integrate into the shaders and standard pipeline properly. three.js for instance supports morph targets as part of it's root Mesh class: [Mesh.morphTargetInfluences](https://threejs.org/docs/index.html?q=Mesh#api/en/objects/Mesh.morphTargetInfluences) and supports CPU morphing [BufferGeometryUtils.computeMorphedAttributes](https://threejs.org/docs/?q=BUfferGeome#examples/en/utils/BufferGeometryUtils.computeMorphedAttributes) despite generally performing morphing in shaders: [morphtarget_vertex.glsl.js](https://github.com/mrdoob/three.js/blob/1c553914ace73127cc67660597806b2c7c013548/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.js) Cannot play animation correctly. ## Bevy version 0.9.1 ## What you did View a model with animation from GLTF via scene_viewer ## What went wrong The animation is incorrect. Here is the result from scene_viewer. https://user-images.githubusercontent.com/18550/205034634-9ee13913-545e-4961-80bc-952f9771e464.mp4 And here is the result from official GLTF viewer. https://user-images.githubusercontent.com/18550/205034721-f764cdf5-395f-4219-8640-85a1835d8e66.mp4 Here is the GLTF file. [dragon_flying.glb.zip](https://github.com/bevyengine/bevy/files/10131676/dragon_flying.glb.zip) ## Additional information Other information that can be used to further reproduce or isolate the problem. This commonly includes: - screenshots - logs - theories about what might be going wrong - workarounds that you used - links to related bugs, PRs or discussions
Since opening this I see: https://github.com/bevyengine/bevy/pull/3722 and https://github.com/bevyengine/bevy/issues/4026 which more or less cover this. I'd be inclined to keep this issue open to specifically mention morph targets due to the wide scope of #4026 but I'm happy to close as duplicate if that's easier for the maintainers. A quick glance makes it seem like it's binding the animations to the wrong bones or the wrong mesh. This could be an issue with the way we're extracting the hierarchy or the animations from the GLTF file. it looks like the model is using morph animation which are not supported in Bevy yet
2023-03-22T15:26:31Z
1.70
2023-08-30T13:46:27Z
6f27e0e35faffbf2b77807bb222d3d3a9a529210
[ "loader::test::node_hierarchy_cyclic", "loader::test::node_hierarchy_missing_node", "loader::test::node_hierarchy_simple_hierarchy", "loader::test::node_hierarchy_hierarchy", "loader::test::node_hierarchy_no_hierarchy", "loader::test::node_hierarchy_single_node" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,040
bevyengine__bevy-8040
[ "8034" ]
ee0e6f485575952fb51d38f807f60907272e1d44
diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -525,7 +525,7 @@ impl Color { let [red, green, blue] = LchRepresentation::lch_to_nonlinear_srgb(*lightness, *chroma, *hue); - Color::Rgba { + Color::RgbaLinear { red: red.nonlinear_to_linear_srgb(), green: green.nonlinear_to_linear_srgb(), blue: blue.nonlinear_to_linear_srgb(),
diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1858,4 +1858,22 @@ mod tests { assert_eq!(starting_color * transformation, mutated_color,); } + + // regression test for https://github.com/bevyengine/bevy/pull/8040 + #[test] + fn convert_to_rgba_linear() { + let rgba = Color::rgba(0., 0., 0., 0.); + let rgba_l = Color::rgba_linear(0., 0., 0., 0.); + let hsla = Color::hsla(0., 0., 0., 0.); + let lcha = Color::Lcha { + lightness: 0.0, + chroma: 0.0, + hue: 0.0, + alpha: 0.0, + }; + assert_eq!(rgba_l, rgba_l.as_rgba_linear()); + let Color::RgbaLinear { .. } = rgba.as_rgba_linear() else { panic!("from Rgba") }; + let Color::RgbaLinear { .. } = hsla.as_rgba_linear() else { panic!("from Hsla") }; + let Color::RgbaLinear { .. } = lcha.as_rgba_linear() else { panic!("from Lcha") }; + } }
Crash when setting background color via Color::Lcha ## Bevy version 0.10.0 ## \[Optional\] Relevant system information rustc 1.68.0 SystemInfo { os: "Linux 22.0.4 Manjaro Linux", kernel: "5.15.94-1-MANJARO", cpu: "AMD Ryzen 7 2700X Eight-Core Processor", core_count: "8", memory: "15.6 GiB" } AdapterInfo { name: "NVIDIA GeForce RTX 2070 SUPER", vendor: 4318, device: 7812, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "525.89.02", backend: Vulkan } ## What you did I set the background color in a project using `Color::Lcha {...}`. Minimal example: ```rust fn main() { App::new() .insert_resource( ClearColor(Color::Lcha { lightness: 80., chroma: 20., hue: 100., alpha: 0., }), /*.as_rgba() makes the problem go away */ ) .add_plugins(DefaultPlugins) .add_startup_system(setup) .run(); } fn setup(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); } ``` ## What went wrong With great anticipation, I awaited the sight of a mesmerizing background color, one that would transport me to a world of beauty and wonder. Alas, my hopes were shattered as the app crashed before my very eyes, leaving me stranded in a void of disappointment and frustration. ## Additional information Console output: ```txt 2023-03-10T23:42:39.181041Z INFO bevy_winit::system: Creating new window "Bevy App" (0v0) 2023-03-10T23:42:39.181279Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1 2023-03-10T23:42:39.254333Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 2070 SUPER", vendor: 4318, device: 7812, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "525.89.02", backend: Vulkan } 2023-03-10T23:42:39.818207Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 22.0.4 Manjaro Linux", kernel: "5.15.94-1-MANJARO", cpu: "AMD Ryzen 7 2700X Eight-Core Processor", core_count: "8", memory: "15.6 GiB" } thread '<unnamed>' panicked at 'internal error: entered unreachable code', /home/~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.10.0/src/color/mod.rs:1155:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'Compute Task Pool (2)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', /home/~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.10.0/src/schedule/executor/multi_threaded.rs:194:60 thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.0/src/task_pool.rs:376:49 thread 'Compute Task Pool (2)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', /home/~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.10.0/src/pipelined_rendering.rs:136:45 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.0/src/task_pool.rs:376:49 ``` Converting the Lcha color to RGBA yielded the expected result, but I found the crash quit surprising, since all other variants of `Color` can be used to set the background color.
There is a wrong return value in Color::as_rgba_linear. I make a PR
2023-03-11T10:56:59Z
1.67
2023-03-11T12:32:56Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "color::tests::convert_to_rgba_linear" ]
[ "mesh::mesh::conversions::tests::vec3a", "color::tests::mul_and_mulassign_f32", "primitives::tests::intersects_sphere_big_frustum_outside", "mesh::mesh::conversions::tests::correct_message", "color::tests::mul_and_mulassign_f32by3", "color::colorspace::test::lch_to_srgb", "color::colorspace::test::srgb_to_lch", "mesh::mesh::conversions::tests::i32_4", "color::colorspace::test::srgb_linear_full_roundtrip", "mesh::mesh::conversions::tests::f32_4", "color::tests::conversions_vec4", "mesh::mesh::conversions::tests::f32_2", "color::tests::mul_and_mulassign_vec4", "primitives::tests::intersects_sphere_big_frustum_intersect", "color::tests::mul_and_mulassign_vec3", "mesh::mesh::conversions::tests::u32", "mesh::mesh::conversions::tests::uvec4", "mesh::mesh::conversions::tests::vec3", "mesh::mesh::conversions::tests::u32_2", "color::tests::mul_and_mulassign_f32by4", "mesh::mesh::conversions::tests::f32", "mesh::mesh::conversions::tests::i32", "color::colorspace::test::srgb_to_hsl", "mesh::mesh::conversions::tests::ivec4", "mesh::mesh::conversions::tests::i32_2", "mesh::mesh::conversions::tests::uvec2", "mesh::mesh::conversions::tests::f32_3", "color::colorspace::test::hsl_to_srgb", "mesh::mesh::tests::panic_invalid_format - should panic", "primitives::tests::intersects_sphere_frustum_intersects_2_planes", "mesh::mesh::conversions::tests::ivec3", "mesh::mesh::conversions::tests::i32_3", "mesh::mesh::conversions::tests::uvec3", "mesh::mesh::conversions::tests::ivec2", "primitives::tests::intersects_sphere_frustum_contained", "mesh::mesh::conversions::tests::vec2", "primitives::tests::intersects_sphere_long_frustum_outside", "color::tests::hex_color", "primitives::tests::intersects_sphere_long_frustum_intersect", "texture::image_texture_conversion::test::two_way_conversion", "render_graph::graph::tests::test_slot_already_occupied", "render_phase::rangefinder::tests::distance", "render_phase::tests::batching", "primitives::tests::intersects_sphere_frustum_dodges_1_plane", "mesh::mesh::conversions::tests::u32_3", "mesh::mesh::conversions::tests::u32_4", "primitives::tests::intersects_sphere_frustum_intersects_3_planes", "primitives::tests::intersects_sphere_frustum_surrounding", "view::visibility::render_layers::rendering_mask_tests::rendering_mask_sanity", "view::visibility::test::ensure_visibility_enum_size", "texture::image::test::image_default_size", "primitives::tests::intersects_sphere_frustum_intersects_plane", "mesh::mesh::conversions::tests::vec4", "render_graph::graph::tests::test_graph_edges", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_get_node_typed", "view::visibility::test::visibility_propagation_unconditional_visible", "texture::image::test::image_size", "view::visibility::test::visibility_propagation", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_third_clause", "render_resource::shader::tests::process_nested_shader_def_outer_defined_inner_not", "render_resource::shader::tests::process_shader_def_equal_bool", "render_resource::shader::tests::process_shader_def_defined", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_second_clause", "render_resource::shader::tests::process_nested_shader_def_neither_defined_else", "render_resource::shader::tests::process_shader_def_not_equal_bool", "render_resource::shader::tests::process_shader_def_not_defined", "render_resource::shader::tests::process_import_ifdef", "render_resource::shader::tests::process_import_in_ifdef", "render_resource::shader::tests::process_nested_shader_def_neither_defined", "render_resource::shader::tests::process_shader_define_only_in_accepting_scopes", "render_resource::shader::tests::process_nested_shader_def_outer_defined_inner_else", "render_resource::shader::tests::process_shader_def_unknown_operator", "render_resource::shader::tests::process_shader_def_else", "render_resource::shader::tests::process_shader_def_unclosed", "render_resource::shader::tests::process_shader_def_else_ifdef_no_match_and_no_fallback_else", "render_resource::shader::tests::process_nested_shader_def_both_defined", "render_resource::shader::tests::process_shader_def_else_ifdef_only_accepts_one_valid_else_ifdef", "render_resource::shader::tests::process_nested_shader_def_inner_defined_outer_not", "render_resource::shader::tests::process_shader_def_replace", "render_resource::shader::tests::process_shader_def_equal_int", "render_resource::shader::tests::process_shader_define_across_imports", "render_resource::shader::tests::process_import_glsl", "render_resource::shader::tests::process_shader_def_too_closed", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_first_clause", "render_resource::shader::tests::process_import_wgsl", "render_resource::shader::tests::process_shader_define_in_shader_with_value", "render_resource::shader::tests::process_shader_def_else_ifdef_complicated_nesting", "render_resource::shader::tests::process_shader_def_commented", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_else", "render_resource::shader::tests::process_import_in_import", "render_resource::shader::tests::process_shader_define_in_shader", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indexed_indirect (line 291)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect_count (line 357)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect_count (line 440)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indirect (line 268)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect (line 400)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect (line 319)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::push_debug_group (line 557)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 243)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 217)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 179)", "src/extract_param.rs - extract_param::Extract (line 29)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 75)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 151)", "src/mesh/mesh/mod.rs - mesh::mesh::Mesh (line 47)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 163)", "src/mesh/mesh/conversions.rs - mesh::mesh::conversions (line 6)", "src/render_graph/graph.rs - render_graph::graph::RenderGraph (line 32)", "src/color/mod.rs - color::Color::hex (line 260)", "src/view/mod.rs - view::Msaa (line 79)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,030
bevyengine__bevy-8030
[ "8192" ]
ce33354cee55322b12768d4ef7da58ce02adc43d
diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -396,7 +396,7 @@ pub fn derive_world_query_impl(input: TokenStream) -> TokenStream { #[automatically_derived] #visibility struct #state_struct_name #user_impl_generics #user_where_clauses { #(#field_idents: <#field_types as #path::query::WorldQuery>::State,)* - #(#ignored_field_idents: #ignored_field_types,)* + #(#ignored_field_idents: ::std::marker::PhantomData<fn() -> #ignored_field_types>,)* } #mutable_impl diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -437,7 +437,7 @@ pub fn derive_world_query_impl(input: TokenStream) -> TokenStream { } struct WorldQueryFieldInfo { - /// Has `#[fetch(ignore)]` or `#[filter_fetch(ignore)]` attribute. + /// Has the `#[world_query(ignore)]` attribute. is_ignored: bool, /// All field attributes except for `world_query` ones. attrs: Vec<Attribute>, diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -14,7 +14,7 @@ use proc_macro2::Span; use quote::{format_ident, quote}; use syn::{ parse::ParseStream, parse_macro_input, parse_quote, punctuated::Punctuated, spanned::Spanned, - ConstParam, DeriveInput, Field, GenericParam, Ident, Index, Meta, MetaList, NestedMeta, Token, + ConstParam, DeriveInput, GenericParam, Ident, Index, Meta, MetaList, NestedMeta, Token, TypeParam, }; diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -264,7 +264,7 @@ static SYSTEM_PARAM_ATTRIBUTE_NAME: &str = "system_param"; pub fn derive_system_param(input: TokenStream) -> TokenStream { let token_stream = input.clone(); let ast = parse_macro_input!(input as DeriveInput); - let syn::Data::Struct(syn::DataStruct { fields: field_definitions, ..}) = ast.data else { + let syn::Data::Struct(syn::DataStruct { fields: field_definitions, .. }) = ast.data else { return syn::Error::new(ast.span(), "Invalid `SystemParam` type: expected a `struct`") .into_compile_error() .into(); diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -295,7 +295,8 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { }), ) }) - .collect::<Vec<(&Field, SystemParamFieldAttributes)>>(); + .collect::<Vec<_>>(); + let mut field_locals = Vec::new(); let mut fields = Vec::new(); let mut field_types = Vec::new(); diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -346,11 +347,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { .filter(|g| !matches!(g, GenericParam::Lifetime(_))) .collect(); - let mut shadowed_lifetimes: Vec<_> = generics.lifetimes().map(|x| x.lifetime.clone()).collect(); - for lifetime in &mut shadowed_lifetimes { - let shadowed_ident = format_ident!("_{}", lifetime.ident); - lifetime.ident = shadowed_ident; - } + let shadowed_lifetimes: Vec<_> = generics.lifetimes().map(|_| quote!('_)).collect(); let mut punctuated_generics = Punctuated::<_, Token![,]>::new(); punctuated_generics.extend(lifetimeless_generics.iter().map(|g| match g { diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -372,9 +369,27 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { _ => unreachable!(), })); + let punctuated_generics_no_bounds: Punctuated<_, Token![,]> = lifetimeless_generics + .iter() + .map(|&g| match g.clone() { + GenericParam::Type(mut g) => { + g.bounds.clear(); + GenericParam::Type(g) + } + g => g, + }) + .collect(); + let mut tuple_types: Vec<_> = field_types.iter().map(|x| quote! { #x }).collect(); let mut tuple_patterns: Vec<_> = field_locals.iter().map(|x| quote! { #x }).collect(); + tuple_types.extend( + ignored_field_types + .iter() + .map(|ty| parse_quote!(::std::marker::PhantomData::<#ty>)), + ); + tuple_patterns.extend(ignored_field_types.iter().map(|_| parse_quote!(_))); + // If the number of fields exceeds the 16-parameter limit, // fold the fields into tuples of tuples until we are below the limit. const LIMIT: usize = 16; diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -385,6 +400,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { let end = Vec::from_iter(tuple_patterns.drain(..LIMIT)); tuple_patterns.push(parse_quote!( (#(#end,)*) )); } + // Create a where clause for the `ReadOnlySystemParam` impl. // Ensure that each field implements `ReadOnlySystemParam`. let mut read_only_generics = generics.clone(); diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -395,6 +411,9 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { .push(syn::parse_quote!(#field_type: #path::system::ReadOnlySystemParam)); } + let fields_alias = + ensure_no_collision(format_ident!("__StructFieldsAlias"), token_stream.clone()); + let struct_name = &ast.ident; let state_struct_visibility = &ast.vis; let state_struct_name = ensure_no_collision(format_ident!("FetchState"), token_stream); diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -404,41 +423,41 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { // The struct can still be accessed via SystemParam::State, e.g. EventReaderState can be accessed via // <EventReader<'static, 'static, T> as SystemParam>::State const _: () = { + // Allows rebinding the lifetimes of each field type. + type #fields_alias <'w, 's, #punctuated_generics_no_bounds> = (#(#tuple_types,)*); + #[doc(hidden)] - #state_struct_visibility struct #state_struct_name <'w, 's, #(#lifetimeless_generics,)*> + #state_struct_visibility struct #state_struct_name <#(#lifetimeless_generics,)*> #where_clause { - state: (#(<#tuple_types as #path::system::SystemParam>::State,)*), - marker: std::marker::PhantomData<( - <#path::prelude::Query<'w, 's, ()> as #path::system::SystemParam>::State, - #(fn() -> #ignored_field_types,)* - )>, + state: <#fields_alias::<'static, 'static, #punctuated_generic_idents> as #path::system::SystemParam>::State, } - unsafe impl<'w, 's, #punctuated_generics> #path::system::SystemParam for #struct_name #ty_generics #where_clause { - type State = #state_struct_name<'static, 'static, #punctuated_generic_idents>; - type Item<'_w, '_s> = #struct_name <#(#shadowed_lifetimes,)* #punctuated_generic_idents>; + unsafe impl<#punctuated_generics> #path::system::SystemParam for + #struct_name <#(#shadowed_lifetimes,)* #punctuated_generic_idents> #where_clause + { + type State = #state_struct_name<#punctuated_generic_idents>; + type Item<'w, 's> = #struct_name #ty_generics; fn init_state(world: &mut #path::world::World, system_meta: &mut #path::system::SystemMeta) -> Self::State { #state_struct_name { - state: <(#(#tuple_types,)*) as #path::system::SystemParam>::init_state(world, system_meta), - marker: std::marker::PhantomData, + state: <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::init_state(world, system_meta), } } fn new_archetype(state: &mut Self::State, archetype: &#path::archetype::Archetype, system_meta: &mut #path::system::SystemMeta) { - <(#(#tuple_types,)*) as #path::system::SystemParam>::new_archetype(&mut state.state, archetype, system_meta) + <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::new_archetype(&mut state.state, archetype, system_meta) } fn apply(state: &mut Self::State, system_meta: &#path::system::SystemMeta, world: &mut #path::world::World) { - <(#(#tuple_types,)*) as #path::system::SystemParam>::apply(&mut state.state, system_meta, world); + <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::apply(&mut state.state, system_meta, world); } - unsafe fn get_param<'w2, 's2>( - state: &'s2 mut Self::State, + unsafe fn get_param<'w, 's>( + state: &'s mut Self::State, system_meta: &#path::system::SystemMeta, - world: &'w2 #path::world::World, + world: &'w #path::world::World, change_tick: #path::component::Tick, - ) -> Self::Item<'w2, 's2> { + ) -> Self::Item<'w, 's> { let (#(#tuple_patterns,)*) = < (#(#tuple_types,)*) as #path::system::SystemParam >::get_param(&mut state.state, system_meta, world, change_tick); diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -278,6 +278,24 @@ use std::{cell::UnsafeCell, marker::PhantomData}; /// # bevy_ecs::system::assert_is_system(my_system); /// ``` /// +/// # Generic Queries +/// +/// When writing generic code, it is often necessary to use [`PhantomData`] +/// to constrain type parameters. Since `WorldQuery` is implemented for all +/// `PhantomData<T>` types, this pattern can be used with this macro. +/// +/// ``` +/// # use bevy_ecs::{prelude::*, query::WorldQuery}; +/// # use std::marker::PhantomData; +/// #[derive(WorldQuery)] +/// pub struct GenericQuery<T> { +/// id: Entity, +/// marker: PhantomData<T>, +/// } +/// # fn my_system(q: Query<GenericQuery<()>>) {} +/// # bevy_ecs::system::assert_is_system(my_system); +/// ``` +/// /// # Safety /// /// Component access of `Self::ReadOnly` must be a subset of `Self` diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1315,7 +1333,6 @@ macro_rules! impl_anytuple_fetch { /// SAFETY: each item in the tuple is read only unsafe impl<$($name: ReadOnlyWorldQuery),*> ReadOnlyWorldQuery for AnyOf<($($name,)*)> {} - }; } diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -19,6 +19,7 @@ use bevy_utils::{all_tuples, synccell::SyncCell}; use std::{ borrow::Cow, fmt::Debug, + marker::PhantomData, ops::{Deref, DerefMut}, }; diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -65,6 +66,11 @@ use std::{ /// # bevy_ecs::system::assert_is_system(my_system::<()>); /// ``` /// +/// ## `PhantomData` +/// +/// [`PhantomData`] is a special type of `SystemParam` that does nothing. +/// This is useful for constraining generic types or lifetimes. +/// /// # Generic `SystemParam`s /// /// When using the derive macro, you may see an error in the form of: diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1465,7 +1471,6 @@ pub mod lifetimeless { /// #[derive(SystemParam)] /// struct GenericParam<'w, 's, T: SystemParam> { /// field: T, -/// #[system_param(ignore)] /// // Use the lifetimes in this type, or they will be unbound. /// phantom: core::marker::PhantomData<&'w &'s ()> /// }
diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1389,6 +1406,71 @@ unsafe impl<Q: WorldQuery> WorldQuery for NopWorldQuery<Q> { /// SAFETY: `NopFetch` never accesses any data unsafe impl<Q: WorldQuery> ReadOnlyWorldQuery for NopWorldQuery<Q> {} +/// SAFETY: `PhantomData` never accesses any world data. +unsafe impl<T: ?Sized> WorldQuery for PhantomData<T> { + type Item<'a> = (); + type Fetch<'a> = (); + type ReadOnly = Self; + type State = (); + + fn shrink<'wlong: 'wshort, 'wshort>(_item: Self::Item<'wlong>) -> Self::Item<'wshort> {} + + unsafe fn init_fetch<'w>( + _world: &'w World, + _state: &Self::State, + _last_run: Tick, + _this_run: Tick, + ) -> Self::Fetch<'w> { + } + + unsafe fn clone_fetch<'w>(_fetch: &Self::Fetch<'w>) -> Self::Fetch<'w> {} + + // `PhantomData` does not match any components, so all components it matches + // are stored in a Table (vacuous truth). + const IS_DENSE: bool = true; + // `PhantomData` matches every entity in each archetype. + const IS_ARCHETYPAL: bool = true; + + unsafe fn set_archetype<'w>( + _fetch: &mut Self::Fetch<'w>, + _state: &Self::State, + _archetype: &'w Archetype, + _table: &'w Table, + ) { + } + + unsafe fn set_table<'w>(_fetch: &mut Self::Fetch<'w>, _state: &Self::State, _table: &'w Table) { + } + + unsafe fn fetch<'w>( + _fetch: &mut Self::Fetch<'w>, + _entity: Entity, + _table_row: TableRow, + ) -> Self::Item<'w> { + } + + fn update_component_access(_state: &Self::State, _access: &mut FilteredAccess<ComponentId>) {} + + fn update_archetype_component_access( + _state: &Self::State, + _archetype: &Archetype, + _access: &mut Access<ArchetypeComponentId>, + ) { + } + + fn init_state(_world: &mut World) -> Self::State {} + + fn matches_component_set( + _state: &Self::State, + _set_contains_id: &impl Fn(ComponentId) -> bool, + ) -> bool { + true + } +} + +/// SAFETY: `PhantomData` never accesses any world data. +unsafe impl<T: ?Sized> ReadOnlyWorldQuery for PhantomData<T> {} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1397,6 +1479,22 @@ mod tests { #[derive(Component)] pub struct A; + // Compile test for https://github.com/bevyengine/bevy/pull/8030. + #[test] + fn world_query_phantom_data() { + #[derive(WorldQuery)] + pub struct IgnoredQuery<Marker> { + id: Entity, + #[world_query(ignore)] + _marker: PhantomData<Marker>, + _marker2: PhantomData<Marker>, + } + + fn ignored_system(_: Query<IgnoredQuery<()>>) {} + + crate::system::assert_is_system(ignored_system); + } + // Ensures that each field of a `WorldQuery` struct's read-only variant // has the same visibility as its corresponding mutable field. #[test] diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1531,6 +1536,26 @@ unsafe impl<P: SystemParam + 'static> SystemParam for StaticSystemParam<'_, '_, } } +// SAFETY: No world access. +unsafe impl<T: ?Sized> SystemParam for PhantomData<T> { + type State = (); + type Item<'world, 'state> = Self; + + fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State {} + + unsafe fn get_param<'world, 'state>( + _state: &'state mut Self::State, + _system_meta: &SystemMeta, + _world: &'world World, + _change_tick: Tick, + ) -> Self::Item<'world, 'state> { + PhantomData + } +} + +// SAFETY: No world access. +unsafe impl<T: ?Sized> ReadOnlySystemParam for PhantomData<T> {} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1605,6 +1630,7 @@ mod tests { _foo: Res<'w, T>, #[system_param(ignore)] marker: PhantomData<&'w Marker>, + marker2: PhantomData<&'w Marker>, } // Compile tests for https://github.com/bevyengine/bevy/pull/6957. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1642,4 +1668,10 @@ mod tests { #[derive(Resource)] pub struct FetchState; + + // Regression test for https://github.com/bevyengine/bevy/issues/8192. + #[derive(SystemParam)] + pub struct InvariantParam<'w, 's> { + _set: ParamSet<'w, 's, (Query<'w, 's, ()>,)>, + } }
SystemParam: lifetime may not live long enough ## Bevy version v0.10.0 ## What you did Upgrading a bevy 0.9 project to the latest and greatest. I have a few `#[derive(SystemParam)]` implementations that were working great with 0.9, but now give me an `error: lifetime may not live long enough` which appears to all occur within the `SystemParam` attribute itself. Here's the struct definition in question: ```rust /// TileEntities is a helper system parameter that provides pulling /// component references directly from the tile positions. #[allow(clippy::complexity)] #[derive(SystemParam)] pub struct TileEntities<'w, 's, T: EntityRef + Component> where <T as EntityRef>::ComponentType: Component, { references: ParamSet<'w, 's, ( Query<'w, 's, &'static mut T>, Query<'w, 's, &'static T>)>, component: ParamSet<'w, 's, ( Query<'w, 's, &'static mut T::ComponentType>, Query<'w, 's, &'static T::ComponentType>)>, map: TileQuery<'w, 's, SimulationLayer>, } ``` The `TileQuery` itself is also a `SystemParam`: ```rust #[derive(SystemParam)] pub struct TileQuery<'w, 's, T: Component + Layer> { map: Query<'w, 's, &'static TileStorage, With<T>>, world_manager: Res<'w, WorldManager>, tile_mapper: TileMapper<'w>, } /// TileMapper can be included in systems and used to map tile positions back into world /// coordinates and other tile related conversions. #[derive(SystemParam)] pub struct TileMapper<'w> { config: Res<'w, MapConfig> } ``` The `EntityRef` trait is defined as: ```rust /// EntityRef is a trait used to reference a single entity from multiple tiles pub trait EntityRef { /// The `ComponentType` refers to the internal type of component the `Entity` /// refers to. This is especially useful information to have for building /// generic bevy `Query` parameters for systems. type ComponentType; /// This method returns the `UVec2` tile position of the entity set. fn tile(&self) -> UVec2; /// This method returns the `Entity` identifier. fn get(&self) -> Entity; } ``` ## What went wrong I'm getting 4 nearly identical errors all pointing to the `#[derive(SystemParam)]`. Here's the first error, followed by the 3 differences ``` error: lifetime may not live long enough --> src\tiles\tile_entities.rs:155:10 | 155 | #[derive(SystemParam)] | ^^^^^^^^^^^ | | | lifetime `'w` defined here | lifetime `'w2` defined here | associated function was supposed to return data with lifetime `'w2` but it is returning data with lifetime `'w` | = help: consider adding the following bound: `'w: 'w2` = note: requirement occurs because of the type `tile_entities::TileEntities<'_, '_, T>`, which makes the generic argument `'_` invariant = note: the struct `tile_entities::TileEntities<'w, 's, T>` is invariant over the parameter `'w` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance = note: this error originates in the derive macro `SystemParam` (in Nightly builds, run with -Z macro-backtrace for more info) ``` Second: ``` ... 155 | #[derive(SystemParam)] | ^^^^^^^^^^^ | | | lifetime `'s` defined here | lifetime `'s2` defined here | associated function was supposed to return data with lifetime `'s2` but it is returning data with lifetime `'s` | = help: consider adding the following bound: `'s: 's2` ... ``` Third: ``` ... 155 | #[derive(SystemParam)] | ^^^^^^^^^^^ | | | lifetime `'s2` defined here | lifetime `'s` defined here | associated function was supposed to return data with lifetime `'s` but it is returning data with lifetime `'s2` | = help: consider adding the following bound: `'s2: 's` ... ``` Fourth: ``` ... 155 | #[derive(SystemParam)] | ^^^^^^^^^^^ | | | lifetime `'w2` defined here | lifetime `'w` defined here | associated function was supposed to return data with lifetime `'w` but it is returning data with lifetime `'w2` | = help: consider adding the following bound: `'w2: 'w` ... ``` ## Additional information I will work to see if I can get a reproducible case with less dependencies than the current project I am working in. Apologies if this is unclear in anyway. Will be happy to assist anyway possible! Thanks for an incredible open source project
2023-03-10T21:02:08Z
1.67
2023-03-30T15:56:12Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_new", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_const", "change_detection::tests::set_if_neq", "entity::tests::reserve_entity_len", "entity::tests::get_reserved_and_invalid", "event::tests::ensure_reader_readonly", "change_detection::tests::change_expiration", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "event::tests::test_event_iter_last", "event::tests::test_event_iter_len_updated", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get - should panic", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query", "query::tests::query_iter_combinations", "query::tests::query_iter_combinations_sparse", "query::tests::derived_worldqueries", "query::tests::query_filtered_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::self_conflicting_worldquery - should panic", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::resize_test", "system::commands::command_queue::test::test_command_is_send", "storage::sparse_set::tests::sparse_sets", "system::commands::command_queue::test::test_command_queue_inner", "storage::table::tests::table", "system::commands::command_queue::test::test_command_queue_inner_panic_safe", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "system::commands::command_queue::test::test_command_queue_inner_drop", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::system_piping::adapter::assert_systems", "system::commands::tests::commands", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::long_life_test", "system::tests::get_system_conflicts", "system::tests::immutable_mut_test", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "system::tests::system_state_invalid_world - should panic", "system::tests::simple_system", "system::tests::write_system_state", "system::tests::system_state_change_detection", "system::tests::update_archetype_component_access_works", "tests::changed_query", "tests::added_queries", "tests::add_remove_components", "tests::despawn_mixed_storage", "tests::duplicate_components_panic - should panic", "tests::despawn_table_storage", "tests::clear_entities", "tests::changed_trackers", "tests::added_tracking", "tests::insert_or_spawn_batch_invalid", "tests::insert_or_spawn_batch", "tests::exact_size_query", "tests::filtered_query_access", "tests::changed_trackers_sparse", "tests::bundle_derive", "tests::empty_spawn", "tests::insert_overwrite_drop", "tests::multiple_worlds_same_query_get - should panic", "tests::insert_overwrite_drop_sparse", "tests::mut_and_ref_query_panic - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "system::tests::disjoint_query_mut_read_component_system", "event::tests::test_event_iter_nth", "schedule::tests::system_ordering::order_exclusive_systems", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::non_send_option_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "tests::non_send_resource_points_to_distinct_data", "tests::mut_and_mut_query_panic - should panic", "system::tests::local_system", "system::tests::query_set_system", "schedule::tests::conditions::systems_nested_in_system_sets", "system::tests::into_iter_impl", "schedule::tests::conditions::multiple_conditions_on_system_sets", "tests::query_all_for_each", "tests::query_all", "system::tests::non_send_system", "system::tests::world_collections_system", "system::tests::or_param_set_system", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::disjoint_query_mut_system", "schedule::tests::system_execution::run_system", "system::tests::or_doesnt_remove_unrelated_filter_with", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::system_execution::run_exclusive_system", "system::tests::nonconflicting_system_resources", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::commands_param_set", "system::tests::panic_inside_system - should panic", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::readonly_query_get_mut_component_fails", "system::tests::query_system_gets", "system::tests::or_has_filter_with_when_both_have_it", "tests::query_filter_with_for_each", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::multiple_conditions_on_system", "tests::query_filter_with_sparse_for_each", "system::tests::removal_tracking", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::condition::tests::run_condition_combinators", "tests::query_filter_with_sparse", "system::tests::changed_resource_system", "schedule::tests::conditions::system_set_conditions_and_change_detection", "tests::query_filter_with", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::query_filters_dont_collide_with_fetches", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_ordering::add_systems_correct_order_nested", "tests::non_send_resource_panic - should panic", "schedule::tests::conditions::mixed_conditions_and_change_detection", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component", "tests::query_filter_without", "tests::ref_and_mut_query_panic - should panic", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::reserve_and_spawn", "tests::remove", "tests::remove_tracking", "tests::query_missing_component", "tests::par_for_each_dense", "tests::reserve_entities_across_worlds", "tests::query_single_component_for_each", "tests::stateful_query_handles_new_archetype", "tests::query_sparse_component", "tests::spawn_batch", "tests::random_access", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::remove_missing", "tests::take", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "tests::par_for_each_sparse", "tests::sparse_set_add_remove_many", "tests::resource", "tests::resource_scope", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "schedule::condition::tests::run_condition", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::inserting_dense_updates_table_row", "schedule::tests::system_ordering::order_systems", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::removing_dense_updates_table_row", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::identifier::tests::world_ids_unique", "world::tests::get_resource_mut_by_id", "query::tests::query_filtered_exactsizeiterator_len", "world::tests::get_resource_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "query::tests::par_iter_mut_change_detection", "world::tests::init_resource_does_not_overwrite", "world::world_cell::tests::world_cell", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::world_cell::tests::world_access_reused", "world::tests::spawn_empty_bundle", "world::world_cell::tests::world_cell_ref_and_ref", "world::tests::panic_while_overwriting_component", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "world::world_cell::tests::world_cell_double_mut - should panic", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "src/component.rs - component::Component (line 124) - compile fail", "src/component.rs - component::ComponentTicks::set_changed (line 711) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 143) - compile", "src/query/fetch.rs - query::fetch::WorldQuery (line 108) - compile fail", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 153) - compile", "src/component.rs - component::StorageType (line 178)", "src/change_detection.rs - change_detection::DetectChangesMut (line 77)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 255)", "src/component.rs - component::Component (line 34)", "src/component.rs - component::Component (line 80)", "src/lib.rs - (line 212)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 241)", "src/bundle.rs - bundle::Bundle (line 94)", "src/event.rs - event::EventWriter (line 274)", "src/entity/map_entities.rs - entity::map_entities::MapEntities (line 34)", "src/lib.rs - (line 287)", "src/query/fetch.rs - query::fetch::WorldQuery (line 124)", "src/component.rs - component::Component (line 99)", "src/lib.rs - (line 239)", "src/component.rs - component::ComponentIdFor (line 727)", "src/lib.rs - (line 189)", "src/lib.rs - (line 30)", "src/change_detection.rs - change_detection::DetectChanges (line 33)", "src/schedule/state.rs - schedule::state::States (line 28)", "src/lib.rs - (line 165)", "src/system/commands/mod.rs - system::commands::Command (line 24)", "src/lib.rs - (line 74)", "src/system/commands/mod.rs - system::commands::Commands (line 88)", "src/query/fetch.rs - query::fetch::WorldQuery (line 224)", "src/query/fetch.rs - query::fetch::WorldQuery (line 199)", "src/component.rs - component::Component (line 134)", "src/system/mod.rs - system::assert_is_read_only_system (line 173) - compile fail", "src/lib.rs - (line 91)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 270)", "src/system/commands/mod.rs - system::commands::Commands (line 70)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 213)", "src/lib.rs - (line 51)", "src/entity/mod.rs - entity::Entity (line 77)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 514)", "src/query/fetch.rs - query::fetch::WorldQuery (line 252)", "src/change_detection.rs - change_detection::ResMut<'a,T>::map_unchanged (line 461)", "src/change_detection.rs - change_detection::Mut<'a,T>::map_unchanged (line 612)", "src/component.rs - component::Components::component_id (line 493)", "src/lib.rs - (line 41)", "src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 217)", "src/entity/mod.rs - entity::Entity (line 97)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 315)", "src/system/function_system.rs - system::function_system::SystemState (line 83)", "src/removal_detection.rs - removal_detection::RemovedComponents (line 119)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 121)", "src/query/filter.rs - query::filter::Changed (line 602)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::despawn (line 768)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 273)", "src/query/fetch.rs - query::fetch::WorldQuery (line 144)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 148)", "src/change_detection.rs - change_detection::NonSendMut<'a,T>::map_unchanged (line 494)", "src/system/function_system.rs - system::function_system::IntoSystem (line 311)", "src/lib.rs - (line 254)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 235)", "src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 864)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many (line 827) - compile", "src/system/function_system.rs - system::function_system::In (line 346)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many_mut (line 932) - compile", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 316)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 487)", "src/query/filter.rs - query::filter::Without (line 120)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 460)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 432)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations (line 419)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 551)", "src/event.rs - event::EventWriter (line 257)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 135)", "src/system/mod.rs - system (line 13)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations_mut (line 453)", "src/system/mod.rs - system::assert_is_system (line 140)", "src/event.rs - event::Events (line 79)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 420)", "src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 155)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 357)", "src/system/function_system.rs - system::function_system::SystemParamFunction (line 565)", "src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 24)", "src/schedule/condition.rs - schedule::condition::common_conditions::not (line 900)", "src/system/query.rs - system::query::Query (line 162)", "src/query/fetch.rs - query::fetch::WorldQuery (line 67)", "src/system/query.rs - system::query::Query (line 139)", "src/system/query.rs - system::query::Query (line 113)", "src/query/filter.rs - query::filter::Added (line 566)", "src/query/filter.rs - query::filter::With (line 24)", "src/system/commands/mod.rs - system::commands::EntityCommand (line 550)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::id (line 638)", "src/system/mod.rs - system (line 56)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 25)", "src/component.rs - component::Components::resource_id (line 527)", "src/query/filter.rs - query::filter::Or (line 220)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::add (line 793)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many_mut (line 291)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 211)", "src/system/function_system.rs - system::function_system::SystemState (line 115)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::remove (line 716)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 366)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 44)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 481)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 771)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists_and_equals (line 705)", "src/schedule/condition.rs - schedule::condition::Condition::or_else (line 76)", "src/lib.rs - (line 124)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::insert (line 662)", "src/system/query.rs - system::query::Query (line 36)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 196)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "src/system/combinator.rs - system::combinator::Combine (line 18)", "src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 653)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 606)", "src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 821)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many (line 231)", "src/system/query.rs - system::query::Query (line 57)", "src/system/query.rs - system::query::Query (line 97)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get (line 761)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_inner (line 1453)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single (line 1175)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_mut (line 874)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each_mut (line 693)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::contains (line 1312)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component (line 1005)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::is_empty (line 1288)", "src/system/query.rs - system::query::Query (line 77)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single_mut (line 1252)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter (line 352)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_inner (line 1410)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many (line 487)", "src/system/system_piping.rs - system::system_piping::adapter::info (line 167)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component_mut (line 1063)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single (line 1147)", "src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::world_scope (line 677)", "src/system/system_piping.rs - system::system_piping::adapter::warn (line 221)", "src/system/system_piping.rs - system::system_piping::adapter::new (line 108)", "src/world/mod.rs - world::World::entity (line 232)", "src/world/mod.rs - world::World::query (line 685)", "src/world/mod.rs - world::World::component_id (line 211)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many_mut (line 543)", "src/world/mod.rs - world::World::insert_or_spawn_batch (line 1155)", "src/system/system_piping.rs - system::system_piping::PipeSystem (line 19)", "src/world/mod.rs - world::World::get (line 566)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single_mut (line 1222)", "src/world/mod.rs - world::World::entity_mut (line 257)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each (line 655)", "src/world/mod.rs - world::World::clear_trackers (line 655)", "src/world/mod.rs - world::World::get_entity_mut (line 383)", "src/world/mod.rs - world::World::spawn (line 441)", "src/world/mod.rs - world::World::get_mut (line 587)", "src/world/mod.rs - world::World::query_filtered (line 752)", "src/world/mod.rs - world::World::despawn (line 613)", "src/world/mod.rs - world::World::spawn_batch (line 540)", "src/world/mod.rs - world::World::get_entity (line 330)", "src/world/mod.rs - world::World::spawn_empty (line 408)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_mut (line 387)", "src/world/mod.rs - world::World::resource_scope (line 1272)", "src/world/mod.rs - world::World::query (line 721)", "src/system/system_piping.rs - system::system_piping::adapter::unwrap (line 136)", "src/system/system_piping.rs - system::system_piping::adapter::ignore (line 281)", "src/system/system_piping.rs - system::system_piping::adapter::error (line 250)", "src/system/system_piping.rs - system::system_piping::adapter::dbg (line 194)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,014
bevyengine__bevy-8014
[ "7989" ]
7d9cb1c4ab210595c5228af0ed4ec7d095241db5
diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -3,7 +3,7 @@ use crate::derive_data::ReflectEnum; use crate::enum_utility::{get_variant_constructors, EnumVariantConstructors}; use crate::field_attributes::DefaultBehavior; use crate::fq_std::{FQAny, FQClone, FQDefault, FQOption}; -use crate::utility::ident_or_index; +use crate::utility::{extend_where_clause, ident_or_index, WhereClauseOptions}; use crate::{ReflectMeta, ReflectStruct}; use proc_macro::TokenStream; use proc_macro2::Span; diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -49,8 +49,20 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> TokenStream { let (impl_generics, ty_generics, where_clause) = reflect_enum.meta().generics().split_for_impl(); + + // Add FromReflect bound for each active field + let where_from_reflect_clause = extend_where_clause( + where_clause, + &WhereClauseOptions { + active_types: reflect_enum.active_types().into_boxed_slice(), + ignored_types: reflect_enum.ignored_types().into_boxed_slice(), + active_trait_bounds: quote!(#bevy_reflect_path::FromReflect), + ignored_trait_bounds: quote!(#FQDefault), + }, + ); + TokenStream::from(quote! { - impl #impl_generics #bevy_reflect_path::FromReflect for #type_name #ty_generics #where_clause { + impl #impl_generics #bevy_reflect_path::FromReflect for #type_name #ty_generics #where_from_reflect_clause { fn from_reflect(#ref_value: &dyn #bevy_reflect_path::Reflect) -> #FQOption<Self> { if let #bevy_reflect_path::ReflectRef::Enum(#ref_value) = #bevy_reflect_path::Reflect::reflect_ref(#ref_value) { match #bevy_reflect_path::Enum::variant_name(#ref_value) { diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -89,11 +101,11 @@ fn impl_struct_internal(reflect_struct: &ReflectStruct, is_tuple: bool) -> Token Ident::new("Struct", Span::call_site()) }; - let field_types = reflect_struct.active_types(); let MemberValuePair(active_members, active_values) = get_active_fields(reflect_struct, &ref_struct, &ref_struct_type, is_tuple); - let constructor = if reflect_struct.meta().traits().contains(REFLECT_DEFAULT) { + let is_defaultable = reflect_struct.meta().traits().contains(REFLECT_DEFAULT); + let constructor = if is_defaultable { quote!( let mut __this: Self = #FQDefault::default(); #( diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -120,16 +132,19 @@ fn impl_struct_internal(reflect_struct: &ReflectStruct, is_tuple: bool) -> Token let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); // Add FromReflect bound for each active field - let mut where_from_reflect_clause = if where_clause.is_some() { - quote! {#where_clause} - } else if !active_members.is_empty() { - quote! {where} - } else { - quote! {} - }; - where_from_reflect_clause.extend(quote! { - #(#field_types: #bevy_reflect_path::FromReflect,)* - }); + let where_from_reflect_clause = extend_where_clause( + where_clause, + &WhereClauseOptions { + active_types: reflect_struct.active_types().into_boxed_slice(), + ignored_types: reflect_struct.ignored_types().into_boxed_slice(), + active_trait_bounds: quote!(#bevy_reflect_path::FromReflect), + ignored_trait_bounds: if is_defaultable { + quote!() + } else { + quote!(#FQDefault) + }, + }, + ); TokenStream::from(quote! { impl #impl_generics #bevy_reflect_path::FromReflect for #struct_name #ty_generics #where_from_reflect_clause diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs @@ -122,8 +122,9 @@ pub(crate) fn extend_where_clause( let active_trait_bounds = &where_clause_options.active_trait_bounds; let ignored_trait_bounds = &where_clause_options.ignored_trait_bounds; - let mut generic_where_clause = if where_clause.is_some() { - quote! {#where_clause} + let mut generic_where_clause = if let Some(where_clause) = where_clause { + let predicates = where_clause.predicates.iter(); + quote! {where #(#predicates,)*} } else if !(active_types.is_empty() && ignored_types.is_empty()) { quote! {where} } else {
diff --git /dev/null b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/bounds.pass.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/bounds.pass.rs @@ -0,0 +1,282 @@ +use bevy_reflect::prelude::*; + +fn main() {} + +#[derive(Default)] +struct NonReflect; + +struct NonReflectNonDefault; + +mod structs { + use super::*; + + #[derive(Reflect)] + struct ReflectGeneric<T> { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + struct FromReflectGeneric<T> { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultGeneric<T> { + foo: Option<T>, + #[reflect(ignore)] + _ignored: NonReflectNonDefault, + } + + impl<T> Default for DefaultGeneric<T> { + fn default() -> Self { + Self { + foo: None, + _ignored: NonReflectNonDefault, + } + } + } + + #[derive(Reflect)] + struct ReflectBoundGeneric<T: Clone> { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + struct FromReflectBoundGeneric<T: Clone> { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultBoundGeneric<T: Clone> { + foo: Option<T>, + #[reflect(ignore)] + _ignored: NonReflectNonDefault, + } + + impl<T: Clone> Default for DefaultBoundGeneric<T> { + fn default() -> Self { + Self { + foo: None, + _ignored: NonReflectNonDefault, + } + } + } + + #[derive(Reflect)] + struct ReflectGenericWithWhere<T> + where + T: Clone, + { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + struct FromReflectGenericWithWhere<T> + where + T: Clone, + { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultGenericWithWhere<T> + where + T: Clone, + { + foo: Option<T>, + #[reflect(ignore)] + _ignored: NonReflectNonDefault, + } + + impl<T> Default for DefaultGenericWithWhere<T> + where + T: Clone, + { + fn default() -> Self { + Self { + foo: None, + _ignored: NonReflectNonDefault, + } + } + } + + #[derive(Reflect)] + #[rustfmt::skip] + struct ReflectGenericWithWhereNoTrailingComma<T> + where + T: Clone + { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + #[rustfmt::skip] + struct FromReflectGenericWithWhereNoTrailingComma<T> + where + T: Clone + { + foo: T, + #[reflect(ignore)] + _ignored: NonReflect, + } + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + #[rustfmt::skip] + struct DefaultGenericWithWhereNoTrailingComma<T> + where + T: Clone + { + foo: Option<T>, + #[reflect(ignore)] + _ignored: NonReflectNonDefault, + } + + impl<T> Default for DefaultGenericWithWhereNoTrailingComma<T> + where + T: Clone, + { + fn default() -> Self { + Self { + foo: None, + _ignored: NonReflectNonDefault, + } + } + } +} + +mod tuple_structs { + use super::*; + + #[derive(Reflect)] + struct ReflectGeneric<T>(T, #[reflect(ignore)] NonReflect); + + #[derive(Reflect, FromReflect)] + struct FromReflectGeneric<T>(T, #[reflect(ignore)] NonReflect); + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultGeneric<T>(Option<T>, #[reflect(ignore)] NonReflectNonDefault); + + impl<T> Default for DefaultGeneric<T> { + fn default() -> Self { + Self(None, NonReflectNonDefault) + } + } + + #[derive(Reflect)] + struct ReflectBoundGeneric<T: Clone>(T, #[reflect(ignore)] NonReflect); + + #[derive(Reflect, FromReflect)] + struct FromReflectBoundGeneric<T: Clone>(T, #[reflect(ignore)] NonReflect); + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultBoundGeneric<T: Clone>(Option<T>, #[reflect(ignore)] NonReflectNonDefault); + + impl<T: Clone> Default for DefaultBoundGeneric<T> { + fn default() -> Self { + Self(None, NonReflectNonDefault) + } + } + + #[derive(Reflect)] + struct ReflectGenericWithWhere<T>(T, #[reflect(ignore)] NonReflect) + where + T: Clone; + + #[derive(Reflect, FromReflect)] + struct FromReflectGenericWithWhere<T>(T, #[reflect(ignore)] NonReflect) + where + T: Clone; + + #[derive(Reflect, FromReflect)] + #[reflect(Default)] + struct DefaultGenericWithWhere<T>(Option<T>, #[reflect(ignore)] NonReflectNonDefault) + where + T: Clone; + + impl<T> Default for DefaultGenericWithWhere<T> + where + T: Clone, + { + fn default() -> Self { + Self(None, NonReflectNonDefault) + } + } +} + +mod enums { + use super::*; + + #[derive(Reflect)] + enum ReflectGeneric<T> { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect, FromReflect)] + enum FromReflectGeneric<T> { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect)] + enum ReflectBoundGeneric<T: Clone> { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect, FromReflect)] + enum FromReflectBoundGeneric<T: Clone> { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect)] + enum ReflectGenericWithWhere<T> + where + T: Clone, + { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect, FromReflect)] + enum FromReflectGenericWithWhere<T> + where + T: Clone, + { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect)] + #[rustfmt::skip] + enum ReflectGenericWithWhereNoTrailingComma<T> + where + T: Clone + { + Foo(T, #[reflect(ignore)] NonReflect), + } + + #[derive(Reflect, FromReflect)] + #[rustfmt::skip] + enum FromReflectGenericWithWhereNoTrailingComma<T> + where + T: Clone + { + Foo(T, #[reflect(ignore)] NonReflect), + } +}
Issue with specific reflect breaking after upgrading from 0.9-0.10 ## Bevy 0.10 0.10 ## What you did Upgraded from bevy 0.9 -> 0.10 ## What went wrong The following code has stopped compiling: ```rust use bevy::{reflect::Reflect, utils::HashSet}; #[derive(Default, Clone, Reflect, serde::Serialize, serde::Deserialize)] pub struct NetSet<T> where T: 'static + Send + Sync + Eq + Copy + core::hash::Hash { set: HashSet<T> } ``` There's an error for the reflect derive, ``` Proc-macro derive produced unparseable tokens ``` and one for the HashSet ``` expected one of `(`, `+`, `,`, `::`, `<`, or `{`, found `HashSet` unexpected token ... ``` ## Additional information Full 0.9 version: <https://github.com/CoffeeVampir3/rusty_cg/blob/main/src/structures/netset.rs> ![image](https://user-images.githubusercontent.com/48565901/223880834-07b45114-e878-4b5d-af2e-8f61d0fbc236.png) ![image](https://user-images.githubusercontent.com/48565901/223880850-b4370c5a-5f19-4618-84b3-256aef498290.png) Fully expanded proc macro: ```rust // Recursive expansion of Reflect! macro // ====================================== #[allow(unused_mut)] impl <T>bevy::reflect::GetTypeRegistration for NetSet<T>where T:'static+Send+Sync+Eq+Copy+core::hash::Hash HashSet<T> :bevy::reflect::Reflect,{ fn get_type_registration() -> bevy::reflect::TypeRegistration { let mut registration = bevy::reflect::TypeRegistration::of:: <NetSet<T> >(); registration.insert:: <bevy::reflect::ReflectFromPtr>(bevy::reflect::FromType:: <NetSet<T> > ::from_type()); let ignored_indices = ::core::iter::IntoIterator::into_iter([]); registration.insert:: <bevy::reflect::serde::SerializationData>(bevy::reflect::serde::SerializationData::new(ignored_indices)); registration } } impl <T>bevy::reflect::Typed for NetSet<T>where T:'static+Send+Sync+Eq+Copy+core::hash::Hash HashSet<T> :bevy::reflect::Reflect,{ fn type_info() -> &'static bevy::reflect::TypeInfo { static CELL:bevy::reflect::utility::GenericTypeInfoCell = bevy::reflect::utility::GenericTypeInfoCell::new(); CELL.get_or_insert:: <Self,_>(||{ let fields = [bevy::reflect::NamedField::new:: <HashSet<T> >("set"),]; let info = bevy::reflect::StructInfo::new:: <Self>("NetSet", &fields); bevy::reflect::TypeInfo::Struct(info) }) } } impl <T>bevy::reflect::Struct for NetSet<T>where T:'static+Send+Sync+Eq+Copy+core::hash::Hash HashSet<T> :bevy::reflect::Reflect,{ fn field(&self,name: &str) -> ::core::option::Option< &dyn bevy::reflect::Reflect>{ match name { "set" => ::core::option::Option::Some(&self.set), _ => ::core::option::Option::None, } } fn field_mut(&mut self,name: &str) -> ::core::option::Option< &mut dyn bevy::reflect::Reflect>{ match name { "set" => ::core::option::Option::Some(&mut self.set), _ => ::core::option::Option::None, } } fn field_at(&self,index:usize) -> ::core::option::Option< &dyn bevy::reflect::Reflect>{ match index { 0usize => ::core::option::Option::Some(&self.set), _ => ::core::option::Option::None, } } fn field_at_mut(&mut self,index:usize) -> ::core::option::Option< &mut dyn bevy::reflect::Reflect>{ match index { 0usize => ::core::option::Option::Some(&mut self.set), _ => ::core::option::Option::None, } } fn name_at(&self,index:usize) -> ::core::option::Option< &str>{ match index { 0usize => ::core::option::Option::Some("set"), _ => ::core::option::Option::None, } } fn field_len(&self) -> usize { 1usize } fn iter_fields(&self) -> bevy::reflect::FieldIter { bevy::reflect::FieldIter::new(self) } fn clone_dynamic(&self) -> bevy::reflect::DynamicStruct { let mut dynamic:bevy::reflect::DynamicStruct = ::core::default::Default::default(); dynamic.set_name(::std::string::ToString::to_string(bevy::reflect::Reflect::type_name(self))); dynamic.insert_boxed("set",bevy::reflect::Reflect::clone_value(&self.set)); dynamic } } impl <T>bevy::reflect::Reflect for NetSet<T>where T:'static+Send+Sync+Eq+Copy+core::hash::Hash HashSet<T> :bevy::reflect::Reflect,{ #[inline] fn type_name(&self) -> &str { ::core::any::type_name:: <Self>() } #[inline] fn get_type_info(&self) -> &'static bevy::reflect::TypeInfo { <Self as bevy::reflect::Typed> ::type_info() } #[inline] fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn ::core::any::Any>{ self } #[inline] fn as_any(&self) -> &dyn ::core::any::Any { self } #[inline] fn as_any_mut(&mut self) -> &mut dyn ::core::any::Any { self } #[inline] fn into_reflect(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn bevy::reflect::Reflect>{ self } #[inline] fn as_reflect(&self) -> &dyn bevy::reflect::Reflect { self } #[inline] fn as_reflect_mut(&mut self) -> &mut dyn bevy::reflect::Reflect { self } #[inline] fn clone_value(&self) -> ::std::boxed::Box<dyn bevy::reflect::Reflect>{ ::std::boxed::Box::new(bevy::reflect::Struct::clone_dynamic(self)) } #[inline] fn set(&mut self,value: ::std::boxed::Box<dyn bevy::reflect::Reflect>) -> ::core::result::Result<(), ::std::boxed::Box<dyn bevy::reflect::Reflect>>{ *self = <dyn bevy::reflect::Reflect> ::take(value)? ; ::core::result::Result::Ok(()) } #[inline] fn apply(&mut self,value: &dyn bevy::reflect::Reflect){ if let bevy::reflect::ReflectRef::Struct(struct_value) = bevy::reflect::Reflect::reflect_ref(value){ for(i,value)in::core::iter::Iterator::enumerate(bevy::reflect::Struct::iter_fields(struct_value)){ let name = bevy::reflect::Struct::name_at(struct_value,i).unwrap(); bevy::reflect::Struct::field_mut(self,name).map(|v|v.apply(value)); } }else { panic!("Attempted to apply non-struct type to struct type."); } } fn reflect_ref(&self) -> bevy::reflect::ReflectRef { bevy::reflect::ReflectRef::Struct(self) } fn reflect_mut(&mut self) -> bevy::reflect::ReflectMut { bevy::reflect::ReflectMut::Struct(self) } fn reflect_owned(self: ::std::boxed::Box<Self>) -> bevy::reflect::ReflectOwned { bevy::reflect::ReflectOwned::Struct(self) } fn reflect_partial_eq(&self,value: &dyn bevy::reflect::Reflect) -> ::core::option::Option<bool>{ bevy::reflect::struct_partial_eq(self,value) } } ```
After expanding the macro I think I've found the issue: The emitted version of the macro (one example) ```rust #[allow(unused_mut)] impl <T>bevy::reflect::GetTypeRegistration for NetSet<T>where T:'static+Send+Sync+Eq+Copy+core::hash::Hash HashSet<T> :bevy::reflect::Reflect,{ fn get_type_registration() -> bevy::reflect::TypeRegistration { let mut registration = bevy::reflect::TypeRegistration::of:: <NetSet<T> >(); registration.insert:: <bevy::reflect::ReflectFromPtr>(bevy::reflect::FromType:: <NetSet<T> > ::from_type()); let ignored_indices = ::core::iter::IntoIterator::into_iter([]); registration.insert:: <bevy::reflect::serde::SerializationData>(bevy::reflect::serde::SerializationData::new(ignored_indices)); registration } ``` there's a missing comma on the reflect emit it appears. gunna dig into the reflect proc macro and see if I can get it to work.
2023-03-10T06:47:15Z
1.67
2023-03-27T22:06:30Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "tests/reflect_derive/bounds.pass.rs [should pass]", "test" ]
[ "tests/reflect_derive/generics.fail.rs [should fail to compile]", "tests/reflect_derive/generics_structs.pass.rs [should pass]", "tests/reflect_derive/lifetimes.pass.rs [should pass]" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,012
bevyengine__bevy-8012
[ "8010" ]
2d5ef75c9fc93cbb301c4b0d19f73b8864694be9
diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -1,9 +1,10 @@ +use bevy_macro_utils::ensure_no_collision; use proc_macro::TokenStream; use proc_macro2::{Ident, Span}; use quote::{quote, ToTokens}; use syn::{ parse::{Parse, ParseStream}, - parse_quote, + parse_macro_input, parse_quote, punctuated::Punctuated, Attribute, Data, DataStruct, DeriveInput, Field, Fields, }; diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -25,7 +26,10 @@ mod field_attr_keywords { pub static WORLD_QUERY_ATTRIBUTE_NAME: &str = "world_query"; -pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream { +pub fn derive_world_query_impl(input: TokenStream) -> TokenStream { + let tokens = input.clone(); + + let ast = parse_macro_input!(input as DeriveInput); let visibility = ast.vis; let mut fetch_struct_attributes = FetchStructAttributes::default(); diff --git a/crates/bevy_ecs/macros/src/fetch.rs b/crates/bevy_ecs/macros/src/fetch.rs --- a/crates/bevy_ecs/macros/src/fetch.rs +++ b/crates/bevy_ecs/macros/src/fetch.rs @@ -104,13 +108,18 @@ pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream { }; let fetch_struct_name = Ident::new(&format!("{struct_name}Fetch"), Span::call_site()); + let fetch_struct_name = ensure_no_collision(fetch_struct_name, tokens.clone()); let read_only_fetch_struct_name = if fetch_struct_attributes.is_mutable { - Ident::new(&format!("{struct_name}ReadOnlyFetch"), Span::call_site()) + let new_ident = Ident::new(&format!("{struct_name}ReadOnlyFetch"), Span::call_site()); + ensure_no_collision(new_ident, tokens.clone()) } else { fetch_struct_name.clone() }; + // Generate a name for the state struct that doesn't conflict + // with the struct definition. let state_struct_name = Ident::new(&format!("{struct_name}State"), Span::call_site()); + let state_struct_name = ensure_no_collision(state_struct_name, tokens); let fields = match &ast.data { Data::Struct(DataStruct { diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -6,7 +6,9 @@ mod set; mod states; use crate::{fetch::derive_world_query_impl, set::derive_set}; -use bevy_macro_utils::{derive_boxed_label, get_named_struct_fields, BevyManifest}; +use bevy_macro_utils::{ + derive_boxed_label, ensure_no_collision, get_named_struct_fields, BevyManifest, +}; use proc_macro::TokenStream; use proc_macro2::Span; use quote::{format_ident, quote}; diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -260,6 +262,7 @@ static SYSTEM_PARAM_ATTRIBUTE_NAME: &str = "system_param"; /// Implement `SystemParam` to use a struct as a parameter in a system #[proc_macro_derive(SystemParam, attributes(system_param))] pub fn derive_system_param(input: TokenStream) -> TokenStream { + let token_stream = input.clone(); let ast = parse_macro_input!(input as DeriveInput); let syn::Data::Struct(syn::DataStruct { fields: field_definitions, ..}) = ast.data else { return syn::Error::new(ast.span(), "Invalid `SystemParam` type: expected a `struct`") diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -394,6 +397,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { let struct_name = &ast.ident; let state_struct_visibility = &ast.vis; + let state_struct_name = ensure_no_collision(format_ident!("FetchState"), token_stream); TokenStream::from(quote! { // We define the FetchState struct in an anonymous scope to avoid polluting the user namespace. diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -401,7 +405,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { // <EventReader<'static, 'static, T> as SystemParam>::State const _: () = { #[doc(hidden)] - #state_struct_visibility struct FetchState <'w, 's, #(#lifetimeless_generics,)*> + #state_struct_visibility struct #state_struct_name <'w, 's, #(#lifetimeless_generics,)*> #where_clause { state: (#(<#tuple_types as #path::system::SystemParam>::State,)*), marker: std::marker::PhantomData<( diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -411,11 +415,11 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { } unsafe impl<'w, 's, #punctuated_generics> #path::system::SystemParam for #struct_name #ty_generics #where_clause { - type State = FetchState<'static, 'static, #punctuated_generic_idents>; + type State = #state_struct_name<'static, 'static, #punctuated_generic_idents>; type Item<'_w, '_s> = #struct_name <#(#shadowed_lifetimes,)* #punctuated_generic_idents>; fn init_state(world: &mut #path::world::World, system_meta: &mut #path::system::SystemMeta) -> Self::State { - FetchState { + #state_struct_name { state: <(#(#tuple_types,)*) as #path::system::SystemParam>::init_state(world, system_meta), marker: std::marker::PhantomData, } diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -454,8 +458,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { /// Implement `WorldQuery` to use a struct as a parameter in a query #[proc_macro_derive(WorldQuery, attributes(world_query))] pub fn derive_world_query(input: TokenStream) -> TokenStream { - let ast = parse_macro_input!(input as DeriveInput); - derive_world_query_impl(ast) + derive_world_query_impl(input) } /// Derive macro generating an impl of the trait `ScheduleLabel`. diff --git a/crates/bevy_macro_utils/Cargo.toml b/crates/bevy_macro_utils/Cargo.toml --- a/crates/bevy_macro_utils/Cargo.toml +++ b/crates/bevy_macro_utils/Cargo.toml @@ -12,3 +12,4 @@ keywords = ["bevy"] toml_edit = "0.19" syn = "1.0" quote = "1.0" +rustc-hash = "1.0" diff --git a/crates/bevy_macro_utils/src/lib.rs b/crates/bevy_macro_utils/src/lib.rs --- a/crates/bevy_macro_utils/src/lib.rs +++ b/crates/bevy_macro_utils/src/lib.rs @@ -8,10 +8,11 @@ pub use attrs::*; pub use shape::*; pub use symbol::*; -use proc_macro::TokenStream; +use proc_macro::{TokenStream, TokenTree}; use quote::{quote, quote_spanned}; +use rustc_hash::FxHashSet; use std::{env, path::PathBuf}; -use syn::spanned::Spanned; +use syn::{spanned::Spanned, Ident}; use toml_edit::{Document, Item}; pub struct BevyManifest { diff --git a/crates/bevy_macro_utils/src/lib.rs b/crates/bevy_macro_utils/src/lib.rs --- a/crates/bevy_macro_utils/src/lib.rs +++ b/crates/bevy_macro_utils/src/lib.rs @@ -108,6 +109,48 @@ impl BevyManifest { } } +/// Finds an identifier that will not conflict with the specified set of tokens. +/// If the identifier is present in `haystack`, extra characters will be added +/// to it until it no longer conflicts with anything. +/// +/// Note that the returned identifier can still conflict in niche cases, +/// such as if an identifier in `haystack` is hidden behind an un-expanded macro. +pub fn ensure_no_collision(value: Ident, haystack: TokenStream) -> Ident { + // Collect all the identifiers in `haystack` into a set. + let idents = { + // List of token streams that will be visited in future loop iterations. + let mut unvisited = vec![haystack]; + // Identifiers we have found while searching tokens. + let mut found = FxHashSet::default(); + while let Some(tokens) = unvisited.pop() { + for t in tokens { + match t { + // Collect any identifiers we encounter. + TokenTree::Ident(ident) => { + found.insert(ident.to_string()); + } + // Queue up nested token streams to be visited in a future loop iteration. + TokenTree::Group(g) => unvisited.push(g.stream()), + TokenTree::Punct(_) | TokenTree::Literal(_) => {} + } + } + } + + found + }; + + let span = value.span(); + + // If there's a collision, add more characters to the identifier + // until it doesn't collide with anything anymore. + let mut value = value.to_string(); + while idents.contains(&value) { + value.push('X'); + } + + Ident::new(&value, span) +} + /// Derive a label trait /// /// # Args
diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1388,3 +1388,37 @@ unsafe impl<Q: WorldQuery> WorldQuery for NopWorldQuery<Q> { /// SAFETY: `NopFetch` never accesses any data unsafe impl<Q: WorldQuery> ReadOnlyWorldQuery for NopWorldQuery<Q> {} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{self as bevy_ecs, system::Query}; + + // Ensures that metadata types generated by the WorldQuery macro + // do not conflict with user-defined types. + // Regression test for https://github.com/bevyengine/bevy/issues/8010. + #[test] + fn world_query_metadata_collision() { + // The metadata types generated would be named `ClientState` and `ClientFetch`, + // but they should rename themselves to avoid conflicts. + #[derive(WorldQuery)] + pub struct Client<S: ClientState> { + pub state: &'static S, + pub fetch: &'static ClientFetch, + } + + pub trait ClientState: Component {} + + #[derive(Component)] + pub struct ClientFetch; + + #[derive(Component)] + pub struct C; + + impl ClientState for C {} + + fn client_system(_: Query<Client<C>>) {} + + crate::system::assert_is_system(client_system); + } +} diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1625,7 +1625,7 @@ mod tests { #[derive(SystemParam)] pub struct EncapsulatedParam<'w>(Res<'w, PrivateResource>); - // regression test for https://github.com/bevyengine/bevy/issues/7103. + // Regression test for https://github.com/bevyengine/bevy/issues/7103. #[derive(SystemParam)] pub struct WhereParam<'w, 's, Q> where diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1633,4 +1633,13 @@ mod tests { { _q: Query<'w, 's, Q, ()>, } + + // Regression test for https://github.com/bevyengine/bevy/issues/1727. + #[derive(SystemParam)] + pub struct Collide<'w> { + _x: Res<'w, FetchState>, + } + + #[derive(Resource)] + pub struct FetchState; }
WorldQuery derive State and Fetch types are still accidentally nameable ## Bevy version Latest commit as of writing ([`7d9cb1c`](https://github.com/bevyengine/bevy/commit/7d9cb1c4ab210595c5228af0ed4ec7d095241db5)) ## What you did ```rust #[derive(WorldQuery)] pub struct Client<S: ClientState> { pub state: &'static S, // ... } pub trait ClientState: Component {} ``` ## What went wrong ```rust error[E0404]: expected trait, found struct `ClientState` --> crates/example/src/client.rs:11:22 | 11 | pub struct Client<S: ClientState> { | ^^^^^^^^^^^ not a trait ... 35 | pub trait ClientState: Component { | ----------- you might have meant to refer to this trait | help: consider importing this trait instead | 1 | use crate::client::ClientState; | ``` ## Additional information To workaround it currently, we can prepend `self::` to the struct bound: ```rust #[derive(WorldQuery)] pub struct Client<S: self::ClientState> { pub state: &'static S, // ... } ```
Interesting, I'll look into this. Not sure if there's a clean way of solving this, but it should at least be possible to *check* for this footgun and emit a descriptive error message.
2023-03-10T04:12:11Z
1.67
2023-03-22T16:42:32Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_new", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_const", "change_detection::tests::set_if_neq", "entity::tests::reserve_entity_len", "entity::tests::get_reserved_and_invalid", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_expiration", "change_detection::tests::change_tick_scan", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_drain_and_read", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::tests::any_query", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::multi_storage_query", "query::tests::query", "query::tests::derived_worldqueries", "query::tests::query_iter_combinations_sparse", "query::tests::query_iter_combinations", "query::tests::query_filtered_iter_combinations", "query::tests::self_conflicting_worldquery - should panic", "schedule::condition::tests::distributive_run_if_compiles", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::dependency_cycle", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::sparse_set::tests::sparse_set", "system::commands::command_queue::test::test_command_is_send", "storage::sparse_set::tests::sparse_sets", "system::commands::command_queue::test::test_command_queue_inner_drop", "storage::blob_vec::tests::aligned_zst", "storage::table::tests::table", "system::commands::command_queue::test::test_command_queue_inner", "system::commands::command_queue::test::test_command_queue_inner_panic_safe", "storage::blob_vec::tests::resize_test", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::commands::tests::remove_resources", "system::system_piping::adapter::assert_systems", "system::commands::tests::commands", "system::commands::tests::remove_components", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::immutable_mut_test", "system::tests::conflicting_query_immut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::option_has_no_filter_with - should panic", "system::tests::can_have_16_parameters", "system::tests::or_has_no_filter_with - should panic", "system::tests::query_is_empty", "system::tests::long_life_test", "system::tests::query_validates_world_id - should panic", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "system::tests::simple_system", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_change_detection", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::added_tracking", "tests::bundle_derive", "tests::add_remove_components", "tests::despawn_mixed_storage", "tests::duplicate_components_panic - should panic", "tests::changed_query", "tests::clear_entities", "tests::empty_spawn", "tests::filtered_query_access", "tests::despawn_table_storage", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::changed_trackers_sparse", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::changed_trackers", "tests::exact_size_query", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::mut_and_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_points_to_distinct_data", "system::tests::non_send_system", "system::tests::non_send_option_system", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::readonly_query_get_mut_component_fails", "system::tests::option_doesnt_remove_unrelated_filter_with", "tests::query_all", "event::tests::test_event_iter_nth", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::conditions::systems_nested_in_system_sets", "system::tests::query_system_gets", "system::tests::query_set_system", "tests::query_filter_with_for_each", "tests::query_filter_with", "tests::query_filter_with_sparse", "system::tests::nonconflicting_system_resources", "schedule::tests::conditions::system_with_condition", "system::tests::local_system", "system::tests::disjoint_query_mut_system", "tests::query_filter_with_sparse_for_each", "system::tests::world_collections_system", "system::tests::panic_inside_system - should panic", "system::tests::into_iter_impl", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::query_all_for_each", "tests::query_filter_without", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::tests::or_param_set_system", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::tests::system_execution::run_system", "schedule::tests::system_execution::run_exclusive_system", "system::tests::disjoint_query_mut_read_component_system", "schedule::tests::conditions::multiple_conditions_on_system", "tests::query_optional_component_sparse_no_match", "tests::query_single_component", "system::tests::changed_resource_system", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_filters_dont_collide_with_fetches", "schedule::condition::tests::run_condition_combinators", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::tests::commands_param_set", "system::tests::removal_tracking", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "tests::remove_missing", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::query_get", "tests::reserve_entities_across_worlds", "tests::query_missing_component", "tests::spawn_batch", "schedule::condition::tests::run_condition", "tests::query_optional_component_sparse", "tests::query_sparse_component", "tests::sparse_set_add_remove_many", "tests::ref_and_mut_query_panic - should panic", "tests::remove_tracking", "tests::take", "tests::remove", "tests::par_for_each_sparse", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "tests::random_access", "tests::query_get_works_across_sparse_removal", "tests::stateful_query_handles_new_archetype", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "tests::par_for_each_dense", "tests::non_send_resource_panic - should panic", "tests::non_send_resource_drop_from_different_thread - should panic", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id", "schedule::tests::system_ordering::order_systems", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::identifier::tests::world_ids_unique", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::removing_dense_updates_table_row", "world::tests::get_resource_mut_by_id", "world::tests::get_resource_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::init_non_send_resource_does_not_overwrite", "query::tests::par_iter_mut_change_detection", "world::world_cell::tests::world_access_reused", "world::tests::panic_while_overwriting_component", "world::world_cell::tests::world_cell", "world::world_cell::tests::world_cell_double_mut - should panic", "world::tests::spawn_empty_bundle", "world::world_cell::tests::world_cell_ref_and_ref", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "world::tests::iterate_entities", "world::tests::inspect_entity_components", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "src/component.rs - component::Component (line 124) - compile fail", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 143) - compile", "src/query/fetch.rs - query::fetch::WorldQuery (line 108) - compile fail", "src/component.rs - component::ComponentTicks::set_changed (line 711) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 153) - compile", "src/component.rs - component::ComponentIdFor (line 727)", "src/change_detection.rs - change_detection::DetectChangesMut (line 77)", "src/change_detection.rs - change_detection::Mut<'a,T>::map_unchanged (line 612)", "src/change_detection.rs - change_detection::DetectChanges (line 33)", "src/component.rs - component::Component (line 99)", "src/component.rs - component::Component (line 34)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 241)", "src/lib.rs - (line 189)", "src/removal_detection.rs - removal_detection::RemovedComponents (line 119)", "src/bundle.rs - bundle::Bundle (line 93)", "src/lib.rs - (line 287)", "src/query/fetch.rs - query::fetch::WorldQuery (line 199)", "src/change_detection.rs - change_detection::ResMut<'a,T>::map_unchanged (line 461)", "src/system/commands/mod.rs - system::commands::Command (line 24)", "src/event.rs - event::EventWriter (line 257)", "src/entity/mod.rs - entity::Entity (line 77)", "src/component.rs - component::StorageType (line 178)", "src/event.rs - event::EventWriter (line 274)", "src/component.rs - component::Component (line 134)", "src/change_detection.rs - change_detection::NonSendMut<'a,T>::map_unchanged (line 494)", "src/query/fetch.rs - query::fetch::WorldQuery (line 124)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 255)", "src/lib.rs - (line 212)", "src/query/filter.rs - query::filter::Without (line 120)", "src/lib.rs - (line 165)", "src/query/fetch.rs - query::fetch::WorldQuery (line 67)", "src/query/filter.rs - query::filter::Added (line 566)", "src/entity/map_entities.rs - entity::map_entities::MapEntities (line 34)", "src/query/fetch.rs - query::fetch::WorldQuery (line 144)", "src/query/filter.rs - query::filter::Changed (line 602)", "src/lib.rs - (line 30)", "src/query/filter.rs - query::filter::With (line 24)", "src/entity/mod.rs - entity::Entity (line 97)", "src/query/fetch.rs - query::fetch::WorldQuery (line 224)", "src/lib.rs - (line 74)", "src/system/commands/mod.rs - system::commands::Commands (line 70)", "src/query/filter.rs - query::filter::Or (line 220)", "src/lib.rs - (line 239)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 270)", "src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 217)", "src/schedule/state.rs - schedule::state::States (line 28)", "src/system/commands/mod.rs - system::commands::Commands (line 88)", "src/query/fetch.rs - query::fetch::WorldQuery (line 252)", "src/component.rs - component::Component (line 80)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 514)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 432)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 315)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many (line 827) - compile", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many_mut (line 932) - compile", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 460)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 357)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::id (line 638)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::despawn (line 768)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 487)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 211)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::insert (line 662)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::remove (line 716)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::add (line 793)", "src/system/query.rs - system::query::Query (line 57)", "src/system/query.rs - system::query::Query (line 36)", "src/system/query.rs - system::query::Query (line 113)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 148)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each (line 655)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_mut (line 874)", "src/system/mod.rs - system (line 13)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::contains (line 1312)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_inner (line 1453)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each_mut (line 693)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single (line 1147)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single (line 1175)", "src/system/query.rs - system::query::Query (line 97)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many (line 487)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get (line 761)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component_mut (line 1063)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component (line 1005)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations_mut (line 453)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter (line 352)", "src/system/system_param.rs - system::system_param::Resource (line 378) - compile fail", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_mut (line 387)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single_mut (line 1252)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1459) - compile fail", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::is_empty (line 1288)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations (line 419)", "src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 24)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many_mut (line 543)", "src/system/query.rs - system::query::Query (line 77)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single_mut (line 1222)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_inner (line 1410)", "src/system/system_param.rs - system::system_param::Local (line 667)", "src/system/system_param.rs - system::system_param::ParamSet (line 302)", "src/system/system_param.rs - system::system_param::ParamSet (line 267)", "src/system/system_param.rs - system::system_param::Resource (line 389)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1435)", "src/system/system_param.rs - system::system_param::SystemParam (line 47)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "src/lib.rs - (line 91)", "src/component.rs - component::Components::component_id (line 493)", "src/lib.rs - (line 41)", "src/lib.rs - (line 254)", "src/component.rs - component::Components::resource_id (line 527)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 235)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 213)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 44)", "src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 653)", "src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 155)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 551)", "src/lib.rs - (line 124)", "src/system/query.rs - system::query::Query (line 162)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 420)", "src/event.rs - event::Events (line 79)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 25)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 273)", "src/lib.rs - (line 51)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 771)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 316)", "src/system/function_system.rs - system::function_system::In (line 346)", "src/system/function_system.rs - system::function_system::SystemParamFunction (line 565)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 121)", "src/world/mod.rs - world::World::clear_trackers (line 655)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists_and_equals (line 705)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 135)", "src/system/function_system.rs - system::function_system::IntoSystem (line 311)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 606)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 196)", "src/system/function_system.rs - system::function_system::SystemState (line 115)", "src/schedule/condition.rs - schedule::condition::common_conditions::not (line 900)", "src/system/system_piping.rs - system::system_piping::adapter::error (line 250)", "src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 864)", "src/world/mod.rs - world::World::entity_mut (line 257)", "src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 821)", "src/system/query.rs - system::query::Query (line 139)", "src/system/function_system.rs - system::function_system::SystemState (line 83)", "src/system/commands/mod.rs - system::commands::EntityCommand (line 550)", "src/system/system_piping.rs - system::system_piping::adapter::dbg (line 194)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many_mut (line 291)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many (line 231)", "src/system/system_param.rs - system::system_param::ParamSet (line 238)", "src/world/mod.rs - world::World::get (line 566)", "src/system/mod.rs - system (line 56)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 366)", "src/schedule/condition.rs - schedule::condition::Condition::or_else (line 76)", "src/world/mod.rs - world::World::spawn_batch (line 540)", "src/system/system_param.rs - system::system_param::Resource (line 349)", "src/world/mod.rs - world::World::despawn (line 613)", "src/world/mod.rs - world::World::resource_scope (line 1272)", "src/world/mod.rs - world::World::component_id (line 211)", "src/world/mod.rs - world::World::insert_or_spawn_batch (line 1155)", "src/system/system_param.rs - system::system_param::Local (line 644)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 481)", "src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::world_scope (line 677)", "src/system/system_piping.rs - system::system_piping::adapter::info (line 167)", "src/system/combinator.rs - system::combinator::Combine (line 18)", "src/system/system_piping.rs - system::system_piping::adapter::unwrap (line 136)", "src/world/mod.rs - world::World::get_mut (line 587)", "src/world/mod.rs - world::World::spawn (line 441)", "src/system/system_piping.rs - system::system_piping::adapter::warn (line 221)", "src/world/mod.rs - world::World::spawn_empty (line 408)", "src/system/system_piping.rs - system::system_piping::adapter::ignore (line 281)", "src/system/system_piping.rs - system::system_piping::PipeSystem (line 19)", "src/system/system_param.rs - system::system_param::Deferred (line 780)", "src/world/mod.rs - world::World::query (line 685)", "src/world/mod.rs - world::World::entity (line 232)", "src/world/mod.rs - world::World::get_entity (line 330)", "src/world/mod.rs - world::World::get_entity_mut (line 383)", "src/system/system_piping.rs - system::system_piping::adapter::new (line 108)", "src/world/mod.rs - world::World::query_filtered (line 752)", "src/world/mod.rs - world::World::query (line 721)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
8,007
bevyengine__bevy-8007
[ "7985" ]
2aaaed7f69d3a8ff001e1392904394b2bea8333b
diff --git a/crates/bevy_core_pipeline/src/bloom/mod.rs b/crates/bevy_core_pipeline/src/bloom/mod.rs --- a/crates/bevy_core_pipeline/src/bloom/mod.rs +++ b/crates/bevy_core_pipeline/src/bloom/mod.rs @@ -16,7 +16,7 @@ use bevy_render::{ ComponentUniforms, DynamicUniformIndex, ExtractComponentPlugin, UniformComponentPlugin, }, prelude::Color, - render_graph::{Node, NodeRunError, RenderGraph, RenderGraphContext}, + render_graph::{Node, NodeRunError, RenderGraphApp, RenderGraphContext}, render_resource::*, renderer::{RenderContext, RenderDevice}, texture::{CachedTexture, TextureCache}, diff --git a/crates/bevy_core_pipeline/src/bloom/mod.rs b/crates/bevy_core_pipeline/src/bloom/mod.rs --- a/crates/bevy_core_pipeline/src/bloom/mod.rs +++ b/crates/bevy_core_pipeline/src/bloom/mod.rs @@ -71,45 +71,27 @@ impl Plugin for BloomPlugin { prepare_upsampling_pipeline.in_set(RenderSet::Prepare), queue_bloom_bind_groups.in_set(RenderSet::Queue), ), + ) + // Add bloom to the 3d render graph + .add_render_graph_node::<BloomNode>(core_3d::graph::NAME, core_3d::graph::node::BLOOM) + .add_render_graph_edges( + core_3d::graph::NAME, + &[ + core_3d::graph::node::END_MAIN_PASS, + core_3d::graph::node::BLOOM, + core_3d::graph::node::TONEMAPPING, + ], + ) + // Add bloom to the 2d render graph + .add_render_graph_node::<BloomNode>(core_2d::graph::NAME, core_2d::graph::node::BLOOM) + .add_render_graph_edges( + core_2d::graph::NAME, + &[ + core_2d::graph::node::MAIN_PASS, + core_2d::graph::node::BLOOM, + core_2d::graph::node::TONEMAPPING, + ], ); - - // Add bloom to the 3d render graph - { - let bloom_node = BloomNode::new(&mut render_app.world); - let mut graph = render_app.world.resource_mut::<RenderGraph>(); - let draw_3d_graph = graph - .get_sub_graph_mut(crate::core_3d::graph::NAME) - .unwrap(); - draw_3d_graph.add_node(core_3d::graph::node::BLOOM, bloom_node); - // MAIN_PASS -> BLOOM -> TONEMAPPING - draw_3d_graph.add_node_edge( - crate::core_3d::graph::node::END_MAIN_PASS, - core_3d::graph::node::BLOOM, - ); - draw_3d_graph.add_node_edge( - core_3d::graph::node::BLOOM, - crate::core_3d::graph::node::TONEMAPPING, - ); - } - - // Add bloom to the 2d render graph - { - let bloom_node = BloomNode::new(&mut render_app.world); - let mut graph = render_app.world.resource_mut::<RenderGraph>(); - let draw_2d_graph = graph - .get_sub_graph_mut(crate::core_2d::graph::NAME) - .unwrap(); - draw_2d_graph.add_node(core_2d::graph::node::BLOOM, bloom_node); - // MAIN_PASS -> BLOOM -> TONEMAPPING - draw_2d_graph.add_node_edge( - crate::core_2d::graph::node::MAIN_PASS, - core_2d::graph::node::BLOOM, - ); - draw_2d_graph.add_node_edge( - core_2d::graph::node::BLOOM, - crate::core_2d::graph::node::TONEMAPPING, - ); - } } } diff --git a/crates/bevy_core_pipeline/src/bloom/mod.rs b/crates/bevy_core_pipeline/src/bloom/mod.rs --- a/crates/bevy_core_pipeline/src/bloom/mod.rs +++ b/crates/bevy_core_pipeline/src/bloom/mod.rs @@ -126,8 +108,8 @@ pub struct BloomNode { )>, } -impl BloomNode { - pub fn new(world: &mut World) -> Self { +impl FromWorld for BloomNode { + fn from_world(world: &mut World) -> Self { Self { view_query: QueryState::new(world), } diff --git a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs --- a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs +++ b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs @@ -6,7 +6,7 @@ use bevy_reflect::{Reflect, TypeUuid}; use bevy_render::{ extract_component::{ExtractComponent, ExtractComponentPlugin, UniformComponentPlugin}, prelude::Camera, - render_graph::RenderGraph, + render_graph::RenderGraphApp, render_resource::*, renderer::RenderDevice, texture::BevyDefault, diff --git a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs --- a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs +++ b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs @@ -114,47 +114,47 @@ impl Plugin for CASPlugin { render_app .init_resource::<CASPipeline>() .init_resource::<SpecializedRenderPipelines<CASPipeline>>() - .add_systems(Render, prepare_cas_pipelines.in_set(RenderSet::Prepare)); - { - let cas_node = CASNode::new(&mut render_app.world); - let mut binding = render_app.world.resource_mut::<RenderGraph>(); - let graph = binding.get_sub_graph_mut(core_3d::graph::NAME).unwrap(); - - graph.add_node(core_3d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, cas_node); - - graph.add_node_edge( + .add_systems(Render, prepare_cas_pipelines.in_set(RenderSet::Prepare)) + // 3d + .add_render_graph_node::<CASNode>( + core_3d::graph::NAME, + core_3d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, + ) + .add_render_graph_edge( + core_3d::graph::NAME, core_3d::graph::node::TONEMAPPING, core_3d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, - ); - graph.add_node_edge( + ) + .add_render_graph_edge( + core_3d::graph::NAME, core_3d::graph::node::FXAA, core_3d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, - ); - graph.add_node_edge( + ) + .add_render_graph_edge( + core_3d::graph::NAME, core_3d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, core_3d::graph::node::END_MAIN_PASS_POST_PROCESSING, - ); - } - { - let cas_node = CASNode::new(&mut render_app.world); - let mut binding = render_app.world.resource_mut::<RenderGraph>(); - let graph = binding.get_sub_graph_mut(core_2d::graph::NAME).unwrap(); - - graph.add_node(core_2d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, cas_node); - - graph.add_node_edge( + ) + // 2d + .add_render_graph_node::<CASNode>( + core_2d::graph::NAME, + core_2d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, + ) + .add_render_graph_edge( + core_2d::graph::NAME, core_2d::graph::node::TONEMAPPING, core_2d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, - ); - graph.add_node_edge( + ) + .add_render_graph_edge( + core_2d::graph::NAME, core_2d::graph::node::FXAA, core_2d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, - ); - graph.add_node_edge( + ) + .add_render_graph_edge( + core_2d::graph::NAME, core_2d::graph::node::CONTRAST_ADAPTIVE_SHARPENING, core_2d::graph::node::END_MAIN_PASS_POST_PROCESSING, ); - } } } diff --git a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/node.rs b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/node.rs --- a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/node.rs +++ b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/node.rs @@ -28,8 +28,8 @@ pub struct CASNode { cached_bind_group: Mutex<Option<(BufferId, TextureViewId, BindGroup)>>, } -impl CASNode { - pub fn new(world: &mut World) -> Self { +impl FromWorld for CASNode { + fn from_world(world: &mut World) -> Self { Self { query: QueryState::new(world), cached_bind_group: Mutex::new(None), diff --git a/crates/bevy_core_pipeline/src/core_2d/mod.rs b/crates/bevy_core_pipeline/src/core_2d/mod.rs --- a/crates/bevy_core_pipeline/src/core_2d/mod.rs +++ b/crates/bevy_core_pipeline/src/core_2d/mod.rs @@ -74,15 +74,14 @@ impl Plugin for Core2dPlugin { draw_2d_graph.add_node(graph::node::TONEMAPPING, tonemapping); draw_2d_graph.add_node(graph::node::END_MAIN_PASS_POST_PROCESSING, EmptyNode); draw_2d_graph.add_node(graph::node::UPSCALING, upscaling); - draw_2d_graph.add_node_edge(graph::node::MAIN_PASS, graph::node::TONEMAPPING); - draw_2d_graph.add_node_edge( + + draw_2d_graph.add_node_edges(&[ + graph::node::MAIN_PASS, graph::node::TONEMAPPING, graph::node::END_MAIN_PASS_POST_PROCESSING, - ); - draw_2d_graph.add_node_edge( - graph::node::END_MAIN_PASS_POST_PROCESSING, graph::node::UPSCALING, - ); + ]); + graph.add_sub_graph(graph::NAME, draw_2d_graph); } } diff --git a/crates/bevy_core_pipeline/src/core_3d/mod.rs b/crates/bevy_core_pipeline/src/core_3d/mod.rs --- a/crates/bevy_core_pipeline/src/core_3d/mod.rs +++ b/crates/bevy_core_pipeline/src/core_3d/mod.rs @@ -106,25 +106,17 @@ impl Plugin for Core3dPlugin { draw_3d_graph.add_node(graph::node::END_MAIN_PASS_POST_PROCESSING, EmptyNode); draw_3d_graph.add_node(graph::node::UPSCALING, upscaling); - draw_3d_graph.add_node_edge(graph::node::PREPASS, graph::node::START_MAIN_PASS); - draw_3d_graph.add_node_edge(graph::node::START_MAIN_PASS, graph::node::MAIN_OPAQUE_PASS); - draw_3d_graph.add_node_edge( + draw_3d_graph.add_node_edges(&[ + graph::node::PREPASS, + graph::node::START_MAIN_PASS, graph::node::MAIN_OPAQUE_PASS, graph::node::MAIN_TRANSPARENT_PASS, - ); - draw_3d_graph.add_node_edge( - graph::node::MAIN_TRANSPARENT_PASS, graph::node::END_MAIN_PASS, - ); - draw_3d_graph.add_node_edge(graph::node::END_MAIN_PASS, graph::node::TONEMAPPING); - draw_3d_graph.add_node_edge( graph::node::TONEMAPPING, graph::node::END_MAIN_PASS_POST_PROCESSING, - ); - draw_3d_graph.add_node_edge( - graph::node::END_MAIN_PASS_POST_PROCESSING, graph::node::UPSCALING, - ); + ]); + graph.add_sub_graph(graph::NAME, draw_3d_graph); } } diff --git a/crates/bevy_core_pipeline/src/fxaa/mod.rs b/crates/bevy_core_pipeline/src/fxaa/mod.rs --- a/crates/bevy_core_pipeline/src/fxaa/mod.rs +++ b/crates/bevy_core_pipeline/src/fxaa/mod.rs @@ -9,7 +9,7 @@ use bevy_reflect::{ use bevy_render::{ extract_component::{ExtractComponent, ExtractComponentPlugin}, prelude::Camera, - render_graph::RenderGraph, + render_graph::RenderGraphApp, render_resource::*, renderer::RenderDevice, texture::BevyDefault, diff --git a/crates/bevy_core_pipeline/src/fxaa/mod.rs b/crates/bevy_core_pipeline/src/fxaa/mod.rs --- a/crates/bevy_core_pipeline/src/fxaa/mod.rs +++ b/crates/bevy_core_pipeline/src/fxaa/mod.rs @@ -90,40 +90,25 @@ impl Plugin for FxaaPlugin { render_app .init_resource::<FxaaPipeline>() .init_resource::<SpecializedRenderPipelines<FxaaPipeline>>() - .add_systems(Render, prepare_fxaa_pipelines.in_set(RenderSet::Prepare)); - - { - let fxaa_node = FxaaNode::new(&mut render_app.world); - let mut binding = render_app.world.resource_mut::<RenderGraph>(); - let graph = binding.get_sub_graph_mut(core_3d::graph::NAME).unwrap(); - - graph.add_node(core_3d::graph::node::FXAA, fxaa_node); - - graph.add_node_edge( - core_3d::graph::node::TONEMAPPING, - core_3d::graph::node::FXAA, - ); - graph.add_node_edge( - core_3d::graph::node::FXAA, - core_3d::graph::node::END_MAIN_PASS_POST_PROCESSING, - ); - } - { - let fxaa_node = FxaaNode::new(&mut render_app.world); - let mut binding = render_app.world.resource_mut::<RenderGraph>(); - let graph = binding.get_sub_graph_mut(core_2d::graph::NAME).unwrap(); - - graph.add_node(core_2d::graph::node::FXAA, fxaa_node); - - graph.add_node_edge( - core_2d::graph::node::TONEMAPPING, - core_2d::graph::node::FXAA, - ); - graph.add_node_edge( - core_2d::graph::node::FXAA, - core_2d::graph::node::END_MAIN_PASS_POST_PROCESSING, + .add_systems(Render, prepare_fxaa_pipelines.in_set(RenderSet::Prepare)) + .add_render_graph_node::<FxaaNode>(core_3d::graph::NAME, core_3d::graph::node::FXAA) + .add_render_graph_edges( + core_3d::graph::NAME, + &[ + core_3d::graph::node::TONEMAPPING, + core_3d::graph::node::FXAA, + core_3d::graph::node::END_MAIN_PASS_POST_PROCESSING, + ], + ) + .add_render_graph_node::<FxaaNode>(core_2d::graph::NAME, core_2d::graph::node::FXAA) + .add_render_graph_edges( + core_2d::graph::NAME, + &[ + core_2d::graph::node::TONEMAPPING, + core_2d::graph::node::FXAA, + core_2d::graph::node::END_MAIN_PASS_POST_PROCESSING, + ], ); - } } } diff --git a/crates/bevy_core_pipeline/src/fxaa/node.rs b/crates/bevy_core_pipeline/src/fxaa/node.rs --- a/crates/bevy_core_pipeline/src/fxaa/node.rs +++ b/crates/bevy_core_pipeline/src/fxaa/node.rs @@ -27,8 +27,8 @@ pub struct FxaaNode { cached_texture_bind_group: Mutex<Option<(TextureViewId, BindGroup)>>, } -impl FxaaNode { - pub fn new(world: &mut World) -> Self { +impl FromWorld for FxaaNode { + fn from_world(world: &mut World) -> Self { Self { query: QueryState::new(world), cached_texture_bind_group: Mutex::new(None), diff --git a/crates/bevy_core_pipeline/src/taa/mod.rs b/crates/bevy_core_pipeline/src/taa/mod.rs --- a/crates/bevy_core_pipeline/src/taa/mod.rs +++ b/crates/bevy_core_pipeline/src/taa/mod.rs @@ -1,4 +1,5 @@ use crate::{ + core_3d, fullscreen_vertex_shader::fullscreen_shader_vertex_state, prelude::Camera3d, prepass::{DepthPrepass, MotionVectorPrepass, ViewPrepassTextures}, diff --git a/crates/bevy_core_pipeline/src/taa/mod.rs b/crates/bevy_core_pipeline/src/taa/mod.rs --- a/crates/bevy_core_pipeline/src/taa/mod.rs +++ b/crates/bevy_core_pipeline/src/taa/mod.rs @@ -18,7 +19,7 @@ use bevy_reflect::{Reflect, TypeUuid}; use bevy_render::{ camera::{ExtractedCamera, TemporalJitter}, prelude::{Camera, Projection}, - render_graph::{Node, NodeRunError, RenderGraph, RenderGraphContext}, + render_graph::{Node, NodeRunError, RenderGraphApp, RenderGraphContext}, render_resource::{ BindGroupDescriptor, BindGroupEntry, BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingResource, BindingType, CachedRenderPipelineId, diff --git a/crates/bevy_core_pipeline/src/taa/mod.rs b/crates/bevy_core_pipeline/src/taa/mod.rs --- a/crates/bevy_core_pipeline/src/taa/mod.rs +++ b/crates/bevy_core_pipeline/src/taa/mod.rs @@ -71,24 +72,17 @@ impl Plugin for TemporalAntiAliasPlugin { prepare_taa_history_textures.in_set(RenderSet::Prepare), prepare_taa_pipelines.in_set(RenderSet::Prepare), ), + ) + .add_render_graph_node::<TAANode>(core_3d::graph::NAME, draw_3d_graph::node::TAA) + .add_render_graph_edges( + core_3d::graph::NAME, + &[ + core_3d::graph::node::END_MAIN_PASS, + draw_3d_graph::node::TAA, + core_3d::graph::node::BLOOM, + core_3d::graph::node::TONEMAPPING, + ], ); - - let taa_node = TAANode::new(&mut render_app.world); - let mut graph = render_app.world.resource_mut::<RenderGraph>(); - let draw_3d_graph = graph - .get_sub_graph_mut(crate::core_3d::graph::NAME) - .unwrap(); - draw_3d_graph.add_node(draw_3d_graph::node::TAA, taa_node); - // MAIN_PASS -> TAA -> BLOOM -> TONEMAPPING - draw_3d_graph.add_node_edge( - crate::core_3d::graph::node::END_MAIN_PASS, - draw_3d_graph::node::TAA, - ); - draw_3d_graph.add_node_edge(draw_3d_graph::node::TAA, crate::core_3d::graph::node::BLOOM); - draw_3d_graph.add_node_edge( - draw_3d_graph::node::TAA, - crate::core_3d::graph::node::TONEMAPPING, - ); } } diff --git a/crates/bevy_core_pipeline/src/taa/mod.rs b/crates/bevy_core_pipeline/src/taa/mod.rs --- a/crates/bevy_core_pipeline/src/taa/mod.rs +++ b/crates/bevy_core_pipeline/src/taa/mod.rs @@ -168,8 +162,8 @@ struct TAANode { )>, } -impl TAANode { - fn new(world: &mut World) -> Self { +impl FromWorld for TAANode { + fn from_world(world: &mut World) -> Self { Self { view_query: QueryState::new(world), } diff --git /dev/null b/crates/bevy_render/src/render_graph/app.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_render/src/render_graph/app.rs @@ -0,0 +1,73 @@ +use bevy_app::App; +use bevy_ecs::world::FromWorld; + +use super::{Node, RenderGraph}; + +/// Adds common [`RenderGraph`] operations to [`App`]. +pub trait RenderGraphApp { + /// Add a [`Node`] to the [`RenderGraph`]: + /// * Create the [`Node`] using the [`FromWorld`] implementation + /// * Add it to the graph + fn add_render_graph_node<T: Node + FromWorld>( + &mut self, + sub_graph_name: &'static str, + node_name: &'static str, + ) -> &mut Self; + /// Automatically add the required node edges based on the given ordering + fn add_render_graph_edges( + &mut self, + sub_graph_name: &'static str, + edges: &[&'static str], + ) -> &mut Self; + /// Add node edge to the specified graph + fn add_render_graph_edge( + &mut self, + sub_graph_name: &'static str, + output_edge: &'static str, + input_edge: &'static str, + ) -> &mut Self; +} + +impl RenderGraphApp for App { + fn add_render_graph_node<T: Node + FromWorld>( + &mut self, + sub_graph_name: &'static str, + node_name: &'static str, + ) -> &mut Self { + let node = T::from_world(&mut self.world); + let mut render_graph = self.world.get_resource_mut::<RenderGraph>().expect( + "RenderGraph not found. Make sure you are using add_render_graph_node on the RenderApp", + ); + + let graph = render_graph.sub_graph_mut(sub_graph_name); + graph.add_node(node_name, node); + self + } + + fn add_render_graph_edges( + &mut self, + sub_graph_name: &'static str, + edges: &[&'static str], + ) -> &mut Self { + let mut render_graph = self.world.get_resource_mut::<RenderGraph>().expect( + "RenderGraph not found. Make sure you are using add_render_graph_node on the RenderApp", + ); + let graph = render_graph.sub_graph_mut(sub_graph_name); + graph.add_node_edges(edges); + self + } + + fn add_render_graph_edge( + &mut self, + sub_graph_name: &'static str, + output_edge: &'static str, + input_edge: &'static str, + ) -> &mut Self { + let mut render_graph = self.world.get_resource_mut::<RenderGraph>().expect( + "RenderGraph not found. Make sure you are using add_render_graph_node on the RenderApp", + ); + let graph = render_graph.sub_graph_mut(sub_graph_name); + graph.add_node_edge(output_edge, input_edge); + self + } +} diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -119,6 +119,24 @@ impl RenderGraph { id } + /// Add `node_edge`s based on the order of the given `edges` array. + /// + /// Defining an edge that already exists is not considered an error with this api. + /// It simply won't create a new edge. + pub fn add_node_edges(&mut self, edges: &[&'static str]) { + for window in edges.windows(2) { + let [a, b] = window else { break; }; + if let Err(err) = self.try_add_node_edge(*a, *b) { + match err { + // Already existing edges are very easy to produce with this api + // and shouldn't cause a panic + RenderGraphError::EdgeAlreadyExists(_) => {} + _ => panic!("{err:?}"), + } + } + } + } + /// Removes the `node` with the `name` from the graph. /// If the name is does not exist, nothing happens. pub fn remove_node( diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -583,6 +601,36 @@ impl RenderGraph { pub fn get_sub_graph_mut(&mut self, name: impl AsRef<str>) -> Option<&mut RenderGraph> { self.sub_graphs.get_mut(name.as_ref()) } + + /// Retrieves the sub graph corresponding to the `name`. + /// + /// # Panics + /// + /// Panics if any invalid node name is given. + /// + /// # See also + /// + /// - [`get_sub_graph`](Self::get_sub_graph) for a fallible version. + pub fn sub_graph(&self, name: impl AsRef<str>) -> &RenderGraph { + self.sub_graphs + .get(name.as_ref()) + .unwrap_or_else(|| panic!("Node {} not found in sub_graph", name.as_ref())) + } + + /// Retrieves the sub graph corresponding to the `name` mutably. + /// + /// # Panics + /// + /// Panics if any invalid node name is given. + /// + /// # See also + /// + /// - [`get_sub_graph_mut`](Self::get_sub_graph_mut) for a fallible version. + pub fn sub_graph_mut(&mut self, name: impl AsRef<str>) -> &mut RenderGraph { + self.sub_graphs + .get_mut(name.as_ref()) + .unwrap_or_else(|| panic!("Node {} not found in sub_graph", name.as_ref())) + } } impl Debug for RenderGraph { diff --git a/crates/bevy_render/src/render_graph/mod.rs b/crates/bevy_render/src/render_graph/mod.rs --- a/crates/bevy_render/src/render_graph/mod.rs +++ b/crates/bevy_render/src/render_graph/mod.rs @@ -1,9 +1,11 @@ +mod app; mod context; mod edge; mod graph; mod node; mod node_slot; +pub use app::*; pub use context::*; pub use edge::*; pub use graph::*; diff --git a/examples/shader/post_process_pass.rs b/examples/shader/post_process_pass.rs --- a/examples/shader/post_process_pass.rs +++ b/examples/shader/post_process_pass.rs @@ -15,7 +15,7 @@ use bevy::{ extract_component::{ ComponentUniforms, ExtractComponent, ExtractComponentPlugin, UniformComponentPlugin, }, - render_graph::{Node, NodeRunError, RenderGraph, RenderGraphContext}, + render_graph::{Node, NodeRunError, RenderGraphApp, RenderGraphContext}, render_resource::{ BindGroupDescriptor, BindGroupEntry, BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingResource, BindingType, CachedRenderPipelineId, diff --git a/examples/shader/post_process_pass.rs b/examples/shader/post_process_pass.rs --- a/examples/shader/post_process_pass.rs +++ b/examples/shader/post_process_pass.rs @@ -53,7 +53,8 @@ impl Plugin for PostProcessPlugin { // be extracted to the render world every frame. // This makes it possible to control the effect from the main world. // This plugin will take care of extracting it automatically. - // It's important to derive [`ExtractComponent`] on [`PostProcessingSettings`] for this plugin to work correctly. + // It's important to derive [`ExtractComponent`] on [`PostProcessingSettings`] + // for this plugin to work correctly. .add_plugin(ExtractComponentPlugin::<PostProcessSettings>::default()) // The settings will also be the data used in the shader. // This plugin will prepare the component for the GPU by creating a uniform buffer diff --git a/examples/shader/post_process_pass.rs b/examples/shader/post_process_pass.rs --- a/examples/shader/post_process_pass.rs +++ b/examples/shader/post_process_pass.rs @@ -65,38 +66,35 @@ impl Plugin for PostProcessPlugin { return; }; - // Initialize the pipeline - render_app.init_resource::<PostProcessPipeline>(); - - // Bevy's renderer uses a render graph which is a collection of nodes in a directed acyclic graph. - // It currently runs on each view/camera and executes each node in the specified order. - // It will make sure that any node that needs a dependency from another node only runs when that dependency is done. - // - // Each node can execute arbitrary work, but it generally runs at least one render pass. - // A node only has access to the render world, so if you need data from the main world - // you need to extract it manually or with the plugin like above. - - // Create the node with the render world - let node = PostProcessNode::new(&mut render_app.world); - - // Get the render graph for the entire app - let mut graph = render_app.world.resource_mut::<RenderGraph>(); - - // Get the render graph for 3d cameras/views - let core_3d_graph = graph.get_sub_graph_mut(core_3d::graph::NAME).unwrap(); - - // Register the post process node in the 3d render graph - core_3d_graph.add_node(PostProcessNode::NAME, node); - - // We now need to add an edge between our node and the nodes from bevy - // to make sure our node is ordered correctly relative to other nodes. - // - // Here we want our effect to run after tonemapping and before the end of the main pass post processing - core_3d_graph.add_node_edge(core_3d::graph::node::TONEMAPPING, PostProcessNode::NAME); - core_3d_graph.add_node_edge( - PostProcessNode::NAME, - core_3d::graph::node::END_MAIN_PASS_POST_PROCESSING, - ); + render_app + // Initialize the pipeline + .init_resource::<PostProcessPipeline>() + // Bevy's renderer uses a render graph which is a collection of nodes in a directed acyclic graph. + // It currently runs on each view/camera and executes each node in the specified order. + // It will make sure that any node that needs a dependency from another node + // only runs when that dependency is done. + // + // Each node can execute arbitrary work, but it generally runs at least one render pass. + // A node only has access to the render world, so if you need data from the main world + // you need to extract it manually or with the plugin like above. + // Add a [`Node`] to the [`RenderGraph`] + // The Node needs to impl FromWorld + .add_render_graph_node::<PostProcessNode>( + // Specifiy the name of the graph, in this case we want the graph for 3d + core_3d::graph::NAME, + // It also needs the name of the node + PostProcessNode::NAME, + ) + .add_render_graph_edges( + core_3d::graph::NAME, + // Specify the node ordering. + // This will automatically create all required node edges to enforce the given ordering. + &[ + core_3d::graph::node::TONEMAPPING, + PostProcessNode::NAME, + core_3d::graph::node::END_MAIN_PASS_POST_PROCESSING, + ], + ); } } diff --git a/examples/shader/post_process_pass.rs b/examples/shader/post_process_pass.rs --- a/examples/shader/post_process_pass.rs +++ b/examples/shader/post_process_pass.rs @@ -109,8 +107,10 @@ struct PostProcessNode { impl PostProcessNode { pub const NAME: &str = "post_process"; +} - fn new(world: &mut World) -> Self { +impl FromWorld for PostProcessNode { + fn from_world(world: &mut World) -> Self { Self { query: QueryState::new(world), }
diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -635,7 +683,7 @@ mod tests { }, renderer::RenderContext, }; - use bevy_ecs::world::World; + use bevy_ecs::world::{FromWorld, World}; use bevy_utils::HashSet; #[derive(Debug)] diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -676,6 +724,22 @@ mod tests { } } + fn input_nodes(name: &'static str, graph: &RenderGraph) -> HashSet<NodeId> { + graph + .iter_node_inputs(name) + .unwrap() + .map(|(_edge, node)| node.id) + .collect::<HashSet<NodeId>>() + } + + fn output_nodes(name: &'static str, graph: &RenderGraph) -> HashSet<NodeId> { + graph + .iter_node_outputs(name) + .unwrap() + .map(|(_edge, node)| node.id) + .collect::<HashSet<NodeId>>() + } + #[test] fn test_graph_edges() { let mut graph = RenderGraph::default(); diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -688,22 +752,6 @@ mod tests { graph.add_node_edge("B", "C"); graph.add_slot_edge("C", 0, "D", 0); - fn input_nodes(name: &'static str, graph: &RenderGraph) -> HashSet<NodeId> { - graph - .iter_node_inputs(name) - .unwrap() - .map(|(_edge, node)| node.id) - .collect::<HashSet<NodeId>>() - } - - fn output_nodes(name: &'static str, graph: &RenderGraph) -> HashSet<NodeId> { - graph - .iter_node_outputs(name) - .unwrap() - .map(|(_edge, node)| node.id) - .collect::<HashSet<NodeId>>() - } - assert!(input_nodes("A", &graph).is_empty(), "A has no inputs"); assert!( output_nodes("A", &graph) == HashSet::from_iter(vec![c_id]), diff --git a/crates/bevy_render/src/render_graph/graph.rs b/crates/bevy_render/src/render_graph/graph.rs --- a/crates/bevy_render/src/render_graph/graph.rs +++ b/crates/bevy_render/src/render_graph/graph.rs @@ -803,4 +851,48 @@ mod tests { "Adding to a duplicate edge should return an error" ); } + + #[test] + fn test_add_node_edges() { + struct SimpleNode; + impl Node for SimpleNode { + fn run( + &self, + _graph: &mut RenderGraphContext, + _render_context: &mut RenderContext, + _world: &World, + ) -> Result<(), NodeRunError> { + Ok(()) + } + } + impl FromWorld for SimpleNode { + fn from_world(_world: &mut World) -> Self { + Self + } + } + + let mut graph = RenderGraph::default(); + let a_id = graph.add_node("A", SimpleNode); + let b_id = graph.add_node("B", SimpleNode); + let c_id = graph.add_node("C", SimpleNode); + + graph.add_node_edges(&["A", "B", "C"]); + + assert!( + output_nodes("A", &graph) == HashSet::from_iter(vec![b_id]), + "A -> B" + ); + assert!( + input_nodes("B", &graph) == HashSet::from_iter(vec![a_id]), + "A -> B" + ); + assert!( + output_nodes("B", &graph) == HashSet::from_iter(vec![c_id]), + "B -> C" + ); + assert!( + input_nodes("C", &graph) == HashSet::from_iter(vec![b_id]), + "B -> C" + ); + } }
Reduce render Node boilerplate 1. Setting up a render node in Plugin::build() often looks like this: ```rust // Create node let taa_node = TAANode::new(&mut render_app.world); // Get core_3d subgraph let mut graph = render_app.world.resource_mut::<RenderGraph>(); let draw_3d_graph = graph .get_sub_graph_mut(crate::core_3d::graph::NAME) .unwrap(); // Add node, connect to view draw_3d_graph.add_node(draw_3d_graph::node::TAA, taa_node); draw_3d_graph.add_slot_edge( draw_3d_graph.input_node().id, crate::core_3d::graph::input::VIEW_ENTITY, draw_3d_graph::node::TAA, TAANode::IN_VIEW, ); // Order nodes: MAIN_PASS -> TAA -> BLOOM -> TONEMAPPING draw_3d_graph.add_node_edge( crate::core_3d::graph::node::MAIN_PASS, draw_3d_graph::node::TAA, ); draw_3d_graph.add_node_edge(draw_3d_graph::node::TAA, crate::core_3d::graph::node::BLOOM); draw_3d_graph.add_node_edge( draw_3d_graph::node::TAA, crate::core_3d::graph::node::TONEMAPPING, ); ``` We could add a helper to simplify it to something like this: ```rust render_app.add_view_node<TAANode>( subgraph: crate::core_3d::graph::NAME, name: draw_3d_graph::node::TAA, order: &[ crate::core_3d::graph::node::MAIN_PASS, draw_3d_graph::node::TAA, crate::core_3d::graph::node::BLOOM, crate::core_3d::graph::node::TONEMAPPING, ], ); ``` --- 2. Declaring a render Node often looks like this: ```rust struct TAANode { view_query: QueryState<( &'static ExtractedCamera, &'static ViewTarget, &'static TAAHistoryTextures, &'static ViewPrepassTextures, &'static TAAPipelineId, )>, } impl TAANode { const IN_VIEW: &'static str = "view"; fn new(world: &mut World) -> Self { Self { view_query: QueryState::new(world), } } } impl Node for TAANode { fn input(&self) -> Vec<SlotInfo> { vec![SlotInfo::new(Self::IN_VIEW, SlotType::Entity)] } fn update(&mut self, world: &mut World) { self.view_query.update_archetypes(world); } fn run( &self, graph: &mut RenderGraphContext, render_context: &mut RenderContext, world: &World, ) -> Result<(), NodeRunError> { // Trace span #[cfg(feature = "trace")] let _taa_span = info_span!("taa").entered(); // Get view_query let view_entity = graph.get_input_entity(Self::IN_VIEW)?; let ( Ok((camera, view_target, taa_history_textures, prepass_textures, taa_pipeline_id)), Some(pipelines), Some(pipeline_cache), ) = ( self.view_query.get_manual(world, view_entity), world.get_resource::<TAAPipeline>(), world.get_resource::<PipelineCache>(), ) else { return Ok(()); }; // ... } } ``` We could provide an easier and more ergonomic Node impl: ```rust struct TAANode { view_query: QueryState<( &'static ExtractedCamera, &'static ViewTarget, &'static TAAHistoryTextures, &'static ViewPrepassTextures, &'static TAAPipelineId, )>, // If possible, allow resource access declaratively taa_pipeline: Res<TAAPipeline>, pipeline_cache: Res<PipelineCache>, } impl SimpleNode for TAANode { fn run( &self, graph: &mut RenderGraphContext, render_context: &mut RenderContext, world: &World, // Automatically get view_query ((camera, view_target, taa_history_textures, ...)): (...), ) -> Result<(), NodeRunError> { // Trace span automatically added // ... } } ```
I _really_ like 1. Although, I'd probably suggest making it a free function that takes a `&mut App` because I don't really like the idea of adding an extension to App that only works when it's the render_app. For 2., I'm not sure how the implementation would work, but it really feels even more like it should just be a regular system. I think we should try to go in that direction. Yeah a free function for 1. is probably better. Whatever syntax ends up best, but you get the basic idea. For 2. I feel the same. It does feel like the render graph should just be replaced with systems, but that's a lot more controversial. Something like 2. would be a (hopefully) easy improvement we could make now, without having to change the fundamental setup.
2023-03-09T20:55:50Z
1.67
2023-04-04T01:19:55Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "color::colorspace::test::hsl_to_srgb", "color::colorspace::test::lch_to_srgb", "color::colorspace::test::srgb_linear_full_roundtrip", "color::colorspace::test::srgb_to_hsl", "color::tests::conversions_vec4", "color::colorspace::test::srgb_to_lch", "color::tests::convert_to_rgba_linear", "color::tests::hex_color", "color::tests::mul_and_mulassign_f32", "color::tests::mul_and_mulassign_f32by3", "color::tests::mul_and_mulassign_f32by4", "color::tests::mul_and_mulassign_vec3", "color::tests::mul_and_mulassign_vec4", "mesh::mesh::conversions::tests::f32", "mesh::mesh::conversions::tests::correct_message", "mesh::mesh::conversions::tests::f32_2", "mesh::mesh::conversions::tests::f32_3", "mesh::mesh::conversions::tests::f32_4", "mesh::mesh::conversions::tests::i32", "mesh::mesh::conversions::tests::i32_2", "mesh::mesh::conversions::tests::i32_3", "mesh::mesh::conversions::tests::i32_4", "mesh::mesh::conversions::tests::ivec2", "mesh::mesh::conversions::tests::ivec3", "mesh::mesh::conversions::tests::ivec4", "mesh::mesh::conversions::tests::u32", "mesh::mesh::conversions::tests::u32_2", "mesh::mesh::conversions::tests::u32_3", "mesh::mesh::conversions::tests::u32_4", "mesh::mesh::conversions::tests::uvec2", "mesh::mesh::conversions::tests::uvec3", "mesh::mesh::conversions::tests::uvec4", "mesh::mesh::conversions::tests::vec3", "mesh::mesh::conversions::tests::vec2", "mesh::mesh::conversions::tests::vec3a", "mesh::mesh::conversions::tests::vec4", "primitives::tests::intersects_sphere_big_frustum_intersect", "primitives::tests::intersects_sphere_big_frustum_outside", "mesh::mesh::tests::panic_invalid_format - should panic", "primitives::tests::intersects_sphere_frustum_contained", "primitives::tests::intersects_sphere_frustum_dodges_1_plane", "primitives::tests::intersects_sphere_frustum_intersects_2_planes", "primitives::tests::intersects_sphere_frustum_intersects_3_planes", "primitives::tests::intersects_sphere_frustum_intersects_plane", "primitives::tests::intersects_sphere_frustum_surrounding", "primitives::tests::intersects_sphere_long_frustum_intersect", "primitives::tests::intersects_sphere_long_frustum_outside", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_get_node_typed", "render_phase::rangefinder::tests::distance", "render_phase::tests::batching", "render_graph::graph::tests::test_graph_edges", "render_graph::graph::tests::test_slot_already_occupied", "view::visibility::render_layers::rendering_mask_tests::rendering_mask_sanity", "texture::image::test::image_default_size", "view::visibility::test::ensure_visibility_enum_size", "texture::image_texture_conversion::test::two_way_conversion", "texture::image::test::image_size", "view::visibility::test::visibility_propagation_unconditional_visible", "view::visibility::test::visibility_propagation", "render_resource::shader::tests::process_shader_define_only_in_accepting_scopes", "render_resource::shader::tests::process_import_glsl", "render_resource::shader::tests::process_import_in_import", "render_resource::shader::tests::process_shader_def_else", "render_resource::shader::tests::process_shader_def_else_ifdef_complicated_nesting", "render_resource::shader::tests::process_import_in_ifdef", "render_resource::shader::tests::process_shader_def_else_ifdef_no_match_and_no_fallback_else", "render_resource::shader::tests::process_nested_shader_def_inner_defined_outer_not", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_second_clause", "render_resource::shader::tests::process_shader_def_not_defined", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_third_clause", "render_resource::shader::tests::process_shader_def_unknown_operator", "render_resource::shader::tests::process_nested_shader_def_neither_defined", "render_resource::shader::tests::process_shader_define_in_shader_with_value", "render_resource::shader::tests::process_nested_shader_def_outer_defined_inner_else", "render_resource::shader::tests::process_shader_def_equal_int", "render_resource::shader::tests::process_shader_def_not_equal_bool", "render_resource::shader::tests::process_shader_def_replace", "render_resource::shader::tests::process_nested_shader_def_neither_defined_else", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_else", "render_resource::shader::tests::process_import_wgsl", "render_resource::shader::tests::process_import_ifdef", "render_resource::shader::tests::process_shader_def_commented", "render_resource::shader::tests::process_shader_def_else_ifdef_ends_up_in_first_clause", "render_resource::shader::tests::process_nested_shader_def_both_defined", "render_resource::shader::tests::process_shader_def_unclosed", "render_resource::shader::tests::process_shader_define_across_imports", "render_resource::shader::tests::process_shader_def_equal_bool", "render_resource::shader::tests::process_shader_def_too_closed", "render_resource::shader::tests::process_shader_def_defined", "render_resource::shader::tests::process_nested_shader_def_outer_defined_inner_not", "render_resource::shader::tests::process_shader_define_in_shader", "render_resource::shader::tests::process_shader_def_else_ifdef_only_accepts_one_valid_else_ifdef", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indirect (line 268)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect (line 319)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect (line 400)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect_count (line 357)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect_count (line 440)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indexed_indirect (line 291)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 75)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 179)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 217)", "src/mesh/mesh/mod.rs - mesh::mesh::Mesh (line 47)", "src/extract_param.rs - extract_param::Extract (line 30)", "src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::push_debug_group (line 557)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 163)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 243)", "src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 151)", "src/render_graph/graph.rs - render_graph::graph::RenderGraph (line 32)", "src/mesh/mesh/conversions.rs - mesh::mesh::conversions (line 6)", "src/color/mod.rs - color::Color::hex (line 297)", "src/view/mod.rs - view::Msaa (line 82)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,951
bevyengine__bevy-7951
[ "7529" ]
daa1b0209ae4c46cdda61b2263e2cfab88625937
diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -413,9 +413,19 @@ impl_from_reflect_value!(Entity); #[derive(Clone)] pub struct ReflectMapEntities { map_entities: fn(&mut World, &EntityMap) -> Result<(), MapEntitiesError>, + map_specific_entities: fn(&mut World, &EntityMap, &[Entity]) -> Result<(), MapEntitiesError>, } impl ReflectMapEntities { + /// A general method for applying [`MapEntities`] behavior to all elements in an [`EntityMap`]. + /// + /// Be mindful in its usage: Works best in situations where the entities in the [`EntityMap`] are newly + /// created, before systems have a chance to add new components. If some of the entities referred to + /// by the [`EntityMap`] might already contain valid entity references, you should use [`map_entities`](Self::map_entities). + /// + /// An example of this: A scene can be loaded with `Parent` components, but then a `Parent` component can be added + /// to these entities after they have been loaded. If you reload the scene using [`map_entities`](Self::map_entities), those `Parent` + /// components with already valid entity references could be updated to point at something else entirely. pub fn map_entities( &self, world: &mut World, diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -423,11 +433,33 @@ impl ReflectMapEntities { ) -> Result<(), MapEntitiesError> { (self.map_entities)(world, entity_map) } + + /// This is like [`map_entities`](Self::map_entities), but only applied to specific entities, not all values + /// in the [`EntityMap`]. + /// + /// This is useful mostly for when you need to be careful not to update components that already contain valid entity + /// values. See [`map_entities`](Self::map_entities) for more details. + pub fn map_specific_entities( + &self, + world: &mut World, + entity_map: &EntityMap, + entities: &[Entity], + ) -> Result<(), MapEntitiesError> { + (self.map_specific_entities)(world, entity_map, entities) + } } impl<C: Component + MapEntities> FromType<C> for ReflectMapEntities { fn from_type() -> Self { ReflectMapEntities { + map_specific_entities: |world, entity_map, entities| { + for &entity in entities { + if let Some(mut component) = world.get_mut::<C>(entity) { + component.map_entities(entity_map)?; + } + } + Ok(()) + }, map_entities: |world, entity_map| { for entity in entity_map.values() { if let Some(mut component) = world.get_mut::<C>(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 @@ -1,12 +1,16 @@ +use std::any::TypeId; + use crate::{DynamicSceneBuilder, Scene, SceneSpawnError}; use anyhow::Result; use bevy_app::AppTypeRegistry; use bevy_ecs::{ entity::EntityMap, + prelude::Entity, reflect::{ReflectComponent, ReflectMapEntities}, world::World, }; use bevy_reflect::{Reflect, TypeRegistryArc, TypeUuid}; +use bevy_utils::HashMap; #[cfg(feature = "serialize")] use crate::serde::SceneSerializer; 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 @@ -86,6 +90,12 @@ impl DynamicScene { reflect_resource.apply_or_insert(world, &**resource); } + // For each component types that reference other entities, we keep track + // of which entities in the scene use that component. + // This is so we can update the scene-internal references to references + // of the actual entities in the world. + let mut scene_mappings: HashMap<TypeId, Vec<Entity>> = HashMap::default(); + for scene_entity in &self.entities { // Fetch the entity with the given entity id from the `entity_map` // or spawn a new entity with a transiently unique id if there is 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 @@ -109,6 +119,15 @@ impl DynamicScene { } })?; + // If this component references entities in the scene, track it + // so we can update it to the entity in the world. + if registration.data::<ReflectMapEntities>().is_some() { + scene_mappings + .entry(registration.type_id()) + .or_insert(Vec::new()) + .push(entity); + } + // If the entity already has the given component attached, // just apply the (possibly) new value, otherwise add the // component to the 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 @@ -116,10 +135,14 @@ impl DynamicScene { } } - for registration in type_registry.iter() { + // Updates references to entities in the scene to entities in the world + for (type_id, entities) in scene_mappings.into_iter() { + let registration = type_registry.get(type_id).expect( + "we should be getting TypeId from this TypeRegistration in the first place", + ); if let Some(map_entities_reflect) = registration.data::<ReflectMapEntities>() { map_entities_reflect - .map_entities(world, entity_map) + .map_specific_entities(world, entity_map, &entities) .unwrap(); } } diff --git a/crates/bevy_scene/src/scene.rs b/crates/bevy_scene/src/scene.rs --- a/crates/bevy_scene/src/scene.rs +++ b/crates/bevy_scene/src/scene.rs @@ -117,6 +117,7 @@ impl Scene { } } } + for registration in type_registry.iter() { if let Some(map_entities_reflect) = registration.data::<ReflectMapEntities>() { map_entities_reflect
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 @@ -160,3 +183,89 @@ where .new_line("\n".to_string()); ron::ser::to_string_pretty(&serialize, pretty_config) } + +#[cfg(test)] +mod tests { + use bevy_app::AppTypeRegistry; + use bevy_ecs::{entity::EntityMap, system::Command, world::World}; + use bevy_hierarchy::{AddChild, Parent}; + + use crate::dynamic_scene_builder::DynamicSceneBuilder; + + #[test] + fn components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map() { + // Testing that scene reloading applies EntityMap correctly to MapEntities components. + + // First, we create a simple world with a parent and a child relationship + let mut world = World::new(); + world.init_resource::<AppTypeRegistry>(); + world + .resource_mut::<AppTypeRegistry>() + .write() + .register::<Parent>(); + let original_parent_entity = world.spawn_empty().id(); + let original_child_entity = world.spawn_empty().id(); + AddChild { + parent: original_parent_entity, + child: original_child_entity, + } + .write(&mut world); + + // We then write this relationship to a new scene, and then write that scene back to the + // world to create another parent and child relationship + let mut scene_builder = DynamicSceneBuilder::from_world(&world); + scene_builder.extract_entity(original_parent_entity); + scene_builder.extract_entity(original_child_entity); + let scene = scene_builder.build(); + let mut entity_map = EntityMap::default(); + scene.write_to_world(&mut world, &mut entity_map).unwrap(); + + let from_scene_parent_entity = entity_map.get(original_parent_entity).unwrap(); + let from_scene_child_entity = entity_map.get(original_child_entity).unwrap(); + + // 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 + AddChild { + parent: original_child_entity, + child: from_scene_parent_entity, + } + .write(&mut world); + + // We then reload the scene to make sure that from_scene_parent_entity's parent component + // isn't updated with the entity map, since this component isn't defined in the scene. + // With bevy_hierarchy, this can cause serious errors and malformed hierarchies. + scene.write_to_world(&mut world, &mut entity_map).unwrap(); + + assert_eq!( + original_parent_entity, + world + .get_entity(original_child_entity) + .unwrap() + .get::<Parent>() + .unwrap() + .get(), + "something about reloading the scene is touching entities with the same scene Ids" + ); + assert_eq!( + original_child_entity, + world + .get_entity(from_scene_parent_entity) + .unwrap() + .get::<Parent>() + .unwrap() + .get(), + "something about reloading the scene is touching components not defined in the scene but on entities defined in the scene" + ); + assert_eq!( + from_scene_parent_entity, + world + .get_entity(from_scene_child_entity) + .unwrap() + .get::<Parent>() + .expect("something is wrong with this test, and the scene components don't have a parent/child relationship") + .get(), + "something is wrong with the this test or the code reloading scenes since the relationship between scene entities is broken" + ); + } +}
Bevy hot-reloading hierarchies cause panic (most of the time) ## Bevy version 0.9.1 ## What you did I was setting up the UI for the game, and decided that it would be convenient to have the UI as a scene so I could adjust the UI at runtime. So I created a start up system to create some initial stub nodes, used `bevy_editor_pls` to save the scene, and adjusted the scene file, including removing unnecessary entities and adjusting entity numbering. I then added this scene with a DynamicSceneBundle to a node with a NodeBundle, set AssetPlugin for hot reloading, ran the code, and began adjusting the scene file while the program was running. [[Link to the repo]](https://github.com/Testare/khaldron/tree/1e4a3ab4153a7df4abcb4a9b14bd440dc115c826) ## What went wrong When the program was running, I would adjust the scene file (Such as changing a background color's red value), and the program would panic and close! It would claim that the reason was a malformed hierarchy. So I put a system in so that whenever the window is resized (random trigger), it would print out information about the hierarchy of the entities loaded by the scene, and the hierarchy looks just fine! More telling, the initial load of the scene always works just fine. The thing is, every now and then, it would actually work just fine. Sometimes when the program is running, I can adjust the scene as much as I want, and the program won't panic at all. This might have something to do with entity ordering. It seems like this happens more often when the EditorPlugin code is uncommented? I assume this has something to do with how components like Parent/Child are loaded by the asset loader on hot-reload, since obviously the references in the scene file won't be the same entity references in the scene. ## Additional information ### Initial hierarchy I added a system to verify that initially the hierarchy is correctly set up, that prints all entities with Node components, their names, their parents and children. This system runs when the window is resized, so you have to resize the window after the scene loads for it to work. Results look like this: (Window UI Root is the node that the DynamicSceneBundle is loaded onto) ``` 7v0: Some(Parent(6v0)) -> "Sidebar" -> None 10v0: Some(Parent(8v0)) -> "Tool bar" -> None 8v0: Some(Parent(6v0)) -> "Center Screen" -> Some(Children([9v0, 10v0])) 9v0: Some(Parent(8v0)) -> "Viewport Node" -> None 6v0: Some(Parent(4v0)) -> "UI Root" -> Some(Children([7v0, 8v0])) 4v0: None -> "Window UI Root" -> Some(Children([6v0])) ``` The entity labels are different numbers from the ones in the scene file, which seems logical, and the hierarchy matches with the shape I was expecting. ### Github repo Luckily it was pretty early on in the project, so I commited the initial commit to this public repo https://github.com/Testare/khaldron/tree/1e4a3ab4153a7df4abcb4a9b14bd440dc115c826 You should be able to check it out to reproduce it. The bug also exists on the current main (commit 2), it just has some extra stuff that isn't relevant to figuring out the bug. ### Default panic message: ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `10v0`, right: `4v0`: Malformed hierarchy. This probably means that your hierarchy has been improperly maintained, or contains a cycle', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:69:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:273:45 ``` ### `RUST_BACKTRACE=1` ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `9v0`, right: `3v0`: Malformed hierarchy. This probably means that your hierarchy has been improperly maintained, or contains a cycle', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:69:9 stack backtrace: 0: rust_begin_unwind at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14 2: core::panicking::assert_failed_inner 3: core::panicking::assert_failed at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:203:5 4: bevy_transform::systems::propagate_recursive at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:69:9 5: bevy_transform::systems::transform_propagate_system at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:38:25 6: core::ops::function::FnMut::call_mut at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:166:5 7: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:297:13 8: <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2),()>>::run::call_inner at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:579:21 9: <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2),()>>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:582:17 10: <bevy_ecs::system::function_system::FunctionSystem<In,Out,Param,Marker,F> as bevy_ecs::system::system::System>::run_unsafe at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:409:19 11: bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:218:26 12: bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:258:21 13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 14: async_executor::Executor::spawn::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-executor-1.5.0/src/lib.rs:139:19 15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 16: async_task::raw::RawTask<F,T,S>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.3.0/src/raw.rs:511:20 17: async_executor::Executor::try_tick at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-executor-1.5.0/src/lib.rs:176:17 18: bevy_tasks::task_pool::TaskPool::scope::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:288:21 19: std::panicking::try::do_call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40 20: std::panicking::try at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19 21: std::panic::catch_unwind at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14 22: bevy_tasks::task_pool::TaskPool::scope at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:287:17 23: <bevy_ecs::schedule::executor_parallel::ParallelExecutor as bevy_ecs::schedule::executor::ParallelSystemExecutor>::run_systems at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:127:9 24: <bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/stage.rs:802:17 25: bevy_ecs::schedule::Schedule::run_once at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/mod.rs:370:13 26: bevy_app::app::App::update at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:152:9 27: bevy_winit::winit_runner_with::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:600:21 28: winit::platform_impl::platform::sticky_exit_callback 29: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:363:17 30: winit::platform_impl::platform::x11::EventLoop<T>::run_return at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:488:27 31: winit::platform_impl::platform::x11::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:503:25 32: winit::platform_impl::platform::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:755:56 33: winit::event_loop::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/event_loop.rs:278:9 34: bevy_winit::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:263:5 35: bevy_winit::winit_runner_with at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:645:9 36: bevy_winit::winit_runner at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:303:5 37: core::ops::function::Fn::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:78:5 38: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 39: bevy_editor_pls_default_windows::debug_settings::debugdump::setup::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_editor_pls_default_windows-0.2.0/src/debug_settings/debugdump.rs:57:9 40: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 41: bevy_app::app::App::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:168:9 42: khaldron::main at ./src/main.rs:15:5 43: core::ops::function::FnOnce::call_once at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:273:45 stack backtrace: 0: rust_begin_unwind at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14 2: core::panicking::panic at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:115:5 3: core::option::Option<T>::unwrap at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/option.rs:778:21 4: bevy_tasks::task_pool::TaskPool::scope::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:273:34 5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 6: <core::pin::Pin<P> as core::future::future::Future>::poll at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/future.rs:124:9 7: <&mut F as core::future::future::Future>::poll at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/future.rs:112:9 8: <futures_lite::future::PollOnce<F> as core::future::future::Future>::poll at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:194:15 9: futures_lite::future::block_on::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:89:27 10: std::thread::local::LocalKey<T>::try_with at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:446:16 11: std::thread::local::LocalKey<T>::with at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:422:9 12: futures_lite::future::block_on at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:79:5 13: bevy_tasks::task_pool::TaskPool::scope at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:283:39 14: <bevy_ecs::schedule::executor_parallel::ParallelExecutor as bevy_ecs::schedule::executor::ParallelSystemExecutor>::run_systems at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:127:9 15: <bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/stage.rs:802:17 16: bevy_ecs::schedule::Schedule::run_once at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/mod.rs:370:13 17: bevy_app::app::App::update at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:152:9 18: bevy_winit::winit_runner_with::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:600:21 19: winit::platform_impl::platform::sticky_exit_callback 20: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:363:17 21: winit::platform_impl::platform::x11::EventLoop<T>::run_return at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:488:27 22: winit::platform_impl::platform::x11::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:503:25 23: winit::platform_impl::platform::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:755:56 24: winit::event_loop::EventLoop<T>::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/event_loop.rs:278:9 25: bevy_winit::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:263:5 26: bevy_winit::winit_runner_with at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:645:9 27: bevy_winit::winit_runner at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:303:5 28: core::ops::function::Fn::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:78:5 29: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 30: bevy_editor_pls_default_windows::debug_settings::debugdump::setup::{{closure}} at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_editor_pls_default_windows-0.2.0/src/debug_settings/debugdump.rs:57:9 31: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 32: bevy_app::app::App::run at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:168:9 33: khaldron::main at ./src/main.rs:15:5 34: core::ops::function::FnOnce::call_once at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ``` ### RUST_BACKTRACE=full ``` thread 'Compute Task Pool (1)' panicked at 'assertion failed: `(left == right)` left: `10v0`, right: `4v0`: Malformed hierarchy. This probably means that your hierarchy has been improperly maintained, or contains a cycle', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:69:9 stack backtrace: 0: 0x7f9e34b6c9a0 - std::backtrace_rs::backtrace::libunwind::trace::he615646ea344481f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f9e34b6c9a0 - std::backtrace_rs::backtrace::trace_unsynchronized::h6ea8eaac68705b9c at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f9e34b6c9a0 - std::sys_common::backtrace::_print_fmt::h7ac486a935ce0bf7 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f9e34b6c9a0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b5a095d3db2e28f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f9e34bc898e - core::fmt::write::h445545b92224a1cd at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/fmt/mod.rs:1209:17 5: 0x7f9e34b5cb15 - std::io::Write::write_fmt::h55a43474c6520b00 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/io/mod.rs:1682:15 6: 0x7f9e34b6c765 - std::sys_common::backtrace::_print::h65d20526fdb736b0 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7f9e34b6c765 - std::sys_common::backtrace::print::h6555fbe12a1cc41b at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7f9e34b6f56f - std::panicking::default_hook::{{closure}}::hbdf58083140e7ac6 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:267:22 9: 0x7f9e34b6f2aa - std::panicking::default_hook::haef8271c56b74d85 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:286:9 10: 0x7f9e34b6fd78 - std::panicking::rust_panic_with_hook::hfd45b6b6c12d9fa5 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:688:13 11: 0x7f9e34b6fb17 - std::panicking::begin_panic_handler::{{closure}}::hf591e8609a75bd4b at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:579:13 12: 0x7f9e34b6ce4c - std::sys_common::backtrace::__rust_end_short_backtrace::h81899558795e4ff7 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:137:18 13: 0x7f9e34b6f832 - rust_begin_unwind at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5 14: 0x7f9e34bc5373 - core::panicking::panic_fmt::h4235fa9b4675b332 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14 15: 0x7f9e34bc5851 - core::panicking::assert_failed_inner::h3e7e3f0d087c1bcc 16: 0x7f9e352bd92b - core::panicking::assert_failed::h85928bb628f2657f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:203:5 17: 0x7f9e365e1b42 - bevy_transform::systems::propagate_recursive::h15b60029386de364 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:69:9 18: 0x7f9e365e1670 - bevy_transform::systems::transform_propagate_system::h8fc62c5f56dffac2 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_transform-0.9.1/src/systems.rs:38:25 19: 0x55cbc8427c64 - core::ops::function::FnMut::call_mut::h2d6d14dab2d41054 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:166:5 20: 0x55cbc8427c64 - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::hf2fc22f05459d0a2 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:297:13 21: 0x55cbc8427c64 - <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2),()>>::run::call_inner::h71372a30502dcd89 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:579:21 22: 0x55cbc8427c64 - <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2),()>>::run::h80f41818957fdde6 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:582:17 23: 0x55cbc8427c64 - <bevy_ecs::system::function_system::FunctionSystem<In,Out,Param,Marker,F> as bevy_ecs::system::system::System>::run_unsafe::h98eafa80c00dc48b at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/system/function_system.rs:409:19 24: 0x7f9e368fa3d4 - bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}}::hcf331cfd274d2d91 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:218:26 25: 0x7f9e368fa3d4 - bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}}::h7c5668778bdab190 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:258:21 26: 0x7f9e368fa3d4 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h288cda967a3b67ad at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 27: 0x7f9e368fa3d4 - async_executor::Executor::spawn::{{closure}}::h5bc11932220a73e9 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-executor-1.5.0/src/lib.rs:139:19 28: 0x7f9e368fa3d4 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb1248291f241bcfc at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 29: 0x7f9e369074bb - async_task::raw::RawTask<F,T,S>::run::hc092d9b639c0c672 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.3.0/src/raw.rs:511:20 30: 0x7f9e36a1b247 - async_executor::Executor::run::{{closure}}::{{closure}}::h1884beaf2439eb00 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-executor-1.5.0/src/lib.rs:230:21 31: 0x7f9e36a1b247 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h3808ae59f332e724 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 32: 0x7f9e36a1b3da - <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll::h7eb19b887c36dd73 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:529:33 33: 0x7f9e36a1b3da - async_executor::Executor::run::{{closure}}::he1f1ac189ec45700 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/async-executor-1.5.0/src/lib.rs:237:31 34: 0x7f9e36a1b3da - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h72181b4c1f0c850c at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 35: 0x7f9e36a175fb - futures_lite::future::block_on::{{closure}}::h7cd59c0634174a52 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:89:27 36: 0x7f9e36a175fb - std::thread::local::LocalKey<T>::try_with::h7c9965b49ca76f99 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:446:16 37: 0x7f9e36a175fb - std::thread::local::LocalKey<T>::with::h2a67fddf368f9deb at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:422:9 38: 0x7f9e36a172f4 - futures_lite::future::block_on::h56e2db4ff15c7309 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:79:5 39: 0x7f9e36a172f4 - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::{{closure}}::h84f2df43b85294b7 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:128:37 40: 0x7f9e36a172f4 - std::panicking::try::do_call::h31b99ec1e72b8c7a at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40 41: 0x7f9e36a172f4 - std::panicking::try::h63ac9ec1164bcb3f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19 42: 0x7f9e36a172f4 - std::panic::catch_unwind::h6a5493dbe5064bd6 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14 43: 0x7f9e36a172f4 - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::hcfc5c4113fa7f6d1 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:122:43 44: 0x7f9e36a172f4 - std::thread::local::LocalKey<T>::try_with::h2e5686515e5884a3 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:446:16 45: 0x7f9e36a172f4 - std::thread::local::LocalKey<T>::with::h9dc48a803dd60d20 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:422:9 46: 0x7f9e36a172f4 - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::h8cb981a08e8166fe at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:120:25 47: 0x7f9e36a172f4 - std::sys_common::backtrace::__rust_begin_short_backtrace::h13b2da9fada95865 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:121:18 48: 0x7f9e36a18565 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h8de837ee560526e5 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/mod.rs:551:17 49: 0x7f9e36a18565 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hefa35e169ffcabf9 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panic/unwind_safe.rs:271:9 50: 0x7f9e36a18565 - std::panicking::try::do_call::haac7fb97449fb28d at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40 51: 0x7f9e36a18565 - std::panicking::try::h03c00e72125db11d at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19 52: 0x7f9e36a18565 - std::panic::catch_unwind::hb5217da48c00b519 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14 53: 0x7f9e36a18565 - std::thread::Builder::spawn_unchecked_::{{closure}}::h9c076570add5a6ab at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/mod.rs:550:30 54: 0x7f9e36a18565 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hcd5b9fb6b9372c63 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5 55: 0x7f9e34b79843 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4273f95ec44459b3 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:1987:9 56: 0x7f9e34b79843 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h70f28fa4ddc269e5 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:1987:9 57: 0x7f9e34b79843 - std::sys::unix::thread::Thread::new::thread_start::h85a9c16b988e2bd0 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys/unix/thread.rs:108:17 58: 0x7f9e348318fd - <unknown> 59: 0x7f9e348b3d20 - <unknown> 60: 0x0 - <unknown> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:273:45 stack backtrace: 0: 0x7f9e34b6c9a0 - std::backtrace_rs::backtrace::libunwind::trace::he615646ea344481f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f9e34b6c9a0 - std::backtrace_rs::backtrace::trace_unsynchronized::h6ea8eaac68705b9c at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f9e34b6c9a0 - std::sys_common::backtrace::_print_fmt::h7ac486a935ce0bf7 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f9e34b6c9a0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b5a095d3db2e28f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f9e34bc898e - core::fmt::write::h445545b92224a1cd at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/fmt/mod.rs:1209:17 5: 0x7f9e34b5cb15 - std::io::Write::write_fmt::h55a43474c6520b00 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/io/mod.rs:1682:15 6: 0x7f9e34b6c765 - std::sys_common::backtrace::_print::h65d20526fdb736b0 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7f9e34b6c765 - std::sys_common::backtrace::print::h6555fbe12a1cc41b at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7f9e34b6f56f - std::panicking::default_hook::{{closure}}::hbdf58083140e7ac6 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:267:22 9: 0x7f9e34b6f2aa - std::panicking::default_hook::haef8271c56b74d85 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:286:9 10: 0x7f9e34b6fd78 - std::panicking::rust_panic_with_hook::hfd45b6b6c12d9fa5 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:688:13 11: 0x7f9e34b6fad1 - std::panicking::begin_panic_handler::{{closure}}::hf591e8609a75bd4b at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:577:13 12: 0x7f9e34b6ce4c - std::sys_common::backtrace::__rust_end_short_backtrace::h81899558795e4ff7 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:137:18 13: 0x7f9e34b6f832 - rust_begin_unwind at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5 14: 0x7f9e34bc5373 - core::panicking::panic_fmt::h4235fa9b4675b332 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14 15: 0x7f9e34bc544d - core::panicking::panic::h9ced3cf2f605ba6a at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:115:5 16: 0x7f9e368fa262 - core::option::Option<T>::unwrap::h5ea22f336ac1703c at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/option.rs:778:21 17: 0x7f9e368fa262 - bevy_tasks::task_pool::TaskPool::scope::{{closure}}::h1f1dbd294f77a4dd at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:273:34 18: 0x7f9e368fa262 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h7dd0b3b28dbaa660 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19 19: 0x7f9e368f753f - <core::pin::Pin<P> as core::future::future::Future>::poll::ha3a115be7edb715d at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/future.rs:124:9 20: 0x7f9e368f753f - <&mut F as core::future::future::Future>::poll::h681a809b708c9dbe at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/future.rs:112:9 21: 0x7f9e368f753f - <futures_lite::future::PollOnce<F> as core::future::future::Future>::poll::h0126c1f692947791 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:194:15 22: 0x7f9e368f753f - futures_lite::future::block_on::{{closure}}::h469e82cb0881c825 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:89:27 23: 0x7f9e368f753f - std::thread::local::LocalKey<T>::try_with::hd29bd3f8d182dc47 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:446:16 24: 0x7f9e368f753f - std::thread::local::LocalKey<T>::with::hc0daab3f8a0809bd at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:422:9 25: 0x7f9e368fcb02 - futures_lite::future::block_on::h746d5948bea123ab at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:79:5 26: 0x7f9e368fcb02 - bevy_tasks::task_pool::TaskPool::scope::hd92fa9120d943994 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.9.1/src/task_pool.rs:283:39 27: 0x7f9e36919e55 - <bevy_ecs::schedule::executor_parallel::ParallelExecutor as bevy_ecs::schedule::executor::ParallelSystemExecutor>::run_systems::h1824ea5040df89cc at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:127:9 28: 0x7f9e368ee8b2 - <bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run::h0c2448c07d0e258c at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/stage.rs:802:17 29: 0x7f9e3692982a - bevy_ecs::schedule::Schedule::run_once::hbf749a7ef5fb52a8 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/schedule/mod.rs:370:13 30: 0x7f9e368d94cf - bevy_app::app::App::update::h3170f812c6dffb32 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:152:9 31: 0x7f9e35317343 - bevy_winit::winit_runner_with::{{closure}}::h3d4ab0d3ec8f1bdb at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:600:21 32: 0x7f9e3533e2b1 - winit::platform_impl::platform::sticky_exit_callback::hd36dd3b07410d937 33: 0x7f9e3533e2b1 - winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration::h4b8d60f4a3e5d7d4 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:363:17 34: 0x7f9e3533e99d - winit::platform_impl::platform::x11::EventLoop<T>::run_return::hf637afd34289a1d3 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:488:27 35: 0x7f9e35340199 - winit::platform_impl::platform::x11::EventLoop<T>::run::h2f30fa08d72e7798 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:503:25 36: 0x7f9e35310c4c - winit::platform_impl::platform::EventLoop<T>::run::hddcc20c1c7682e89 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:755:56 37: 0x7f9e35329e7c - winit::event_loop::EventLoop<T>::run::h9c7b07d2e7c70199 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/event_loop.rs:278:9 38: 0x7f9e3532da4c - bevy_winit::run::h680326dd9bd21896 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:263:5 39: 0x7f9e3532eb11 - bevy_winit::winit_runner_with::h21752fcc36edb17e at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:645:9 40: 0x7f9e3530eab4 - bevy_winit::winit_runner::h3abb6f9bdecf5943 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_winit-0.9.1/src/lib.rs:303:5 41: 0x7f9e3530eab4 - core::ops::function::Fn::call::hf6916cdf175634f7 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:78:5 42: 0x55cbc85e56d5 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hd3a646e8eb7cbf75 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 43: 0x55cbc85e56d5 - bevy_editor_pls_default_windows::debug_settings::debugdump::setup::{{closure}}::h8fbee92d7445d55e at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_editor_pls_default_windows-0.2.0/src/debug_settings/debugdump.rs:57:9 44: 0x7f9e368d96eb - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc13eb8885ed27a5f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/boxed.rs:2001:9 45: 0x7f9e368d96eb - bevy_app::app::App::run::hffbab9c13c110a62 at /home/testare/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:168:9 46: 0x55cbc8431d02 - khaldron::main::h93ff7d9fed48864c at /home/testare/arch/khaldron/src/main.rs:15:5 47: 0x55cbc841e6b3 - core::ops::function::FnOnce::call_once::h7c69adbb59b720be at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5 48: 0x55cbc841e6b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf839dfd07c8c179f at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:121:18 49: 0x55cbc8438f19 - std::rt::lang_start::{{closure}}::hf2b754e429dfc8f1 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:166:18 50: 0x7f9e34b4db4b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h072eb4cd8da964ba at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:286:13 51: 0x7f9e34b4db4b - std::panicking::try::do_call::h8eca204fe9266946 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40 52: 0x7f9e34b4db4b - std::panicking::try::h12574e1b7b2cbacb at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19 53: 0x7f9e34b4db4b - std::panic::catch_unwind::hf71522d4448329d6 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14 54: 0x7f9e34b4db4b - std::rt::lang_start_internal::{{closure}}::h65b66ac9bff580f8 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:148:48 55: 0x7f9e34b4db4b - std::panicking::try::do_call::hfff61e33ca3db9f1 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40 56: 0x7f9e34b4db4b - std::panicking::try::he48c8ecead279cad at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19 57: 0x7f9e34b4db4b - std::panic::catch_unwind::hd510a26bfc950ccc at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14 58: 0x7f9e34b4db4b - std::rt::lang_start_internal::hc680b25eab888da9 at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:148:20 59: 0x55cbc843390c - main 60: 0x7f9e347ce290 - <unknown> 61: 0x7f9e347ce34a - __libc_start_main 62: 0x55cbc84013c5 - _start 63: 0x0 - <unknown> ```
I've done some debugging on my own, and while I haven't found the exact root cause, wanted to document what I've found so far. Process: I first checked out this repository, and migrated my code more-or-less to this intermediate bevy version, and used the local repo for the dependency,and injected some println statements into the bevy_scene crate, and modified the scene file to get different results. So what I've found is basically this: When the scene is hot-reloaded, it uses an entity map to map from scene entity numbers to the actual world entity numbers. So long as the real-world entity ID for the entity the DynamicSceneBundle was added to is NOT a key in the entity map (I.E. not an entity ID used in the scene), hot-reloading works fine. So, when the DynamicScene is spawned, all entities without a parent already defined set are added as children to the entity with the DynamicSceneBundle (I'll call this the root entity). This is all well and good. But when the scene is reload, the entities keep this Parent(RootEntity) component. Then the code that updates these components to point at actual Entity ID's instead of the Scene-internal Entity ID's passes through, and sees these Parent(RootEntity) components, and updates them with the Entity Map to point at some other entity (It seems that if it can't find that entity ID in the entity map, it leaves it alone). For example: We have a scene with 3 entities, labeled 0, 1, and 2 respectively. 1 and 2 are children of entity 0, and 0 has no parents. This scene is added to an entity in the App. At runtime, the DynamicScene entity is created with entity ID 2. It then spawns the scene. While in the scene they're defined as 0, 1, and 2, at runtime the actual world entity IDs become 4, 5, and 6. An entity map is created (0->4, 1->5, 2->6). Then the Parent/Children components are updated by this. So while in the scene code, entity 1 defines 0 as its parent entity, the actual entity 5's parent component is updated to point at entity 4. This is all well and good: This preserves the relationship as modeled in the scene file. Then, because this is how things are done, all the nodes in the scene without parents already defined are added as children of the DynamicScene entity that spawned them. So entity 4 (scene entity 0) gains a parent component with a value of 2. Then we update the scene asset. The scene is reloaded, but luckily we have the entity map to preserve the mapping of scene entities to real entities. We adjust these entities and their components. The scene must once again correct the parent and children components so that instead of pointing to values like 0, 1, and 2, they point ot the appropriate entities 4, 5, and 6. But hold up! Scene entity 0 (real entity 4) has a parent component too now, that points at entity 2, the dynamic scene root. But I guess the code that applies the entity map to these components doesn't realize that is what this is. It sees the parent component pointing to 2, and updates it to point at entity 6. Now we have entity 4 which is simultaneously the child and parent of entity 6. Malformed hierachy! Code panics. It seems that if the entity map does not contain a key for this match, it fails quitely and allows the parent component to remain unchanged. I.E. if in the previous example, the DynamicScene entity was entity 3 instead of 2. Then there would be no entry in the map to change it to, and the updates work just fine. This explains why it works sometimes and not others. tldr; It looks like code that updates parent/children components in scenes doesn't work well with the fact that entities without parents in the scene are added as children of the entity with the DynamicSceneBundle Yeah, that's what it looks like. The Parent Component that is being added to scene entities is being looped through the MapEntities code. I will say, the fact that I'm able to more or less understand what the code is doing is a great compliment to the people who wrote and maintained it. Looks better than most code I come across in my job! XD That said, I'm not entirely sure how to fix this bug ^-^' Having scene entities be children of their spawning entity seems to idiomatic and logical that I don't think breaking this link is the solution. Moreover, this problem only occurs when a scene is reloaded. Conversely, changing the contract of MapEntities to allow some sort of metadata to pass through seems difficult, especially in figured out what the metadata should be and how this metadata is passed. I suppose we could add some sort of property to the Parent component to mark it as one that does not bear updating through MapEntities, but then you have to consider the implications for all the other possible uses of MapEntities, such as networking. The solution I think sounds most reasonable is to have some sort of mechanism for a scene to remove certain components from an entity when the scene is reloaded. Perhaps which components are removed this way could be a property of the Reflect trait? If we can remove the Parent component of all entities that don't have parent components defined in the scene, we can just re-add them to the appropriate parent on reload. That's still kinda a hefty operation though.
2023-03-07T16:16:11Z
1.67
2023-03-27T22:41:29Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map" ]
[ "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene_builder::tests::extract_one_resource_twice", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::remove_componentless_entity", "dynamic_scene_builder::tests::extract_query", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::should_roundtrip_bincode", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_serialize", "serde::tests::should_deserialize", "src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 22)", "src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 102)", "src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 165)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,931
bevyengine__bevy-7931
[ "6497" ]
d3df04cb4c8d94cb06780a777cc6712fa4a316dd
diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -537,6 +537,41 @@ pub struct Mut<'a, T: ?Sized> { pub(crate) ticks: TicksMut<'a>, } +impl<'a, T: ?Sized> Mut<'a, T> { + /// Creates a new change-detection enabled smart pointer. + /// In almost all cases you do not need to call this method manually, + /// as instances of `Mut` will be created by engine-internal code. + /// + /// Many use-cases of this method would be better served by [`Mut::map_unchanged`] + /// or [`Mut::reborrow`]. + /// + /// - `value` - The value wrapped by this smart pointer. + /// - `added` - A [`Tick`] that stores the tick when the wrapped value was created. + /// - `last_changed` - A [`Tick`] that stores the last time the wrapped value was changed. + /// This will be updated to the value of `change_tick` if the returned smart pointer + /// is modified. + /// - `last_change_tick` - A [`Tick`], occurring before `change_tick`, which is used + /// as a reference to determine whether the wrapped value is newly added or changed. + /// - `change_tick` - A [`Tick`] corresponding to the current point in time -- "now". + pub fn new( + value: &'a mut T, + added: &'a mut Tick, + last_changed: &'a mut Tick, + last_change_tick: u32, + change_tick: u32, + ) -> Self { + Self { + value, + ticks: TicksMut { + added, + changed: last_changed, + last_change_tick, + change_tick, + }, + } + } +} + impl<'a, T: ?Sized> From<Mut<'a, T>> for Ref<'a, T> { fn from(mut_ref: Mut<'a, T>) -> Self { Self {
diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -827,6 +862,26 @@ mod tests { assert_eq!(4, into_mut.ticks.change_tick); } + #[test] + fn mut_new() { + let mut component_ticks = ComponentTicks { + added: Tick::new(1), + changed: Tick::new(3), + }; + let mut res = R {}; + + let val = Mut::new( + &mut res, + &mut component_ticks.added, + &mut component_ticks.changed, + 2, // last_change_tick + 4, // current change_tick + ); + + assert!(!val.is_added()); + assert!(val.is_changed()); + } + #[test] fn mut_from_non_send_mut() { let mut component_ticks = ComponentTicks {
Expose a public constructor for `Mut` ## What problem does this solve or what need does it fill? While ordinarily `Mut` should not be constructed directly by users (and instead should be retrieved via querying), it can be very useful when writing bevy-external tests. ## What solution would you like? Create a `Mut::new(value: T, ticks: Ticks)` method. Carefully document that this is an advanced API, and explain how to correctly set the `Ticks` value (following the `set_last_changed` API). ## What alternative(s) have you considered? Users can already construct arbitrary `Mut` values directly, via APIs like `world.get_mut()`. This may involve creating a dummy world, which is wasteful, confusing and roundabout. ## Additional context Discussed [on Discord](https://discord.com/channels/691052431525675048/749332104487108618/1038856546869850232) in the context of testing asset code with @djeedai, @maniwani and @JoJoJet.
2023-03-06T16:52:34Z
1.67
2023-04-05T14:22:14Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "change_detection::tests::mut_from_res_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_const", "change_detection::tests::set_if_neq", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "change_detection::tests::change_expiration", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::tests::any_query", "query::tests::many_entities", "query::tests::multi_storage_query", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "query::tests::query_iter_combinations_sparse", "query::tests::self_conflicting_worldquery - should panic", "query::tests::derived_worldqueries", "schedule::tests::base_sets::disallow_adding_base_sets_to_base_sets - should panic", "schedule::tests::base_sets::disallow_adding_base_sets_to_sets - should panic", "query::tests::query_filtered_iter_combinations", "schedule::tests::base_sets::disallow_adding_set_to_multiple_base_sets - should panic", "schedule::tests::base_sets::disallow_adding_sets_to_multiple_base_sets - should panic", "schedule::tests::base_sets::disallow_adding_system_to_multiple_base_sets - should panic", "schedule::tests::base_sets::disallow_adding_systems_to_multiple_base_sets - should panic", "schedule::tests::base_sets::allow_same_base_sets", "schedule::tests::base_sets::disallow_multiple_base_sets", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::aligned_zst", "system::commands::command_queue::test::test_command_is_send", "storage::sparse_set::tests::sparse_sets", "storage::sparse_set::tests::sparse_set", "system::commands::command_queue::test::test_command_queue_inner", "system::commands::command_queue::test::test_command_queue_inner_drop", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::resize_test", "system::system_piping::adapter::assert_systems", "system::commands::command_queue::test::test_command_queue_inner_panic_safe", "storage::table::tests::table", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "system::commands::tests::commands", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::get_system_conflicts", "system::tests::can_have_16_parameters", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::immutable_mut_test", "system::tests::conflicting_query_immut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::long_life_test", "system::tests::option_has_no_filter_with - should panic", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::read_system_state", "system::tests::query_is_empty", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::simple_system", "system::tests::write_system_state", "system::tests::system_state_change_detection", "tests::add_remove_components", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::added_tracking", "tests::changed_query", "tests::bundle_derive", "tests::duplicate_components_panic - should panic", "tests::filtered_query_access", "tests::despawn_mixed_storage", "tests::clear_entities", "tests::despawn_table_storage", "tests::changed_trackers", "tests::empty_spawn", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::exact_size_query", "tests::multiple_worlds_same_query_for_each - should panic", "tests::insert_or_spawn_batch_invalid", "tests::changed_trackers_sparse", "tests::multiple_worlds_same_query_get - should panic", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_iter - should panic", "tests::non_send_resource", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "system::tests::option_doesnt_remove_unrelated_filter_with", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::non_send_resource_points_to_distinct_data", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "system::tests::disjoint_query_mut_read_component_system", "schedule::tests::system_execution::run_exclusive_system", "system::tests::non_send_option_system", "tests::query_all", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_filter_with_sparse_for_each", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::local_system", "tests::query_filter_with", "event::tests::test_event_iter_nth", "system::tests::into_iter_impl", "tests::query_filter_with_for_each", "system::tests::nonconflicting_system_resources", "schedule::tests::conditions::system_with_condition", "system::tests::non_send_system", "system::tests::query_system_gets", "system::tests::disjoint_query_mut_system", "tests::query_filter_with_sparse", "tests::remove_missing", "schedule::tests::conditions::systems_nested_in_system_sets", "tests::ref_and_mut_query_panic - should panic", "tests::query_optional_component_table", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_set_conditions_and_change_detection", "tests::stateful_query_handles_new_archetype", "tests::query_single_component_for_each", "tests::take", "schedule::tests::conditions::systems_with_distributive_condition", "tests::query_sparse_component", "system::tests::removal_tracking", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::resource_scope", "tests::query_get", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "tests::remove", "schedule::tests::base_sets::default_base_set_ordering", "schedule::tests::system_ordering::add_systems_correct_order", "tests::query_optional_component_sparse_no_match", "schedule::tests::system_ordering::order_exclusive_systems", "system::tests::panic_inside_system - should panic", "schedule::tests::conditions::mixed_conditions_and_change_detection", "tests::reserve_and_spawn", "tests::random_access", "tests::remove_tracking", "system::tests::query_set_system", "tests::query_all_for_each", "tests::query_single_component", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::conditions::multiple_conditions_on_system_sets", "tests::query_optional_component_sparse", "system::tests::world_collections_system", "system::tests::commands_param_set", "system::tests::readonly_query_get_mut_component_fails", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::or_param_set_system", "tests::resource", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::tests::conditions::multiple_conditions_on_system", "tests::reserve_entities_across_worlds", "system::tests::changed_resource_system", "tests::non_send_resource_panic - should panic", "tests::trackers_query", "tests::par_for_each_dense", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "tests::test_is_archetypal_size_hints", "tests::spawn_batch", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::identifier::tests::world_ids_unique", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id", "tests::sparse_set_add_remove_many", "world::tests::panic_while_overwriting_component", "world::entity_ref::tests::removing_dense_updates_table_row", "world::tests::inspect_entity_components", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::tests::iterate_entities", "world::tests::spawn_empty_bundle", "world::world_cell::tests::world_cell", "tests::par_for_each_sparse", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "world::world_cell::tests::world_access_reused", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "world::world_cell::tests::world_cell_double_mut - should panic", "world::world_cell::tests::world_cell_ref_and_ref", "query::tests::query_filtered_exactsizeiterator_len", "schedule::tests::system_ordering::order_systems", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 143) - compile", "src/component.rs - component::Tick::set_changed (line 634) - compile", "src/query/fetch.rs - query::fetch::WorldQuery (line 111) - compile fail", "src/component.rs - component::Component (line 124) - compile fail", "src/component.rs - component::ComponentTicks::set_changed (line 700) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 153) - compile", "src/query/iter.rs - query::iter::QueryCombinationIter (line 264)", "src/bundle.rs - bundle::Bundle (line 93)", "src/lib.rs - (line 239)", "src/change_detection.rs - change_detection::DetectChanges (line 33)", "src/query/fetch.rs - query::fetch::WorldQuery (line 127)", "src/change_detection.rs - change_detection::NonSendMut<'a,T>::map_unchanged (line 498)", "src/lib.rs - (line 165)", "src/component.rs - component::ComponentIdFor (line 716)", "src/change_detection.rs - change_detection::ResMut<'a,T>::map_unchanged (line 465)", "src/query/filter.rs - query::filter::With (line 24)", "src/lib.rs - (line 189)", "src/lib.rs - (line 30)", "src/query/fetch.rs - query::fetch::WorldQuery (line 227)", "src/component.rs - component::Component (line 80)", "src/query/fetch.rs - query::fetch::WorldQuery (line 67)", "src/query/fetch.rs - query::fetch::WorldQuery (line 147)", "src/query/filter.rs - query::filter::Added (line 578)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 148)", "src/system/commands/mod.rs - system::commands::Command (line 24)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 514)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 250)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 487)", "src/system/commands/mod.rs - system::commands::Commands (line 70)", "src/entity/mod.rs - entity::Entity (line 77)", "src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 217)", "src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 24)", "src/query/filter.rs - query::filter::Or (line 232)", "src/query/fetch.rs - query::fetch::ChangeTrackers (line 1096)", "src/component.rs - component::StorageType (line 178)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 315)", "src/query/fetch.rs - query::fetch::WorldQuery (line 202)", "src/schedule/state.rs - schedule::state::States (line 28)", "src/query/filter.rs - query::filter::Without (line 126)", "src/lib.rs - (line 287)", "src/event.rs - event::EventWriter (line 274)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::add (line 793)", "src/change_detection.rs - change_detection::DetectChangesMut (line 77)", "src/lib.rs - (line 212)", "src/entity/map_entities.rs - entity::map_entities::MapEntities (line 34)", "src/removal_detection.rs - removal_detection::RemovedComponents (line 119)", "src/component.rs - component::Component (line 99)", "src/system/commands/mod.rs - system::commands::Commands (line 88)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::insert (line 662)", "src/component.rs - component::Component (line 134)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::despawn (line 768)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 432)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 270)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 460)", "src/query/filter.rs - query::filter::Changed (line 614)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 211)", "src/lib.rs - (line 74)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::remove (line 716)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::id (line 638)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1469) - compile fail", "src/component.rs - component::Component (line 34)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many (line 842) - compile", "src/entity/mod.rs - entity::Entity (line 97)", "src/system/system_param.rs - system::system_param::SystemParam (line 99) - compile fail", "src/event.rs - event::EventWriter (line 257)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 357)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many_mut (line 954) - compile", "src/query/fetch.rs - query::fetch::WorldQuery (line 255)", "src/system/query.rs - system::query::Query (line 97)", "src/system/query.rs - system::query::Query (line 36)", "src/system/query.rs - system::query::Query (line 57)", "src/system/query.rs - system::query::Query (line 77)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component_mut (line 1085)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component (line 1027)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_inner (line 1435)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::is_empty (line 1313)", "src/system/system_param.rs - system::system_param::Local (line 674)", "src/system/query.rs - system::query::Query (line 113)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations (line 421)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single (line 1169)", "src/system/system_param.rs - system::system_param::SystemParam (line 110)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1445)", "src/system/system_param.rs - system::system_param::ParamSet (line 340)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single (line 1197)", "src/system/mod.rs - system (line 13)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_inner (line 1478)", "src/system/system_param.rs - system::system_param::SystemParam (line 47)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many_mut (line 548)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get (line 773)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::contains (line 1337)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many (line 492)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single_mut (line 1244)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_mut (line 389)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each_mut (line 705)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_mut (line 889)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single_mut (line 1274)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations_mut (line 455)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter (line 352)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each (line 667)", "src/system/system_param.rs - system::system_param::ParamSet (line 305)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "src/lib.rs - (line 51)", "src/system/function_system.rs - system::function_system::IntoSystem (line 312)", "src/lib.rs - (line 124)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 406)", "src/component.rs - component::Components::resource_id (line 527)", "src/schedule/condition.rs - schedule::condition::common_conditions::not (line 356)", "src/system/function_system.rs - system::function_system::SystemState (line 84)", "src/system/function_system.rs - system::function_system::SystemState (line 116)", "src/system/function_system.rs - system::function_system::In (line 347)", "src/component.rs - component::Components::component_id (line 493)", "src/system/system_piping.rs - system::system_piping::adapter::new (line 108)", "src/world/mod.rs - world::World::despawn (line 610)", "src/lib.rs - (line 41)", "src/system/system_piping.rs - system::system_piping::adapter::dbg (line 194)", "src/lib.rs - (line 254)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 130)", "src/lib.rs - (line 91)", "src/world/mod.rs - world::World::entity (line 230)", "src/system/system_piping.rs - system::system_piping::adapter::unwrap (line 136)", "src/world/mod.rs - world::World::insert_or_spawn_batch (line 1152)", "src/system/system_piping.rs - system::system_piping::adapter::warn (line 221)", "src/system/function_system.rs - system::function_system::SystemParamFunction (line 546)", "src/system/system_param.rs - system::system_param::Local (line 651)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 20)", "src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::world_scope (line 593)", "src/schedule/condition.rs - schedule::condition::Condition::or_else (line 71)", "src/world/mod.rs - world::World::spawn (line 439)", "src/system/system_piping.rs - system::system_piping::adapter::ignore (line 281)", "src/event.rs - event::Events (line 79)", "src/system/query.rs - system::query::Query (line 162)", "src/world/mod.rs - world::World::get_entity_mut (line 381)", "src/world/mod.rs - world::World::clear_trackers (line 652)", "src/world/mod.rs - world::World::get (line 563)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 39)", "src/system/query.rs - system::query::Query (line 139)", "src/world/mod.rs - world::World::resource_scope (line 1270)", "src/system/combinator.rs - system::combinator::Combine (line 15)", "src/system/system_piping.rs - system::system_piping::adapter::info (line 167)", "src/system/mod.rs - system (line 56)", "src/system/system_param.rs - system::system_param::ParamSet (line 276)", "src/world/mod.rs - world::World::spawn_batch (line 537)", "src/world/mod.rs - world::World::entity_mut (line 255)", "src/system/system_param.rs - system::system_param::Resource (line 387)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 144)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many (line 231)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many_mut (line 291)", "src/world/mod.rs - world::World::component_id (line 209)", "src/world/mod.rs - world::World::get_entity (line 328)", "src/world/mod.rs - world::World::query_filtered (line 749)", "src/system/system_piping.rs - system::system_piping::PipeSystem (line 19)", "src/world/mod.rs - world::World::get_mut (line 584)", "src/system/system_piping.rs - system::system_piping::adapter::error (line 250)", "src/system/commands/mod.rs - system::commands::EntityCommand (line 550)", "src/world/mod.rs - world::World::query (line 682)", "src/system/system_param.rs - system::system_param::Deferred (line 787)", "src/world/mod.rs - world::World::query (line 718)", "src/world/mod.rs - world::World::spawn_empty (line 406)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,762
bevyengine__bevy-7762
[ "5569", "9335" ]
0dc7e60d0e894382c3026603c8772d59d1a4f0dc
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -4,11 +4,11 @@ use bevy_ecs::{ prelude::*, schedule::{ apply_state_transition, common_conditions::run_once as run_once_condition, - run_enter_schedule, BoxedScheduleLabel, IntoSystemConfigs, IntoSystemSetConfigs, + run_enter_schedule, InternedScheduleLabel, IntoSystemConfigs, IntoSystemSetConfigs, ScheduleBuildSettings, ScheduleLabel, }, }; -use bevy_utils::{tracing::debug, HashMap, HashSet}; +use bevy_utils::{intern::Interned, tracing::debug, HashMap, HashSet}; use std::{ fmt::Debug, panic::{catch_unwind, resume_unwind, AssertUnwindSafe}, diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -20,10 +20,14 @@ use bevy_utils::tracing::info_span; bevy_utils::define_label!( /// A strongly-typed class of labels used to identify an [`App`]. AppLabel, - /// A strongly-typed identifier for an [`AppLabel`]. - AppLabelId, + APP_LABEL_INTERNER ); +pub use bevy_utils::label::DynEq; + +/// A shorthand for `Interned<dyn AppLabel>`. +pub type InternedAppLabel = Interned<dyn AppLabel>; + pub(crate) enum AppError { DuplicatePlugin { plugin_name: String }, } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -70,8 +74,8 @@ pub struct App { /// The schedule that runs the main loop of schedule execution. /// /// This is initially set to [`Main`]. - pub main_schedule_label: BoxedScheduleLabel, - sub_apps: HashMap<AppLabelId, SubApp>, + pub main_schedule_label: InternedScheduleLabel, + sub_apps: HashMap<InternedAppLabel, SubApp>, plugin_registry: Vec<Box<dyn Plugin>>, plugin_name_added: HashSet<String>, /// A private counter to prevent incorrect calls to `App::run()` from `Plugin::build()` diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -156,7 +160,7 @@ impl SubApp { /// Runs the [`SubApp`]'s default schedule. pub fn run(&mut self) { - self.app.world.run_schedule(&*self.app.main_schedule_label); + self.app.world.run_schedule(self.app.main_schedule_label); self.app.world.clear_trackers(); } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -219,7 +223,7 @@ impl App { sub_apps: HashMap::default(), plugin_registry: Vec::default(), plugin_name_added: Default::default(), - main_schedule_label: Box::new(Main), + main_schedule_label: Main.intern(), building_plugin_depth: 0, } } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -241,7 +245,7 @@ impl App { { #[cfg(feature = "trace")] let _bevy_main_update_span = info_span!("main app").entered(); - self.world.run_schedule(&*self.main_schedule_label); + self.world.run_schedule(self.main_schedule_label); } for (_label, sub_app) in &mut self.sub_apps { #[cfg(feature = "trace")] diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -379,9 +383,10 @@ impl App { schedule: impl ScheduleLabel, systems: impl IntoSystemConfigs<M>, ) -> &mut Self { + let schedule = schedule.intern(); let mut schedules = self.world.resource_mut::<Schedules>(); - if let Some(schedule) = schedules.get_mut(&schedule) { + if let Some(schedule) = schedules.get_mut(schedule) { schedule.add_systems(systems); } else { let mut new_schedule = Schedule::new(schedule); diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -410,8 +415,9 @@ impl App { schedule: impl ScheduleLabel, sets: impl IntoSystemSetConfigs, ) -> &mut Self { + let schedule = schedule.intern(); let mut schedules = self.world.resource_mut::<Schedules>(); - if let Some(schedule) = schedules.get_mut(&schedule) { + if let Some(schedule) = schedules.get_mut(schedule) { schedule.configure_sets(sets); } else { let mut new_schedule = Schedule::new(schedule); diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -746,16 +752,15 @@ impl App { pub fn sub_app_mut(&mut self, label: impl AppLabel) -> &mut App { match self.get_sub_app_mut(label) { Ok(app) => app, - Err(label) => panic!("Sub-App with label '{:?}' does not exist", label.as_str()), + Err(label) => panic!("Sub-App with label '{:?}' does not exist", label), } } /// Retrieves a `SubApp` inside this [`App`] with the given label, if it exists. Otherwise returns /// an [`Err`] containing the given label. - pub fn get_sub_app_mut(&mut self, label: impl AppLabel) -> Result<&mut App, AppLabelId> { - let label = label.as_label(); + pub fn get_sub_app_mut(&mut self, label: impl AppLabel) -> Result<&mut App, impl AppLabel> { self.sub_apps - .get_mut(&label) + .get_mut(&label.intern()) .map(|sub_app| &mut sub_app.app) .ok_or(label) } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -768,25 +773,25 @@ impl App { pub fn sub_app(&self, label: impl AppLabel) -> &App { match self.get_sub_app(label) { Ok(app) => app, - Err(label) => panic!("Sub-App with label '{:?}' does not exist", label.as_str()), + Err(label) => panic!("Sub-App with label '{:?}' does not exist", label), } } /// Inserts an existing sub app into the app pub fn insert_sub_app(&mut self, label: impl AppLabel, sub_app: SubApp) { - self.sub_apps.insert(label.as_label(), sub_app); + self.sub_apps.insert(label.intern(), sub_app); } /// Removes a sub app from the app. Returns [`None`] if the label doesn't exist. pub fn remove_sub_app(&mut self, label: impl AppLabel) -> Option<SubApp> { - self.sub_apps.remove(&label.as_label()) + self.sub_apps.remove(&label.intern()) } /// Retrieves a `SubApp` inside this [`App`] with the given label, if it exists. Otherwise returns /// an [`Err`] containing the given label. pub fn get_sub_app(&self, label: impl AppLabel) -> Result<&App, impl AppLabel> { self.sub_apps - .get(&label.as_label()) + .get(&label.intern()) .map(|sub_app| &sub_app.app) .ok_or(label) } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -807,8 +812,9 @@ impl App { /// /// See [`App::add_schedule`] to pass in a pre-constructed schedule. pub fn init_schedule(&mut self, label: impl ScheduleLabel) -> &mut Self { + let label = label.intern(); let mut schedules = self.world.resource_mut::<Schedules>(); - if !schedules.contains(&label) { + if !schedules.contains(label) { schedules.insert(Schedule::new(label)); } self diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -817,7 +823,7 @@ impl App { /// Gets read-only access to the [`Schedule`] with the provided `label` if it exists. pub fn get_schedule(&self, label: impl ScheduleLabel) -> Option<&Schedule> { let schedules = self.world.get_resource::<Schedules>()?; - schedules.get(&label) + schedules.get(label) } /// Gets read-write access to a [`Schedule`] with the provided `label` if it exists. diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -825,7 +831,7 @@ impl App { let schedules = self.world.get_resource_mut::<Schedules>()?; // We need to call .into_inner here to satisfy the borrow checker: // it can reason about reborrows using ordinary references but not the `Mut` smart pointer. - schedules.into_inner().get_mut(&label) + schedules.into_inner().get_mut(label) } /// Applies the function to the [`Schedule`] associated with `label`. diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -836,13 +842,14 @@ impl App { label: impl ScheduleLabel, f: impl FnOnce(&mut Schedule), ) -> &mut Self { + let label = label.intern(); let mut schedules = self.world.resource_mut::<Schedules>(); - if schedules.get(&label).is_none() { - schedules.insert(Schedule::new(label.dyn_clone())); + if schedules.get(label).is_none() { + schedules.insert(Schedule::new(label)); } - let schedule = schedules.get_mut(&label).unwrap(); + let schedule = schedules.get_mut(label).unwrap(); // Call the function f, passing in the schedule retrieved f(schedule); diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -1,6 +1,6 @@ use crate::{App, Plugin}; use bevy_ecs::{ - schedule::{ExecutorKind, Schedule, ScheduleLabel}, + schedule::{ExecutorKind, InternedScheduleLabel, Schedule, ScheduleLabel}, system::{Local, Resource}, world::{Mut, World}, }; diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -105,21 +105,21 @@ pub struct Last; #[derive(Resource, Debug)] pub struct MainScheduleOrder { /// The labels to run for the [`Main`] schedule (in the order they will be run). - pub labels: Vec<Box<dyn ScheduleLabel>>, + pub labels: Vec<InternedScheduleLabel>, } impl Default for MainScheduleOrder { fn default() -> Self { Self { labels: vec![ - Box::new(First), - Box::new(PreUpdate), - Box::new(StateTransition), - Box::new(RunFixedUpdateLoop), - Box::new(Update), - Box::new(SpawnScene), - Box::new(PostUpdate), - Box::new(Last), + First.intern(), + PreUpdate.intern(), + StateTransition.intern(), + RunFixedUpdateLoop.intern(), + Update.intern(), + SpawnScene.intern(), + PostUpdate.intern(), + Last.intern(), ], } } diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -133,7 +133,7 @@ impl MainScheduleOrder { .iter() .position(|current| (**current).eq(&after)) .unwrap_or_else(|| panic!("Expected {after:?} to exist")); - self.labels.insert(index + 1, Box::new(schedule)); + self.labels.insert(index + 1, schedule.intern()); } } diff --git a/crates/bevy_app/src/main_schedule.rs b/crates/bevy_app/src/main_schedule.rs --- a/crates/bevy_app/src/main_schedule.rs +++ b/crates/bevy_app/src/main_schedule.rs @@ -148,8 +148,8 @@ impl Main { } world.resource_scope(|world, order: Mut<MainScheduleOrder>| { - for label in &order.labels { - let _ = world.try_run_schedule(&**label); + for &label in &order.labels { + let _ = world.try_run_schedule(label); } }); } diff --git a/crates/bevy_derive/src/lib.rs b/crates/bevy_derive/src/lib.rs --- a/crates/bevy_derive/src/lib.rs +++ b/crates/bevy_derive/src/lib.rs @@ -201,12 +201,13 @@ pub fn derive_enum_variant_meta(input: TokenStream) -> TokenStream { /// Generates an impl of the `AppLabel` trait. /// -/// This works only for unit structs, or enums with only unit variants. -/// You may force a struct or variant to behave as if it were fieldless with `#[app_label(ignore_fields)]`. -#[proc_macro_derive(AppLabel, attributes(app_label))] +/// This does not work for unions. +#[proc_macro_derive(AppLabel)] pub fn derive_app_label(input: TokenStream) -> TokenStream { let input = syn::parse_macro_input!(input as syn::DeriveInput); let mut trait_path = BevyManifest::default().get_path("bevy_app"); + let mut dyn_eq_path = trait_path.clone(); trait_path.segments.push(format_ident!("AppLabel").into()); - derive_label(input, &trait_path, "app_label") + dyn_eq_path.segments.push(format_ident!("DynEq").into()); + derive_label(input, "AppLabel", &trait_path, &dyn_eq_path) } diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -2,13 +2,10 @@ extern crate proc_macro; mod component; mod fetch; -mod set; mod states; -use crate::{fetch::derive_world_query_impl, set::derive_set}; -use bevy_macro_utils::{ - derive_boxed_label, ensure_no_collision, get_named_struct_fields, BevyManifest, -}; +use crate::fetch::derive_world_query_impl; +use bevy_macro_utils::{derive_label, ensure_no_collision, get_named_struct_fields, BevyManifest}; use proc_macro::TokenStream; use proc_macro2::Span; use quote::{format_ident, quote}; diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -434,25 +431,33 @@ pub fn derive_world_query(input: TokenStream) -> TokenStream { } /// Derive macro generating an impl of the trait `ScheduleLabel`. +/// +/// This does not work for unions. #[proc_macro_derive(ScheduleLabel)] pub fn derive_schedule_label(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as DeriveInput); let mut trait_path = bevy_ecs_path(); trait_path.segments.push(format_ident!("schedule").into()); + let mut dyn_eq_path = trait_path.clone(); trait_path .segments .push(format_ident!("ScheduleLabel").into()); - derive_boxed_label(input, &trait_path) + dyn_eq_path.segments.push(format_ident!("DynEq").into()); + derive_label(input, "ScheduleName", &trait_path, &dyn_eq_path) } /// Derive macro generating an impl of the trait `SystemSet`. +/// +/// This does not work for unions. #[proc_macro_derive(SystemSet)] pub fn derive_system_set(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as DeriveInput); let mut trait_path = bevy_ecs_path(); trait_path.segments.push(format_ident!("schedule").into()); + let mut dyn_eq_path = trait_path.clone(); trait_path.segments.push(format_ident!("SystemSet").into()); - derive_set(input, &trait_path) + dyn_eq_path.segments.push(format_ident!("DynEq").into()); + derive_label(input, "SystemSet", &trait_path, &dyn_eq_path) } pub(crate) fn bevy_ecs_path() -> syn::Path { diff --git a/crates/bevy_ecs/macros/src/set.rs /dev/null --- a/crates/bevy_ecs/macros/src/set.rs +++ /dev/null @@ -1,33 +0,0 @@ -use proc_macro::TokenStream; -use quote::quote; - -/// Derive a set trait -/// -/// # Args -/// -/// - `input`: The [`syn::DeriveInput`] for the struct that we want to derive the set trait for -/// - `trait_path`: The [`syn::Path`] to the set trait -pub fn derive_set(input: syn::DeriveInput, trait_path: &syn::Path) -> TokenStream { - let ident = input.ident; - - let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - let mut where_clause = where_clause.cloned().unwrap_or_else(|| syn::WhereClause { - where_token: Default::default(), - predicates: Default::default(), - }); - where_clause.predicates.push( - syn::parse2(quote! { - Self: 'static + Send + Sync + Clone + Eq + ::std::fmt::Debug + ::std::hash::Hash - }) - .unwrap(), - ); - - (quote! { - impl #impl_generics #trait_path for #ident #ty_generics #where_clause { - fn dyn_clone(&self) -> std::boxed::Box<dyn #trait_path> { - std::boxed::Box::new(std::clone::Clone::clone(self)) - } - } - }) - .into() -} diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -4,7 +4,7 @@ use crate::{ schedule::{ condition::{BoxedCondition, Condition}, graph_utils::{Ambiguity, Dependency, DependencyKind, GraphInfo}, - set::{BoxedSystemSet, IntoSystemSet, SystemSet}, + set::{InternedSystemSet, IntoSystemSet, SystemSet}, }, system::{BoxedSystem, IntoSystem, System}, }; diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -20,7 +20,7 @@ fn new_condition<M>(condition: impl Condition<M>) -> BoxedCondition { Box::new(condition_system) } -fn ambiguous_with(graph_info: &mut GraphInfo, set: BoxedSystemSet) { +fn ambiguous_with(graph_info: &mut GraphInfo, set: InternedSystemSet) { match &mut graph_info.ambiguous_with { detection @ Ambiguity::Check => { *detection = Ambiguity::IgnoreWithSet(vec![set]); diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -92,20 +92,20 @@ impl SystemConfigs { impl<T> NodeConfigs<T> { /// Adds a new boxed system set to the systems. - pub fn in_set_dyn(&mut self, set: BoxedSystemSet) { + pub fn in_set_inner(&mut self, set: InternedSystemSet) { match self { Self::NodeConfig(config) => { config.graph_info.sets.push(set); } Self::Configs { configs, .. } => { for config in configs { - config.in_set_dyn(set.dyn_clone()); + config.in_set_inner(set); } } } } - fn before_inner(&mut self, set: BoxedSystemSet) { + fn before_inner(&mut self, set: InternedSystemSet) { match self { Self::NodeConfig(config) => { config diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -115,13 +115,13 @@ impl<T> NodeConfigs<T> { } Self::Configs { configs, .. } => { for config in configs { - config.before_inner(set.dyn_clone()); + config.before_inner(set); } } } } - fn after_inner(&mut self, set: BoxedSystemSet) { + fn after_inner(&mut self, set: InternedSystemSet) { match self { Self::NodeConfig(config) => { config diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -131,7 +131,7 @@ impl<T> NodeConfigs<T> { } Self::Configs { configs, .. } => { for config in configs { - config.after_inner(set.dyn_clone()); + config.after_inner(set); } } } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -150,14 +150,14 @@ impl<T> NodeConfigs<T> { } } - fn ambiguous_with_inner(&mut self, set: BoxedSystemSet) { + fn ambiguous_with_inner(&mut self, set: InternedSystemSet) { match self { Self::NodeConfig(config) => { ambiguous_with(&mut config.graph_info, set); } Self::Configs { configs, .. } => { for config in configs { - config.ambiguous_with_inner(set.dyn_clone()); + config.ambiguous_with_inner(set); } } } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -330,20 +330,20 @@ impl IntoSystemConfigs<()> for SystemConfigs { "adding arbitrary systems to a system type set is not allowed" ); - self.in_set_dyn(set.dyn_clone()); + self.in_set_inner(set.intern()); self } fn before<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.before_inner(set.dyn_clone()); + self.before_inner(set.intern()); self } fn after<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.after_inner(set.dyn_clone()); + self.after_inner(set.intern()); self } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -354,7 +354,7 @@ impl IntoSystemConfigs<()> for SystemConfigs { fn ambiguous_with<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.ambiguous_with_inner(set.dyn_clone()); + self.ambiguous_with_inner(set.intern()); self } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -398,11 +398,11 @@ macro_rules! impl_system_collection { all_tuples!(impl_system_collection, 1, 20, P, S); /// A [`SystemSet`] with scheduling metadata. -pub type SystemSetConfig = NodeConfig<BoxedSystemSet>; +pub type SystemSetConfig = NodeConfig<InternedSystemSet>; impl SystemSetConfig { #[track_caller] - pub(super) fn new(set: BoxedSystemSet) -> Self { + pub(super) fn new(set: InternedSystemSet) -> Self { // system type sets are automatically populated // to avoid unintentionally broad changes, they cannot be configured assert!( diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -419,7 +419,7 @@ impl SystemSetConfig { } /// A collection of [`SystemSetConfig`]. -pub type SystemSetConfigs = NodeConfigs<BoxedSystemSet>; +pub type SystemSetConfigs = NodeConfigs<InternedSystemSet>; /// Types that can convert into a [`SystemSetConfigs`]. pub trait IntoSystemSetConfigs diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -485,21 +485,21 @@ impl IntoSystemSetConfigs for SystemSetConfigs { set.system_type().is_none(), "adding arbitrary systems to a system type set is not allowed" ); - self.in_set_dyn(set.dyn_clone()); + self.in_set_inner(set.intern()); self } fn before<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.before_inner(set.dyn_clone()); + self.before_inner(set.intern()); self } fn after<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.after_inner(set.dyn_clone()); + self.after_inner(set.intern()); self } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -512,7 +512,7 @@ impl IntoSystemSetConfigs for SystemSetConfigs { fn ambiguous_with<M>(mut self, set: impl IntoSystemSet<M>) -> Self { let set = set.into_system_set(); - self.ambiguous_with_inner(set.dyn_clone()); + self.ambiguous_with_inner(set.intern()); self } diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -530,13 +530,7 @@ impl IntoSystemSetConfigs for SystemSetConfigs { impl<S: SystemSet> IntoSystemSetConfigs for S { fn into_configs(self) -> SystemSetConfigs { - SystemSetConfigs::NodeConfig(SystemSetConfig::new(Box::new(self))) - } -} - -impl IntoSystemSetConfigs for BoxedSystemSet { - fn into_configs(self) -> SystemSetConfigs { - SystemSetConfigs::NodeConfig(SystemSetConfig::new(self)) + SystemSetConfigs::NodeConfig(SystemSetConfig::new(self.intern())) } } diff --git a/crates/bevy_ecs/src/schedule/graph_utils.rs b/crates/bevy_ecs/src/schedule/graph_utils.rs --- a/crates/bevy_ecs/src/schedule/graph_utils.rs +++ b/crates/bevy_ecs/src/schedule/graph_utils.rs @@ -51,11 +51,11 @@ pub(crate) enum DependencyKind { #[derive(Clone)] pub(crate) struct Dependency { pub(crate) kind: DependencyKind, - pub(crate) set: BoxedSystemSet, + pub(crate) set: InternedSystemSet, } impl Dependency { - pub fn new(kind: DependencyKind, set: BoxedSystemSet) -> Self { + pub fn new(kind: DependencyKind, set: InternedSystemSet) -> Self { Self { kind, set } } } diff --git a/crates/bevy_ecs/src/schedule/graph_utils.rs b/crates/bevy_ecs/src/schedule/graph_utils.rs --- a/crates/bevy_ecs/src/schedule/graph_utils.rs +++ b/crates/bevy_ecs/src/schedule/graph_utils.rs @@ -66,14 +66,14 @@ pub(crate) enum Ambiguity { #[default] Check, /// Ignore warnings with systems in any of these system sets. May contain duplicates. - IgnoreWithSet(Vec<BoxedSystemSet>), + IgnoreWithSet(Vec<InternedSystemSet>), /// Ignore all warnings. IgnoreAll, } #[derive(Clone, Default)] pub(crate) struct GraphInfo { - pub(crate) sets: Vec<BoxedSystemSet>, + pub(crate) sets: Vec<InternedSystemSet>, pub(crate) dependencies: Vec<Dependency>, pub(crate) ambiguous_with: Ambiguity, } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -28,7 +28,7 @@ use crate::{ /// Resource that stores [`Schedule`]s mapped to [`ScheduleLabel`]s. #[derive(Default, Resource)] pub struct Schedules { - inner: HashMap<BoxedScheduleLabel, Schedule>, + inner: HashMap<InternedScheduleLabel, Schedule>, /// List of [`ComponentId`]s to ignore when reporting system order ambiguity conflicts pub ignored_scheduling_ambiguities: BTreeSet<ComponentId>, } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -47,36 +47,35 @@ impl Schedules { /// If the map already had an entry for `label`, `schedule` is inserted, /// and the old schedule is returned. Otherwise, `None` is returned. pub fn insert(&mut self, schedule: Schedule) -> Option<Schedule> { - let label = schedule.name.dyn_clone(); - self.inner.insert(label, schedule) + self.inner.insert(schedule.name, schedule) } /// Removes the schedule corresponding to the `label` from the map, returning it if it existed. - pub fn remove(&mut self, label: &dyn ScheduleLabel) -> Option<Schedule> { - self.inner.remove(label) + pub fn remove(&mut self, label: impl ScheduleLabel) -> Option<Schedule> { + self.inner.remove(&label.intern()) } /// Removes the (schedule, label) pair corresponding to the `label` from the map, returning it if it existed. pub fn remove_entry( &mut self, - label: &dyn ScheduleLabel, - ) -> Option<(Box<dyn ScheduleLabel>, Schedule)> { - self.inner.remove_entry(label) + label: impl ScheduleLabel, + ) -> Option<(InternedScheduleLabel, Schedule)> { + self.inner.remove_entry(&label.intern()) } /// Does a schedule with the provided label already exist? - pub fn contains(&self, label: &dyn ScheduleLabel) -> bool { - self.inner.contains_key(label) + pub fn contains(&self, label: impl ScheduleLabel) -> bool { + self.inner.contains_key(&label.intern()) } /// Returns a reference to the schedule associated with `label`, if it exists. - pub fn get(&self, label: &dyn ScheduleLabel) -> Option<&Schedule> { - self.inner.get(label) + pub fn get(&self, label: impl ScheduleLabel) -> Option<&Schedule> { + self.inner.get(&label.intern()) } /// Returns a mutable reference to the schedule associated with `label`, if it exists. - pub fn get_mut(&mut self, label: &dyn ScheduleLabel) -> Option<&mut Schedule> { - self.inner.get_mut(label) + pub fn get_mut(&mut self, label: impl ScheduleLabel) -> Option<&mut Schedule> { + self.inner.get_mut(&label.intern()) } /// Returns an iterator over all schedules. Iteration order is undefined. diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -195,7 +194,7 @@ fn make_executor(kind: ExecutorKind) -> Box<dyn SystemExecutor> { /// } /// ``` pub struct Schedule { - name: BoxedScheduleLabel, + name: InternedScheduleLabel, graph: ScheduleGraph, executable: SystemSchedule, executor: Box<dyn SystemExecutor>, diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -219,7 +218,7 @@ impl Schedule { /// Constructs an empty `Schedule`. pub fn new(label: impl ScheduleLabel) -> Self { Self { - name: label.dyn_clone(), + name: label.intern(), graph: ScheduleGraph::new(), executable: SystemSchedule::new(), executor: make_executor(ExecutorKind::default()), diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -307,7 +306,7 @@ impl Schedule { &mut self.executable, world.components(), &ignored_ambiguities, - &self.name, + self.name, )?; self.graph.changed = false; self.executor_initialized = false; diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -401,11 +400,11 @@ impl Dag { /// A [`SystemSet`] with metadata, stored in a [`ScheduleGraph`]. struct SystemSetNode { - inner: BoxedSystemSet, + inner: InternedSystemSet, } impl SystemSetNode { - pub fn new(set: BoxedSystemSet) -> Self { + pub fn new(set: InternedSystemSet) -> Self { Self { inner: set } } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -450,13 +449,14 @@ pub struct ScheduleGraph { system_conditions: Vec<Vec<BoxedCondition>>, system_sets: Vec<SystemSetNode>, system_set_conditions: Vec<Vec<BoxedCondition>>, - system_set_ids: HashMap<BoxedSystemSet, NodeId>, + system_set_ids: HashMap<InternedSystemSet, NodeId>, uninit: Vec<(NodeId, usize)>, hierarchy: Dag, dependency: Dag, ambiguous_with: UnGraphMap<NodeId, ()>, ambiguous_with_all: HashSet<NodeId>, conflicting_systems: Vec<(NodeId, NodeId, Vec<ComponentId>)>, + anonymous_sets: usize, changed: bool, settings: ScheduleBuildSettings, } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -476,6 +476,7 @@ impl ScheduleGraph { ambiguous_with: UnGraphMap::new(), ambiguous_with_all: HashSet::new(), conflicting_systems: Vec::new(), + anonymous_sets: 0, changed: false, settings: default(), } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -604,11 +605,11 @@ impl ScheduleGraph { let more_than_one_entry = configs.len() > 1; if !collective_conditions.is_empty() { if more_than_one_entry { - let set = AnonymousSet::new(); + let set = self.create_anonymous_set(); for config in &mut configs { - config.in_set_dyn(set.dyn_clone()); + config.in_set_inner(set.intern()); } - let mut set_config = SystemSetConfig::new(set.dyn_clone()); + let mut set_config = SystemSetConfig::new(set.intern()); set_config.conditions.extend(collective_conditions); self.configure_set_inner(set_config).unwrap(); } else { diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -748,7 +749,7 @@ impl ScheduleGraph { let id = match self.system_set_ids.get(&set) { Some(&id) => id, - None => self.add_set(set.dyn_clone()), + None => self.add_set(set), }; // graph updates are immediate diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -762,36 +763,42 @@ impl ScheduleGraph { Ok(id) } - fn add_set(&mut self, set: BoxedSystemSet) -> NodeId { + fn add_set(&mut self, set: InternedSystemSet) -> NodeId { let id = NodeId::Set(self.system_sets.len()); - self.system_sets.push(SystemSetNode::new(set.dyn_clone())); + self.system_sets.push(SystemSetNode::new(set)); self.system_set_conditions.push(Vec::new()); self.system_set_ids.insert(set, id); id } - fn check_set(&mut self, id: &NodeId, set: &dyn SystemSet) -> Result<(), ScheduleBuildError> { - match self.system_set_ids.get(set) { + fn check_set(&mut self, id: &NodeId, set: InternedSystemSet) -> Result<(), ScheduleBuildError> { + match self.system_set_ids.get(&set) { Some(set_id) => { if id == set_id { return Err(ScheduleBuildError::HierarchyLoop(self.get_node_name(id))); } } None => { - self.add_set(set.dyn_clone()); + self.add_set(set); } } Ok(()) } + fn create_anonymous_set(&mut self) -> AnonymousSet { + let id = self.anonymous_sets; + self.anonymous_sets += 1; + AnonymousSet::new(id) + } + fn check_sets( &mut self, id: &NodeId, graph_info: &GraphInfo, ) -> Result<(), ScheduleBuildError> { - for set in &graph_info.sets { - self.check_set(id, &**set)?; + for &set in &graph_info.sets { + self.check_set(id, set)?; } Ok(()) diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -810,7 +817,7 @@ impl ScheduleGraph { } } None => { - self.add_set(set.dyn_clone()); + self.add_set(*set); } } } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -818,7 +825,7 @@ impl ScheduleGraph { if let Ambiguity::IgnoreWithSet(ambiguous_with) = &graph_info.ambiguous_with { for set in ambiguous_with { if !self.system_set_ids.contains_key(set) { - self.add_set(set.dyn_clone()); + self.add_set(*set); } } } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -915,7 +922,7 @@ impl ScheduleGraph { pub fn build_schedule( &mut self, components: &Components, - schedule_label: &BoxedScheduleLabel, + schedule_label: InternedScheduleLabel, ignored_ambiguities: &BTreeSet<ComponentId>, ) -> Result<SystemSchedule, ScheduleBuildError> { // check hierarchy for cycles diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -1229,7 +1236,7 @@ impl ScheduleGraph { schedule: &mut SystemSchedule, components: &Components, ignored_ambiguities: &BTreeSet<ComponentId>, - schedule_label: &BoxedScheduleLabel, + schedule_label: InternedScheduleLabel, ) -> Result<(), ScheduleBuildError> { if !self.uninit.is_empty() { return Err(ScheduleBuildError::Uninitialized); diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -1296,7 +1303,7 @@ impl ProcessNodeConfig for BoxedSystem { } } -impl ProcessNodeConfig for BoxedSystemSet { +impl ProcessNodeConfig for InternedSystemSet { fn process_config(schedule_graph: &mut ScheduleGraph, config: NodeConfig<Self>) -> NodeId { schedule_graph.configure_set_inner(config).unwrap() } diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -1372,7 +1379,7 @@ impl ScheduleGraph { fn optionally_check_hierarchy_conflicts( &self, transitive_edges: &[(NodeId, NodeId)], - schedule_label: &BoxedScheduleLabel, + schedule_label: InternedScheduleLabel, ) -> Result<(), ScheduleBuildError> { if self.settings.hierarchy_detection == LogLevel::Ignore || transitive_edges.is_empty() { return Ok(()); diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -1584,7 +1591,7 @@ impl ScheduleGraph { &self, conflicts: &[(NodeId, NodeId, Vec<ComponentId>)], components: &Components, - schedule_label: &BoxedScheduleLabel, + schedule_label: InternedScheduleLabel, ) -> Result<(), ScheduleBuildError> { if self.settings.ambiguity_detection == LogLevel::Ignore || conflicts.is_empty() { return Ok(()); diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -2,57 +2,52 @@ use std::any::TypeId; use std::fmt::Debug; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; -use std::sync::atomic::{AtomicUsize, Ordering}; pub use bevy_ecs_macros::{ScheduleLabel, SystemSet}; -use bevy_utils::define_boxed_label; -use bevy_utils::label::DynHash; +use bevy_utils::define_label; +use bevy_utils::intern::Interned; +pub use bevy_utils::label::DynEq; use crate::system::{ ExclusiveSystemParamFunction, IsExclusiveFunctionSystem, IsFunctionSystem, SystemParamFunction, }; -define_boxed_label!(ScheduleLabel); - -/// A shorthand for `Box<dyn SystemSet>`. -pub type BoxedSystemSet = Box<dyn SystemSet>; -/// A shorthand for `Box<dyn ScheduleLabel>`. -pub type BoxedScheduleLabel = Box<dyn ScheduleLabel>; - -/// Types that identify logical groups of systems. -pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { - /// Returns `Some` if this system set is a [`SystemTypeSet`]. - fn system_type(&self) -> Option<TypeId> { - None - } - - /// Returns `true` if this system set is an [`AnonymousSet`]. - fn is_anonymous(&self) -> bool { - false - } - /// Creates a boxed clone of the label corresponding to this system set. - fn dyn_clone(&self) -> Box<dyn SystemSet>; -} - -impl PartialEq for dyn SystemSet { - fn eq(&self, other: &Self) -> bool { - self.dyn_eq(other.as_dyn_eq()) - } -} - -impl Eq for dyn SystemSet {} - -impl Hash for dyn SystemSet { - fn hash<H: Hasher>(&self, state: &mut H) { - self.dyn_hash(state); +define_label!( + /// A strongly-typed class of labels used to identify an [`Schedule`]. + ScheduleLabel, + SCHEDULE_LABEL_INTERNER +); + +define_label!( + /// Types that identify logical groups of systems. + SystemSet, + SYSTEM_SET_INTERNER, + extra_methods: { + /// Returns `Some` if this system set is a [`SystemTypeSet`]. + fn system_type(&self) -> Option<TypeId> { + None + } + + /// Returns `true` if this system set is an [`AnonymousSet`]. + fn is_anonymous(&self) -> bool { + false + } + }, + extra_methods_impl: { + fn system_type(&self) -> Option<TypeId> { + (**self).system_type() + } + + fn is_anonymous(&self) -> bool { + (**self).is_anonymous() + } } -} +); -impl Clone for Box<dyn SystemSet> { - fn clone(&self) -> Self { - self.dyn_clone() - } -} +/// A shorthand for `Interned<dyn SystemSet>`. +pub type InternedSystemSet = Interned<dyn SystemSet>; +/// A shorthand for `Interned<dyn ScheduleLabel>`. +pub type InternedScheduleLabel = Interned<dyn ScheduleLabel>; /// A [`SystemSet`] grouping instances of the same function. /// diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -108,6 +103,15 @@ impl<T> SystemSet for SystemTypeSet<T> { fn dyn_clone(&self) -> Box<dyn SystemSet> { Box::new(*self) } + + fn as_dyn_eq(&self) -> &dyn DynEq { + self + } + + fn dyn_hash(&self, mut state: &mut dyn Hasher) { + std::any::TypeId::of::<Self>().hash(&mut state); + self.hash(&mut state); + } } /// A [`SystemSet`] implicitly created when using diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -116,11 +120,9 @@ impl<T> SystemSet for SystemTypeSet<T> { #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)] pub struct AnonymousSet(usize); -static NEXT_ANONYMOUS_SET_ID: AtomicUsize = AtomicUsize::new(0); - impl AnonymousSet { - pub(crate) fn new() -> Self { - Self(NEXT_ANONYMOUS_SET_ID.fetch_add(1, Ordering::Relaxed)) + pub(crate) fn new(id: usize) -> Self { + Self(id) } } diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -129,6 +131,15 @@ impl SystemSet for AnonymousSet { true } + fn as_dyn_eq(&self) -> &dyn DynEq { + self + } + + fn dyn_hash(&self, mut state: &mut dyn Hasher) { + std::any::TypeId::of::<Self>().hash(&mut state); + self.hash(&mut state); + } + fn dyn_clone(&self) -> Box<dyn SystemSet> { Box::new(*self) } diff --git a/crates/bevy_ecs/src/system/adapter_system.rs b/crates/bevy_ecs/src/system/adapter_system.rs --- a/crates/bevy_ecs/src/system/adapter_system.rs +++ b/crates/bevy_ecs/src/system/adapter_system.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use super::{ReadOnlySystem, System}; -use crate::world::unsafe_world_cell::UnsafeWorldCell; +use crate::{schedule::InternedSystemSet, world::unsafe_world_cell::UnsafeWorldCell}; /// Customizes the behavior of an [`AdapterSystem`] /// diff --git a/crates/bevy_ecs/src/system/adapter_system.rs b/crates/bevy_ecs/src/system/adapter_system.rs --- a/crates/bevy_ecs/src/system/adapter_system.rs +++ b/crates/bevy_ecs/src/system/adapter_system.rs @@ -143,7 +143,7 @@ where self.system.set_last_run(last_run); } - fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> { + fn default_system_sets(&self) -> Vec<InternedSystemSet> { self.system.default_system_sets() } } diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -7,6 +7,7 @@ use crate::{ component::{ComponentId, Tick}, prelude::World, query::Access, + schedule::InternedSystemSet, world::unsafe_world_cell::UnsafeWorldCell, }; diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -226,7 +227,7 @@ where self.b.set_last_run(last_run); } - fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> { + fn default_system_sets(&self) -> Vec<InternedSystemSet> { let mut default_sets = self.a.default_system_sets(); default_sets.append(&mut self.b.default_system_sets()); default_sets diff --git a/crates/bevy_ecs/src/system/exclusive_function_system.rs b/crates/bevy_ecs/src/system/exclusive_function_system.rs --- a/crates/bevy_ecs/src/system/exclusive_function_system.rs +++ b/crates/bevy_ecs/src/system/exclusive_function_system.rs @@ -2,6 +2,7 @@ use crate::{ archetype::ArchetypeComponentId, component::{ComponentId, Tick}, query::Access, + schedule::{InternedSystemSet, SystemSet}, system::{ check_system_change_tick, ExclusiveSystemParam, ExclusiveSystemParamItem, In, IntoSystem, System, SystemMeta, diff --git a/crates/bevy_ecs/src/system/exclusive_function_system.rs b/crates/bevy_ecs/src/system/exclusive_function_system.rs --- a/crates/bevy_ecs/src/system/exclusive_function_system.rs +++ b/crates/bevy_ecs/src/system/exclusive_function_system.rs @@ -150,9 +151,9 @@ where ); } - fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> { + fn default_system_sets(&self) -> Vec<InternedSystemSet> { let set = crate::schedule::SystemTypeSet::<F>::new(); - vec![Box::new(set)] + vec![set.intern()] } } diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -3,6 +3,7 @@ use crate::{ component::{ComponentId, Tick}, prelude::FromWorld, query::{Access, FilteredAccessSet}, + schedule::{InternedSystemSet, SystemSet}, system::{check_system_change_tick, ReadOnlySystemParam, System, SystemParam, SystemParamItem}, world::{unsafe_world_cell::UnsafeWorldCell, World, WorldId}, }; diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -528,9 +529,9 @@ where ); } - fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> { + fn default_system_sets(&self) -> Vec<InternedSystemSet> { let set = crate::schedule::SystemTypeSet::<F>::new(); - vec![Box::new(set)] + vec![set.intern()] } } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -2,6 +2,7 @@ use bevy_utils::tracing::warn; use core::fmt::Debug; use crate::component::Tick; +use crate::schedule::InternedSystemSet; use crate::world::unsafe_world_cell::UnsafeWorldCell; use crate::{archetype::ArchetypeComponentId, component::ComponentId, query::Access, world::World}; diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -91,7 +92,7 @@ pub trait System: Send + Sync + 'static { fn check_change_tick(&mut self, change_tick: Tick); /// Returns the system's default [system sets](crate::schedule::SystemSet). - fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> { + fn default_system_sets(&self) -> Vec<InternedSystemSet> { Vec::new() } diff --git a/crates/bevy_ecs/src/world/error.rs b/crates/bevy_ecs/src/world/error.rs --- a/crates/bevy_ecs/src/world/error.rs +++ b/crates/bevy_ecs/src/world/error.rs @@ -2,11 +2,11 @@ use thiserror::Error; -use crate::schedule::BoxedScheduleLabel; +use crate::schedule::InternedScheduleLabel; /// The error type returned by [`World::try_run_schedule`] if the provided schedule does not exist. /// /// [`World::try_run_schedule`]: crate::world::World::try_run_schedule #[derive(Error, Debug)] #[error("The schedule with the label {0:?} was not found.")] -pub struct TryRunScheduleError(pub BoxedScheduleLabel); +pub struct TryRunScheduleError(pub InternedScheduleLabel); 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 @@ -1993,15 +1993,15 @@ impl World { /// For other use cases, see the example on [`World::schedule_scope`]. pub fn try_schedule_scope<R>( &mut self, - label: impl AsRef<dyn ScheduleLabel>, + label: impl ScheduleLabel, f: impl FnOnce(&mut World, &mut Schedule) -> R, ) -> Result<R, TryRunScheduleError> { - let label = label.as_ref(); + let label = label.intern(); let Some(mut schedule) = self .get_resource_mut::<Schedules>() .and_then(|mut s| s.remove(label)) else { - return Err(TryRunScheduleError(label.dyn_clone())); + return Err(TryRunScheduleError(label)); }; let value = f(self, &mut schedule); 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 @@ -2053,7 +2053,7 @@ impl World { /// If the requested schedule does not exist. pub fn schedule_scope<R>( &mut self, - label: impl AsRef<dyn ScheduleLabel>, + label: impl ScheduleLabel, f: impl FnOnce(&mut World, &mut Schedule) -> R, ) -> R { self.try_schedule_scope(label, f) 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 @@ -2084,7 +2084,7 @@ impl World { /// # Panics /// /// If the requested schedule does not exist. - pub fn run_schedule(&mut self, label: impl AsRef<dyn ScheduleLabel>) { + pub fn run_schedule(&mut self, label: impl ScheduleLabel) { self.schedule_scope(label, |world, sched| sched.run(world)); } diff --git a/crates/bevy_macro_utils/src/label.rs b/crates/bevy_macro_utils/src/label.rs --- a/crates/bevy_macro_utils/src/label.rs +++ b/crates/bevy_macro_utils/src/label.rs @@ -3,8 +3,6 @@ use quote::{quote, quote_spanned}; use rustc_hash::FxHashSet; use syn::{spanned::Spanned, Ident}; -use crate::BevyManifest; - /// Finds an identifier that will not conflict with the specified set of tokens. /// If the identifier is present in `haystack`, extra characters will be added /// to it until it no longer conflicts with anything. diff --git a/crates/bevy_macro_utils/src/label.rs b/crates/bevy_macro_utils/src/label.rs --- a/crates/bevy_macro_utils/src/label.rs +++ b/crates/bevy_macro_utils/src/label.rs @@ -52,11 +50,24 @@ pub fn ensure_no_collision(value: Ident, haystack: TokenStream) -> Ident { /// # Args /// /// - `input`: The [`syn::DeriveInput`] for struct that is deriving the label trait -/// - `trait_path`: The path [`syn::Path`] to the label trait -pub fn derive_boxed_label(input: syn::DeriveInput, trait_path: &syn::Path) -> TokenStream { - let bevy_utils_path = BevyManifest::default().get_path("bevy_utils"); +/// - `trait_name`: Name of the label trait +/// - `trait_path`: The [path](`syn::Path`) to the label trait +/// - `dyn_eq_path`: The [path](`syn::Path`) to the `DynEq` trait +pub fn derive_label( + input: syn::DeriveInput, + trait_name: &str, + trait_path: &syn::Path, + dyn_eq_path: &syn::Path, +) -> TokenStream { + if let syn::Data::Union(_) = &input.data { + let message = format!("Cannot derive {trait_name} for unions."); + return quote_spanned! { + input.span() => compile_error!(#message); + } + .into(); + } - let ident = input.ident; + let ident = input.ident.clone(); let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); let mut where_clause = where_clause.cloned().unwrap_or_else(|| syn::WhereClause { where_token: Default::default(), diff --git a/crates/bevy_macro_utils/src/label.rs b/crates/bevy_macro_utils/src/label.rs --- a/crates/bevy_macro_utils/src/label.rs +++ b/crates/bevy_macro_utils/src/label.rs @@ -68,141 +79,22 @@ pub fn derive_boxed_label(input: syn::DeriveInput, trait_path: &syn::Path) -> To }) .unwrap(), ); - (quote! { impl #impl_generics #trait_path for #ident #ty_generics #where_clause { - fn dyn_clone(&self) -> std::boxed::Box<dyn #trait_path> { - std::boxed::Box::new(std::clone::Clone::clone(self)) + fn dyn_clone(&self) -> ::std::boxed::Box<dyn #trait_path> { + ::std::boxed::Box::new(::std::clone::Clone::clone(self)) } - fn as_dyn_eq(&self) -> &dyn #bevy_utils_path::label::DynEq { + fn as_dyn_eq(&self) -> &dyn #dyn_eq_path { self } fn dyn_hash(&self, mut state: &mut dyn ::std::hash::Hasher) { - let ty_id = #trait_path::inner_type_id(self); + let ty_id = ::std::any::TypeId::of::<Self>(); ::std::hash::Hash::hash(&ty_id, &mut state); ::std::hash::Hash::hash(self, &mut state); } } - - impl #impl_generics ::std::convert::AsRef<dyn #trait_path> for #ident #ty_generics #where_clause { - fn as_ref(&self) -> &dyn #trait_path { - self - } - } - }) - .into() -} - -/// Derive a label trait -/// -/// # Args -/// -/// - `input`: The [`syn::DeriveInput`] for struct that is deriving the label trait -/// - `trait_path`: The path [`syn::Path`] to the label trait -pub fn derive_label( - input: syn::DeriveInput, - trait_path: &syn::Path, - attr_name: &str, -) -> TokenStream { - // return true if the variant specified is an `ignore_fields` attribute - fn is_ignore(attr: &syn::Attribute, attr_name: &str) -> bool { - if attr.path().get_ident().as_ref().unwrap() != &attr_name { - return false; - } - - syn::custom_keyword!(ignore_fields); - attr.parse_args_with(|input: syn::parse::ParseStream| { - let ignore = input.parse::<Option<ignore_fields>>()?.is_some(); - Ok(ignore) - }) - .unwrap() - } - - let ident = input.ident.clone(); - - let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - let mut where_clause = where_clause.cloned().unwrap_or_else(|| syn::WhereClause { - where_token: Default::default(), - predicates: Default::default(), - }); - where_clause - .predicates - .push(syn::parse2(quote! { Self: 'static }).unwrap()); - - let as_str = match input.data { - syn::Data::Struct(d) => { - // see if the user tried to ignore fields incorrectly - if let Some(attr) = d - .fields - .iter() - .flat_map(|f| &f.attrs) - .find(|a| is_ignore(a, attr_name)) - { - let err_msg = format!("`#[{attr_name}(ignore_fields)]` cannot be applied to fields individually: add it to the struct declaration"); - return quote_spanned! { - attr.span() => compile_error!(#err_msg); - } - .into(); - } - // Structs must either be fieldless, or explicitly ignore the fields. - let ignore_fields = input.attrs.iter().any(|a| is_ignore(a, attr_name)); - if matches!(d.fields, syn::Fields::Unit) || ignore_fields { - let lit = ident.to_string(); - quote! { #lit } - } else { - let err_msg = format!("Labels cannot contain data, unless explicitly ignored with `#[{attr_name}(ignore_fields)]`"); - return quote_spanned! { - d.fields.span() => compile_error!(#err_msg); - } - .into(); - } - } - syn::Data::Enum(d) => { - // check if the user put #[label(ignore_fields)] in the wrong place - if let Some(attr) = input.attrs.iter().find(|a| is_ignore(a, attr_name)) { - let err_msg = format!("`#[{attr_name}(ignore_fields)]` can only be applied to enum variants or struct declarations"); - return quote_spanned! { - attr.span() => compile_error!(#err_msg); - } - .into(); - } - let arms = d.variants.iter().map(|v| { - // Variants must either be fieldless, or explicitly ignore the fields. - let ignore_fields = v.attrs.iter().any(|a| is_ignore(a, attr_name)); - if matches!(v.fields, syn::Fields::Unit) | ignore_fields { - let mut path = syn::Path::from(ident.clone()); - path.segments.push(v.ident.clone().into()); - let lit = format!("{ident}::{}", v.ident.clone()); - quote! { #path { .. } => #lit } - } else { - let err_msg = format!("Label variants cannot contain data, unless explicitly ignored with `#[{attr_name}(ignore_fields)]`"); - quote_spanned! { - v.fields.span() => _ => { compile_error!(#err_msg); } - } - } - }); - quote! { - match self { - #(#arms),* - } - } - } - syn::Data::Union(_) => { - return quote_spanned! { - input.span() => compile_error!("Unions cannot be used as labels."); - } - .into(); - } - }; - - (quote! { - impl #impl_generics #trait_path for #ident #ty_generics #where_clause { - fn as_str(&self) -> &'static str { - #as_str - } - } }) .into() } diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -406,7 +406,7 @@ unsafe fn initialize_render_app(app: &mut App) { app.init_resource::<ScratchMainWorld>(); let mut render_app = App::empty(); - render_app.main_schedule_label = Box::new(Render); + render_app.main_schedule_label = Render.intern(); let mut extract_schedule = Schedule::new(ExtractSchedule); extract_schedule.set_apply_final_deferred(false); diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -475,7 +475,7 @@ unsafe fn initialize_render_app(app: &mut App) { fn apply_extract_commands(render_world: &mut World) { render_world.resource_scope(|render_world, mut schedules: Mut<Schedules>| { schedules - .get_mut(&ExtractSchedule) + .get_mut(ExtractSchedule) .unwrap() .apply_deferred(render_world); }); diff --git a/crates/bevy_utils/src/label.rs b/crates/bevy_utils/src/label.rs --- a/crates/bevy_utils/src/label.rs +++ b/crates/bevy_utils/src/label.rs @@ -65,154 +65,134 @@ where /// # Example /// /// ``` -/// # use bevy_utils::define_boxed_label; -/// define_boxed_label!(MyNewLabelTrait); +/// # use bevy_utils::define_label; +/// define_label!( +/// /// Documentation of label trait +/// MyNewLabelTrait, +/// MY_NEW_LABEL_TRAIT_INTERNER +/// ); +/// +/// define_label!( +/// /// Documentation of another label trait +/// MyNewExtendedLabelTrait, +/// MY_NEW_EXTENDED_LABEL_TRAIT_INTERNER, +/// extra_methods: { +/// // Extra methods for the trait can be defined here +/// fn additional_method(&self) -> i32; +/// }, +/// extra_methods_impl: { +/// // Implementation of the extra methods for Interned<dyn MyNewExtendedLabelTrait> +/// fn additional_method(&self) -> i32 { +/// 0 +/// } +/// } +/// ); /// ``` #[macro_export] -macro_rules! define_boxed_label { - ($label_trait_name:ident) => { - /// A strongly-typed label. +macro_rules! define_label { + ( + $(#[$label_attr:meta])* + $label_trait_name:ident, + $interner_name:ident + ) => { + $crate::define_label!( + $(#[$label_attr])* + $label_trait_name, + $interner_name, + extra_methods: {}, + extra_methods_impl: {} + ); + }; + ( + $(#[$label_attr:meta])* + $label_trait_name:ident, + $interner_name:ident, + extra_methods: { $($trait_extra_methods:tt)* }, + extra_methods_impl: { $($interned_extra_methods_impl:tt)* } + ) => { + + $(#[$label_attr])* pub trait $label_trait_name: 'static + Send + Sync + ::std::fmt::Debug { - /// Return's the [`TypeId`] of this label, or the ID of the - /// wrapped label type for `Box<dyn - #[doc = stringify!($label_trait_name)] - /// >` - /// - /// [TypeId]: std::any::TypeId - fn inner_type_id(&self) -> ::std::any::TypeId { - std::any::TypeId::of::<Self>() - } + + $($trait_extra_methods)* /// Clones this ` #[doc = stringify!($label_trait_name)] - /// ` - fn dyn_clone(&self) -> Box<dyn $label_trait_name>; + ///`. + fn dyn_clone(&self) -> ::std::boxed::Box<dyn $label_trait_name>; /// Casts this value to a form where it can be compared with other type-erased values. - fn as_dyn_eq(&self) -> &dyn ::bevy_utils::label::DynEq; + fn as_dyn_eq(&self) -> &dyn $crate::label::DynEq; /// Feeds this value into the given [`Hasher`]. /// /// [`Hasher`]: std::hash::Hasher fn dyn_hash(&self, state: &mut dyn ::std::hash::Hasher); - } - impl PartialEq for dyn $label_trait_name { - fn eq(&self, other: &Self) -> bool { - self.as_dyn_eq().dyn_eq(other.as_dyn_eq()) + /// Returns an [`Interned`](bevy_utils::intern::Interned) value corresponding to `self`. + fn intern(&self) -> $crate::intern::Interned<dyn $label_trait_name> + where Self: Sized { + $interner_name.intern(self) } } - impl Eq for dyn $label_trait_name {} + impl $label_trait_name for $crate::intern::Interned<dyn $label_trait_name> { - impl ::std::hash::Hash for dyn $label_trait_name { - fn hash<H: ::std::hash::Hasher>(&self, state: &mut H) { - self.dyn_hash(state); - } - } - - impl ::std::convert::AsRef<dyn $label_trait_name> for dyn $label_trait_name { - #[inline] - fn as_ref(&self) -> &Self { - self - } - } - - impl Clone for Box<dyn $label_trait_name> { - fn clone(&self) -> Self { - self.dyn_clone() - } - } - - impl $label_trait_name for Box<dyn $label_trait_name> { - fn inner_type_id(&self) -> ::std::any::TypeId { - (**self).inner_type_id() - } + $($interned_extra_methods_impl)* - fn dyn_clone(&self) -> Box<dyn $label_trait_name> { - // Be explicit that we want to use the inner value - // to avoid infinite recursion. + fn dyn_clone(&self) -> ::std::boxed::Box<dyn $label_trait_name> { (**self).dyn_clone() } - fn as_dyn_eq(&self) -> &dyn ::bevy_utils::label::DynEq { + /// Casts this value to a form where it can be compared with other type-erased values. + fn as_dyn_eq(&self) -> &dyn $crate::label::DynEq { (**self).as_dyn_eq() } fn dyn_hash(&self, state: &mut dyn ::std::hash::Hasher) { (**self).dyn_hash(state); } - } - }; -} - -/// Macro to define a new label trait -/// -/// # Example -/// -/// ``` -/// # use bevy_utils::define_label; -/// define_label!( -/// /// A class of labels. -/// MyNewLabelTrait, -/// /// Identifies a value that implements `MyNewLabelTrait`. -/// MyNewLabelId, -/// ); -/// ``` -#[macro_export] -macro_rules! define_label { - ( - $(#[$label_attr:meta])* - $label_name:ident, - $(#[$id_attr:meta])* - $id_name:ident $(,)? - ) => { - $(#[$id_attr])* - #[derive(Clone, Copy, PartialEq, Eq, Hash)] - pub struct $id_name(::core::any::TypeId, &'static str); - - impl ::core::fmt::Debug for $id_name { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - write!(f, "{}", self.1) + fn intern(&self) -> Self { + *self } } - $(#[$label_attr])* - pub trait $label_name: Send + Sync + 'static { - /// Converts this type into an opaque, strongly-typed label. - fn as_label(&self) -> $id_name { - let id = self.type_id(); - let label = self.as_str(); - $id_name(id, label) - } - /// Returns the [`TypeId`] used to differentiate labels. - fn type_id(&self) -> ::core::any::TypeId { - ::core::any::TypeId::of::<Self>() + impl PartialEq for dyn $label_trait_name { + fn eq(&self, other: &Self) -> bool { + self.as_dyn_eq().dyn_eq(other.as_dyn_eq()) } - /// Returns the representation of this label as a string literal. - /// - /// In cases where you absolutely need a label to be determined at runtime, - /// you can use [`Box::leak`] to get a `'static` reference. - fn as_str(&self) -> &'static str; } - impl $label_name for $id_name { - fn as_label(&self) -> Self { - *self + impl Eq for dyn $label_trait_name {} + + impl ::std::hash::Hash for dyn $label_trait_name { + fn hash<H: ::std::hash::Hasher>(&self, state: &mut H) { + self.dyn_hash(state); } - fn type_id(&self) -> ::core::any::TypeId { - self.0 + } + + impl $crate::intern::Internable for dyn $label_trait_name { + fn leak(&self) -> &'static Self { + Box::leak(self.dyn_clone()) } - fn as_str(&self) -> &'static str { - self.1 + + fn ref_eq(&self, other: &Self) -> bool { + if self.as_dyn_eq().type_id() == other.as_dyn_eq().type_id() { + (self as *const Self as *const ()) == (other as *const Self as *const ()) + } else { + false + } } - } - impl $label_name for &'static str { - fn as_str(&self) -> Self { - self + fn ref_hash<H: ::std::hash::Hasher>(&self, state: &mut H) { + use ::std::hash::Hash; + self.as_dyn_eq().type_id().hash(state); + (self as *const Self as *const ()).hash(state); } } + + static $interner_name: $crate::intern::Interner<dyn $label_trait_name> = + $crate::intern::Interner::new(); }; } diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -21,6 +21,7 @@ pub mod syncunsafecell; mod cow_arc; mod default; mod float_ord; +pub mod intern; pub use ahash::{AHasher, RandomState}; pub use bevy_utils_proc_macros::*;
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -964,6 +971,8 @@ pub struct AppExit; #[cfg(test)] mod tests { + use std::marker::PhantomData; + use bevy_ecs::{ schedule::{OnEnter, States}, system::Commands, diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1060,4 +1069,107 @@ mod tests { app.world.run_schedule(OnEnter(AppState::MainMenu)); assert_eq!(app.world.entities().len(), 2); } + + #[test] + fn test_derive_app_label() { + use super::AppLabel; + use crate::{self as bevy_app}; + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct UnitLabel; + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct TupleLabel(u32, u32); + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct StructLabel { + a: u32, + b: u32, + } + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyTupleLabel(); + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyStructLabel {} + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + enum EnumLabel { + #[default] + Unit, + Tuple(u32, u32), + Struct { + a: u32, + b: u32, + }, + } + + #[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct GenericLabel<T>(PhantomData<T>); + + assert_eq!(UnitLabel.intern(), UnitLabel.intern()); + assert_eq!(EnumLabel::Unit.intern(), EnumLabel::Unit.intern()); + assert_ne!(UnitLabel.intern(), EnumLabel::Unit.intern()); + assert_ne!(UnitLabel.intern(), TupleLabel(0, 0).intern()); + assert_ne!(EnumLabel::Unit.intern(), EnumLabel::Tuple(0, 0).intern()); + + assert_eq!(TupleLabel(0, 0).intern(), TupleLabel(0, 0).intern()); + assert_eq!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Tuple(0, 0).intern() + ); + assert_ne!(TupleLabel(0, 0).intern(), TupleLabel(0, 1).intern()); + assert_ne!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Tuple(0, 1).intern() + ); + assert_ne!(TupleLabel(0, 0).intern(), EnumLabel::Tuple(0, 0).intern()); + assert_ne!( + TupleLabel(0, 0).intern(), + StructLabel { a: 0, b: 0 }.intern() + ); + assert_ne!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + + assert_eq!( + StructLabel { a: 0, b: 0 }.intern(), + StructLabel { a: 0, b: 0 }.intern() + ); + assert_eq!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + StructLabel { a: 0, b: 1 }.intern() + ); + assert_ne!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 1 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!(StructLabel { a: 0, b: 0 }.intern(), UnitLabel.intern(),); + assert_ne!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Unit.intern() + ); + + assert_eq!( + GenericLabel::<u32>(PhantomData).intern(), + GenericLabel::<u32>(PhantomData).intern() + ); + assert_ne!( + GenericLabel::<u32>(PhantomData).intern(), + GenericLabel::<u64>(PhantomData).intern() + ); + } } diff --git a/crates/bevy_ecs/src/schedule/mod.rs b/crates/bevy_ecs/src/schedule/mod.rs --- a/crates/bevy_ecs/src/schedule/mod.rs +++ b/crates/bevy_ecs/src/schedule/mod.rs @@ -1011,7 +1011,7 @@ mod tests { schedule.graph_mut().initialize(&mut world); let _ = schedule.graph_mut().build_schedule( world.components(), - &TestSchedule.dyn_clone(), + TestSchedule.intern(), &BTreeSet::new(), ); diff --git a/crates/bevy_ecs/src/schedule/mod.rs b/crates/bevy_ecs/src/schedule/mod.rs --- a/crates/bevy_ecs/src/schedule/mod.rs +++ b/crates/bevy_ecs/src/schedule/mod.rs @@ -1060,7 +1060,7 @@ mod tests { schedule.graph_mut().initialize(&mut world); let _ = schedule.graph_mut().build_schedule( world.components(), - &TestSchedule.dyn_clone(), + TestSchedule.intern(), &BTreeSet::new(), ); diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -189,7 +200,7 @@ mod tests { use super::*; #[test] - fn test_boxed_label() { + fn test_schedule_label() { use crate::{self as bevy_ecs, world::World}; #[derive(Resource)] diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -198,20 +209,220 @@ mod tests { #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] struct A; + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct B; + let mut world = World::new(); let mut schedule = Schedule::new(A); schedule.add_systems(|mut flag: ResMut<Flag>| flag.0 = true); world.add_schedule(schedule); - let boxed: Box<dyn ScheduleLabel> = Box::new(A); + let interned = A.intern(); world.insert_resource(Flag(false)); - world.run_schedule(&boxed); + world.run_schedule(interned); assert!(world.resource::<Flag>().0); world.insert_resource(Flag(false)); - world.run_schedule(boxed); + world.run_schedule(interned); assert!(world.resource::<Flag>().0); + + assert_ne!(A.intern(), B.intern()); + } + + #[test] + fn test_derive_schedule_label() { + use crate::{self as bevy_ecs}; + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct UnitLabel; + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct TupleLabel(u32, u32); + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct StructLabel { + a: u32, + b: u32, + } + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyTupleLabel(); + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyStructLabel {} + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + enum EnumLabel { + #[default] + Unit, + Tuple(u32, u32), + Struct { + a: u32, + b: u32, + }, + } + + #[derive(ScheduleLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct GenericLabel<T>(PhantomData<T>); + + assert_eq!(UnitLabel.intern(), UnitLabel.intern()); + assert_eq!(EnumLabel::Unit.intern(), EnumLabel::Unit.intern()); + assert_ne!(UnitLabel.intern(), EnumLabel::Unit.intern()); + assert_ne!(UnitLabel.intern(), TupleLabel(0, 0).intern()); + assert_ne!(EnumLabel::Unit.intern(), EnumLabel::Tuple(0, 0).intern()); + + assert_eq!(TupleLabel(0, 0).intern(), TupleLabel(0, 0).intern()); + assert_eq!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Tuple(0, 0).intern() + ); + assert_ne!(TupleLabel(0, 0).intern(), TupleLabel(0, 1).intern()); + assert_ne!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Tuple(0, 1).intern() + ); + assert_ne!(TupleLabel(0, 0).intern(), EnumLabel::Tuple(0, 0).intern()); + assert_ne!( + TupleLabel(0, 0).intern(), + StructLabel { a: 0, b: 0 }.intern() + ); + assert_ne!( + EnumLabel::Tuple(0, 0).intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + + assert_eq!( + StructLabel { a: 0, b: 0 }.intern(), + StructLabel { a: 0, b: 0 }.intern() + ); + assert_eq!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + StructLabel { a: 0, b: 1 }.intern() + ); + assert_ne!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 1 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructLabel { a: 0, b: 0 }.intern(), + EnumLabel::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!(StructLabel { a: 0, b: 0 }.intern(), UnitLabel.intern(),); + assert_ne!( + EnumLabel::Struct { a: 0, b: 0 }.intern(), + EnumLabel::Unit.intern() + ); + + assert_eq!( + GenericLabel::<u32>(PhantomData).intern(), + GenericLabel::<u32>(PhantomData).intern() + ); + assert_ne!( + GenericLabel::<u32>(PhantomData).intern(), + GenericLabel::<u64>(PhantomData).intern() + ); + } + + #[test] + fn test_derive_system_set() { + use crate::{self as bevy_ecs}; + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct UnitSet; + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct TupleSet(u32, u32); + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct StructSet { + a: u32, + b: u32, + } + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyTupleSet(); + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct EmptyStructSet {} + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + enum EnumSet { + #[default] + Unit, + Tuple(u32, u32), + Struct { + a: u32, + b: u32, + }, + } + + #[derive(SystemSet, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] + struct GenericSet<T>(PhantomData<T>); + + assert_eq!(UnitSet.intern(), UnitSet.intern()); + assert_eq!(EnumSet::Unit.intern(), EnumSet::Unit.intern()); + assert_ne!(UnitSet.intern(), EnumSet::Unit.intern()); + assert_ne!(UnitSet.intern(), TupleSet(0, 0).intern()); + assert_ne!(EnumSet::Unit.intern(), EnumSet::Tuple(0, 0).intern()); + + assert_eq!(TupleSet(0, 0).intern(), TupleSet(0, 0).intern()); + assert_eq!(EnumSet::Tuple(0, 0).intern(), EnumSet::Tuple(0, 0).intern()); + assert_ne!(TupleSet(0, 0).intern(), TupleSet(0, 1).intern()); + assert_ne!(EnumSet::Tuple(0, 0).intern(), EnumSet::Tuple(0, 1).intern()); + assert_ne!(TupleSet(0, 0).intern(), EnumSet::Tuple(0, 0).intern()); + assert_ne!(TupleSet(0, 0).intern(), StructSet { a: 0, b: 0 }.intern()); + assert_ne!( + EnumSet::Tuple(0, 0).intern(), + EnumSet::Struct { a: 0, b: 0 }.intern() + ); + + assert_eq!( + StructSet { a: 0, b: 0 }.intern(), + StructSet { a: 0, b: 0 }.intern() + ); + assert_eq!( + EnumSet::Struct { a: 0, b: 0 }.intern(), + EnumSet::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructSet { a: 0, b: 0 }.intern(), + StructSet { a: 0, b: 1 }.intern() + ); + assert_ne!( + EnumSet::Struct { a: 0, b: 0 }.intern(), + EnumSet::Struct { a: 0, b: 1 }.intern() + ); + assert_ne!( + StructSet { a: 0, b: 0 }.intern(), + EnumSet::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!( + StructSet { a: 0, b: 0 }.intern(), + EnumSet::Struct { a: 0, b: 0 }.intern() + ); + assert_ne!(StructSet { a: 0, b: 0 }.intern(), UnitSet.intern(),); + assert_ne!( + EnumSet::Struct { a: 0, b: 0 }.intern(), + EnumSet::Unit.intern() + ); + + assert_eq!( + GenericSet::<u32>(PhantomData).intern(), + GenericSet::<u32>(PhantomData).intern() + ); + assert_ne!( + GenericSet::<u32>(PhantomData).intern(), + GenericSet::<u64>(PhantomData).intern() + ); } } 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 @@ -2069,7 +2069,7 @@ impl World { /// For simple testing use cases, call [`Schedule::run(&mut world)`](Schedule::run) instead. pub fn try_run_schedule( &mut self, - label: impl AsRef<dyn ScheduleLabel>, + label: impl ScheduleLabel, ) -> Result<(), TryRunScheduleError> { self.try_schedule_scope(label, |world, sched| sched.run(world)) } diff --git /dev/null b/crates/bevy_utils/src/intern.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_utils/src/intern.rs @@ -0,0 +1,286 @@ +//! Provides types used to statically intern immutable values. +//! +//! Interning is a pattern used to save memory by deduplicating identical values, +//! speed up code by shrinking the stack size of large types, +//! and make comparisons for any type as fast as integers. + +use std::{ + fmt::Debug, + hash::Hash, + ops::Deref, + sync::{OnceLock, PoisonError, RwLock}, +}; + +use crate::HashSet; + +/// An interned value. Will stay valid until the end of the program and will not drop. +/// +/// For details on interning, see [the module level docs](self). +/// +/// # Comparisons +/// +/// Interned values use reference equality, meaning they implement [`Eq`] +/// and [`Hash`] regardless of whether `T` implements these traits. +/// Two interned values are only guaranteed to compare equal if they were interned using +/// the same [`Interner`] instance. +// NOTE: This type must NEVER implement Borrow since it does not obey that trait's invariants. +/// +/// ``` +/// # use bevy_utils::intern::*; +/// #[derive(PartialEq, Eq, Hash, Debug)] +/// struct Value(i32); +/// impl Internable for Value { +/// // ... +/// # fn leak(&self) -> &'static Self { Box::leak(Box::new(Value(self.0))) } +/// # fn ref_eq(&self, other: &Self) -> bool { std::ptr::eq(self, other ) } +/// # fn ref_hash<H: std::hash::Hasher>(&self, state: &mut H) { std::ptr::hash(self, state); } +/// } +/// let interner_1 = Interner::new(); +/// let interner_2 = Interner::new(); +/// // Even though both values are identical, their interned forms do not +/// // compare equal as they use different interner instances. +/// assert_ne!(interner_1.intern(&Value(42)), interner_2.intern(&Value(42))); +/// ``` +pub struct Interned<T: ?Sized + 'static>(pub &'static T); + +impl<T: ?Sized> Deref for Interned<T> { + type Target = T; + + fn deref(&self) -> &Self::Target { + self.0 + } +} + +impl<T: ?Sized> Clone for Interned<T> { + fn clone(&self) -> Self { + *self + } +} + +impl<T: ?Sized> Copy for Interned<T> {} + +// Two Interned<T> should only be equal if they are clones from the same instance. +// Therefore, we only use the pointer to determine equality. +impl<T: ?Sized + Internable> PartialEq for Interned<T> { + fn eq(&self, other: &Self) -> bool { + self.0.ref_eq(other.0) + } +} + +impl<T: ?Sized + Internable> Eq for Interned<T> {} + +// Important: This must be kept in sync with the PartialEq/Eq implementation +impl<T: ?Sized + Internable> Hash for Interned<T> { + fn hash<H: std::hash::Hasher>(&self, state: &mut H) { + self.0.ref_hash(state); + } +} + +impl<T: ?Sized + Debug> Debug for Interned<T> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.0.fmt(f) + } +} + +impl<T> From<&Interned<T>> for Interned<T> { + fn from(value: &Interned<T>) -> Self { + *value + } +} + +/// A trait for internable values. +/// +/// This is used by [`Interner<T>`] to create static references for values that are interned. +pub trait Internable: Hash + Eq { + /// Creates a static reference to `self`, possibly leaking memory. + fn leak(&self) -> &'static Self; + + /// Returns `true` if the two references point to the same value. + fn ref_eq(&self, other: &Self) -> bool; + + /// Feeds the reference to the hasher. + fn ref_hash<H: std::hash::Hasher>(&self, state: &mut H); +} + +impl Internable for str { + fn leak(&self) -> &'static Self { + let str = self.to_owned().into_boxed_str(); + Box::leak(str) + } + + fn ref_eq(&self, other: &Self) -> bool { + self.as_ptr() == other.as_ptr() && self.len() == other.len() + } + + fn ref_hash<H: std::hash::Hasher>(&self, state: &mut H) { + self.len().hash(state); + self.as_ptr().hash(state); + } +} + +/// A thread-safe interner which can be used to create [`Interned<T>`] from `&T` +/// +/// For details on interning, see [the module level docs](self). +/// +/// The implementation ensures that two equal values return two equal [`Interned<T>`] values. +/// +/// To use an [`Interner<T>`], `T` must implement [`Internable`]. +pub struct Interner<T: ?Sized + 'static>(OnceLock<RwLock<HashSet<&'static T>>>); + +impl<T: ?Sized> Interner<T> { + /// Creates a new empty interner + pub const fn new() -> Self { + Self(OnceLock::new()) + } +} + +impl<T: Internable + ?Sized> Interner<T> { + /// Return the [`Interned<T>`] corresponding to `value`. + /// + /// If it is called the first time for `value`, it will possibly leak the value and return an + /// [`Interned<T>`] using the obtained static reference. Subsequent calls for the same `value` + /// will return [`Interned<T>`] using the same static reference. + pub fn intern(&self, value: &T) -> Interned<T> { + let lock = self.0.get_or_init(Default::default); + { + let set = lock.read().unwrap_or_else(PoisonError::into_inner); + if let Some(value) = set.get(value) { + return Interned(*value); + } + } + { + let mut set = lock.write().unwrap_or_else(PoisonError::into_inner); + if let Some(value) = set.get(value) { + Interned(*value) + } else { + let leaked = value.leak(); + set.insert(leaked); + Interned(leaked) + } + } + } +} + +impl<T: ?Sized> Default for Interner<T> { + fn default() -> Self { + Self::new() + } +} + +#[cfg(test)] +mod tests { + use std::{ + collections::hash_map::DefaultHasher, + hash::{Hash, Hasher}, + }; + + use crate::intern::{Internable, Interned, Interner}; + + #[test] + fn zero_sized_type() { + #[derive(PartialEq, Eq, Hash, Debug)] + pub struct A; + + impl Internable for A { + fn leak(&self) -> &'static Self { + &A + } + + fn ref_eq(&self, other: &Self) -> bool { + std::ptr::eq(self, other) + } + + fn ref_hash<H: std::hash::Hasher>(&self, state: &mut H) { + std::ptr::hash(self, state); + } + } + + let interner = Interner::default(); + let x = interner.intern(&A); + let y = interner.intern(&A); + assert_eq!(x, y); + } + + #[test] + fn fieldless_enum() { + #[derive(PartialEq, Eq, Hash, Debug, Clone)] + pub enum A { + X, + Y, + } + + impl Internable for A { + fn leak(&self) -> &'static Self { + match self { + A::X => &A::X, + A::Y => &A::Y, + } + } + + fn ref_eq(&self, other: &Self) -> bool { + std::ptr::eq(self, other) + } + + fn ref_hash<H: std::hash::Hasher>(&self, state: &mut H) { + std::ptr::hash(self, state); + } + } + + let interner = Interner::default(); + let x = interner.intern(&A::X); + let y = interner.intern(&A::Y); + assert_ne!(x, y); + } + + #[test] + fn static_sub_strings() { + let str = "ABC ABC"; + let a = &str[0..3]; + let b = &str[4..7]; + // Same contents + assert_eq!(a, b); + let x = Interned(a); + let y = Interned(b); + // Different pointers + assert_ne!(x, y); + let interner = Interner::default(); + let x = interner.intern(a); + let y = interner.intern(b); + // Same pointers returned by interner + assert_eq!(x, y); + } + + #[test] + fn same_interned_instance() { + let a = Interned("A"); + let b = a; + + assert_eq!(a, b); + + let mut hasher = DefaultHasher::default(); + a.hash(&mut hasher); + let hash_a = hasher.finish(); + + let mut hasher = DefaultHasher::default(); + b.hash(&mut hasher); + let hash_b = hasher.finish(); + + assert_eq!(hash_a, hash_b); + } + + #[test] + fn same_interned_content() { + let a = Interned::<str>(Box::leak(Box::new("A".to_string()))); + let b = Interned::<str>(Box::leak(Box::new("A".to_string()))); + + assert_ne!(a, b); + } + + #[test] + fn different_interned_content() { + let a = Interned::<str>("A"); + let b = Interned::<str>("B"); + + assert_ne!(a, b); + } +}
Revisit labels again ## What problem does this solve or what need does it fill? #4957 made labels much cheaper, but also made them much less capable. By nature, the design moves away from using `Hash` and `PartialEq` impls to using `(TypeId, &'static str)` tuples for comparisons. (#5377 recovers constant-time performance by adding a `u64`, so the `&'static str` or formatter can just be there for log/debug purposes). Beyond simple fieldless enum variants, this change basically prevents using different *values* to mean different labels, e.g. `MyLabel(T)`, which I think is a big ergonomics hit. Under bevyengine/rfcs#45, the plan for state machines is to facilitate linking each state to a pair of on-enter and on-exit schedules, which would run from within an exclusive system handling state transitions. The implementation for this in #4391 was looking extremely simple. ```rust pub struct CurrentState(pub S); pub struct NextState(pub S); pub struct PrevState(pub S); #[derive(SystemLabel)] pub struct OnEnter<S: State>(pub S); #[derive(SystemLabel)] pub struct OnExit<S: State>(pub S); pub fn apply_state_transition<S: State>(world: &mut World) { world.resource_scope(|world, mut state: Mut<CurrentState<S>>| { if world.resource::<NextState<S>>().0.is_some() { let new_state = world.resource_mut::<NextState<S>>().0.take().unwrap(); let old_state = std::mem::replace(&mut state.0, new_state.clone()); world.resource_mut::<PrevState<S>>().0 = Some(old_state.clone()); run_schedule(OnExit(old_state), world); run_schedule(OnEnter(new_state), world); } }); } ``` ```rust pub fn run_schedule(system_set: impl SystemLabel, world: &mut World) { let systems = world.resource_mut::<Systems>(); let schedule = systems.take_schedule(&system_set)); schedule.run(world); let systems = world.resource_mut::<Systems>(); systems.return_schedule(&system_set, schedule); } ``` The `apply_state_transition` system just reads the state resources, then loads and runs their appropriate schedules (if they exist). What was really nice was that it was just a convenient export of something users could do on their own. However, this is no longer possible, and I'm not sure how to adapt it for the current 0.8 build. Since I don't know `S`, I don't know how to produce a unique `&'static str` / `u64` for each label value. There's probably some way to do it, but having to do a special manual impl for a simple wrapper type feels ridiculous. As one of its main authors, I believe that what's coming with stageless will lead to apps having more labels, so increasing friction here by reducing what users can do with even POD types seems counterproductive. It's true that schedule construction had too much boxing, but those costs were infrequent, basically once at startup, so I'm skeptical the tradeoff we made was worth it. ## What solution would you like? I haven't figured out an obvious solution yet, but the essence of the problem is that: 1. bevy wants plain integers for efficient schedule construction 2. user wants names for logging/debugging All the boxing happened in the [descriptor API methods][1], where we had to collect all `SystemLabel` trait objects into a struct before handing it to the `SystemStage`, so we ended up boxing each and every use of a label. (edit) Removing that excessive boxing seems to have been the main reason people supported the new scheme. Since `add_system` is a method on `SystemStage`, could we add a `HashMap<SystemLabelId, Box<dyn SystemLabel>>` field and somehow pass a `&mut` reference to it into the descriptor process? If we can do that, we'd only box each label once and different values could mean different labels again. The `*LabelId` types can just wrap `(type_id, value_hash)` tuples (currently same size as a `u128`). ## What alternative(s) have you considered? 1. Same solution as above, except initialize the map as a static variable, e.g. using a `OnceCell`, and have the descriptor methods access that. It's fine for a system label value to have the same ID, program-wide. 2. Revert the changes. Slightly faster schedule construction isn't all that important if it only happens once or twice. 3. Stay the course and add some magic macro attributes to enable some common patterns. [1]: https://github.com/bevyengine/bevy/blob/b1c3e9862d06f5d8ec0fca3ce20d7318cff2d456/crates/bevy_ecs/src/schedule/system_descriptor.rs `ScheduleLabel` proc macro produces code that requires additional dependency apart from its originating crate ## Bevy version 0.11 and/or main branch ## What you did Put ```rust use bevy_ecs::schedule::ScheduleLabel; #[derive(ScheduleLabel, Clone, Debug, PartialEq, Eq, Hash)] pub struct Render; ``` in my bevy mod/plugin project ## What went wrong ``` error[E0433]: failed to resolve: use of undeclared crate or module `bevy_utils` --> src\render_schedule.rs:3:10 | 3 | #[derive(ScheduleLabel, Clone, Debug, PartialEq, Eq, Hash)] | ^^^^^^^^^^^^^ use of undeclared crate or module `bevy_utils` | = note: this error originates in the derive macro `ScheduleLabel` (in Nightly builds, run with -Z macro-backtrace for more info) ``` The code generated by the macro contains ```rust fn as_dyn_eq(&self) -> &dyn bevy_utils::label::DynEq { self } ``` but I don't have `bevy_utils` in scope or even as a dependency. It's unclear to me why a derive from `bevy_ecs` should produce code that requires an entirely different crate to work. Typically if macros require types from other crates to work, they re-export them and refer to them by their re-exported path. ## Additional information My Cargo.toml only has ```toml # Same thing happens with Bevy's git@main bevy_app = { version = "0.11" } bevy_ecs = { version = "0.11" } ``` because those are the only bits of Bevy my crate needs. Or so I thought, anyway.
> 1. Just initialize the map as a static variable, e.g. using a OnceCell, and have our descriptor methods use that. This is possible under #5377, and it could be made much easier (and derivable) with some design changes. Most label types are incredibly simple and don't need boxing, so we should only box the types that actually need it IMO. > This is possible under #5377. #5377 continues #4957 though, doesn't it? I want to return to a state where different values mean different labels, without macro attributes, etc. I think it's fine if label types have to be POD, but that's an irrelevant detail. Alternative 1 is the same idea as the rest of the post, except we wouldn't pass around a reference to the map, it would just be a global variable. Like, instead of trying to make the ID type handle everything awkwardly, I would prefer we intern one `Box<dyn SystemLabel>` for each label (but just one), so the ID can just be an ID, and we can lookup the boxed trait object if we need to print something. ```rust // the `u64` here would be a hash of the value pub struct SystemLabelId(TypeId, u64);` ``` > #5377 continues #4957 though, doesn't it? If it solves the problem, I don't see why that's a concern. > Alternative 1 is the same idea as the rest of the post, except we wouldn't pass around a reference to the map, it would just be a global variable. We don't need anything complex like that. Here's an example of a basic label that we should all be familiar with. Since it's so basic, heap allocations aren't necessary. I believe that the vast majority of labels will look like this. ```rust #[derive(SystemLabel)] pub struct MyLabel; ``` Here's an (approximate) example of a more-complex label, which must be stored on the heap. We can do that without having to change the design of the label traits. ```rust pub struct OurLabel(Vec<i32>); static MAP: RwLock<HashMap<u64, Vec<i32>>> = stuff(); impl SystemLabel for OurLabel { fn data(&self) -> u64 { let hash = calculate_hash(&self.0); MAP.write().entry(hash).or_insert_with(|| self.0.clone()); hash } fn fmt(data: u64, f: &mut Formatter) -> fmt::Result { let val = MAP.read().get(&data)?; write!(f, "{val:?}") } } // I believe this can be made even simpler even, hashing ID's might not be necessary. // I'd have to iterate. ``` We don't need to force every label to allocate, we can do it as an implementation detail for some types. This isn't currently supported by the derive macro, but it can be. Does this solve your problem? **Edit:** Downcasting is even possible, and ergonomic. Gonna try and revive this thread -- I think we should consider making a decision on this issue. We need to resolve the current usability problems with labels, but should we improve upon #4957, or should we revert it? Reverting it would make deriving labels really annoying again (`#[derive(SystemLabel, Clone, PartialEq, Eq, Hash)]`), but it would also remove all of the current limitations. If we want to keep #4957, we could try to make improvements to gradually lift limitations, but we could never lift them entirely. I think either direction is acceptable. I'm thinking we should do this for all label traits: - Make them require `Debug`. - Use the `u64` returned by `DynHash` (plus `TypeId` if there's risk of collision) to distinguish between labels. - Leak and intern the `Debug` string as a `Cow<'static, str>` in a static map to avoid all the boxing. Something like this: ```rust /// `TypeId` + output of `DynHash` given the `DefaultHasher`. /// Is different for every value. struct RawValueHash(TypeId, u64); /// Lightweight + printable identifier. pub struct MyLabelTraitId { hash: RawValueHash, str: &'static str, // Can also use the hash to pull from the map instead of caching it here. } ``` Basically a mix of stuff we've talked about before. We'd allocate one string for every label (upon first use), except in cases where we already have a `&'static str` (e.g. system type names). The hashing can be a blanket impl and the interning can be a default impl, so the derivable label traits just have to provide a method for sticking them in strongly-typed wrappers. > interning can be a default impl Like this, I believe. ```rust type Interner = RwLock<HashMap<RawValueHash, Cow<'static, str>>>; static INTERNER: OnceCell<Interner> = OnceCell::new(); pub trait SystemSet: DynHash + Debug { fn id(&self) -> SystemSetId { let key = self.hash(); let mut map = INTERNER.get_or_init(|| default()).write().unwrap(); let str = map .entry(key) .or_insert_with(|| { // Things like system-type sets can implement this differently to skip the heap allocation. let string = format!("{:?}", self); let str: &'static mut str = string.into_boxed_str().leak(); str.into() }) .deref(); SystemSetId::new(key, str) } } ``` Like I think minimizing heap allocations is a win even if there is still one per label. If done this way, manually implementing the trait is almost never required. All of our label traits can even share this one map. It sucks that the derive ends up being long, but I'd rather that than trying to workaround limitations. Is it possible to have an attribute macro that fills in the missing derives? > Is it possible to have an attribute macro that fills in the missing derives? We could just make `#[derive(SystemSet)]` generate a basic `Hash` impl in addition to the `SystemSet` impl. That derive should be very trivial to include, although we'd probably want a way of opting out from deriving any extra traits.
2023-02-20T13:41:42Z
1.70
2023-10-25T22:02:30Z
6f27e0e35faffbf2b77807bb222d3d3a9a529210
[ "plugin_group::tests::add_after", "plugin_group::tests::add_before", "plugin_group::tests::basic_ordering", "plugin_group::tests::readd", "plugin_group::tests::readd_after", "plugin_group::tests::readd_before", "app::tests::cant_add_twice_the_same_plugin - should panic", "app::tests::cant_call_app_run_from_plugin_build - should panic" ]
[ "short_names::name_formatting_tests::enums", "short_names::name_formatting_tests::array_type", "short_names::name_formatting_tests::multiple_type_parameters", "short_names::name_formatting_tests::generics", "short_names::name_formatting_tests::nested_generics", "short_names::name_formatting_tests::path_separated", "short_names::name_formatting_tests::sub_path_after_closing_bracket", "short_names::name_formatting_tests::trivial", "short_names::name_formatting_tests::trivial_generics", "short_names::name_formatting_tests::tuple_type", "crates/bevy_utils/src/default.rs - default::default (line 3)", "crates/bevy_utils/src/syncunsafecell.rs - syncunsafecell::SyncUnsafeCell<[T]>::as_slice_of_cells (line 93)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,575
bevyengine__bevy-7575
[ "5101" ]
c3627248f5bdac9b00666b9170e6bfa575794631
diff --git a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml --- a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml +++ b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml @@ -23,4 +23,3 @@ syn = { version = "2.0", features = ["full"] } proc-macro2 = "1.0" quote = "1.0" uuid = { version = "1.1", features = ["v4"] } -bit-set = "0.5.2" diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -1,11 +1,11 @@ use crate::container_attributes::{FromReflectAttrs, ReflectTraits}; use crate::field_attributes::{parse_field_attrs, ReflectFieldAttr}; use crate::type_path::parse_path_no_leading_colon; -use crate::utility::{members_to_serialization_denylist, StringExpr, WhereClauseOptions}; -use bit_set::BitSet; +use crate::utility::{StringExpr, WhereClauseOptions}; use quote::{quote, ToTokens}; use syn::token::Comma; +use crate::serialization::SerializationDataDef; use crate::{ utility, REFLECT_ATTRIBUTE_NAME, REFLECT_VALUE_ATTRIBUTE_NAME, TYPE_NAME_ATTRIBUTE_NAME, TYPE_PATH_ATTRIBUTE_NAME, diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -65,7 +65,7 @@ pub(crate) struct ReflectMeta<'a> { /// ``` pub(crate) struct ReflectStruct<'a> { meta: ReflectMeta<'a>, - serialization_denylist: BitSet<u32>, + serialization_data: Option<SerializationDataDef>, fields: Vec<StructField<'a>>, } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -95,7 +95,14 @@ pub(crate) struct StructField<'a> { /// The reflection-based attributes on the field. pub attrs: ReflectFieldAttr, /// The index of this field within the struct. - pub index: usize, + pub declaration_index: usize, + /// The index of this field as seen by the reflection API. + /// + /// This index accounts for the removal of [ignored] fields. + /// It will only be `Some(index)` when the field is not ignored. + /// + /// [ignored]: crate::field_attributes::ReflectIgnoreBehavior::IgnoreAlways + pub reflection_index: Option<usize>, /// The documentation for this field, if any #[cfg(feature = "documentation")] pub doc: crate::documentation::Documentation, diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -272,9 +279,7 @@ impl<'a> ReflectDerive<'a> { let fields = Self::collect_struct_fields(&data.fields)?; let reflect_struct = ReflectStruct { meta, - serialization_denylist: members_to_serialization_denylist( - fields.iter().map(|v| v.attrs.ignore), - ), + serialization_data: SerializationDataDef::new(&fields)?, fields, }; diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -308,19 +313,31 @@ impl<'a> ReflectDerive<'a> { } fn collect_struct_fields(fields: &'a Fields) -> Result<Vec<StructField<'a>>, syn::Error> { + let mut active_index = 0; let sifter: utility::ResultSifter<StructField<'a>> = fields .iter() .enumerate() - .map(|(index, field)| -> Result<StructField, syn::Error> { - let attrs = parse_field_attrs(&field.attrs)?; - Ok(StructField { - index, - attrs, - data: field, - #[cfg(feature = "documentation")] - doc: crate::documentation::Documentation::from_attributes(&field.attrs), - }) - }) + .map( + |(declaration_index, field)| -> Result<StructField, syn::Error> { + let attrs = parse_field_attrs(&field.attrs)?; + + let reflection_index = if attrs.ignore.is_ignored() { + None + } else { + active_index += 1; + Some(active_index - 1) + }; + + Ok(StructField { + declaration_index, + reflection_index, + attrs, + data: field, + #[cfg(feature = "documentation")] + doc: crate::documentation::Documentation::from_attributes(&field.attrs), + }) + }, + ) .fold( utility::ResultSifter::default(), utility::ResultSifter::fold, diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -420,12 +437,9 @@ impl<'a> ReflectStruct<'a> { &self.meta } - /// Access the data about which fields should be ignored during serialization. - /// - /// The returned bitset is a collection of indices obtained from the [`members_to_serialization_denylist`] function. - #[allow(dead_code)] - pub fn serialization_denylist(&self) -> &BitSet<u32> { - &self.serialization_denylist + /// Returns the [`SerializationDataDef`] for this struct. + pub fn serialization_data(&self) -> Option<&SerializationDataDef> { + self.serialization_data.as_ref() } /// Returns the `GetTypeRegistration` impl as a `TokenStream`. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -438,7 +452,7 @@ impl<'a> ReflectStruct<'a> { crate::registration::impl_get_type_registration( self.meta(), where_clause_options, - Some(&self.serialization_denylist), + self.serialization_data(), ) } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -189,7 +189,7 @@ fn get_ignored_fields(reflect_struct: &ReflectStruct) -> MemberValuePair { reflect_struct .ignored_fields() .map(|field| { - let member = ident_or_index(field.data.ident.as_ref(), field.index); + let member = ident_or_index(field.data.ident.as_ref(), field.declaration_index); let value = match &field.attrs.default { DefaultBehavior::Func(path) => quote! {#path()}, diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/from_reflect.rs @@ -218,8 +218,12 @@ fn get_active_fields( reflect_struct .active_fields() .map(|field| { - let member = ident_or_index(field.data.ident.as_ref(), field.index); - let accessor = get_field_accessor(field.data, field.index, is_tuple); + let member = ident_or_index(field.data.ident.as_ref(), field.declaration_index); + let accessor = get_field_accessor( + field.data, + field.reflection_index.expect("field should be active"), + is_tuple, + ); let ty = field.data.ty.clone(); let get_field = quote! { diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs b/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs @@ -346,7 +346,11 @@ fn generate_impls(reflect_enum: &ReflectEnum, ref_index: &Ident, ref_name: &Iden // Ignored field continue; } - constructor_argument.push(generate_for_field(reflect_idx, field.index, field)); + constructor_argument.push(generate_for_field( + reflect_idx, + field.declaration_index, + field, + )); reflect_idx += 1; } constructor_argument diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/impls/structs.rs b/crates/bevy_reflect/bevy_reflect_derive/src/impls/structs.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/impls/structs.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/impls/structs.rs @@ -19,12 +19,12 @@ pub(crate) fn impl_struct(reflect_struct: &ReflectStruct) -> proc_macro2::TokenS .ident .as_ref() .map(|i| i.to_string()) - .unwrap_or_else(|| field.index.to_string()) + .unwrap_or_else(|| field.declaration_index.to_string()) }) .collect::<Vec<String>>(); let field_idents = reflect_struct .active_fields() - .map(|field| ident_or_index(field.data.ident.as_ref(), field.index)) + .map(|field| ident_or_index(field.data.ident.as_ref(), field.declaration_index)) .collect::<Vec<_>>(); let field_types = reflect_struct.active_types(); let field_count = field_idents.len(); diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/impls/tuple_structs.rs b/crates/bevy_reflect/bevy_reflect_derive/src/impls/tuple_structs.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/impls/tuple_structs.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/impls/tuple_structs.rs @@ -14,7 +14,7 @@ pub(crate) fn impl_tuple_struct(reflect_struct: &ReflectStruct) -> proc_macro2:: let field_idents = reflect_struct .active_fields() - .map(|field| Member::Unnamed(Index::from(field.index))) + .map(|field| Member::Unnamed(Index::from(field.declaration_index))) .collect::<Vec<_>>(); let field_types = reflect_struct.active_types(); let field_count = field_idents.len(); diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -24,6 +24,7 @@ mod from_reflect; mod impls; mod reflect_value; mod registration; +mod serialization; mod trait_reflection; mod type_path; mod type_uuid; diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -201,8 +202,10 @@ pub fn derive_reflect(input: TokenStream) -> TokenStream { }; TokenStream::from(quote! { - #reflect_impls - #from_reflect_impl + const _: () = { + #reflect_impls + #from_reflect_impl + }; }) } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -241,15 +244,20 @@ pub fn derive_from_reflect(input: TokenStream) -> TokenStream { Err(err) => return err.into_compile_error().into(), }; - match derive_data { + let from_reflect_impl = match derive_data { ReflectDerive::Struct(struct_data) | ReflectDerive::UnitStruct(struct_data) => { from_reflect::impl_struct(&struct_data) } ReflectDerive::TupleStruct(struct_data) => from_reflect::impl_tuple_struct(&struct_data), ReflectDerive::Enum(meta) => from_reflect::impl_enum(&meta), ReflectDerive::Value(meta) => from_reflect::impl_value(&meta), - } - .into() + }; + + TokenStream::from(quote! { + const _: () = { + #from_reflect_impl + }; + }) } /// Derives the `TypePath` trait, providing a stable alternative to [`std::any::type_name`]. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -275,21 +283,31 @@ pub fn derive_type_path(input: TokenStream) -> TokenStream { Err(err) => return err.into_compile_error().into(), }; - impls::impl_type_path( + let type_path_impl = impls::impl_type_path( derive_data.meta(), // Use `WhereClauseOptions::new_value` here so we don't enforce reflection bounds &WhereClauseOptions::new_value(derive_data.meta()), - ) - .into() + ); + + TokenStream::from(quote! { + const _: () = { + #type_path_impl + }; + }) } // From https://github.com/randomPoison/type-uuid #[proc_macro_derive(TypeUuid, attributes(uuid))] pub fn derive_type_uuid(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as DeriveInput); - type_uuid::type_uuid_derive(input) - .unwrap_or_else(syn::Error::into_compile_error) - .into() + let uuid_impl = + type_uuid::type_uuid_derive(input).unwrap_or_else(syn::Error::into_compile_error); + + TokenStream::from(quote! { + const _: () = { + #uuid_impl + }; + }) } /// A macro that automatically generates type data for traits, which their implementors can then register. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -401,8 +419,10 @@ pub fn impl_reflect_value(input: TokenStream) -> TokenStream { let from_reflect_impl = from_reflect::impl_value(&meta); TokenStream::from(quote! { - #reflect_impls - #from_reflect_impl + const _: () = { + #reflect_impls + #from_reflect_impl + }; }) } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -446,7 +466,7 @@ pub fn impl_reflect_struct(input: TokenStream) -> TokenStream { Err(err) => return err.into_compile_error().into(), }; - match derive_data { + let output = match derive_data { ReflectDerive::Struct(struct_data) => { if !struct_data.meta().type_path().has_custom_path() { return syn::Error::new( diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -460,27 +480,30 @@ pub fn impl_reflect_struct(input: TokenStream) -> TokenStream { let impl_struct = impls::impl_struct(&struct_data); let impl_from_struct = from_reflect::impl_struct(&struct_data); - TokenStream::from(quote! { + quote! { #impl_struct #impl_from_struct - }) + } } ReflectDerive::TupleStruct(..) => syn::Error::new( ast.span(), "impl_reflect_struct does not support tuple structs", ) - .into_compile_error() - .into(), + .into_compile_error(), ReflectDerive::UnitStruct(..) => syn::Error::new( ast.span(), "impl_reflect_struct does not support unit structs", ) - .into_compile_error() - .into(), + .into_compile_error(), _ => syn::Error::new(ast.span(), "impl_reflect_struct only supports structs") - .into_compile_error() - .into(), - } + .into_compile_error(), + }; + + TokenStream::from(quote! { + const _: () = { + #output + }; + }) } /// A macro used to generate a `FromReflect` trait implementation for the given type. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -521,7 +544,14 @@ pub fn impl_from_reflect_value(input: TokenStream) -> TokenStream { } }; - from_reflect::impl_value(&ReflectMeta::new(type_path, def.traits.unwrap_or_default())).into() + let from_reflect_impl = + from_reflect::impl_value(&ReflectMeta::new(type_path, def.traits.unwrap_or_default())); + + TokenStream::from(quote! { + const _: () = { + #from_reflect_impl + }; + }) } /// A replacement for [deriving `TypePath`] for use on foreign types. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/lib.rs @@ -583,12 +613,24 @@ pub fn impl_type_path(input: TokenStream) -> TokenStream { let meta = ReflectMeta::new(type_path, ReflectTraits::default()); - impls::impl_type_path(&meta, &WhereClauseOptions::new_value(&meta)).into() + let type_path_impl = impls::impl_type_path(&meta, &WhereClauseOptions::new_value(&meta)); + + TokenStream::from(quote! { + const _: () = { + #type_path_impl + }; + }) } /// Derives `TypeUuid` for the given type. This is used internally to implement `TypeUuid` on foreign types, such as those in the std. This macro should be used in the format of `<[Generic Params]> [Type (Path)], [Uuid (String Literal)]`. #[proc_macro] pub fn impl_type_uuid(input: TokenStream) -> TokenStream { let def = parse_macro_input!(input as type_uuid::TypeUuidDef); - type_uuid::gen_impl_type_uuid(def).into() + let uuid_impl = type_uuid::gen_impl_type_uuid(def); + + TokenStream::from(quote! { + const _: () = { + #uuid_impl + }; + }) } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs @@ -1,8 +1,8 @@ //! Contains code related specifically to Bevy's type registration. use crate::derive_data::ReflectMeta; +use crate::serialization::SerializationDataDef; use crate::utility::{extend_where_clause, WhereClauseOptions}; -use bit_set::BitSet; use quote::quote; /// Creates the `GetTypeRegistration` impl for the given type data. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs @@ -10,7 +10,7 @@ use quote::quote; pub(crate) fn impl_get_type_registration( meta: &ReflectMeta, where_clause_options: &WhereClauseOptions, - serialization_denylist: Option<&BitSet<u32>>, + serialization_data: Option<&SerializationDataDef>, ) -> proc_macro2::TokenStream { let type_path = meta.type_path(); let bevy_reflect_path = meta.bevy_reflect_path(); diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs @@ -20,17 +20,16 @@ pub(crate) fn impl_get_type_registration( let from_reflect_data = if meta.from_reflect().should_auto_derive() { Some(quote! { - registration.insert::<#bevy_reflect_path::ReflectFromReflect>(#bevy_reflect_path::FromType::<Self>::from_type()); + registration.insert::<#bevy_reflect_path::ReflectFromReflect>(#bevy_reflect_path::FromType::<Self>::from_type()); }) } else { None }; - let serialization_data = serialization_denylist.map(|denylist| { - let denylist = denylist.into_iter(); + let serialization_data = serialization_data.map(|data| { + let serialization_data = data.as_serialization_data(bevy_reflect_path); quote! { - let ignored_indices = ::core::iter::IntoIterator::into_iter([#(#denylist),*]); - registration.insert::<#bevy_reflect_path::serde::SerializationData>(#bevy_reflect_path::serde::SerializationData::new(ignored_indices)); + registration.insert::<#bevy_reflect_path::serde::SerializationData>(#serialization_data); } }); diff --git /dev/null b/crates/bevy_reflect/bevy_reflect_derive/src/serialization.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_reflect/bevy_reflect_derive/src/serialization.rs @@ -0,0 +1,91 @@ +use crate::derive_data::StructField; +use crate::field_attributes::{DefaultBehavior, ReflectIgnoreBehavior}; +use bevy_macro_utils::fq_std::{FQBox, FQDefault}; +use quote::quote; +use std::collections::HashMap; +use syn::spanned::Spanned; +use syn::Path; + +type ReflectionIndex = usize; + +/// Collected serialization data used to generate a `SerializationData` type. +pub(crate) struct SerializationDataDef { + /// Maps a field's _reflection_ index to its [`SkippedFieldDef`] if marked as `#[reflect(skip_serializing)]`. + skipped: HashMap<ReflectionIndex, SkippedFieldDef>, +} + +impl SerializationDataDef { + /// Attempts to create a new `SerializationDataDef` from the given collection of fields. + /// + /// Returns `Ok(Some(data))` if there are any fields needing to be skipped during serialization. + /// Otherwise, returns `Ok(None)`. + pub fn new(fields: &[StructField<'_>]) -> Result<Option<Self>, syn::Error> { + let mut skipped = HashMap::default(); + + for field in fields { + match field.attrs.ignore { + ReflectIgnoreBehavior::IgnoreSerialization => { + skipped.insert( + field.reflection_index.ok_or_else(|| { + syn::Error::new( + field.data.span(), + "internal error: field is missing a reflection index", + ) + })?, + SkippedFieldDef::new(field)?, + ); + } + _ => continue, + } + } + + if skipped.is_empty() { + Ok(None) + } else { + Ok(Some(Self { skipped })) + } + } + + /// Returns a `TokenStream` containing an initialized `SerializationData` type. + pub fn as_serialization_data(&self, bevy_reflect_path: &Path) -> proc_macro2::TokenStream { + let fields = + self.skipped + .iter() + .map(|(reflection_index, SkippedFieldDef { default_fn })| { + quote! {( + #reflection_index, + #bevy_reflect_path::serde::SkippedField::new(#default_fn) + )} + }); + quote! { + #bevy_reflect_path::serde::SerializationData::new( + ::core::iter::IntoIterator::into_iter([#(#fields),*]) + ) + } + } +} + +/// Collected field data used to generate a `SkippedField` type. +pub(crate) struct SkippedFieldDef { + /// The default function for this field. + /// + /// This is of type `fn() -> Box<dyn Reflect>`. + default_fn: proc_macro2::TokenStream, +} + +impl SkippedFieldDef { + pub fn new(field: &StructField<'_>) -> Result<Self, syn::Error> { + let ty = &field.data.ty; + + let default_fn = match &field.attrs.default { + DefaultBehavior::Func(func) => quote! { + || { #FQBox::new(#func()) } + }, + _ => quote! { + || { #FQBox::new(<#ty as #FQDefault>::default()) } + }, + }; + + Ok(Self { default_fn }) + } +} diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs @@ -1,12 +1,10 @@ //! General-purpose utility functions for internal usage within this crate. use crate::derive_data::{ReflectMeta, StructField}; -use crate::field_attributes::ReflectIgnoreBehavior; use bevy_macro_utils::{ fq_std::{FQAny, FQOption, FQSend, FQSync}, BevyManifest, }; -use bit_set::BitSet; use proc_macro2::{Ident, Span}; use quote::{quote, ToTokens}; use syn::{spanned::Spanned, LitStr, Member, Path, Type, WhereClause}; diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs @@ -286,42 +284,6 @@ impl<T> ResultSifter<T> { } } -/// Converts an iterator over ignore behavior of members to a bitset of ignored members. -/// -/// Takes into account the fact that always ignored (non-reflected) members are skipped. -/// -/// # Example -/// ```rust,ignore -/// pub struct HelloWorld { -/// reflected_field: u32 // index: 0 -/// -/// #[reflect(ignore)] -/// non_reflected_field: u32 // index: N/A (not 1!) -/// -/// #[reflect(skip_serializing)] -/// non_serialized_field: u32 // index: 1 -/// } -/// ``` -/// Would convert to the `0b01` bitset (i.e second field is NOT serialized) -/// -pub(crate) fn members_to_serialization_denylist<T>(member_iter: T) -> BitSet<u32> -where - T: Iterator<Item = ReflectIgnoreBehavior>, -{ - let mut bitset = BitSet::default(); - - member_iter.fold(0, |next_idx, member| match member { - ReflectIgnoreBehavior::IgnoreAlways => next_idx, - ReflectIgnoreBehavior::IgnoreSerialization => { - bitset.insert(next_idx); - next_idx + 1 - } - ReflectIgnoreBehavior::None => next_idx + 1, - }); - - bitset -} - /// Turns an `Option<TokenStream>` into a `TokenStream` for an `Option`. pub(crate) fn wrap_in_option(tokens: Option<proc_macro2::TokenStream>) -> proc_macro2::TokenStream { match tokens { diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -2,9 +2,8 @@ use crate::serde::SerializationData; use crate::{ ArrayInfo, DynamicArray, DynamicEnum, DynamicList, DynamicMap, DynamicStruct, DynamicTuple, DynamicTupleStruct, DynamicVariant, EnumInfo, ListInfo, Map, MapInfo, NamedField, Reflect, - ReflectDeserialize, StructInfo, StructVariantInfo, Tuple, TupleInfo, TupleStruct, - TupleStructInfo, TupleVariantInfo, TypeInfo, TypeRegistration, TypeRegistry, UnnamedField, - VariantInfo, + ReflectDeserialize, StructInfo, StructVariantInfo, TupleInfo, TupleStructInfo, + TupleVariantInfo, TypeInfo, TypeRegistration, TypeRegistry, UnnamedField, VariantInfo, }; use erased_serde::Deserializer; use serde::de::{ diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -27,6 +26,8 @@ pub trait DeserializeValue { trait StructLikeInfo { fn get_path(&self) -> &str; fn get_field(&self, name: &str) -> Option<&NamedField>; + fn field_at(&self, index: usize) -> Option<&NamedField>; + fn get_field_len(&self) -> usize; fn iter_fields(&self) -> Iter<'_, NamedField>; } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -49,10 +50,18 @@ impl StructLikeInfo for StructInfo { self.type_path() } + fn field_at(&self, index: usize) -> Option<&NamedField> { + self.field_at(index) + } + fn get_field(&self, name: &str) -> Option<&NamedField> { self.field(name) } + fn get_field_len(&self) -> usize { + self.field_len() + } + fn iter_fields(&self) -> Iter<'_, NamedField> { self.iter() } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -80,10 +89,18 @@ impl StructLikeInfo for StructVariantInfo { self.name() } + fn field_at(&self, index: usize) -> Option<&NamedField> { + self.field_at(index) + } + fn get_field(&self, name: &str) -> Option<&NamedField> { self.field(name) } + fn get_field_len(&self) -> usize { + self.field_len() + } + fn iter_fields(&self) -> Iter<'_, NamedField> { self.iter() } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -120,6 +137,54 @@ impl TupleLikeInfo for TupleInfo { } } +impl Container for TupleInfo { + fn get_field_registration<'a, E: Error>( + &self, + index: usize, + registry: &'a TypeRegistry, + ) -> Result<&'a TypeRegistration, E> { + let field = self.field_at(index).ok_or_else(|| { + de::Error::custom(format_args!( + "no field at index {} on tuple {}", + index, + self.type_path(), + )) + })?; + get_registration(field.type_id(), field.type_path(), registry) + } +} + +impl TupleLikeInfo for TupleStructInfo { + fn get_path(&self) -> &str { + self.type_path() + } + + fn get_field(&self, index: usize) -> Option<&UnnamedField> { + self.field_at(index) + } + + fn get_field_len(&self) -> usize { + self.field_len() + } +} + +impl Container for TupleStructInfo { + fn get_field_registration<'a, E: Error>( + &self, + index: usize, + registry: &'a TypeRegistry, + ) -> Result<&'a TypeRegistration, E> { + let field = self.field_at(index).ok_or_else(|| { + de::Error::custom(format_args!( + "no field at index {} on tuple struct {}", + index, + self.type_path(), + )) + })?; + get_registration(field.type_id(), field.type_path(), registry) + } +} + impl TupleLikeInfo for TupleVariantInfo { fn get_path(&self) -> &str { self.name() diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -134,6 +199,23 @@ impl TupleLikeInfo for TupleVariantInfo { } } +impl Container for TupleVariantInfo { + fn get_field_registration<'a, E: Error>( + &self, + index: usize, + registry: &'a TypeRegistry, + ) -> Result<&'a TypeRegistration, E> { + let field = self.field_at(index).ok_or_else(|| { + de::Error::custom(format_args!( + "no field at index {} on tuple variant {}", + index, + self.name(), + )) + })?; + get_registration(field.type_id(), field.type_path(), registry) + } +} + /// A debug struct used for error messages that displays a list of expected values. /// /// # Example diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -444,6 +526,7 @@ impl<'a, 'de> DeserializeSeed<'de> for TypedReflectDeserializer<'a> { tuple_info.field_len(), TupleVisitor { tuple_info, + registration: self.registration, registry: self.registry, }, )?; diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -500,43 +583,14 @@ impl<'a, 'de> Visitor<'de> for StructVisitor<'a> { where V: MapAccess<'de>, { - visit_struct(&mut map, self.struct_info, self.registry) + visit_struct(&mut map, self.struct_info, self.registration, self.registry) } fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error> where A: SeqAccess<'de>, { - let mut index = 0usize; - let mut output = DynamicStruct::default(); - - let ignored_len = self - .registration - .data::<SerializationData>() - .map(|data| data.len()) - .unwrap_or(0); - let field_len = self.struct_info.field_len().saturating_sub(ignored_len); - - if field_len == 0 { - // Handle unit structs and ignored fields - return Ok(output); - } - - while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { - registration: self - .struct_info - .get_field_registration(index, self.registry)?, - registry: self.registry, - })? { - let name = self.struct_info.field_at(index).unwrap().name(); - output.insert_boxed(name, value); - index += 1; - if index >= self.struct_info.field_len() { - break; - } - } - - Ok(output) + visit_struct_seq(&mut seq, self.struct_info, self.registration, self.registry) } } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -557,64 +611,19 @@ impl<'a, 'de> Visitor<'de> for TupleStructVisitor<'a> { where V: SeqAccess<'de>, { - let mut index = 0usize; - let mut tuple_struct = DynamicTupleStruct::default(); - - let ignored_len = self - .registration - .data::<SerializationData>() - .map(|data| data.len()) - .unwrap_or(0); - let field_len = self - .tuple_struct_info - .field_len() - .saturating_sub(ignored_len); - - if field_len == 0 { - // Handle unit structs and ignored fields - return Ok(tuple_struct); - } - - let get_field_registration = |index: usize| -> Result<&'a TypeRegistration, V::Error> { - let field = self.tuple_struct_info.field_at(index).ok_or_else(|| { - de::Error::custom(format_args!( - "no field at index {} on tuple {}", - index, - self.tuple_struct_info.type_path(), - )) - })?; - get_registration(field.type_id(), field.type_path(), self.registry) - }; - - while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { - registration: get_field_registration(index)?, - registry: self.registry, - })? { - tuple_struct.insert_boxed(value); - index += 1; - if index >= self.tuple_struct_info.field_len() { - break; - } - } - - let ignored_len = self - .registration - .data::<SerializationData>() - .map(|data| data.len()) - .unwrap_or(0); - if tuple_struct.field_len() != self.tuple_struct_info.field_len() - ignored_len { - return Err(Error::invalid_length( - tuple_struct.field_len(), - &self.tuple_struct_info.field_len().to_string().as_str(), - )); - } - - Ok(tuple_struct) + visit_tuple( + &mut seq, + self.tuple_struct_info, + self.registration, + self.registry, + ) + .map(DynamicTupleStruct::from) } } struct TupleVisitor<'a> { tuple_info: &'static TupleInfo, + registration: &'a TypeRegistration, registry: &'a TypeRegistry, } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -629,7 +638,7 @@ impl<'a, 'de> Visitor<'de> for TupleVisitor<'a> { where V: SeqAccess<'de>, { - visit_tuple(&mut seq, self.tuple_info, self.registry) + visit_tuple(&mut seq, self.tuple_info, self.registration, self.registry) } } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -782,9 +791,7 @@ impl<'a, 'de> Visitor<'de> for EnumVisitor<'a> { )? .into(), VariantInfo::Tuple(tuple_info) if tuple_info.field_len() == 1 => { - let field = tuple_info.field_at(0).unwrap(); - let registration = - get_registration(field.type_id(), field.type_path(), self.registry)?; + let registration = tuple_info.get_field_registration(0, self.registry)?; let value = variant.newtype_variant_seed(TypedReflectDeserializer { registration, registry: self.registry, diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -879,43 +886,14 @@ impl<'a, 'de> Visitor<'de> for StructVariantVisitor<'a> { where V: MapAccess<'de>, { - visit_struct(&mut map, self.struct_info, self.registry) + visit_struct(&mut map, self.struct_info, self.registration, self.registry) } fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error> where A: SeqAccess<'de>, { - let mut index = 0usize; - let mut output = DynamicStruct::default(); - - let ignored_len = self - .registration - .data::<SerializationData>() - .map(|data| data.len()) - .unwrap_or(0); - let field_len = self.struct_info.field_len().saturating_sub(ignored_len); - - if field_len == 0 { - // Handle all fields being ignored - return Ok(output); - } - - while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { - registration: self - .struct_info - .get_field_registration(index, self.registry)?, - registry: self.registry, - })? { - let name = self.struct_info.field_at(index).unwrap().name(); - output.insert_boxed(name, value); - index += 1; - if index >= self.struct_info.field_len() { - break; - } - } - - Ok(output) + visit_struct_seq(&mut seq, self.struct_info, self.registration, self.registry) } } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -936,19 +914,7 @@ impl<'a, 'de> Visitor<'de> for TupleVariantVisitor<'a> { where V: SeqAccess<'de>, { - let ignored_len = self - .registration - .data::<SerializationData>() - .map(|data| data.len()) - .unwrap_or(0); - let field_len = self.tuple_info.field_len().saturating_sub(ignored_len); - - if field_len == 0 { - // Handle all fields being ignored - return Ok(DynamicTuple::default()); - } - - visit_tuple(&mut seq, self.tuple_info, self.registry) + visit_tuple(&mut seq, self.tuple_info, self.registration, self.registry) } } diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -1005,6 +971,7 @@ impl<'a, 'de> Visitor<'de> for OptionVisitor<'a> { fn visit_struct<'de, T, V>( map: &mut V, info: &'static T, + registration: &TypeRegistration, registry: &TypeRegistry, ) -> Result<DynamicStruct, V::Error> where diff --git a/crates/bevy_reflect/src/serde/de.rs b/crates/bevy_reflect/src/serde/de.rs --- a/crates/bevy_reflect/src/serde/de.rs +++ b/crates/bevy_reflect/src/serde/de.rs @@ -1029,49 +996,101 @@ where dynamic_struct.insert_boxed(&key, value); } + if let Some(serialization_data) = registration.data::<SerializationData>() { + for (skipped_index, skipped_field) in serialization_data.iter_skipped() { + let Some(field) = info.field_at(*skipped_index) else { + continue; + }; + dynamic_struct.insert_boxed(field.name(), skipped_field.generate_default()); + } + } + Ok(dynamic_struct) } fn visit_tuple<'de, T, V>( seq: &mut V, info: &T, + registration: &TypeRegistration, registry: &TypeRegistry, ) -> Result<DynamicTuple, V::Error> where - T: TupleLikeInfo, + T: TupleLikeInfo + Container, V: SeqAccess<'de>, { let mut tuple = DynamicTuple::default(); - let mut index = 0usize; - let get_field_registration = |index: usize| -> Result<&TypeRegistration, V::Error> { - let field = info.get_field(index).ok_or_else(|| { - Error::invalid_length(index, &info.get_field_len().to_string().as_str()) - })?; - get_registration(field.type_id(), field.type_path(), registry) - }; + let len = info.get_field_len(); - while let Some(value) = seq.next_element_seed(TypedReflectDeserializer { - registration: get_field_registration(index)?, - registry, - })? { - tuple.insert_boxed(value); - index += 1; - if index >= info.get_field_len() { - break; + if len == 0 { + // Handle empty tuple/tuple struct + return Ok(tuple); + } + + let serialization_data = registration.data::<SerializationData>(); + + for index in 0..len { + if let Some(value) = serialization_data.and_then(|data| data.generate_default(index)) { + tuple.insert_boxed(value); + continue; } + + let value = seq + .next_element_seed(TypedReflectDeserializer { + registration: info.get_field_registration(index, registry)?, + registry, + })? + .ok_or_else(|| Error::invalid_length(index, &len.to_string().as_str()))?; + tuple.insert_boxed(value); } + Ok(tuple) +} + +fn visit_struct_seq<'de, T, V>( + seq: &mut V, + info: &T, + registration: &TypeRegistration, + registry: &TypeRegistry, +) -> Result<DynamicStruct, V::Error> +where + T: StructLikeInfo + Container, + V: SeqAccess<'de>, +{ + let mut dynamic_struct = DynamicStruct::default(); + let len = info.get_field_len(); - if tuple.field_len() != len { - return Err(Error::invalid_length( - tuple.field_len(), - &len.to_string().as_str(), - )); + if len == 0 { + // Handle unit structs + return Ok(dynamic_struct); } - Ok(tuple) + let serialization_data = registration.data::<SerializationData>(); + + for index in 0..len { + let name = info.field_at(index).unwrap().name(); + + if serialization_data + .map(|data| data.is_field_skipped(index)) + .unwrap_or_default() + { + if let Some(value) = serialization_data.unwrap().generate_default(index) { + dynamic_struct.insert_boxed(name, value); + } + continue; + } + + let value = seq + .next_element_seed(TypedReflectDeserializer { + registration: info.get_field_registration(index, registry)?, + registry, + })? + .ok_or_else(|| Error::invalid_length(index, &len.to_string().as_str()))?; + dynamic_struct.insert_boxed(name, value); + } + + Ok(dynamic_struct) } fn get_registration<'a, E: Error>( diff --git a/crates/bevy_reflect/src/serde/ser.rs b/crates/bevy_reflect/src/serde/ser.rs --- a/crates/bevy_reflect/src/serde/ser.rs +++ b/crates/bevy_reflect/src/serde/ser.rs @@ -212,7 +212,7 @@ impl<'a> Serialize for StructSerializer<'a> { for (index, value) in self.struct_value.iter_fields().enumerate() { if serialization_data - .map(|data| data.is_ignored_field(index)) + .map(|data| data.is_field_skipped(index)) .unwrap_or(false) { continue; diff --git a/crates/bevy_reflect/src/serde/ser.rs b/crates/bevy_reflect/src/serde/ser.rs --- a/crates/bevy_reflect/src/serde/ser.rs +++ b/crates/bevy_reflect/src/serde/ser.rs @@ -265,7 +265,7 @@ impl<'a> Serialize for TupleStructSerializer<'a> { for (index, value) in self.tuple_struct.iter_fields().enumerate() { if serialization_data - .map(|data| data.is_ignored_field(index)) + .map(|data| data.is_field_skipped(index)) .unwrap_or(false) { continue; diff --git a/crates/bevy_reflect/src/serde/type_data.rs b/crates/bevy_reflect/src/serde/type_data.rs --- a/crates/bevy_reflect/src/serde/type_data.rs +++ b/crates/bevy_reflect/src/serde/type_data.rs @@ -1,44 +1,136 @@ -use std::collections::HashSet; +use crate::Reflect; +use bevy_utils::hashbrown::hash_map::Iter; +use bevy_utils::HashMap; -/// Contains data relevant to the automatic reflect powered serialization of a type +/// Contains data relevant to the automatic reflect powered (de)serialization of a type. #[derive(Debug, Clone)] pub struct SerializationData { - ignored_field_indices: HashSet<usize>, + skipped_fields: HashMap<usize, SkippedField>, } impl SerializationData { - /// Creates a new `SerializationData` instance given: + /// Creates a new `SerializationData` instance with the given skipped fields. /// - /// - `ignored_iter`: the iterator of member indices to be ignored during serialization. Indices are assigned only to reflected members, those which are not reflected are skipped. - pub fn new<I: Iterator<Item = usize>>(ignored_iter: I) -> Self { + /// # Arguments + /// + /// * `skipped_iter`: The iterator of field indices to be skipped during (de)serialization. + /// Indices are assigned only to reflected fields. + /// Ignored fields (i.e. those marked `#[reflect(ignore)]`) are implicitly skipped + /// and do not need to be included in this iterator. + pub fn new<I: Iterator<Item = (usize, SkippedField)>>(skipped_iter: I) -> Self { Self { - ignored_field_indices: ignored_iter.collect(), + skipped_fields: skipped_iter.collect(), } } - /// Returns true if the given index corresponds to a field meant to be ignored in serialization. - /// - /// Indices start from 0 and ignored fields are skipped. + /// Returns true if the given index corresponds to a field meant to be skipped during (de)serialization. /// /// # Example /// - /// ```rust,ignore + /// ``` + /// # use std::any::TypeId; + /// # use bevy_reflect::{Reflect, Struct, TypeRegistry, serde::SerializationData}; + /// #[derive(Reflect)] + /// struct MyStruct { + /// serialize_me: i32, + /// #[reflect(skip_serializing)] + /// skip_me: i32 + /// } + /// + /// let mut registry = TypeRegistry::new(); + /// registry.register::<MyStruct>(); + /// + /// let my_struct = MyStruct { + /// serialize_me: 123, + /// skip_me: 321, + /// }; + /// + /// let serialization_data = registry.get_type_data::<SerializationData>(TypeId::of::<MyStruct>()).unwrap(); + /// /// for (idx, field) in my_struct.iter_fields().enumerate(){ - /// if serialization_data.is_ignored_field(idx){ - /// // serialize ... - /// } + /// if serialization_data.is_field_skipped(idx) { + /// // Skipped! + /// assert_eq!(1, idx); + /// } else { + /// // Not Skipped! + /// assert_eq!(0, idx); + /// } + /// } + /// ``` + pub fn is_field_skipped(&self, index: usize) -> bool { + self.skipped_fields.contains_key(&index) + } + + /// Generates a default instance of the skipped field at the given index. + /// + /// Returns `None` if the field is not skipped. + /// + /// # Example + /// + /// ``` + /// # use std::any::TypeId; + /// # use bevy_reflect::{Reflect, Struct, TypeRegistry, serde::SerializationData}; + /// #[derive(Reflect)] + /// struct MyStruct { + /// serialize_me: i32, + /// #[reflect(skip_serializing)] + /// #[reflect(default = "skip_me_default")] + /// skip_me: i32 /// } + /// + /// fn skip_me_default() -> i32 { + /// 789 + /// } + /// + /// let mut registry = TypeRegistry::new(); + /// registry.register::<MyStruct>(); + /// + /// let serialization_data = registry.get_type_data::<SerializationData>(TypeId::of::<MyStruct>()).unwrap(); + /// assert_eq!(789, serialization_data.generate_default(1).unwrap().take::<i32>().unwrap()); /// ``` - pub fn is_ignored_field(&self, index: usize) -> bool { - self.ignored_field_indices.contains(&index) + pub fn generate_default(&self, index: usize) -> Option<Box<dyn Reflect>> { + self.skipped_fields + .get(&index) + .map(|field| field.generate_default()) } - /// Returns the number of ignored fields. + /// Returns the number of skipped fields. pub fn len(&self) -> usize { - self.ignored_field_indices.len() + self.skipped_fields.len() } - /// Returns true if there are no ignored fields. + /// Returns true if there are no skipped fields. pub fn is_empty(&self) -> bool { - self.ignored_field_indices.is_empty() + self.skipped_fields.is_empty() + } + + /// Returns an iterator over the skipped fields. + /// + /// Each item in the iterator is a tuple containing: + /// 1. The reflected index of the field + /// 2. The (de)serialization metadata of the field + pub fn iter_skipped(&self) -> Iter<'_, usize, SkippedField> { + self.skipped_fields.iter() + } +} + +/// Data needed for (de)serialization of a skipped field. +#[derive(Debug, Clone)] +pub struct SkippedField { + default_fn: fn() -> Box<dyn Reflect>, +} + +impl SkippedField { + /// Create a new `SkippedField`. + /// + /// # Arguments + /// + /// * `default_fn`: A function pointer used to generate a default instance of the field. + pub fn new(default_fn: fn() -> Box<dyn Reflect>) -> Self { + Self { default_fn } + } + + /// Generates a default instance of the field. + pub fn generate_default(&self) -> Box<dyn Reflect> { + (self.default_fn)() } } diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -1,8 +1,8 @@ use bevy_reflect_derive::impl_type_path; use crate::{ - self as bevy_reflect, Reflect, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, - TypePathTable, UnnamedField, + self as bevy_reflect, DynamicTuple, Reflect, ReflectMut, ReflectOwned, ReflectRef, Tuple, + TypeInfo, TypePath, TypePathTable, UnnamedField, }; use std::any::{Any, TypeId}; use std::fmt::{Debug, Formatter}; diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -390,6 +390,15 @@ impl Debug for DynamicTupleStruct { } } +impl From<DynamicTuple> for DynamicTupleStruct { + fn from(value: DynamicTuple) -> Self { + Self { + represented_type: None, + fields: Box::new(value).drain(), + } + } +} + /// Compares a [`TupleStruct`] with a [`Reflect`] value. /// /// Returns true if and only if all of the following are true:
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -764,6 +764,39 @@ mod tests { .unwrap_or_default()); } + #[test] + fn from_reflect_should_allow_ignored_unnamed_fields() { + #[derive(Reflect, Eq, PartialEq, Debug)] + struct MyTupleStruct(i8, #[reflect(ignore)] i16, i32); + + let expected = MyTupleStruct(1, 0, 3); + + let mut dyn_tuple_struct = DynamicTupleStruct::default(); + dyn_tuple_struct.insert(1_i8); + dyn_tuple_struct.insert(3_i32); + let my_tuple_struct = <MyTupleStruct as FromReflect>::from_reflect(&dyn_tuple_struct); + + assert_eq!(Some(expected), my_tuple_struct); + + #[derive(Reflect, Eq, PartialEq, Debug)] + enum MyEnum { + Tuple(i8, #[reflect(ignore)] i16, i32), + } + + let expected = MyEnum::Tuple(1, 0, 3); + + let mut dyn_tuple = DynamicTuple::default(); + dyn_tuple.insert(1_i8); + dyn_tuple.insert(3_i32); + + let mut dyn_enum = DynamicEnum::default(); + dyn_enum.set_variant("Tuple", dyn_tuple); + + let my_enum = <MyEnum as FromReflect>::from_reflect(&dyn_enum); + + assert_eq!(Some(expected), my_enum); + } + #[test] fn from_reflect_should_use_default_field_attributes() { #[derive(Reflect, Eq, PartialEq, Debug)] diff --git a/crates/bevy_reflect/src/serde/mod.rs b/crates/bevy_reflect/src/serde/mod.rs --- a/crates/bevy_reflect/src/serde/mod.rs +++ b/crates/bevy_reflect/src/serde/mod.rs @@ -12,7 +12,7 @@ mod tests { use crate::{ serde::{ReflectSerializer, UntypedReflectDeserializer}, type_registry::TypeRegistry, - DynamicStruct, Reflect, + DynamicStruct, FromReflect, Reflect, }; use serde::de::DeserializeSeed; diff --git a/crates/bevy_reflect/src/serde/mod.rs b/crates/bevy_reflect/src/serde/mod.rs --- a/crates/bevy_reflect/src/serde/mod.rs +++ b/crates/bevy_reflect/src/serde/mod.rs @@ -26,7 +26,14 @@ mod tests { b: i32, #[reflect(skip_serializing)] c: i32, + #[reflect(skip_serializing)] + #[reflect(default = "custom_default")] d: i32, + e: i32, + } + + fn custom_default() -> i32 { + -1 } let mut registry = TypeRegistry::default(); diff --git a/crates/bevy_reflect/src/serde/mod.rs b/crates/bevy_reflect/src/serde/mod.rs --- a/crates/bevy_reflect/src/serde/mod.rs +++ b/crates/bevy_reflect/src/serde/mod.rs @@ -37,24 +44,42 @@ mod tests { b: 4, c: 5, d: 6, + e: 7, }; let serializer = ReflectSerializer::new(&test_struct, &registry); let serialized = ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap(); - let mut expected = DynamicStruct::default(); - expected.insert("a", 3); - expected.insert("d", 6); - let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); let reflect_deserializer = UntypedReflectDeserializer::new(&registry); let value = reflect_deserializer.deserialize(&mut deserializer).unwrap(); let deserialized = value.take::<DynamicStruct>().unwrap(); + let mut expected = DynamicStruct::default(); + expected.insert("a", 3); + // Ignored: expected.insert("b", 0); + expected.insert("c", 0); + expected.insert("d", -1); + expected.insert("e", 7); + assert!( expected.reflect_partial_eq(&deserialized).unwrap(), - "Expected {expected:?} found {deserialized:?}" + "Deserialization failed: expected {expected:?} found {deserialized:?}" + ); + + let expected = TestStruct { + a: 3, + b: 0, + c: 0, + d: -1, + e: 7, + }; + let received = <TestStruct as FromReflect>::from_reflect(&deserialized).unwrap(); + + assert_eq!( + expected, received, + "FromReflect failed: expected {expected:?} found {received:?}" ); } diff --git a/crates/bevy_reflect/src/serde/mod.rs b/crates/bevy_reflect/src/serde/mod.rs --- a/crates/bevy_reflect/src/serde/mod.rs +++ b/crates/bevy_reflect/src/serde/mod.rs @@ -66,30 +91,48 @@ mod tests { i32, #[reflect(ignore)] i32, #[reflect(skip_serializing)] i32, + #[reflect(skip_serializing)] + #[reflect(default = "custom_default")] + i32, i32, ); + fn custom_default() -> i32 { + -1 + } + let mut registry = TypeRegistry::default(); registry.register::<TestStruct>(); - let test_struct = TestStruct(3, 4, 5, 6); + let test_struct = TestStruct(3, 4, 5, 6, 7); let serializer = ReflectSerializer::new(&test_struct, &registry); let serialized = ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap(); - let mut expected = DynamicTupleStruct::default(); - expected.insert(3); - expected.insert(6); - let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); let reflect_deserializer = UntypedReflectDeserializer::new(&registry); let value = reflect_deserializer.deserialize(&mut deserializer).unwrap(); let deserialized = value.take::<DynamicTupleStruct>().unwrap(); + let mut expected = DynamicTupleStruct::default(); + expected.insert(3); + // Ignored: expected.insert(0); + expected.insert(0); + expected.insert(-1); + expected.insert(7); + assert!( expected.reflect_partial_eq(&deserialized).unwrap(), - "Expected {expected:?} found {deserialized:?}" + "Deserialization failed: expected {expected:?} found {deserialized:?}" + ); + + let expected = TestStruct(3, 0, 0, -1, 7); + let received = <TestStruct as FromReflect>::from_reflect(&deserialized).unwrap(); + + assert_eq!( + expected, received, + "FromReflect failed: expected {expected:?} found {received:?}" ); }
bevy_reflect: ignored fields are not ignored by `FromReflect` **bevy version**: main as of 1bd33ca When deriving `FromReflect` on tuple structs, the field index of fields declared after a field marked with `#[reflect(ignore)]` are not as one would expect them. Here is an example: ```rust #[derive(Reflect, FromReflect)] struct Foo( u32, // :0 #[reflect(ignore)] f32, // :1 String, // :2 ); let mut tuple_struct = DynamicTupleStruct::default(); tuple_struct.set_name("Foo".to_owned()); tuple_struct.insert(22_u32); tuple_struct.insert(3432423234234_i128); tuple_struct.insert("hello world".to_owned()); let foo = Foo::from_reflect(&tuple_struct).unwrap(); println!( "tuple_struct\n[0]: {:?}\n[1]: {:?}\n[2]: {:?}\n", tuple_struct.field(0), tuple_struct.field(1), tuple_struct.field(2), ); println!( "foo\n[0]: {:?}\n[1]: {:?}\n[2]: {:?}\n", foo.field(0), foo.field(1), foo.field(2). ); ``` Prints the following: ``` tuple_struct [0]: Some(22) [1]: Some(3432423234234) [2]: Some("hello world") foo [0]: Some(22) [1]: Some("hello world") [2]: None ``` The unexpected behavior is here: ```rust let mut tuple_struct = DynamicTupleStruct::default(); tuple_struct.set_name("Foo".to_owned()); tuple_struct.insert(22_u32); // vvv required, otherwise Foo::from_reflect returns None tuple_struct.insert(3432423234234_i128); tuple_struct.insert("hello world".to_owned()); let foo = Foo::from_reflect(&tuple_struct).unwrap(); ``` You'd expect to be able to build `Foo` from a `DynamicTupleStruct` with exactly **two** fields, not three. The correct behavior would be to account for it in the `FromReflect` implementation.
This affects everything actually, not just `FromReflect`. Calling `TupleStruct::field_at` will have a similar problem. So this more generally relates to the behavior of field indices on structs with ignored fields as a whole. And while it shows up most noticeably in `FromReflect` it could appear also outside of the reflection API (should users rely on reflection to get/set non-reflected fields by index). > Calling `TupleStruct::field_at` will have a similar problem. The sample example demonstrates it's not the case. In the following code `.field` is the method on the `TupleStruct` trait ```rust println!( "foo\n[0]: {:?}\n[1]: {:?}\n[2]: {:?}\n", foo.field(0), foo.field(1), foo.field(2). ); ``` The output shown in the issue post demonstrates it works as expected. > > Calling `TupleStruct::field_at` will have a similar problem. > > > > The sample example demonstrates it's not the case. In the following code `.field` is the method on the `TupleStruct` trait > > ```rust > > println!( > > "foo\n[0]: {:?}\n[1]: {:?}\n[2]: {:?}\n", > > foo.field(0), > > foo.field(1), > > foo.field(2). > > ); > > ``` > > > > The output shown in the issue post demonstrates it works as expected. This should print: ``` foo [0]: Some(22) [1]: Some("hello world") [2]: None ``` Which correctly ignores the field at index 1. The issue I was generalizing this to is regarding whether the reflected index should be the same as the declaration index or not (e.g. swap 1 and 2 in that print statement). A user could take this info and try to edit a non-reflected instance to confusing results. We could simply disregard those use cases and say, "Don't rely on reflection outside of reflection." That's a totally fair stance I think haha, but we could also consider adding a method to convert reflected indices to declaration indices: ```rust foo.decl_index(1); // Some(2) ``` Or, as suggested by others, print a warning if the ignored fields don't come last. Just wanted to possibly open this up to other solutions if that's what we want to look into. If not, then solving it at least for `FromReflect` is good enough. Thinking on this a bit, I feel like a good start would be to implement the warning system. Making sure users know to put these fields last will help protect them from running into this issue in the first place. With that as a temporary[^1] fix, we can begin to explore other ways of dealing with this problem. [^1]: Possibly not temporary depending on if a better solution can't be found Actually, it might not be possible to emit a warning since [that API is still unstable](https://github.com/rust-lang/rust/issues/54140). We could maybe consider making this a full on error. It might make sense considering we don't actually support deserializing tuple structs with a `#[reflect(skip_serializing)]` marker anywhere but the end. Otherwise, it fails to deserialize and we end up with the warning: ``` WARN bevy_asset::asset_server: encountered an error while loading an asset: Expected integer ``` Or worse, it ends up putting a value into the skipped field anyways 😬. Alternatively, we could print a warning only when (de)serializing or calling `FromReflect` (or whatever else breaks because of this) to let the user know that things might not work correctly. However, if a third-party crate doesn't test that their reflected types serialize properly or that it doesn't use `FromReflect` properly, then consumers of that crate won't be able to correct the behavior themselves (not without forking or creating a PR at least). This would require us adding some sort of API to check if there are any misplaced ignores/skips, though, since we don't always have the registry (i.e. in `FromReflect`) to get that info from type data (which is where we at least store `skip_serializing` info). --- I think we should go with the compile error (I wish we could do compile warnings). However, I understand and am open to the second option of just printing a warning during (de)serialization/`FromReflect`. I just think we should prevent this incorrect behavior for everything rather than just rely on warnings being conditionally printed out (and the first option is also just a lot simpler/cleaner to implement). Any other thoughts?
2023-02-09T03:38:24Z
1.70
2023-10-26T21:32:21Z
6f27e0e35faffbf2b77807bb222d3d3a9a529210
[ "serde::tests::test_serialization_tuple_struct", "serde::tests::test_serialization_struct", "tests::from_reflect_should_allow_ignored_unnamed_fields" ]
[ "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::enum_should_apply", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_generics", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_set", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::can_serialize_duration", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "list::tests::test_into_iter", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "serde::de::tests::should_deserialize_value", "serde::de::tests::should_deserialized_typed", "serde::de::tests::enum_should_deserialize", "tests::as_reflect", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::de::tests::should_deserialize_option", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::enum_should_serialize", "tests::custom_debug_function", "tests::docstrings::fields_should_contain_docs", "serde::tests::should_roundtrip_proxied_dynamic", "serde::de::tests::should_deserialize_self_describing_binary", "serde::ser::tests::should_serialize", "tests::can_opt_out_type_path", "serde::ser::tests::should_serialize_option", "tests::docstrings::should_contain_docs", "tests::docstrings::should_not_contain_docs", "serde::ser::tests::should_serialize_self_describing_binary", "tests::docstrings::variants_should_contain_docs", "tests::from_reflect_should_use_default_container_attribute", "serde::de::tests::should_deserialize", "tests::from_reflect_should_use_default_field_attributes", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::glam::vec3_apply_dynamic", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "tests::into_reflect", "tests::glam::quat_deserialization", "tests::multiple_reflect_lists", "tests::multiple_reflect_value_lists", "tests::glam::quat_serialization", "tests::recursive_typed_storage_does_not_hang", "tests::not_dynamic_names", "tests::reflect_downcast", "tests::reflect_ignore", "tests::glam::vec3_serialization", "tests::glam::vec3_deserialization", "tests::reflect_map", "tests::reflect_complex_patch", "tests::reflect_map_no_hash - should panic", "tests::reflect_struct", "tests::reflect_take", "tests::reflect_unit_struct", "tests::reflect_type_path", "tests::should_permit_higher_ranked_lifetimes", "tests::reflect_type_info", "tests::should_drain_fields", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_call_from_reflect_dynamically", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_reflect_debug", "type_uuid::test::test_generic_type_unique_uuid", "type_uuid::test::test_generic_type_uuid_derive", "type_registry::test::test_reflect_from_ptr", "tests::std_type_paths", "type_uuid::test::test_generic_type_uuid_same_for_eq_param", "type_uuid::test::test_inverted_generic_type_unique_uuid", "type_uuid::test::test_multiple_generic_uuid", "type_uuid::test::test_primitive_generic_uuid", "tests::reflect_serialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 10)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 41)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 59)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 20)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 51)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 165)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 26)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 125)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 28)", "crates/bevy_reflect/src/lib.rs - (line 31)", "crates/bevy_reflect/src/lib.rs - (line 288)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 24)", "crates/bevy_reflect/src/map.rs - map::Map (line 29)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 57)", "crates/bevy_reflect/src/lib.rs - (line 98)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 481)", "crates/bevy_reflect/src/array.rs - array::Array (line 30)", "crates/bevy_reflect/src/list.rs - list::List (line 37)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 175)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 528)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 505)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 95)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 434)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 224)", "crates/bevy_reflect/src/lib.rs - (line 148)", "crates/bevy_reflect/src/lib.rs - (line 208)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 154)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 437)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 21)", "crates/bevy_reflect/src/lib.rs - (line 306)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/lib.rs - (line 77)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 306)", "crates/bevy_reflect/src/lib.rs - (line 239)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 310)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 77)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 25)", "crates/bevy_reflect/src/lib.rs - (line 183)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 117)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 474)", "crates/bevy_reflect/src/lib.rs - (line 267)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 176)", "crates/bevy_reflect/src/lib.rs - (line 169)", "crates/bevy_reflect/src/lib.rs - (line 134)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 206)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 140)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 146)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "crates/bevy_reflect/src/lib.rs - (line 349)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,454
bevyengine__bevy-7454
[ "7429" ]
84de9e7f28bfaaba8e0eef4ecf185ce795add9e2
diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1219,6 +1219,178 @@ impl FromReflect for Cow<'static, str> { } } +impl<T: PathOnly> PathOnly for [T] where [T]: ToOwned {} + +impl<T: TypePath> TypePath for [T] +where + [T]: ToOwned, +{ + fn type_path() -> &'static str { + static CELL: GenericTypePathCell = GenericTypePathCell::new(); + CELL.get_or_insert::<Self, _>(|| format!("[{}]", <T>::type_path())) + } + + fn short_type_path() -> &'static str { + static CELL: GenericTypePathCell = GenericTypePathCell::new(); + CELL.get_or_insert::<Self, _>(|| format!("[{}]", <T>::short_type_path())) + } +} + +impl<T: ToOwned> PathOnly for T {} + +impl<T: FromReflect + Clone + TypePath> List for Cow<'static, [T]> { + fn get(&self, index: usize) -> Option<&dyn Reflect> { + self.as_ref().get(index).map(|x| x as &dyn Reflect) + } + + fn get_mut(&mut self, index: usize) -> Option<&mut dyn Reflect> { + self.to_mut().get_mut(index).map(|x| x as &mut dyn Reflect) + } + + fn len(&self) -> usize { + self.as_ref().len() + } + + fn iter(&self) -> crate::ListIter { + crate::ListIter::new(self) + } + + fn drain(self: Box<Self>) -> Vec<Box<dyn Reflect>> { + // into_owned() is not uneccessary here because it avoids cloning whenever you have a Cow::Owned already + #[allow(clippy::unnecessary_to_owned)] + self.into_owned() + .into_iter() + .map(|value| value.clone_value()) + .collect() + } + + fn insert(&mut self, index: usize, element: Box<dyn Reflect>) { + let value = element.take::<T>().unwrap_or_else(|value| { + T::from_reflect(&*value).unwrap_or_else(|| { + panic!( + "Attempted to insert invalid value of type {}.", + value.type_name() + ) + }) + }); + self.to_mut().insert(index, value); + } + + fn remove(&mut self, index: usize) -> Box<dyn Reflect> { + Box::new(self.to_mut().remove(index)) + } + + fn push(&mut self, value: Box<dyn Reflect>) { + let value = T::take_from_reflect(value).unwrap_or_else(|value| { + panic!( + "Attempted to push invalid value of type {}.", + value.type_name() + ) + }); + self.to_mut().push(value); + } + + fn pop(&mut self) -> Option<Box<dyn Reflect>> { + self.to_mut() + .pop() + .map(|value| Box::new(value) as Box<dyn Reflect>) + } +} + +impl<T: FromReflect + Clone + TypePath> Reflect for Cow<'static, [T]> { + fn type_name(&self) -> &str { + std::any::type_name::<Self>() + } + + fn into_any(self: Box<Self>) -> Box<dyn Any> { + self + } + + fn as_any(&self) -> &dyn Any { + self + } + + fn as_any_mut(&mut self) -> &mut dyn Any { + self + } + + fn into_reflect(self: Box<Self>) -> Box<dyn Reflect> { + self + } + + fn as_reflect(&self) -> &dyn Reflect { + self + } + + fn as_reflect_mut(&mut self) -> &mut dyn Reflect { + self + } + + fn apply(&mut self, value: &dyn Reflect) { + crate::list_apply(self, value); + } + + fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>> { + *self = value.take()?; + Ok(()) + } + + fn reflect_ref(&self) -> ReflectRef { + ReflectRef::List(self) + } + + fn reflect_mut(&mut self) -> ReflectMut { + ReflectMut::List(self) + } + + fn reflect_owned(self: Box<Self>) -> ReflectOwned { + ReflectOwned::List(self) + } + + fn clone_value(&self) -> Box<dyn Reflect> { + Box::new(List::clone_dynamic(self)) + } + + fn reflect_hash(&self) -> Option<u64> { + crate::list_hash(self) + } + + fn reflect_partial_eq(&self, value: &dyn Reflect) -> Option<bool> { + crate::list_partial_eq(self, value) + } + + fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { + Some(<Self as Typed>::type_info()) + } +} + +impl<T: FromReflect + Clone + TypePath> Typed for Cow<'static, [T]> { + fn type_info() -> &'static TypeInfo { + static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); + CELL.get_or_insert::<Self, _>(|| TypeInfo::List(ListInfo::new::<Self, T>())) + } +} + +impl<T: FromReflect + Clone + TypePath> GetTypeRegistration for Cow<'static, [T]> { + fn get_type_registration() -> TypeRegistration { + TypeRegistration::of::<Cow<'static, [T]>>() + } +} + +impl<T: FromReflect + Clone + TypePath> FromReflect for Cow<'static, [T]> { + fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { + if let ReflectRef::List(ref_list) = reflect.reflect_ref() { + let mut temp_vec = Vec::with_capacity(ref_list.len()); + for field in ref_list.iter() { + temp_vec.push(T::from_reflect(field)?); + } + temp_vec.try_into().ok() + } else { + None + } + } +} + impl Reflect for &'static Path { fn type_name(&self) -> &str { std::any::type_name::<Self>()
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -550,8 +550,12 @@ mod tests { ser::{to_string_pretty, PrettyConfig}, Deserializer, }; - use std::fmt::{Debug, Formatter}; - use std::{any::TypeId, marker::PhantomData}; + use std::{ + any::TypeId, + borrow::Cow, + fmt::{Debug, Formatter}, + marker::PhantomData, + }; use super::prelude::*; use super::*; diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1031,6 +1035,8 @@ mod tests { b: Bar, u: usize, t: ([f32; 3], String), + v: Cow<'static, str>, + w: Cow<'static, [u8]>, } let foo = Foo { diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1039,6 +1045,8 @@ mod tests { b: Bar { y: 255 }, u: 1111111111111, t: ([3.0, 2.0, 1.0], "Tuple String".to_string()), + v: Cow::Owned("Cow String".to_string()), + w: Cow::Owned(vec![1, 2, 3]), }; let foo2: Box<dyn Reflect> = Box::new(foo.clone()); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1394,6 +1402,38 @@ mod tests { let info = value.get_represented_type_info().unwrap(); assert!(info.is::<MyArray>()); + // Cow<'static, str> + type MyCowStr = Cow<'static, str>; + + let info = MyCowStr::type_info(); + if let TypeInfo::Value(info) = info { + assert!(info.is::<MyCowStr>()); + assert_eq!(std::any::type_name::<MyCowStr>(), info.type_name()); + } else { + panic!("Expected `TypeInfo::Value`"); + } + + let value: &dyn Reflect = &Cow::<'static, str>::Owned("Hello!".to_string()); + let info = value.get_represented_type_info().unwrap(); + assert!(info.is::<MyCowStr>()); + + // Cow<'static, [u8]> + type MyCowSlice = Cow<'static, [u8]>; + + let info = MyCowSlice::type_info(); + if let TypeInfo::List(info) = info { + assert!(info.is::<MyCowSlice>()); + assert!(info.item_is::<u8>()); + assert_eq!(std::any::type_name::<MyCowSlice>(), info.type_name()); + assert_eq!(std::any::type_name::<u8>(), info.item_type_name()); + } else { + panic!("Expected `TypeInfo::List`"); + } + + let value: &dyn Reflect = &Cow::<'static, [u8]>::Owned(vec![0, 1, 2, 3]); + let info = value.get_represented_type_info().unwrap(); + assert!(info.is::<MyCowSlice>()); + // Map type MyMap = HashMap<usize, f32>;
bevy_reflect: Support Cow<'static, [T]> ## What problem does this solve or what need does it fill? At present, only `Cow<'static, str>` implements `Reflect`. However, `Cow` has another use: `Cow<'static, [T]>` for owned or borrowed lists. ## What solution would you like? Implement `Reflect` and all other associated/required traits for `Cow<'static, [T]>`. ## What alternative(s) have you considered? Just use a `Vec<T>`. However, `Vec`s don't work for const lists like arrays, and potentially use up more memory in the same way a `String` and `Cow<'static, str>` are compared.
2023-02-01T01:50:05Z
1.70
2023-06-19T15:25:35Z
6f27e0e35faffbf2b77807bb222d3d3a9a529210
[ "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_allow_generics", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "impls::std::tests::option_should_apply", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "enums::tests::should_skip_ignored_fields", "impls::std::tests::should_partial_eq_char", "enums::tests::enum_should_apply", "impls::std::tests::can_serialize_duration", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "list::tests::test_into_iter", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::parsed_path_get_field", "path::tests::reflect_path", "serde::de::tests::should_deserialize_value", "serde::de::tests::should_deserialized_typed", "serde::de::tests::enum_should_deserialize", "serde::de::tests::should_deserialize_option", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::de::tests::should_deserialize", "serde::ser::tests::enum_should_serialize", "serde::de::tests::should_deserialize_self_describing_binary", "serde::ser::tests::should_serialize", "serde::tests::test_serialization_tuple_struct", "tests::as_reflect", "serde::tests::unproxied_dynamic_should_not_serialize - should panic", "serde::tests::test_serialization_struct", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::should_serialize_self_describing_binary", "tests::custom_debug_function", "serde::ser::tests::should_serialize_option", "tests::from_reflect_should_use_default_container_attribute", "tests::dynamic_names", "tests::from_reflect_should_use_default_field_attributes", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::into_reflect", "tests::multiple_reflect_lists", "tests::multiple_reflect_value_lists", "tests::reflect_downcast", "tests::reflect_ignore", "tests::reflect_map", "tests::reflect_complex_patch", "tests::reflect_map_no_hash - should panic", "tests::reflect_take", "tests::reflect_struct", "tests::reflect_type_path", "tests::reflect_type_info", "tests::reflect_unit_struct", "tests::should_drain_fields", "tests::should_permit_higher_ranked_lifetimes", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_reflect_debug", "tests::should_call_from_reflect_dynamically", "type_registry::test::test_reflect_from_ptr", "type_uuid::test::test_generic_type_unique_uuid", "tests::reflect_serialize", "type_registry::test::test_property_type_registration", "type_uuid::test::test_generic_type_uuid_derive", "type_uuid::test::test_generic_type_uuid_same_for_eq_param", "type_uuid::test::test_inverted_generic_type_unique_uuid", "type_uuid::test::test_multiple_generic_uuid", "type_uuid::test::test_primitive_generic_uuid", "src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 59)", "src/enums/variants.rs - enums::variants::VariantType::Unit (line 28)", "src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 41)", "src/enums/variants.rs - enums::variants::VariantType::Struct (line 10)", "src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 51)", "src/utility.rs - utility::NonGenericTypeCell (line 51)", "src/enums/variants.rs - enums::variants::VariantType::Tuple (line 20)", "src/utility.rs - utility::GenericTypeCell (line 171)", "src/type_path.rs - type_path::TypePath (line 37)", "src/utility.rs - utility::GenericTypeCell (line 129)", "src/type_info.rs - type_info::Typed (line 25)", "src/lib.rs - (line 260)", "src/lib.rs - (line 31)", "src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "src/lib.rs - (line 134)", "src/from_reflect.rs - from_reflect::ReflectFromReflect (line 57)", "src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 176)", "src/lib.rs - (line 77)", "src/array.rs - array::array_debug (line 434)", "src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 436)", "src/path.rs - path::GetPath (line 115)", "src/list.rs - list::List (line 36)", "src/struct_trait.rs - struct_trait::struct_debug (line 536)", "src/lib.rs - (line 278)", "src/lib.rs - (line 207)", "src/tuple_struct.rs - tuple_struct::TupleStruct (line 20)", "src/lib.rs - (line 169)", "src/tuple.rs - tuple::Tuple (line 23)", "src/map.rs - map::map_debug (line 463)", "src/map.rs - map::Map (line 26)", "src/lib.rs - (line 239)", "src/path.rs - path::GetPath (line 78)", "src/lib.rs - (line 183)", "src/struct_trait.rs - struct_trait::Struct (line 24)", "src/type_registry.rs - type_registry::TypeRegistration (line 292)", "src/struct_trait.rs - struct_trait::GetField (line 225)", "src/lib.rs - (line 98)", "src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "src/tuple.rs - tuple::GetTupleField (line 94)", "src/lib.rs - (line 148)", "src/array.rs - array::Array (line 30)", "src/list.rs - list::list_debug (line 477)", "src/type_registry.rs - type_registry::ReflectFromPtr (line 507)", "src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 138)", "src/path.rs - path::GetPath (line 101)", "src/path.rs - path::GetPath (line 137)", "src/from_reflect.rs - from_reflect::ReflectFromReflect (line 77)", "src/tuple.rs - tuple::tuple_debug (line 450)", "src/path.rs - path::GetPath (line 167)", "src/path.rs - path::ParsedPath::parse (line 312)", "src/lib.rs - (line 321)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,335
bevyengine__bevy-7335
[ "4793" ]
ee697f820c0b164cf2825b9c8e932fc8cee24a2c
diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -26,7 +26,7 @@ thread_local = "1.1.4" fixedbitset = "0.4.2" rustc-hash = "1.1" downcast-rs = "1.2" -serde = { version = "1", features = ["derive"] } +serde = "1" thiserror = "1.0" [dev-dependencies] diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -1,24 +1,5 @@ -use crate::entity::Entity; +use crate::{entity::Entity, world::World}; use bevy_utils::{Entry, HashMap}; -use std::fmt; - -/// The errors that might be returned while using [`MapEntities::map_entities`]. -#[derive(Debug)] -pub enum MapEntitiesError { - EntityNotFound(Entity), -} - -impl std::error::Error for MapEntitiesError {} - -impl fmt::Display for MapEntitiesError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - MapEntitiesError::EntityNotFound(_) => { - write!(f, "the given entity does not exist in the map") - } - } - } -} /// Operation to map all contained [`Entity`] fields in a type to new values. /// diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -33,7 +14,7 @@ impl fmt::Display for MapEntitiesError { /// /// ```rust /// use bevy_ecs::prelude::*; -/// use bevy_ecs::entity::{EntityMap, MapEntities, MapEntitiesError}; +/// use bevy_ecs::entity::{EntityMapper, MapEntities}; /// /// #[derive(Component)] /// struct Spring { diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -42,10 +23,9 @@ impl fmt::Display for MapEntitiesError { /// } /// /// impl MapEntities for Spring { -/// fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> { -/// self.a = entity_map.get(self.a)?; -/// self.b = entity_map.get(self.b)?; -/// Ok(()) +/// fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { +/// self.a = entity_mapper.get_or_reserve(self.a); +/// self.b = entity_mapper.get_or_reserve(self.b); /// } /// } /// ``` diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -55,16 +35,22 @@ pub trait MapEntities { /// Updates all [`Entity`] references stored inside using `entity_map`. /// /// Implementors should look up any and all [`Entity`] values stored within and - /// update them to the mapped values via `entity_map`. - fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError>; + /// update them to the mapped values via `entity_mapper`. + fn map_entities(&mut self, entity_mapper: &mut EntityMapper); } /// A mapping from one set of entities to another. /// /// The API generally follows [`HashMap`], but each [`Entity`] is returned by value, as they are [`Copy`]. /// -/// This is typically used to coordinate data transfer between sets of entities, such as between a scene and the world or over the network. -/// This is required as [`Entity`] identifiers are opaque; you cannot and do not want to reuse identifiers directly. +/// This is typically used to coordinate data transfer between sets of entities, such as between a scene and the world +/// or over the network. This is required as [`Entity`] identifiers are opaque; you cannot and do not want to reuse +/// identifiers directly. +/// +/// On its own, an `EntityMap` is not capable of allocating new entity identifiers, which is needed to map references +/// to entities that lie outside the source entity set. To do this, an `EntityMap` can be wrapped in an +/// [`EntityMapper`] which scopes it to a particular destination [`World`] and allows new identifiers to be allocated. +/// This functionality can be accessed through [`Self::world_scope()`]. #[derive(Default, Debug)] pub struct EntityMap { map: HashMap<Entity, Entity>, diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -91,11 +77,8 @@ impl EntityMap { } /// Returns the corresponding mapped entity. - pub fn get(&self, entity: Entity) -> Result<Entity, MapEntitiesError> { - self.map - .get(&entity) - .cloned() - .ok_or(MapEntitiesError::EntityNotFound(entity)) + pub fn get(&self, entity: Entity) -> Option<Entity> { + self.map.get(&entity).copied() } /// An iterator visiting all keys in arbitrary order. diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -115,7 +115,7 @@ type IdCursor = isize; /// [`EntityCommands`]: crate::system::EntityCommands /// [`Query::get`]: crate::system::Query::get /// [`World`]: crate::world::World -#[derive(Clone, Copy, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] +#[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct Entity { generation: u32, index: u32, diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -227,6 +227,25 @@ impl Entity { } } +impl Serialize for Entity { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + serializer.serialize_u64(self.to_bits()) + } +} + +impl<'de> Deserialize<'de> for Entity { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let id: u64 = serde::de::Deserialize::deserialize(deserializer)?; + Ok(Entity::from_bits(id)) + } +} + impl fmt::Debug for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}v{}", self.index, self.generation) diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -604,6 +623,25 @@ impl Entities { self.meta.get_unchecked_mut(index as usize).location = location; } + /// Increments the `generation` of a freed [`Entity`]. The next entity ID allocated with this + /// `index` will count `generation` starting from the prior `generation` + the specified + /// value + 1. + /// + /// Does nothing if no entity with this `index` has been allocated yet. + pub(crate) fn reserve_generations(&mut self, index: u32, generations: u32) -> bool { + if (index as usize) >= self.meta.len() { + return false; + } + + let meta = &mut self.meta[index as usize]; + if meta.location.archetype_id == ArchetypeId::INVALID { + meta.generation += generations; + true + } else { + false + } + } + /// Get the [`Entity`] with a given id, if it exists in this [`Entities`] collection /// Returns `None` if this [`Entity`] is outside of the range of currently reserved Entities /// diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -3,7 +3,7 @@ use crate::{ change_detection::Mut, component::Component, - entity::{Entity, EntityMap, MapEntities, MapEntitiesError}, + entity::{Entity, EntityMap, EntityMapper, MapEntities}, system::Resource, world::{ unsafe_world_cell::{UnsafeEntityCell, UnsafeWorldCell}, diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -412,8 +412,8 @@ impl_from_reflect_value!(Entity); #[derive(Clone)] pub struct ReflectMapEntities { - map_entities: fn(&mut World, &EntityMap) -> Result<(), MapEntitiesError>, - map_specific_entities: fn(&mut World, &EntityMap, &[Entity]) -> Result<(), MapEntitiesError>, + map_entities: fn(&mut World, &mut EntityMapper), + map_specific_entities: fn(&mut World, &mut EntityMapper, &[Entity]), } impl ReflectMapEntities { diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -426,12 +426,8 @@ impl ReflectMapEntities { /// An example of this: A scene can be loaded with `Parent` components, but then a `Parent` component can be added /// to these entities after they have been loaded. If you reload the scene using [`map_entities`](Self::map_entities), those `Parent` /// components with already valid entity references could be updated to point at something else entirely. - pub fn map_entities( - &self, - world: &mut World, - entity_map: &EntityMap, - ) -> Result<(), MapEntitiesError> { - (self.map_entities)(world, entity_map) + pub fn map_entities(&self, world: &mut World, entity_map: &mut EntityMap) { + entity_map.world_scope(world, self.map_entities); } /// This is like [`map_entities`](Self::map_entities), but only applied to specific entities, not all values diff --git a/crates/bevy_ecs/src/reflect.rs b/crates/bevy_ecs/src/reflect.rs --- a/crates/bevy_ecs/src/reflect.rs +++ b/crates/bevy_ecs/src/reflect.rs @@ -442,31 +438,32 @@ impl ReflectMapEntities { pub fn map_specific_entities( &self, world: &mut World, - entity_map: &EntityMap, + entity_map: &mut EntityMap, entities: &[Entity], - ) -> Result<(), MapEntitiesError> { - (self.map_specific_entities)(world, entity_map, entities) + ) { + entity_map.world_scope(world, |world, mapper| { + (self.map_specific_entities)(world, mapper, entities); + }); } } impl<C: Component + MapEntities> FromType<C> for ReflectMapEntities { fn from_type() -> Self { ReflectMapEntities { - map_specific_entities: |world, entity_map, entities| { + map_specific_entities: |world, entity_mapper, entities| { for &entity in entities { if let Some(mut component) = world.get_mut::<C>(entity) { - component.map_entities(entity_map)?; + component.map_entities(entity_mapper); } } - Ok(()) }, - map_entities: |world, entity_map| { - for entity in entity_map.values() { - if let Some(mut component) = world.get_mut::<C>(entity) { - component.map_entities(entity_map)?; + map_entities: |world, entity_mapper| { + let entities = entity_mapper.get_map().values().collect::<Vec<Entity>>(); + for entity in &entities { + if let Some(mut component) = world.get_mut::<C>(*entity) { + component.map_entities(entity_mapper); } } - Ok(()) }, } } diff --git a/crates/bevy_hierarchy/src/components/children.rs b/crates/bevy_hierarchy/src/components/children.rs --- a/crates/bevy_hierarchy/src/components/children.rs +++ b/crates/bevy_hierarchy/src/components/children.rs @@ -1,6 +1,6 @@ use bevy_ecs::{ component::Component, - entity::{Entity, EntityMap, MapEntities, MapEntitiesError}, + entity::{Entity, EntityMapper, MapEntities}, prelude::FromWorld, reflect::{ReflectComponent, ReflectMapEntities}, world::World, diff --git a/crates/bevy_hierarchy/src/components/children.rs b/crates/bevy_hierarchy/src/components/children.rs --- a/crates/bevy_hierarchy/src/components/children.rs +++ b/crates/bevy_hierarchy/src/components/children.rs @@ -21,12 +21,10 @@ use std::ops::Deref; pub struct Children(pub(crate) SmallVec<[Entity; 8]>); impl MapEntities for Children { - fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> { + fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { for entity in &mut self.0 { - *entity = entity_map.get(*entity)?; + *entity = entity_mapper.get_or_reserve(*entity); } - - Ok(()) } } diff --git a/crates/bevy_hierarchy/src/components/parent.rs b/crates/bevy_hierarchy/src/components/parent.rs --- a/crates/bevy_hierarchy/src/components/parent.rs +++ b/crates/bevy_hierarchy/src/components/parent.rs @@ -1,6 +1,6 @@ use bevy_ecs::{ component::Component, - entity::{Entity, EntityMap, MapEntities, MapEntitiesError}, + entity::{Entity, EntityMapper, MapEntities}, reflect::{ReflectComponent, ReflectMapEntities}, world::{FromWorld, World}, }; diff --git a/crates/bevy_hierarchy/src/components/parent.rs b/crates/bevy_hierarchy/src/components/parent.rs --- a/crates/bevy_hierarchy/src/components/parent.rs +++ b/crates/bevy_hierarchy/src/components/parent.rs @@ -36,13 +36,8 @@ impl FromWorld for Parent { } impl MapEntities for Parent { - fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> { - // Parent of an entity in the new world can be in outside world, in which case it - // should not be mapped. - if let Ok(mapped_entity) = entity_map.get(self.0) { - self.0 = mapped_entity; - } - Ok(()) + fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { + self.0 = entity_mapper.get_or_reserve(self.0); } } diff --git a/crates/bevy_render/src/mesh/mesh/skinning.rs b/crates/bevy_render/src/mesh/mesh/skinning.rs --- a/crates/bevy_render/src/mesh/mesh/skinning.rs +++ b/crates/bevy_render/src/mesh/mesh/skinning.rs @@ -1,7 +1,7 @@ use bevy_asset::Handle; use bevy_ecs::{ component::Component, - entity::{Entity, EntityMap, MapEntities, MapEntitiesError}, + entity::{Entity, EntityMapper, MapEntities}, prelude::ReflectComponent, reflect::ReflectMapEntities, }; diff --git a/crates/bevy_render/src/mesh/mesh/skinning.rs b/crates/bevy_render/src/mesh/mesh/skinning.rs --- a/crates/bevy_render/src/mesh/mesh/skinning.rs +++ b/crates/bevy_render/src/mesh/mesh/skinning.rs @@ -17,12 +17,10 @@ pub struct SkinnedMesh { } impl MapEntities for SkinnedMesh { - fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> { + fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { for joint in &mut self.joints { - *joint = entity_map.get(*joint)?; + *joint = entity_mapper.get_or_reserve(*joint); } - - Ok(()) } } 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 @@ -4,8 +4,7 @@ use crate::{DynamicSceneBuilder, Scene, SceneSpawnError}; use anyhow::Result; use bevy_app::AppTypeRegistry; use bevy_ecs::{ - entity::EntityMap, - prelude::Entity, + entity::{Entity, EntityMap}, reflect::{ReflectComponent, ReflectMapEntities}, world::World, }; 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 @@ -36,8 +35,10 @@ pub struct DynamicScene { /// A reflection-powered serializable representation of an entity and its components. pub struct DynamicEntity { - /// The transiently unique identifier of a corresponding [`Entity`](bevy_ecs::entity::Entity). - pub entity: u32, + /// The identifier of the entity, unique within a scene (and the world it may have been generated from). + /// + /// Components that reference this entity must consistently use this identifier. + pub entity: Entity, /// A vector of boxed components that belong to the given entity and /// implement the [`Reflect`] trait. pub components: Vec<Box<dyn Reflect>>, 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 @@ -101,7 +102,7 @@ impl DynamicScene { // or spawn a new entity with a transiently unique id if there is // no corresponding entry. let entity = *entity_map - .entry(bevy_ecs::entity::Entity::from_raw(scene_entity.entity)) + .entry(scene_entity.entity) .or_insert_with(|| world.spawn_empty().id()); let entity_mut = &mut world.entity_mut(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 @@ -141,9 +142,7 @@ impl DynamicScene { "we should be getting TypeId from this TypeRegistration in the first place", ); if let Some(map_entities_reflect) = registration.data::<ReflectMapEntities>() { - map_entities_reflect - .map_specific_entities(world, entity_map, &entities) - .unwrap(); + map_entities_reflect.map_specific_entities(world, entity_map, &entities); } } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -38,7 +38,7 @@ use std::collections::BTreeMap; /// ``` pub struct DynamicSceneBuilder<'w> { extracted_resources: BTreeMap<ComponentId, Box<dyn Reflect>>, - extracted_scene: BTreeMap<u32, DynamicEntity>, + extracted_scene: BTreeMap<Entity, DynamicEntity>, type_registry: AppTypeRegistry, original_world: &'w World, } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -123,19 +123,17 @@ impl<'w> DynamicSceneBuilder<'w> { let type_registry = self.type_registry.read(); for entity in entities { - let index = entity.index(); - - if self.extracted_scene.contains_key(&index) { + if self.extracted_scene.contains_key(&entity) { continue; } let mut entry = DynamicEntity { - entity: index, + entity, components: Vec::new(), }; - let entity = self.original_world.entity(entity); - for component_id in entity.archetype().components() { + let original_entity = self.original_world.entity(entity); + for component_id in original_entity.archetype().components() { let mut extract_and_push = || { let type_id = self .original_world diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -145,13 +143,13 @@ impl<'w> DynamicSceneBuilder<'w> { let component = type_registry .get(type_id)? .data::<ReflectComponent>()? - .reflect(entity)?; + .reflect(original_entity)?; entry.components.push(component.clone_value()); Some(()) }; extract_and_push(); } - self.extracted_scene.insert(index, entry); + self.extracted_scene.insert(entity, entry); } drop(type_registry); diff --git a/crates/bevy_scene/src/scene.rs b/crates/bevy_scene/src/scene.rs --- a/crates/bevy_scene/src/scene.rs +++ b/crates/bevy_scene/src/scene.rs @@ -120,9 +120,7 @@ impl Scene { for registration in type_registry.iter() { if let Some(map_entities_reflect) = registration.data::<ReflectMapEntities>() { - map_entities_reflect - .map_entities(world, &instance_info.entity_map) - .unwrap(); + map_entities_reflect.map_entities(world, &mut instance_info.entity_map); } } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -1,5 +1,6 @@ use crate::{DynamicEntity, DynamicScene}; use anyhow::Result; +use bevy_ecs::entity::Entity; use bevy_reflect::serde::{TypedReflectDeserializer, TypedReflectSerializer}; use bevy_reflect::{ serde::{TypeRegistrationDeserializer, UntypedReflectDeserializer}, diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -260,9 +261,9 @@ impl<'a, 'de> Visitor<'de> for SceneEntitiesVisitor<'a> { A: MapAccess<'de>, { let mut entities = Vec::new(); - while let Some(id) = map.next_key::<u32>()? { + while let Some(entity) = map.next_key::<Entity>()? { let entity = map.next_value_seed(SceneEntityDeserializer { - id, + entity, type_registry: self.type_registry, })?; entities.push(entity); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -273,7 +274,7 @@ impl<'a, 'de> Visitor<'de> for SceneEntitiesVisitor<'a> { } pub struct SceneEntityDeserializer<'a> { - pub id: u32, + pub entity: Entity, pub type_registry: &'a TypeRegistry, } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -288,7 +289,7 @@ impl<'a, 'de> DeserializeSeed<'de> for SceneEntityDeserializer<'a> { ENTITY_STRUCT, &[ENTITY_FIELD_COMPONENTS], SceneEntityVisitor { - id: self.id, + entity: self.entity, registry: self.type_registry, }, ) diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -296,7 +297,7 @@ impl<'a, 'de> DeserializeSeed<'de> for SceneEntityDeserializer<'a> { } struct SceneEntityVisitor<'a> { - pub id: u32, + pub entity: Entity, pub registry: &'a TypeRegistry, } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -318,7 +319,7 @@ impl<'a, 'de> Visitor<'de> for SceneEntityVisitor<'a> { .ok_or_else(|| Error::missing_field(ENTITY_FIELD_COMPONENTS))?; Ok(DynamicEntity { - entity: self.id, + entity: self.entity, components, }) } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -346,7 +347,7 @@ impl<'a, 'de> Visitor<'de> for SceneEntityVisitor<'a> { .take() .ok_or_else(|| Error::missing_field(ENTITY_FIELD_COMPONENTS))?; Ok(DynamicEntity { - entity: self.id, + entity: self.entity, components, }) } diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -1,5 +1,5 @@ use bevy_ecs::{ - entity::{Entity, EntityMap, MapEntities, MapEntitiesError}, + entity::{Entity, EntityMapper, MapEntities}, prelude::{Component, ReflectComponent}, }; use bevy_math::{DVec2, IVec2, Vec2}; diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -55,14 +55,13 @@ impl WindowRef { } impl MapEntities for WindowRef { - fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> { + fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { match self { Self::Entity(entity) => { - *entity = entity_map.get(*entity)?; - Ok(()) + *entity = entity_mapper.get_or_reserve(*entity); } - Self::Primary => Ok(()), - } + Self::Primary => {} + }; } } diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -145,7 +144,7 @@ pub struct Window { /// The "html canvas" element selector. /// /// If set, this selector will be used to find a matching html canvas element, - /// rather than creating a new one. + /// rather than creating a new one. /// Uses the [CSS selector format](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector). /// /// This value has no effect on non-web platforms.
diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -122,4 +105,138 @@ impl EntityMap { pub fn iter(&self) -> impl Iterator<Item = (Entity, Entity)> + '_ { self.map.iter().map(|(from, to)| (*from, *to)) } + + /// Creates an [`EntityMapper`] from this [`EntityMap`] and scoped to the provided [`World`], then calls the + /// provided function with it. This allows one to allocate new entity references in the provided `World` that are + /// guaranteed to never point at a living entity now or in the future. This functionality is useful for safely + /// mapping entity identifiers that point at entities outside the source world. The passed function, `f`, is called + /// within the scope of the passed world. Its return value is then returned from `world_scope` as the generic type + /// parameter `R`. + pub fn world_scope<R>( + &mut self, + world: &mut World, + f: impl FnOnce(&mut World, &mut EntityMapper) -> R, + ) -> R { + let mut mapper = EntityMapper::new(self, world); + let result = f(world, &mut mapper); + mapper.finish(world); + result + } +} + +/// A wrapper for [`EntityMap`], augmenting it with the ability to allocate new [`Entity`] references in a destination +/// world. These newly allocated references are guaranteed to never point to any living entity in that world. +/// +/// References are allocated by returning increasing generations starting from an internally initialized base +/// [`Entity`]. After it is finished being used by [`MapEntities`] implementations, this entity is despawned and the +/// requisite number of generations reserved. +pub struct EntityMapper<'m> { + /// The wrapped [`EntityMap`]. + map: &'m mut EntityMap, + /// A base [`Entity`] used to allocate new references. + dead_start: Entity, + /// The number of generations this mapper has allocated thus far. + generations: u32, +} + +impl<'m> EntityMapper<'m> { + /// Returns the corresponding mapped entity or reserves a new dead entity ID if it is absent. + pub fn get_or_reserve(&mut self, entity: Entity) -> Entity { + if let Some(mapped) = self.map.get(entity) { + return mapped; + } + + // this new entity reference is specifically designed to never represent any living entity + let new = Entity { + generation: self.dead_start.generation + self.generations, + index: self.dead_start.index, + }; + self.generations += 1; + + self.map.insert(entity, new); + + new + } + + /// Gets a reference to the underlying [`EntityMap`]. + pub fn get_map(&'m self) -> &'m EntityMap { + self.map + } + + /// Gets a mutable reference to the underlying [`EntityMap`] + pub fn get_map_mut(&'m mut self) -> &'m mut EntityMap { + self.map + } + + /// Creates a new [`EntityMapper`], spawning a temporary base [`Entity`] in the provided [`World`] + fn new(map: &'m mut EntityMap, world: &mut World) -> Self { + Self { + map, + // SAFETY: Entities data is kept in a valid state via `EntityMap::world_scope` + dead_start: unsafe { world.entities_mut().alloc() }, + generations: 0, + } + } + + /// Reserves the allocated references to dead entities within the world. This frees the temporary base + /// [`Entity`] while reserving extra generations via [`crate::entity::Entities::reserve_generations`]. Because this + /// renders the [`EntityMapper`] unable to safely allocate any more references, this method takes ownership of + /// `self` in order to render it unusable. + fn finish(self, world: &mut World) { + // SAFETY: Entities data is kept in a valid state via `EntityMap::world_scope` + let entities = unsafe { world.entities_mut() }; + assert!(entities.free(self.dead_start).is_some()); + assert!(entities.reserve_generations(self.dead_start.index, self.generations)); + } +} + +#[cfg(test)] +mod tests { + use super::{EntityMap, EntityMapper}; + use crate::{entity::Entity, world::World}; + + #[test] + fn entity_mapper() { + const FIRST_IDX: u32 = 1; + const SECOND_IDX: u32 = 2; + + let mut map = EntityMap::default(); + let mut world = World::new(); + let mut mapper = EntityMapper::new(&mut map, &mut world); + + let mapped_ent = Entity::new(FIRST_IDX, 0); + let dead_ref = mapper.get_or_reserve(mapped_ent); + + assert_eq!( + dead_ref, + mapper.get_or_reserve(mapped_ent), + "should persist the allocated mapping from the previous line" + ); + assert_eq!( + mapper.get_or_reserve(Entity::new(SECOND_IDX, 0)).index(), + dead_ref.index(), + "should re-use the same index for further dead refs" + ); + + mapper.finish(&mut world); + // Next allocated entity should be a further generation on the same index + let entity = world.spawn_empty().id(); + assert_eq!(entity.index(), dead_ref.index()); + assert!(entity.generation() > dead_ref.generation()); + } + + #[test] + fn world_scope_reserves_generations() { + let mut map = EntityMap::default(); + let mut world = World::new(); + + let dead_ref = map.world_scope(&mut world, |_, mapper| { + mapper.get_or_reserve(Entity::new(0, 0)) + }); + + // Next allocated entity should be a further generation on the same index + let entity = world.spawn_empty().id(); + assert_eq!(entity.index(), dead_ref.index()); + assert!(entity.generation() > dead_ref.generation()); + } } diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -847,4 +885,29 @@ mod tests { const C4: u32 = Entity::from_bits(0x00dd_00ff_0000_0000).generation(); assert_eq!(0x00dd_00ff, C4); } + + #[test] + fn reserve_generations() { + let mut entities = Entities::new(); + let entity = entities.alloc(); + entities.free(entity); + + assert!(entities.reserve_generations(entity.index, 1)); + } + + #[test] + fn reserve_generations_and_alloc() { + const GENERATIONS: u32 = 10; + + let mut entities = Entities::new(); + let entity = entities.alloc(); + entities.free(entity); + + assert!(entities.reserve_generations(entity.index, GENERATIONS)); + + // The very next entitiy allocated should be a further generation on the same index + let next_entity = entities.alloc(); + assert_eq!(next_entity.index(), entity.index()); + assert!(next_entity.generation > entity.generation + GENERATIONS); + } } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -243,7 +241,7 @@ mod tests { let scene = builder.build(); assert_eq!(scene.entities.len(), 1); - assert_eq!(scene.entities[0].entity, entity.index()); + assert_eq!(scene.entities[0].entity, entity); assert_eq!(scene.entities[0].components.len(), 1); assert!(scene.entities[0].components[0].represents::<ComponentA>()); } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -264,7 +262,7 @@ mod tests { let scene = builder.build(); assert_eq!(scene.entities.len(), 1); - assert_eq!(scene.entities[0].entity, entity.index()); + assert_eq!(scene.entities[0].entity, entity); assert_eq!(scene.entities[0].components.len(), 1); assert!(scene.entities[0].components[0].represents::<ComponentA>()); } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -288,7 +286,7 @@ mod tests { let scene = builder.build(); assert_eq!(scene.entities.len(), 1); - assert_eq!(scene.entities[0].entity, entity.index()); + assert_eq!(scene.entities[0].entity, entity); assert_eq!(scene.entities[0].components.len(), 2); assert!(scene.entities[0].components[0].represents::<ComponentA>()); assert!(scene.entities[0].components[1].represents::<ComponentB>()); diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -315,10 +313,10 @@ mod tests { let mut entities = builder.build().entities.into_iter(); // Assert entities are ordered - assert_eq!(entity_a.index(), entities.next().map(|e| e.entity).unwrap()); - assert_eq!(entity_b.index(), entities.next().map(|e| e.entity).unwrap()); - assert_eq!(entity_c.index(), entities.next().map(|e| e.entity).unwrap()); - assert_eq!(entity_d.index(), entities.next().map(|e| e.entity).unwrap()); + assert_eq!(entity_a, entities.next().map(|e| e.entity).unwrap()); + assert_eq!(entity_b, entities.next().map(|e| e.entity).unwrap()); + assert_eq!(entity_c, entities.next().map(|e| e.entity).unwrap()); + assert_eq!(entity_d, entities.next().map(|e| e.entity).unwrap()); } #[test] diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -345,7 +343,7 @@ mod tests { assert_eq!(scene.entities.len(), 2); let mut scene_entities = vec![scene.entities[0].entity, scene.entities[1].entity]; scene_entities.sort(); - assert_eq!(scene_entities, [entity_a_b.index(), entity_a.index()]); + assert_eq!(scene_entities, [entity_a_b, entity_a]); } #[test] diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -365,7 +363,7 @@ mod tests { let scene = builder.build(); assert_eq!(scene.entities.len(), 1); - assert_eq!(scene.entities[0].entity, entity_a.index()); + assert_eq!(scene.entities[0].entity, entity_a); } #[test] diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -424,8 +425,11 @@ mod tests { use crate::serde::{SceneDeserializer, SceneSerializer}; use crate::{DynamicScene, DynamicSceneBuilder}; use bevy_app::AppTypeRegistry; - use bevy_ecs::entity::EntityMap; + use bevy_ecs::entity::{Entity, EntityMap, EntityMapper, MapEntities}; use bevy_ecs::prelude::{Component, ReflectComponent, ReflectResource, Resource, World}; + use bevy_ecs::query::{With, Without}; + use bevy_ecs::reflect::ReflectMapEntities; + use bevy_ecs::world::FromWorld; use bevy_reflect::{FromReflect, Reflect, ReflectSerialize}; use bincode::Options; use serde::de::DeserializeSeed; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -466,6 +470,22 @@ mod tests { foo: i32, } + #[derive(Clone, Component, Reflect, PartialEq)] + #[reflect(Component, MapEntities, PartialEq)] + struct MyEntityRef(Entity); + + impl MapEntities for MyEntityRef { + fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { + self.0 = entity_mapper.get_or_reserve(self.0); + } + } + + impl FromWorld for MyEntityRef { + fn from_world(_world: &mut World) -> Self { + Self(Entity::PLACEHOLDER) + } + } + fn create_world() -> World { let mut world = World::new(); let registry = AppTypeRegistry::default(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -480,6 +500,8 @@ mod tests { registry.register_type_data::<String, ReflectSerialize>(); registry.register::<[usize; 3]>(); registry.register::<(f32, f32)>(); + registry.register::<MyEntityRef>(); + registry.register::<Entity>(); registry.register::<MyResource>(); } world.insert_resource(registry); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -596,6 +618,57 @@ mod tests { assert_eq!(1, dst_world.query::<&Baz>().iter(&dst_world).count()); } + #[test] + fn should_roundtrip_with_later_generations_and_obsolete_references() { + let mut world = create_world(); + + world.spawn_empty().despawn(); + + let a = world.spawn_empty().id(); + let foo = world.spawn(MyEntityRef(a)).insert(Foo(123)).id(); + world.despawn(a); + world.spawn(MyEntityRef(foo)).insert(Bar(123)); + + let registry = world.resource::<AppTypeRegistry>(); + + let scene = DynamicScene::from_world(&world, registry); + + let serialized = scene + .serialize_ron(&world.resource::<AppTypeRegistry>().0) + .unwrap(); + let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); + let scene_deserializer = SceneDeserializer { + type_registry: &registry.0.read(), + }; + + let deserialized_scene = scene_deserializer.deserialize(&mut deserializer).unwrap(); + + let mut map = EntityMap::default(); + let mut dst_world = create_world(); + deserialized_scene + .write_to_world(&mut dst_world, &mut map) + .unwrap(); + + assert_eq!(2, deserialized_scene.entities.len()); + assert_scene_eq(&scene, &deserialized_scene); + + let bar_to_foo = dst_world + .query_filtered::<&MyEntityRef, Without<Foo>>() + .get_single(&dst_world) + .cloned() + .unwrap(); + let foo = dst_world + .query_filtered::<Entity, With<Foo>>() + .get_single(&dst_world) + .unwrap(); + + assert_eq!(foo, bar_to_foo.0); + assert!(dst_world + .query_filtered::<&MyEntityRef, With<Foo>>() + .iter(&dst_world) + .all(|r| world.get_entity(r.0).is_none())); + } + #[test] fn should_roundtrip_postcard() { let mut world = create_world(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -696,12 +769,12 @@ mod tests { assert_eq!( vec![ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 0, 0, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, 58, - 115, 101, 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, 111, - 109, 112, 111, 110, 101, 110, 116, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 102, 102, 166, 63, 205, 204, 108, 64, 1, 0, 0, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, + 58, 58, 115, 101, 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, + 67, 111, 109, 112, 111, 110, 101, 110, 116, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 102, 102, 166, 63, 205, 204, 108, 64, 1, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 ], serialized_scene ); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -732,7 +805,7 @@ mod tests { .entities .iter() .find(|dynamic_entity| dynamic_entity.entity == expected.entity) - .unwrap_or_else(|| panic!("missing entity (expected: `{}`)", expected.entity)); + .unwrap_or_else(|| panic!("missing entity (expected: `{:?}`)", expected.entity)); assert_eq!(expected.entity, received.entity, "entities did not match",);
DynamicScenes contain invalid Entity references ## Bevy version Commit hash: 15acd6f45deb3cd21d1f3a9e7d39d135068f09c5 (post v0.7.0) ## Bug description Minimal example <details> ```rust use bevy::{ecs::entity::EntityMap, prelude::*}; fn main() { App::new() .add_plugins(DefaultPlugins) .add_startup_system(save_scene_system) .run(); } #[derive(Resource)] pub struct StoredScene(Option<DynamicScene>); fn save_scene_system(world: &mut World) { let mut scene_world = World::new(); // Uncomment the following lines to cause the bug! let child = scene_world.spawn(()).id(); scene_world.despawn(child); let child = scene_world.spawn(()).id(); scene_world.spawn(()).push_children(&[child]); let type_registry = world.resource::<AppTypeRegistry>(); let scene = DynamicScene::from_world(&scene_world, type_registry); println!("{}", scene.serialize_ron(type_registry).unwrap()); scene .write_to_world(world, &mut EntityMap::default()) .unwrap(); } ``` </details> When applying `DynamicScene`s to a world using write_to_world, the operation will sometimes panic. (more specifically, it will crash if the DynamicScene was created from any entities with a generation != 0 which belong to a hierarchy) ## Cause DynamicScenes store entities without their generation, which makes sense because the simple ids are transiently unique. However, `Entity`s stored in components (such as `Parent` or `Children`) still contain the generation. This means that upon applying the `DynamicScene`, the mapping phase of write_to_world will try to map the "generationful" `Entity`s and will fail to find them in the map (because the map only has a 0-generation for its keys). ### Important note OUTDATED ~~I believe most people never encounter this problem, because DynamicScenes are mainly used alongside serialization, and serialization of an `Entity` strips it of its generation already. (I didn't find where in the codebase but it's what I deduce)~~ UPDATE: The workaround above no longer works as per #6194 ## Proposed fix OUTDATED ~~I believe we would simply need to add a prior mapping phase in DynamicScene::from_world to strip the generation of all `Entity`s contained in components. I will file a PR soon. Nevermind, I am not well-enough versed in the deep arts of reflection~~ UPDATE: Since the arguments in #6194 are convincing that serializing the generation is useful, I think we need another solution. Possibly, storing the generation in the DynamicScenes
Well, I think my reflection-fu is not strong enough for this, so I'm giving up on the PR, I'll let someone with more experience in that area/more determination tackle this. I tried implementing the initial generation-stripping mapping phase in DynamicScene::from_world but I don't know how to call MapEntities on the cloned & reflected component. I think doing this might require fiddling with the reflection related types and I'm not too comfortable with that stuff. > I believe most people never encounter this problem, because DynamicScenes are mainly used alongside serialization, and serialization of an Entity strips it of its generation already. (I didn't find where in the codebase but it's what I deduce) Note that this is no longer the case since https://github.com/bevyengine/bevy/pull/6194. Generation is now serialized so this happens when saving and loading a scene too, making this affect a lot more use cases. Simply saving and loading a scene that contains a dynamic scene with any hierarchy now fails. I updated the original post to reflect this, as well as the minimal repro example :+1:
2023-01-22T20:27:10Z
1.67
2023-07-18T11:03:51Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "change_detection::tests::set_if_neq", "entity::tests::entity_bits_roundtrip", "change_detection::tests::change_tick_wraparound", "entity::tests::entity_const", "change_detection::tests::change_tick_scan", "change_detection::tests::change_expiration", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_last", "event::tests::test_event_iter_len_updated", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_drain_and_read", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_struct_variants", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::many_entities", "query::tests::multi_storage_query", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::derived_worldqueries", "query::tests::query_iter_combinations", "query::tests::query_iter_combinations_sparse", "query::tests::self_conflicting_worldquery - should panic", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_filtered_iter_combinations", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "system::commands::command_queue::test::test_command_is_send", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::aligned_zst", "storage::table::tests::table", "system::commands::command_queue::test::test_command_queue_inner_drop", "system::commands::command_queue::test::test_command_queue_inner", "system::commands::command_queue::test::test_command_queue_inner_panic_safe", "system::commands::tests::commands", "storage::blob_vec::tests::resize_test", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_flexibility", "system::commands::tests::remove_components", "system::commands::tests::remove_resources", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_where_clause", "system::tests::assert_systems", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::convert_mut_to_immut", "system::tests::can_have_16_parameters", "system::tests::get_system_conflicts", "system::tests::long_life_test", "system::tests::immutable_mut_test", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::query_validates_world_id - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::write_system_state", "system::tests::system_state_invalid_world - should panic", "system::tests::query_is_empty", "system::tests::update_archetype_component_access_works", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::clear_entities", "tests::added_tracking", "tests::despawn_table_storage", "tests::empty_spawn", "tests::filtered_query_access", "tests::added_queries", "tests::changed_query", "tests::exact_size_query", "tests::bundle_derive", "tests::changed_trackers", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_get - should panic", "tests::duplicate_components_panic - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::changed_trackers_sparse", "tests::multiple_worlds_same_query_iter - should panic", "tests::despawn_mixed_storage", "tests::insert_overwrite_drop", "tests::non_send_resource", "tests::mut_and_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::add_remove_components", "tests::non_send_resource_drop_from_same_thread", "query::tests::query_filtered_exactsizeiterator_len", "tests::non_send_resource_points_to_distinct_data", "tests::query_all", "tests::query_filter_with", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_all_for_each", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_filter_with_for_each", "tests::query_missing_component", "tests::non_send_resource_panic - should panic", "tests::query_optional_component_sparse", "system::tests::or_has_filter_with_when_both_have_it", "tests::query_get", "tests::query_get_works_across_sparse_removal", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::or_param_set_system", "tests::query_optional_component_table", "system::tests::non_send_system", "system::tests::non_send_option_system", "tests::query_optional_component_sparse_no_match", "schedule::tests::conditions::systems_nested_in_system_sets", "tests::query_sparse_component", "schedule::tests::system_execution::run_exclusive_system", "tests::query_single_component", "system::tests::query_set_system", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "schedule::tests::conditions::multiple_conditions_on_system", "system::tests::panic_inside_system - should panic", "schedule::tests::system_ordering::order_exclusive_systems", "system::tests::or_expanded_with_and_without_common", "tests::random_access", "system::tests::query_system_gets", "tests::ref_and_mut_query_panic - should panic", "tests::reserve_and_spawn", "system::tests::disjoint_query_mut_system", "system::tests::local_system", "system::tests::into_iter_impl", "tests::remove", "tests::query_single_component_for_each", "tests::remove_missing", "system::tests::disjoint_query_mut_read_component_system", "system::tests::world_collections_system", "schedule::tests::conditions::system_with_condition", "event::tests::test_event_iter_nth", "system::tests::or_with_without_and_compatible_with_without", "system::tests::nonconflicting_system_resources", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::tests::option_doesnt_remove_unrelated_filter_with", "schedule::condition::tests::run_condition_combinators", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::commands_param_set", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::any_of_and_without", "schedule::condition::tests::multiple_run_conditions", "system::tests::removal_tracking", "system::tests::or_expanded_nested_with_and_common_nested_without", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::tests::conditions::system_conditions_and_change_detection", "system::tests::or_has_filter_with", "schedule::set::tests::test_boxed_label", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::readonly_query_get_mut_component_fails", "tests::par_for_each_sparse", "tests::remove_tracking", "schedule::tests::system_ordering::order_systems", "tests::reserve_entities_across_worlds", "system::tests::changed_resource_system", "tests::resource_scope", "schedule::condition::tests::run_condition", "tests::sparse_set_add_remove_many", "tests::resource", "tests::par_for_each_dense", "tests::spawn_batch", "tests::stateful_query_handles_new_archetype", "tests::take", "world::entity_ref::tests::despawning_entity_updates_table_row", "query::tests::par_iter_mut_change_detection", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::spawn_empty_bundle", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::world_cell::tests::world_access_reused", "world::world_cell::tests::world_cell", "world::world_cell::tests::world_cell_double_mut - should panic", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "world::world_cell::tests::world_cell_ref_and_ref", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "src/component.rs - component::Component (line 124) - compile fail", "src/query/fetch.rs - query::fetch::WorldQuery (line 101) - compile fail", "src/component.rs - component::ComponentTicks::set_changed (line 715) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 143) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 153) - compile", "src/change_detection.rs - change_detection::DetectChangesMut (line 77)", "src/bundle.rs - bundle::Bundle (line 94)", "src/change_detection.rs - change_detection::DetectChanges (line 33)", "src/component.rs - component::Component (line 134)", "src/component.rs - component::Component (line 80)", "src/component.rs - component::Component (line 99)", "src/lib.rs - (line 288)", "src/component.rs - component::Component (line 34)", "src/schedule/state.rs - schedule::state::States (line 26)", "src/component.rs - component::ComponentIdFor (line 731)", "src/lib.rs - (line 190)", "src/component.rs - component::StorageType (line 178)", "src/lib.rs - (line 31)", "src/event.rs - event::EventWriter (line 274)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 255)", "src/query/fetch.rs - query::fetch::WorldQuery (line 217)", "src/query/fetch.rs - query::fetch::WorldQuery (line 192)", "src/lib.rs - (line 240)", "src/lib.rs - (line 166)", "src/query/fetch.rs - query::fetch::WorldQuery (line 117)", "src/lib.rs - (line 213)", "src/lib.rs - (line 75)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 241)", "src/system/commands/mod.rs - system::commands::Command (line 24)", "src/system/commands/mod.rs - system::commands::Commands (line 88)", "src/event.rs - event::Events (line 79)", "src/query/filter.rs - query::filter::Or (line 222)", "src/system/commands/mod.rs - system::commands::Commands (line 70)", "src/query/fetch.rs - query::fetch::WorldQuery (line 245)", "src/component.rs - component::Components::component_id (line 494)", "src/query/fetch.rs - query::fetch::WorldQuery (line 137)", "src/entity/mod.rs - entity::Entity (line 77)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 135)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 236)", "src/system/mod.rs - system::assert_is_read_only_system (line 173) - compile fail", "src/change_detection.rs - change_detection::ResMut<'a,T>::map_unchanged (line 487)", "src/change_detection.rs - change_detection::NonSendMut<'a,T>::map_unchanged (line 520)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 250)", "src/system/combinator.rs - system::combinator::PipeSystem (line 254)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 148)", "src/entity/mod.rs - entity::Entity (line 97)", "src/change_detection.rs - change_detection::Mut<'a,T>::map_unchanged (line 638)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many (line 231)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 315)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::remove (line 712)", "src/lib.rs - (line 42)", "src/lib.rs - (line 255)", "src/event.rs - event::EventWriter (line 257)", "src/lib.rs - (line 92)", "src/system/function_system.rs - system::function_system::SystemState (line 83)", "src/query/filter.rs - query::filter::Without (line 121)", "src/query/filter.rs - query::filter::Changed (line 594)", "src/system/function_system.rs - system::function_system::SystemParamFunction (line 514)", "src/query/filter.rs - query::filter::Added (line 558)", "src/removal_detection.rs - removal_detection::RemovedComponents (line 119)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 458)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::despawn (line 761)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 772)", "src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 217)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::add (line 786)", "src/component.rs - component::Components::resource_id (line 528)", "src/query/fetch.rs - query::fetch::WorldQuery (line 60)", "src/system/commands/mod.rs - system::commands::EntityCommand (line 546)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many (line 827) - compile", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::many_mut (line 932) - compile", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 317)", "src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 654)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 421)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 510)", "src/lib.rs - (line 52)", "src/schedule/condition.rs - schedule::condition::Condition::or_else (line 76)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 121)", "src/query/fetch.rs - query::fetch::WorldQuery (line 280)", "src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 865)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::id (line 634)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations (line 419)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 432)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_combinations_mut (line 453)", "src/query/filter.rs - query::filter::With (line 24)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 211)", "src/system/system_param.rs - system::system_param::Resource (line 384) - compile fail", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 217)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1459) - compile fail", "src/system/mod.rs - system::IntoSystem (line 200)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 197)", "src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 156)", "src/system/mod.rs - system::In (line 249)", "src/system/mod.rs - system::adapter::ignore (line 448)", "src/schedule/condition.rs - schedule::condition::common_conditions::not (line 912)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::insert (line 658)", "src/system/mod.rs - system::adapter::dbg (line 361)", "src/system/mod.rs - system (line 13)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 44)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1435)", "src/lib.rs - (line 125)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists_and_equals (line 706)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 357)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 485)", "src/system/system_param.rs - system::system_param::Resource (line 395)", "src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 129)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 270)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 25)", "src/system/function_system.rs - system::function_system::SystemState (line 115)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many_mut (line 291)", "src/system/combinator.rs - system::combinator::Combine (line 18)", "src/system/mod.rs - system (line 56)", "src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 822)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 274)", "src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 24)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 552)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 607)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 482)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 367)", "src/system/mod.rs - system::adapter::error (line 417)", "src/system/mod.rs - system::adapter::new (line 275)", "src/system/mod.rs - system::adapter::info (line 334)", "src/system/query.rs - system::query::Query (line 162)", "src/system/mod.rs - system::adapter::unwrap (line 303)", "src/system/query.rs - system::query::Query (line 77)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_inner (line 1410)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single_mut (line 1222)", "src/system/mod.rs - system::adapter::warn (line 388)", "src/system/query.rs - system::query::Query (line 57)", "src/world/mod.rs - world::World::component_id (line 214)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_mut (line 874)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single (line 1175)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::contains (line 1312)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component (line 1005)", "src/system/query.rs - system::query::Query (line 97)", "src/system/system_param.rs - system::system_param::ParamSet (line 273)", "src/system/query.rs - system::query::Query (line 36)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter (line 352)", "src/world/mod.rs - world::World::despawn (line 616)", "src/system/mod.rs - system::assert_is_system (line 140)", "src/system/system_param.rs - system::system_param::Local (line 647)", "src/world/mod.rs - world::World::spawn_empty (line 411)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get (line 761)", "src/system/query.rs - system::query::Query (line 113)", "src/system/query.rs - system::query::Query (line 139)", "src/world/mod.rs - world::World::clear_trackers (line 658)", "src/world/mod.rs - world::World::spawn_batch (line 543)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_component_mut (line 1063)", "src/world/mod.rs - world::World::get (line 569)", "src/world/mod.rs - world::World::entity_mut (line 260)", "src/world/mod.rs - world::World::get_entity_mut (line 386)", "src/world/mod.rs - world::World::query_filtered (line 755)", "src/system/system_param.rs - system::system_param::SystemParam (line 46)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each_mut (line 693)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::for_each (line 655)", "src/system/system_param.rs - system::system_param::ParamSet (line 308)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::is_empty (line 1288)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_mut (line 387)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many (line 487)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_inner (line 1453)", "src/world/mod.rs - world::World::spawn (line 444)", "src/world/mod.rs - world::World::schedule_scope (line 1770)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::iter_many_mut (line 543)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::single (line 1147)", "src/system/system_param.rs - system::system_param::Resource (line 355)", "src/system/system_param.rs - system::system_param::Local (line 670)", "src/world/mod.rs - world::World::get_entity (line 333)", "src/system/query.rs - system::query::Query<'w,'s,Q,F>::get_single_mut (line 1252)", "src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::world_scope (line 677)", "src/world/mod.rs - world::World::entity (line 235)", "src/world/mod.rs - world::World::insert_or_spawn_batch (line 1158)", "src/world/mod.rs - world::World::get_mut (line 590)", "src/world/mod.rs - world::World::resource_scope (line 1276)", "src/system/system_param.rs - system::system_param::ParamSet (line 244)", "src/world/mod.rs - world::World::query (line 688)", "src/world/mod.rs - world::World::query (line 724)", "src/system/system_param.rs - system::system_param::Deferred (line 784)", "dynamic_scene_builder::tests::extract_one_resource_twice", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::remove_componentless_entity", "dynamic_scene_builder::tests::extract_query", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_roundtrip_bincode", "serde::tests::should_serialize", "serde::tests::should_deserialize", "src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 102)", "src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 22)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
7,264
bevyengine__bevy-7264
[ "7263" ]
09f1bd0be7bb1b6642dab989f1ebafe8807a1473
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 @@ -2,6 +2,8 @@ use crate::components::{GlobalTransform, Transform}; use bevy_ecs::{ change_detection::Ref, prelude::{Changed, DetectChanges, Entity, Query, With, Without}, + removal_detection::RemovedComponents, + system::{Local, ParamSet}, }; use bevy_hierarchy::{Children, Parent}; 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 @@ -9,16 +11,30 @@ use bevy_hierarchy::{Children, Parent}; /// /// Third party plugins should ensure that this is used in concert with [`propagate_transforms`]. pub fn sync_simple_transforms( - mut query: Query< - (&Transform, &mut GlobalTransform), - (Changed<Transform>, Without<Parent>, Without<Children>), - >, + mut query: ParamSet<( + Query< + (&Transform, &mut GlobalTransform), + (Changed<Transform>, Without<Parent>, Without<Children>), + >, + Query<(Ref<Transform>, &mut GlobalTransform), Without<Children>>, + )>, + mut orphaned: RemovedComponents<Parent>, ) { + // Update changed entities. query + .p0() .par_iter_mut() .for_each_mut(|(transform, mut global_transform)| { *global_transform = GlobalTransform::from(*transform); }); + // Update orphaned entities. + let mut query = query.p1(); + let mut iter = query.iter_many_mut(orphaned.iter()); + while let Some((transform, mut global_transform)) = iter.fetch_next() { + if !transform.is_changed() { + *global_transform = GlobalTransform::from(*transform); + } + } } /// Update [`GlobalTransform`] component of entities based on entity hierarchy and 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 @@ -30,12 +46,17 @@ pub fn propagate_transforms( (Entity, &Children, Ref<Transform>, &mut GlobalTransform), Without<Parent>, >, + mut orphaned: RemovedComponents<Parent>, transform_query: Query<(Ref<Transform>, &mut GlobalTransform, Option<&Children>), With<Parent>>, parent_query: Query<(Entity, Ref<Parent>)>, + mut orphaned_entities: Local<Vec<Entity>>, ) { + orphaned_entities.clear(); + orphaned_entities.extend(orphaned.iter()); + orphaned_entities.sort_unstable(); root_query.par_iter_mut().for_each_mut( |(entity, children, transform, mut global_transform)| { - let changed = transform.is_changed(); + let changed = transform.is_changed() || orphaned_entities.binary_search(&entity).is_ok(); if changed { *global_transform = GlobalTransform::from(*transform); }
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 @@ -165,6 +186,61 @@ mod test { use crate::TransformBundle; use bevy_hierarchy::{BuildChildren, BuildWorldChildren, Children, Parent}; + #[test] + fn correct_parent_removed() { + ComputeTaskPool::init(TaskPool::default); + let mut world = World::default(); + let offset_global_transform = + |offset| GlobalTransform::from(Transform::from_xyz(offset, offset, offset)); + let offset_transform = + |offset| TransformBundle::from_transform(Transform::from_xyz(offset, offset, offset)); + + let mut schedule = Schedule::new(); + schedule.add_systems((sync_simple_transforms, propagate_transforms)); + + let mut command_queue = CommandQueue::default(); + let mut commands = Commands::new(&mut command_queue, &world); + let root = commands.spawn(offset_transform(3.3)).id(); + let parent = commands.spawn(offset_transform(4.4)).id(); + let child = commands.spawn(offset_transform(5.5)).id(); + commands.entity(parent).set_parent(root); + commands.entity(child).set_parent(parent); + command_queue.apply(&mut world); + schedule.run(&mut world); + + assert_eq!( + world.get::<GlobalTransform>(parent).unwrap(), + &offset_global_transform(4.4 + 3.3), + "The transform systems didn't run, ie: `GlobalTransform` wasn't updated", + ); + + // Remove parent of `parent` + let mut command_queue = CommandQueue::default(); + let mut commands = Commands::new(&mut command_queue, &world); + commands.entity(parent).remove_parent(); + command_queue.apply(&mut world); + schedule.run(&mut world); + + assert_eq!( + world.get::<GlobalTransform>(parent).unwrap(), + &offset_global_transform(4.4), + "The global transform of an orphaned entity wasn't updated properly", + ); + + // Remove parent of `child` + let mut command_queue = CommandQueue::default(); + let mut commands = Commands::new(&mut command_queue, &world); + commands.entity(child).remove_parent(); + command_queue.apply(&mut world); + schedule.run(&mut world); + + assert_eq!( + world.get::<GlobalTransform>(child).unwrap(), + &offset_global_transform(5.5), + "The global transform of an orphaned entity wasn't updated properly", + ); + } + #[test] fn did_propagate() { ComputeTaskPool::init(TaskPool::default);
The `GlobalTransform` did not get updated when `Parent` was removed ## What problem does this solve or what need does it fill? The `GlobalTransform` did not get updated (it should be) when `Parent` was removed. ## What solution would you like? - Always recalculate the new `GlobalTransform` then `set_if_neq`. ```rust if transform_changed { *global_transform = GlobalTransform::from(*transform); } else { global_transform.set_if_neq(GlobalTransform::from(*transform)); } ``` - Or use `RemovedComponents<Parent>`, _which may have poor performance_ if there have so many entities without `Transform`. - Or use `Removed` change detection, _but does not exist currently_. ```rust Query<(&Transform, &mut GlobalTransform, Removed<Parent>)> ``` ```rust if parent_removed || transform_changed { *global_transform = GlobalTransform::from(*transform); } ``` ## What alternative(s) have you considered? none ## Additional context none
Bevy 0.10 will have new commands to update parent while updating the transform, see * #7024 * #7020 I may have misunderstood the issue. Could you provide a minimal reproducible example or at least try with the last `main` commit? It might have been fixed with a recent commit. * https://github.com/bevyengine/bevy/pull/6870 > I may have misunderstood the issue. Could you provide a minimal reproducible example or at least try with the last `main` commit? It might have been fixed with a recent commit. > > * [[Merged by Bors] - Improve change detection behavior for transform propagation #6870](https://github.com/bevyengine/bevy/pull/6870) Here is a simple test case for this. ```rust #[test] fn correct_parent_removed() { ComputeTaskPool::init(TaskPool::default); let mut world = World::default(); let mut update_stage = SystemStage::parallel(); update_stage.add_system(sync_simple_transforms); update_stage.add_system(propagate_transforms); let mut schedule = Schedule::default(); schedule.add_stage(Update, update_stage); let (root, parent, child) = { let mut command_queue = CommandQueue::default(); let mut commands = Commands::new(&mut command_queue, &world); let root = commands.spawn(TransformBundle::from_transform(Transform::from_xyz(1.0, 0.0, 0.0))).id(); let parent = commands.spawn(TransformBundle::IDENTITY).id(); let child = commands.spawn(TransformBundle::IDENTITY).id(); commands.entity(parent).set_parent(root); commands.entity(child).set_parent(parent); command_queue.apply(&mut world); schedule.run(&mut world); (root, parent, child) }; assert_ne!( world.get::<GlobalTransform>(parent).unwrap(), &GlobalTransform::from(Transform::IDENTITY) ); // Remove parent of `parent` { let mut command_queue = CommandQueue::default(); let mut commands = Commands::new(&mut command_queue, &world); commands.entity(parent).remove_parent(); command_queue.apply(&mut world); schedule.run(&mut world); } assert_eq!( world.get::<GlobalTransform>(parent).unwrap(), &GlobalTransform::from(Transform::IDENTITY) ); } ``` yeah I can reproduce. I've a fix working, I'll open a PR shortly
2023-01-18T10:00:31Z
1.67
2025-01-28T04:46:44Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "systems::test::correct_parent_removed" ]
[ "components::global_transform::test::reparented_to_transform_identity", "components::global_transform::test::reparented_usecase", "systems::test::did_propagate_command_buffer", "systems::test::correct_children", "systems::test::did_propagate", "systems::test::correct_transforms_when_no_children", "systems::test::panic_when_hierarchy_cycle - should panic", "crates/bevy_transform/src/components/global_transform.rs - components::global_transform::GlobalTransform::reparented_to (line 118)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
6,960
bevyengine__bevy-6960
[ "4278" ]
c6170d48f91357b5ed8ebb167b33d3cfa9688a6d
diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -50,7 +50,7 @@ pub mod prelude { Commands, Deferred, In, IntoSystem, Local, NonSend, NonSendMut, ParallelCommands, ParamSet, Query, ReadOnlySystem, Res, ResMut, Resource, System, SystemParamFunction, }, - world::{FromWorld, World}, + world::{EntityRef, FromWorld, World}, }; } diff --git a/crates/bevy_ecs/src/query/access.rs b/crates/bevy_ecs/src/query/access.rs --- a/crates/bevy_ecs/src/query/access.rs +++ b/crates/bevy_ecs/src/query/access.rs @@ -121,6 +121,11 @@ impl<T: SparseSetIndex> Access<T> { self.writes.contains(index.sparse_set_index()) } + /// Returns `true` if this accesses anything mutably. + pub fn has_any_write(&self) -> bool { + !self.writes.is_clear() + } + /// Sets this as having access to all indexed elements (i.e. `&World`). pub fn read_all(&mut self) { self.reads_all = true; diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -5,7 +5,7 @@ use crate::{ entity::Entity, query::{Access, DebugCheckedUnwrap, FilteredAccess}, storage::{ComponentSparseSet, Table, TableRow}, - world::{unsafe_world_cell::UnsafeWorldCell, Mut, Ref, World}, + world::{unsafe_world_cell::UnsafeWorldCell, EntityRef, Mut, Ref, World}, }; pub use bevy_ecs_macros::WorldQuery; use bevy_ptr::{ThinSlicePtr, UnsafeCellDeref}; diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -536,6 +536,89 @@ unsafe impl WorldQuery for Entity { /// SAFETY: access is read only unsafe impl ReadOnlyWorldQuery for Entity {} +/// SAFETY: `Self` is the same as `Self::ReadOnly` +unsafe impl<'a> WorldQuery for EntityRef<'a> { + type Fetch<'w> = &'w World; + type Item<'w> = EntityRef<'w>; + type ReadOnly = Self; + type State = (); + + fn shrink<'wlong: 'wshort, 'wshort>(item: Self::Item<'wlong>) -> Self::Item<'wshort> { + item + } + + const IS_DENSE: bool = true; + + const IS_ARCHETYPAL: bool = true; + + unsafe fn init_fetch<'w>( + world: UnsafeWorldCell<'w>, + _state: &Self::State, + _last_run: Tick, + _this_run: Tick, + ) -> Self::Fetch<'w> { + // SAFE: EntityRef has permission to access the whole world immutably thanks to update_component_access and update_archetype_component_access + world.world() + } + + unsafe fn clone_fetch<'w>(world: &Self::Fetch<'w>) -> Self::Fetch<'w> { + world + } + + #[inline] + unsafe fn set_archetype<'w>( + _fetch: &mut Self::Fetch<'w>, + _state: &Self::State, + _archetype: &'w Archetype, + _table: &Table, + ) { + } + + #[inline] + unsafe fn set_table<'w>(_fetch: &mut Self::Fetch<'w>, _state: &Self::State, _table: &'w Table) { + } + + #[inline(always)] + unsafe fn fetch<'w>( + world: &mut Self::Fetch<'w>, + entity: Entity, + _table_row: TableRow, + ) -> Self::Item<'w> { + // SAFETY: `fetch` must be called with an entity that exists in the world + unsafe { world.get_entity(entity).debug_checked_unwrap() } + } + + fn update_component_access(_state: &Self::State, access: &mut FilteredAccess<ComponentId>) { + assert!( + !access.access().has_any_write(), + "EntityRef conflicts with a previous access in this query. Shared access cannot coincide with exclusive access.", + ); + access.read_all(); + } + + fn update_archetype_component_access( + _state: &Self::State, + archetype: &Archetype, + access: &mut Access<ArchetypeComponentId>, + ) { + for component_id in archetype.components() { + access.add_read(archetype.get_archetype_component_id(component_id).unwrap()); + } + } + + fn init_state(_world: &mut World) {} + + fn matches_component_set( + _state: &Self::State, + _set_contains_id: &impl Fn(ComponentId) -> bool, + ) -> bool { + true + } +} + +/// SAFETY: access is read only +unsafe impl<'a> ReadOnlyWorldQuery for EntityRef<'a> {} + #[doc(hidden)] pub struct ReadFetch<'w, T> { // T::Storage = TableStorage diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -125,71 +125,6 @@ pub use system_param::*; use crate::world::World; -/// Ensure that a given function is a [system](System). -/// -/// This should be used when writing doc examples, -/// to confirm that systems used in an example are -/// valid systems. -/// -/// # Examples -/// -/// The following example will panic when run since the -/// system's parameters mutably access the same component -/// multiple times. -/// -/// ```should_panic -/// # use bevy_ecs::{prelude::*, system::assert_is_system}; -/// # -/// # #[derive(Component)] -/// # struct Transform; -/// # -/// fn my_system(query1: Query<&mut Transform>, query2: Query<&mut Transform>) { -/// // ... -/// } -/// -/// assert_is_system(my_system); -/// ``` -pub fn assert_is_system<In: 'static, Out: 'static, Marker>( - system: impl IntoSystem<In, Out, Marker>, -) { - let mut system = IntoSystem::into_system(system); - - // Initialize the system, which will panic if the system has access conflicts. - let mut world = World::new(); - system.initialize(&mut world); -} - -/// Ensure that a given function is a [read-only system](ReadOnlySystem). -/// -/// This should be used when writing doc examples, -/// to confirm that systems used in an example are -/// valid systems. -/// -/// # Examples -/// -/// The following example will fail to compile -/// since the system accesses a component mutably. -/// -/// ```compile_fail -/// # use bevy_ecs::{prelude::*, system::assert_is_read_only_system}; -/// # -/// # #[derive(Component)] -/// # struct Transform; -/// # -/// fn my_system(query: Query<&mut Transform>) { -/// // ... -/// } -/// -/// assert_is_read_only_system(my_system); -/// ``` -pub fn assert_is_read_only_system<In: 'static, Out: 'static, Marker, S>(system: S) -where - S: IntoSystem<In, Out, Marker>, - S::System: ReadOnlySystem, -{ - assert_is_system(system); -} - /// Conversion trait to turn something into a [`System`]. /// /// Use this to get a system from a function. Also note that every system implements this trait as diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -183,6 +183,52 @@ use std::{any::TypeId, borrow::Borrow, fmt::Debug}; /// /// An alternative to this idiom is to wrap the conflicting queries into a [`ParamSet`](super::ParamSet). /// +/// ## Whole Entity Access +/// +/// [`EntityRef`]s can be fetched from a query. This will give read-only access to any component on the entity, +/// and can be use to dynamically fetch any component without baking it into the query type. Due to this global +/// access to the entity, this will block any other system from parallelizing with it. As such these queries +/// should be sparingly used. +/// +/// ``` +/// # use bevy_ecs::prelude::*; +/// # #[derive(Component)] +/// # struct ComponentA; +/// # fn system( +/// query: Query<(EntityRef, &ComponentA)> +/// # ) {} +/// # bevy_ecs::system::assert_is_system(system); +/// ``` +/// +/// As `EntityRef` can read any component on an entity, a query using it will conflict with *any* mutable +/// access. It is strongly advised to couple `EntityRef` queries with the use of either `With`/`Without` +/// filters or `ParamSets`. This also limits the scope of the query, which will improve iteration performance +/// and also allows it to parallelize with other non-conflicting systems. +/// +/// ```should_panic +/// # use bevy_ecs::prelude::*; +/// # #[derive(Component)] +/// # struct ComponentA; +/// # fn system( +/// // This will panic! +/// query: Query<(EntityRef, &mut ComponentA)> +/// # ) {} +/// # bevy_ecs::system::assert_system_does_not_conflict(system); +/// ``` +/// ``` +/// # use bevy_ecs::prelude::*; +/// # #[derive(Component)] +/// # struct ComponentA; +/// # #[derive(Component)] +/// # struct ComponentB; +/// # fn system( +/// // This will not panic. +/// query_a: Query<EntityRef, With<ComponentA>>, +/// query_b: Query<&mut ComponentB, Without<ComponentA>>, +/// # ) {} +/// # bevy_ecs::system::assert_system_does_not_conflict(system); +/// ``` +/// /// # Accessing query items /// /// The following table summarizes the behavior of the safe methods that can be used to get query items. diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -248,6 +294,7 @@ use std::{any::TypeId, borrow::Borrow, fmt::Debug}; /// [`Changed`]: crate::query::Changed /// [components]: crate::component::Component /// [entity identifiers]: crate::entity::Entity +/// [`EntityRef`]: crate::world::EntityRef /// [`for_each`]: Self::for_each /// [`for_each_mut`]: Self::for_each_mut /// [`get`]: Self::get
diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -70,7 +70,7 @@ mod tests { entity::Entity, query::{Added, Changed, FilteredAccess, ReadOnlyWorldQuery, With, Without}, system::Resource, - world::{Mut, World}, + world::{EntityRef, Mut, World}, }; use bevy_tasks::{ComputeTaskPool, TaskPool}; use std::{ diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1323,6 +1323,13 @@ mod tests { world.query::<(&A, &mut A)>(); } + #[test] + #[should_panic] + fn entity_ref_and_mut_query_panic() { + let mut world = World::new(); + world.query::<(EntityRef, &mut A)>(); + } + #[test] #[should_panic] fn mut_and_ref_query_panic() { diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1330,6 +1337,13 @@ mod tests { world.query::<(&mut A, &A)>(); } + #[test] + #[should_panic] + fn mut_and_entity_ref_query_panic() { + let mut world = World::new(); + world.query::<(&mut A, EntityRef)>(); + } + #[test] #[should_panic] fn mut_and_mut_query_panic() { diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -477,6 +412,83 @@ pub mod adapter { pub fn ignore<T>(In(_): In<T>) {} } +/// Ensure that a given function is a [system](System). +/// +/// This should be used when writing doc examples, +/// to confirm that systems used in an example are +/// valid systems. +/// +/// # Examples +/// +/// The following example will panic when run since the +/// system's parameters mutably access the same component +/// multiple times. +/// +/// ```should_panic +/// # use bevy_ecs::{prelude::*, system::assert_is_system}; +/// # +/// # #[derive(Component)] +/// # struct Transform; +/// # +/// fn my_system(query1: Query<&mut Transform>, query2: Query<&mut Transform>) { +/// // ... +/// } +/// +/// assert_is_system(my_system); +/// ``` +pub fn assert_is_system<In: 'static, Out: 'static, Marker>( + system: impl IntoSystem<In, Out, Marker>, +) { + let mut system = IntoSystem::into_system(system); + + // Initialize the system, which will panic if the system has access conflicts. + let mut world = World::new(); + system.initialize(&mut world); +} + +/// Ensure that a given function is a [read-only system](ReadOnlySystem). +/// +/// This should be used when writing doc examples, +/// to confirm that systems used in an example are +/// valid systems. +/// +/// # Examples +/// +/// The following example will fail to compile +/// since the system accesses a component mutably. +/// +/// ```compile_fail +/// # use bevy_ecs::{prelude::*, system::assert_is_read_only_system}; +/// # +/// # #[derive(Component)] +/// # struct Transform; +/// # +/// fn my_system(query: Query<&mut Transform>) { +/// // ... +/// } +/// +/// assert_is_read_only_system(my_system); +/// ``` +pub fn assert_is_read_only_system<In: 'static, Out: 'static, Marker, S>(system: S) +where + S: IntoSystem<In, Out, Marker>, + S::System: ReadOnlySystem, +{ + assert_is_system(system); +} + +/// Ensures that the provided system doesn't with itself. +/// +/// This function will panic if the provided system conflict with itself. +/// +/// Note: this will run the system on an empty world. +pub fn assert_system_does_not_conflict<Out, Params, S: IntoSystem<(), Out, Params>>(sys: S) { + let mut world = World::new(); + let mut system = IntoSystem::into_system(sys); + system.initialize(&mut world); + system.run((), &mut world); +} + #[cfg(test)] mod tests { use std::any::TypeId; diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -1739,6 +1751,13 @@ mod tests { query.iter(); } + #[test] + #[should_panic] + fn assert_system_does_not_conflict() { + fn system(_query: Query<(&mut W<u32>, &mut W<u32>)>) {} + super::assert_system_does_not_conflict(system); + } + #[test] #[should_panic] fn panic_inside_system() {
Allow users to read / write from all components of a given entity using an `All` `WorldQuery` types ## What problem does this solve or what need does it fill? From time to time, users want to fetch all of the components from a given set of entities. To do so, they must use the `EntityRef` or `EntityMut` API, in an exclusive system. Fundamentally though, there's no reason this must be done in an exclusive system: this does not impact resource data, and we can limit the archetypes affected when combined with query filters. ## What solution would you like? Create a `All` type that parallels the API of `EntityRef`. This would enable users to write e.g. `Query<&All, With<Networked>>` in an ordinary system, allowing them to read from any component of the given entity. This will require some interesting new logic around defining which fetches are needed, but should be relatively straightforward. ## Alternatives considered Initially, I thought we could use `EntityRef` and `EntityMut` for this by implementing the `WorldQuery` trait on them directly. However, `EntityMut` allows users to add components, which cannot be done in parallel due to the potential impacts on archetypes. Without the ability to reuse the APIs, IMO it makes more sense just to create a new type and use the standard & vs &mut distinction. Alternatively alternatively, we could instead use one of the more 🧪 ideas to allow for instant component addition / removals in parallel systems and then just use EntityRef and EntityMut, likely by deferring the archetype updates until the next sync point and storing new component data in a scratch space of sorts.
You can sort of do this with `ReflectComponent`, though this both requires `Reflect` impls, still requires an exclusive system, and is mostly for the dynamic case where the types are not known at compile time. However, I'm not sure what kind of use case for `AllComponents` would work where we know the types at compile time that isn't served by generic systems and the existing query type. Agreed, this would be dramatically more useful after we have dynamic components. > This will require some interesting new logic around defining which fetches are needed, but should be relatively straightforward. Pretty sure the only thing this query can return is the de-powered version of `EntityRef/Mut`. The type system doesn't allow queries to yield a mix of different component fetch tuples. > This would enable users to write e.g. `Query<&AllComponents, With<Networked>>` in an ordinary system, allowing them to read from any component of the given entity. Could you expand on how that would be used? ```rust fn my_system( query: Query<&AllComponents, With<Networked>> ) { for all_components in query.iter() { // how do you use this all_components? } } ``` Without going full dynamic, you'll need to provide the concrete component type, so why not put it in the query anyway? Maybe we trade concurrency for ergonomics and provide this as a separate `SystemParam` that just doesn't block resources. ```rust fn my_system( mut all: AllComponentsMut, ) { for (mut a, b) in all.query::<(&mut A, &B)>() { /* ... */ } } ``` > Maybe we trade concurrency for ergonomics and provide this as a separate SystemParam that just doesn't block resources. This is better than nothing, but IMO the ability to additionally filter this down based on specific components is an important usability win. In most of the cases I can foresee (networking, saving), you're going to want to restrict this based on the presence or absence of a marker component.
2022-12-15T05:29:29Z
1.70
2023-06-27T05:21:35Z
6f27e0e35faffbf2b77807bb222d3d3a9a529210
[ "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_new", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_const", "change_detection::tests::set_if_neq", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_expiration", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_reader_clear", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_struct_variants", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get - should panic", "query::tests::has_query", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query", "query::tests::query_iter_combinations_sparse", "query::tests::self_conflicting_worldquery - should panic", "query::tests::derived_worldqueries", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_filtered_iter_combinations", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::resize_test", "system::commands::command_queue::test::test_command_is_send", "storage::sparse_set::tests::sparse_sets", "storage::table::tests::table", "system::commands::command_queue::test::test_command_queue_inner_drop", "system::commands::command_queue::test::test_command_queue_inner_panic_safe", "system::commands::tests::remove_resources", "system::commands::tests::commands", "system::commands::command_queue::test::test_command_queue_inner", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_where_clause", "system::commands::tests::remove_components", "system::system_param::tests::system_param_field_limit", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::tests::assert_systems", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::immutable_mut_test", "system::tests::get_system_conflicts", "system::tests::conflicting_query_immut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::long_life_test", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_mut_system - should panic", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::pipe_change_detection", "system::tests::query_is_empty", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::query_validates_world_id - should panic", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::system_state_invalid_world - should panic", "tests::added_queries", "system::tests::update_archetype_component_access_works", "tests::changed_query", "tests::added_tracking", "tests::filtered_query_access", "tests::add_remove_components", "system::tests::any_of_has_filter_with_when_both_have_it", "tests::multiple_worlds_same_query_get - should panic", "event::tests::test_event_iter_nth", "tests::duplicate_components_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::tests::non_send_system", "schedule::tests::system_ordering::order_exclusive_systems", "system::tests::or_expanded_nested_with_and_without_common", "tests::non_send_resource", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::nonconflicting_system_resources", "system::tests::query_system_gets", "tests::non_send_resource_drop_from_same_thread", "schedule::tests::system_execution::run_system", "tests::empty_spawn", "schedule::condition::tests::multiple_run_conditions", "system::tests::local_system", "schedule::tests::conditions::systems_nested_in_system_sets", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::readonly_query_get_mut_component_fails", "system::tests::disjoint_query_mut_read_component_system", "system::tests::non_send_option_system", "tests::despawn_mixed_storage", "tests::changed_trackers", "tests::insert_or_spawn_batch_invalid", "tests::despawn_table_storage", "tests::clear_entities", "schedule::tests::conditions::multiple_conditions_on_system", "system::tests::query_set_system", "tests::multiple_worlds_same_query_for_each - should panic", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::tests::panic_inside_system - should panic", "tests::exact_size_query", "system::tests::or_with_without_and_compatible_with_without", "schedule::set::tests::test_boxed_label", "system::tests::option_doesnt_remove_unrelated_filter_with", "tests::multiple_worlds_same_query_iter - should panic", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::into_iter_impl", "schedule::condition::tests::run_condition_combinators", "system::tests::any_of_and_without", "system::tests::or_has_filter_with", "schedule::tests::conditions::system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "system::tests::commands_param_set", "system::tests::or_expanded_with_and_without_common", "system::tests::disjoint_query_mut_system", "system::tests::or_has_filter_with_when_both_have_it", "tests::changed_trackers_sparse", "schedule::tests::system_ordering::add_systems_correct_order", "system::tests::or_param_set_system", "tests::mut_and_ref_query_panic - should panic", "tests::insert_overwrite_drop_sparse", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::world_collections_system", "system::tests::removal_tracking", "tests::insert_overwrite_drop", "system::tests::write_system_state", "tests::bundle_derive", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::condition::tests::run_condition", "system::tests::test_combinator_clone", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::insert_or_spawn_batch", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::tests::changed_resource_system", "tests::par_for_each_sparse", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::query_all", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_sparse", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "schedule::tests::system_ordering::order_systems", "tests::query_get", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_missing_component", "tests::query_optional_component_sparse", "query::tests::par_iter_mut_change_detection", "tests::query_optional_component_table", "tests::query_optional_component_sparse_no_match", "tests::query_get_works_across_sparse_removal", "tests::ref_and_mut_query_panic - should panic", "tests::query_single_component", "tests::query_single_component_for_each", "tests::remove", "tests::query_sparse_component", "tests::remove_missing", "tests::random_access", "tests::resource", "tests::reserve_and_spawn", "tests::resource_scope", "tests::remove_tracking", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::spawn_batch", "tests::stateful_query_handles_new_archetype", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "tests::take", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_world_scope_panic", "query::tests::query_filtered_exactsizeiterator_len", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::tests::get_resource_by_id", "world::tests::custom_resource_with_layout", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::spawn_empty_bundle", "world::world_cell::tests::world_access_reused", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::world_cell::tests::world_cell", "world::tests::iterate_entities", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "world::world_cell::tests::world_cell_ref_and_ref", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "world::world_cell::tests::world_cell_double_mut - should panic", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "src/component.rs - component::Component (line 125) - compile fail", "src/component.rs - component::ComponentTicks::set_changed (line 786) - compile", "src/query/fetch.rs - query::fetch::WorldQuery (line 101) - compile fail", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 143) - compile", "src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 153) - compile", "src/lib.rs - (line 32)", "src/entity/map_entities.rs - entity::map_entities::MapEntities (line 15)", "src/lib.rs - (line 191)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 254)", "src/lib.rs - (line 167)", "src/event.rs - event::EventWriter (line 315)", "src/lib.rs - (line 289)", "src/query/fetch.rs - query::fetch::WorldQuery (line 117)", "src/component.rs - component::Component (line 81)", "src/query/iter.rs - query::iter::QueryCombinationIter (line 240)", "src/lib.rs - (line 241)", "src/component.rs - component::ComponentIdFor (line 802)", "src/change_detection.rs - change_detection::DetectChangesMut (line 82)", "src/change_detection.rs - change_detection::DetectChanges (line 33)", "src/lib.rs - (line 214)", "src/component.rs - component::Component (line 100)", "src/component.rs - component::Component (line 135)", "src/lib.rs - (line 76)", "src/component.rs - component::Component (line 35)", "src/bundle.rs - bundle::Bundle (line 94)", "src/query/fetch.rs - query::fetch::WorldQuery (line 217)", "src/component.rs - component::StorageType (line 188)", "src/query/fetch.rs - query::fetch::WorldQuery (line 192)", "src/schedule/state.rs - schedule::state::States (line 27)", "src/lib.rs - (line 93)", "src/removal_detection.rs - removal_detection::RemovedComponents (line 125)", "src/entity/mod.rs - entity::Entity (line 77)", "src/lib.rs - (line 43)", "src/change_detection.rs - change_detection::NonSendMut<'a,T>::map_unchanged (line 528)", "src/change_detection.rs - change_detection::Mut<'a,T>::map_unchanged (line 687)", "src/query/fetch.rs - query::fetch::WorldQuery (line 280)", "src/lib.rs - (line 256)", "src/system/commands/mod.rs - system::commands::Commands (line 97)", "src/component.rs - component::Components::component_id (line 543)", "src/system/commands/mod.rs - system::commands::Command (line 24)", "src/event.rs - event::Events (line 115)", "src/change_detection.rs - change_detection::ResMut<'a,T>::map_unchanged (line 495)", "src/component.rs - component::Components::resource_id (line 577)", "src/event.rs - event::EventWriter (line 297)", "src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 255)", "src/query/fetch.rs - query::fetch::WorldQuery (line 245)", "src/query/filter.rs - query::filter::Or (line 234)", "src/entity/mod.rs - entity::Entity (line 97)", "src/lib.rs - (line 53)", "src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 134)", "src/schedule/condition.rs - schedule::condition::Condition (line 21)", "src/lib.rs - (line 126)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 597)", "src/query/filter.rs - query::filter::Added (line 576)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 121)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 69)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 255)", "src/schedule/condition.rs - schedule::condition::Condition::and_then (line 88)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::add (line 798)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::id (line 646)", "src/system/commands/mod.rs - system::commands::Commands (line 79)", "src/query/filter.rs - query::filter::Changed (line 612)", "src/schedule/condition.rs - schedule::condition::Condition::or_else (line 120)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many_mut (line 330)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 326)", "src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 201)", "src/system/mod.rs - system (line 13)", "src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 867)", "src/query/filter.rs - query::filter::With (line 24)", "src/query/fetch.rs - query::fetch::WorldQuery (line 137)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 157)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 368)", "src/schedule/schedule.rs - schedule::schedule::Schedule (line 135)", "src/system/function_system.rs - system::function_system::SystemState (line 83)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::despawn (line 773)", "src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 222)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1470) - compile fail", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists_and_equals (line 751)", "src/system/system_param.rs - system::system_param::Resource (line 383) - compile fail", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 281)", "src/query/state.rs - query::state::QueryState<Q,F>::get_many (line 262)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 469)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 817)", "src/system/query.rs - system::query::Query (line 115)", "src/system/function_system.rs - system::function_system::SystemParamFunction (line 540)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 281)", "src/query/fetch.rs - query::fetch::WorldQuery (line 60)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 521)", "src/query/filter.rs - query::filter::Without (line 127)", "src/system/combinator.rs - system::combinator::Combine (line 19)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 496)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 443)", "src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 222)", "src/system/function_system.rs - system::function_system::SystemState (line 116)", "src/system/mod.rs - system (line 56)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 242)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::insert (line 670)", "src/system/system_param.rs - system::system_param::Resource (line 394)", "src/system/system_param.rs - system::system_param::StaticSystemParam (line 1446)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 412)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 362)", "src/system/commands/mod.rs - system::commands::EntityCommands<'w,'s,'a>::remove (line 724)", "src/schedule/condition.rs - schedule::condition::common_conditions::not (line 958)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 113) - compile", "src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 699)", "src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 24)", "src/system/combinator.rs - system::combinator::PipeSystem (line 269)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 466)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 527)", "src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 46)", "src/system/query.rs - system::query::Query (line 141)", "src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 652)", "src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 319)", "src/system/commands/mod.rs - system::commands::EntityCommand (line 557)", "src/system/query.rs - system::query::Query (line 164)", "src/schedule/condition.rs - schedule::condition::Condition (line 45)", "src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 911)", "src/system/query.rs - system::query::Query (line 59)", "src/system/query.rs - system::query::Query (line 38)", "src/system/query.rs - system::query::Query (line 99)", "src/system/query.rs - system::query::Query (line 79)", "src/system/system_param.rs - system::system_param::Deferred (line 783)", "src/world/mod.rs - world::World::get_mut (line 584)", "src/system/system_param.rs - system::system_param::SystemParam (line 46)", "src/world/mod.rs - world::World::query (line 718)", "src/world/mod.rs - world::World::spawn_empty (line 405)", "src/system/system_param.rs - system::system_param::ParamSet (line 306)", "src/world/mod.rs - world::World::component_id (line 208)", "src/system/system_param.rs - system::system_param::Local (line 646)", "src/system/system_param.rs - system::system_param::Local (line 669)", "src/world/mod.rs - world::World::resource_scope (line 1284)", "src/system/system_param.rs - system::system_param::ParamSet (line 271)", "src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::world_scope (line 746)", "src/world/mod.rs - world::World::spawn (line 438)", "src/system/system_param.rs - system::system_param::ParamSet (line 242)", "src/world/mod.rs - world::World::get_entity (line 327)", "src/world/mod.rs - world::World::clear_trackers (line 652)", "src/world/mod.rs - world::World::schedule_scope (line 1784)", "src/world/mod.rs - world::World::entity_mut (line 254)", "src/world/mod.rs - world::World::get_entity_mut (line 380)", "src/system/system_param.rs - system::system_param::Resource (line 354)", "src/world/mod.rs - world::World::despawn (line 610)", "src/world/mod.rs - world::World::insert_or_spawn_batch (line 1166)", "src/world/mod.rs - world::World::spawn_batch (line 537)", "src/world/mod.rs - world::World::query (line 682)", "src/world/mod.rs - world::World::query_filtered (line 749)", "src/world/mod.rs - world::World::entity (line 229)", "src/world/mod.rs - world::World::get (line 563)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
6,846
bevyengine__bevy-6846
[ "3576" ]
d58ed67fa467eefeeeb07302510626134293d689
diff --git a/assets/scenes/load_scene_example.scn.ron b/assets/scenes/load_scene_example.scn.ron --- a/assets/scenes/load_scene_example.scn.ron +++ b/assets/scenes/load_scene_example.scn.ron @@ -1,4 +1,9 @@ ( + resources: { + "scene::ResourceA": ( + score: 2, + ), + }, entities: { 0: ( components: { 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 @@ -10,10 +10,13 @@ use bevy_reflect::{Reflect, TypeRegistryArc, TypeUuid}; #[cfg(feature = "serialize")] use crate::serde::SceneSerializer; +use bevy_ecs::reflect::ReflectResource; #[cfg(feature = "serialize")] use serde::Serialize; -/// A collection of serializable dynamic entities, each with its own run-time defined set of components. +/// A collection of serializable resources and dynamic entities. +/// +/// Each dynamic entity in the collection contains its own run-time defined set of components. /// To spawn a dynamic scene, you can use either: /// * [`SceneSpawner::spawn_dynamic`](crate::SceneSpawner::spawn_dynamic) /// * adding the [`DynamicSceneBundle`](crate::DynamicSceneBundle) to an 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 @@ -23,6 +26,7 @@ use serde::Serialize; #[derive(Default, TypeUuid)] #[uuid = "749479b1-fb8c-4ff8-a775-623aa76014f5"] pub struct DynamicScene { + pub resources: Vec<Box<dyn Reflect>>, pub entities: Vec<DynamicEntity>, } 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 @@ -47,15 +51,16 @@ impl DynamicScene { DynamicSceneBuilder::from_world_with_type_registry(world, type_registry.clone()); builder.extract_entities(world.iter_entities().map(|entity| entity.id())); + builder.extract_resources(); builder.build() } - /// Write the dynamic entities and their corresponding components to the given world. + /// Write the resources, the dynamic entities, and their corresponding components to the given world. /// /// This method will return a [`SceneSpawnError`] if a type either is not registered /// in the provided [`AppTypeRegistry`] resource, or doesn't reflect the - /// [`Component`](bevy_ecs::component::Component) trait. + /// [`Component`](bevy_ecs::component::Component) or [`Resource`](bevy_ecs::prelude::Resource) trait. pub fn write_to_world_with( &self, world: &mut World, 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 @@ -64,6 +69,23 @@ impl DynamicScene { ) -> Result<(), SceneSpawnError> { let type_registry = type_registry.read(); + for resource in &self.resources { + let registration = type_registry + .get_with_name(resource.type_name()) + .ok_or_else(|| SceneSpawnError::UnregisteredType { + type_name: resource.type_name().to_string(), + })?; + let reflect_resource = registration.data::<ReflectResource>().ok_or_else(|| { + SceneSpawnError::UnregisteredResource { + type_name: resource.type_name().to_string(), + } + })?; + + // If the world already contains an instance of the given resource + // just apply the (possibly) new value, otherwise insert the resource + reflect_resource.apply_or_insert(world, &**resource); + } + for scene_entity in &self.entities { // Fetch the entity with the given entity id from the `entity_map` // or spawn a new entity with a transiently unique id if there is 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 @@ -105,7 +127,7 @@ impl DynamicScene { Ok(()) } - /// Write the dynamic entities and their corresponding components to the given world. + /// Write the resources, the dynamic entities, and their corresponding components to the given world. /// /// This method will return a [`SceneSpawnError`] if a type either is not registered /// in the world's [`AppTypeRegistry`] resource, or doesn't reflect the diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -1,10 +1,16 @@ use crate::{DynamicEntity, DynamicScene}; use bevy_app::AppTypeRegistry; -use bevy_ecs::{prelude::Entity, reflect::ReflectComponent, world::World}; +use bevy_ecs::component::ComponentId; +use bevy_ecs::{ + prelude::Entity, + reflect::{ReflectComponent, ReflectResource}, + world::World, +}; +use bevy_reflect::Reflect; use bevy_utils::default; use std::collections::BTreeMap; -/// A [`DynamicScene`] builder, used to build a scene from a [`World`] by extracting some entities. +/// A [`DynamicScene`] builder, used to build a scene from a [`World`] by extracting some entities and resources. /// /// # Entity Order /// diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -31,6 +37,7 @@ use std::collections::BTreeMap; /// let dynamic_scene = builder.build(); /// ``` pub struct DynamicSceneBuilder<'w> { + extracted_resources: BTreeMap<ComponentId, Box<dyn Reflect>>, extracted_scene: BTreeMap<u32, DynamicEntity>, type_registry: AppTypeRegistry, original_world: &'w World, diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -41,6 +48,7 @@ impl<'w> DynamicSceneBuilder<'w> { /// All components registered in that world's [`AppTypeRegistry`] resource will be extracted. pub fn from_world(world: &'w World) -> Self { Self { + extracted_resources: default(), extracted_scene: default(), type_registry: world.resource::<AppTypeRegistry>().clone(), original_world: world, diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -51,6 +59,7 @@ impl<'w> DynamicSceneBuilder<'w> { /// Only components registered in the given [`AppTypeRegistry`] will be extracted. pub fn from_world_with_type_registry(world: &'w World, type_registry: AppTypeRegistry) -> Self { Self { + extracted_resources: default(), extracted_scene: default(), type_registry, original_world: world, diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -63,6 +72,7 @@ impl<'w> DynamicSceneBuilder<'w> { /// [`Self::remove_empty_entities`] before building the scene. pub fn build(self) -> DynamicScene { DynamicScene { + resources: self.extracted_resources.into_values().collect(), entities: self.extracted_scene.into_values().collect(), } } diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -126,17 +136,20 @@ impl<'w> DynamicSceneBuilder<'w> { let entity = self.original_world.entity(entity); for component_id in entity.archetype().components() { - let reflect_component = self - .original_world - .components() - .get_info(component_id) - .and_then(|info| type_registry.get(info.type_id().unwrap())) - .and_then(|registration| registration.data::<ReflectComponent>()) - .and_then(|reflect_component| reflect_component.reflect(entity)); - - if let Some(reflect_component) = reflect_component { - entry.components.push(reflect_component.clone_value()); - } + let mut extract_and_push = || { + let type_id = self + .original_world + .components() + .get_info(component_id)? + .type_id()?; + let component = type_registry + .get(type_id)? + .data::<ReflectComponent>()? + .reflect(entity)?; + entry.components.push(component.clone_value()); + Some(()) + }; + extract_and_push(); } self.extracted_scene.insert(index, entry); } diff --git a/crates/bevy_scene/src/scene.rs b/crates/bevy_scene/src/scene.rs --- a/crates/bevy_scene/src/scene.rs +++ b/crates/bevy_scene/src/scene.rs @@ -1,7 +1,7 @@ use bevy_app::AppTypeRegistry; use bevy_ecs::{ entity::EntityMap, - reflect::{ReflectComponent, ReflectMapEntities}, + reflect::{ReflectComponent, ReflectMapEntities, ReflectResource}, world::World, }; use bevy_reflect::TypeUuid; diff --git a/crates/bevy_scene/src/scene.rs b/crates/bevy_scene/src/scene.rs --- a/crates/bevy_scene/src/scene.rs +++ b/crates/bevy_scene/src/scene.rs @@ -61,6 +61,33 @@ impl Scene { }; let type_registry = type_registry.read(); + + // Resources archetype + for (component_id, _) in self.world.storages().resources.iter() { + let component_info = self + .world + .components() + .get_info(component_id) + .expect("component_ids in archetypes should have ComponentInfo"); + + let type_id = component_info + .type_id() + .expect("reflected resources must have a type_id"); + + let registration = + type_registry + .get(type_id) + .ok_or_else(|| SceneSpawnError::UnregisteredType { + type_name: component_info.name().to_string(), + })?; + let reflect_resource = registration.data::<ReflectResource>().ok_or_else(|| { + SceneSpawnError::UnregisteredResource { + type_name: component_info.name().to_string(), + } + })?; + reflect_resource.copy(&self.world, world); + } + for archetype in self.world.archetypes().iter() { for scene_entity in archetype.entities() { let entity = *instance_info 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 @@ -45,6 +45,8 @@ pub struct SceneSpawner { pub enum SceneSpawnError { #[error("scene contains the unregistered component `{type_name}`. consider adding `#[reflect(Component)]` to your type")] UnregisteredComponent { type_name: String }, + #[error("scene contains the unregistered resource `{type_name}`. consider adding `#[reflect(Resource)]` to your type")] + UnregisteredResource { type_name: String }, #[error("scene contains the unregistered type `{type_name}`. consider registering the type using `app.register_type::<T>()`")] UnregisteredType { type_name: String }, #[error("scene does not exist")] diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -15,6 +15,7 @@ use serde::{ use std::fmt::Formatter; pub const SCENE_STRUCT: &str = "Scene"; +pub const SCENE_RESOURCES: &str = "resources"; pub const SCENE_ENTITIES: &str = "entities"; pub const ENTITY_STRUCT: &str = "Entity"; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -36,7 +37,14 @@ impl<'a> Serialize for SceneSerializer<'a> { where S: serde::Serializer, { - let mut state = serializer.serialize_struct(SCENE_STRUCT, 1)?; + let mut state = serializer.serialize_struct(SCENE_STRUCT, 2)?; + state.serialize_field( + SCENE_RESOURCES, + &SceneMapSerializer { + entries: &self.scene.resources, + registry: self.registry, + }, + )?; state.serialize_field( SCENE_ENTITIES, &EntitiesSerializer { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -85,8 +93,8 @@ impl<'a> Serialize for EntitySerializer<'a> { let mut state = serializer.serialize_struct(ENTITY_STRUCT, 1)?; state.serialize_field( ENTITY_FIELD_COMPONENTS, - &ComponentsSerializer { - components: &self.entity.components, + &SceneMapSerializer { + entries: &self.entity.components, registry: self.registry, }, )?; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -94,21 +102,21 @@ impl<'a> Serialize for EntitySerializer<'a> { } } -pub struct ComponentsSerializer<'a> { - pub components: &'a [Box<dyn Reflect>], +pub struct SceneMapSerializer<'a> { + pub entries: &'a [Box<dyn Reflect>], pub registry: &'a TypeRegistryArc, } -impl<'a> Serialize for ComponentsSerializer<'a> { +impl<'a> Serialize for SceneMapSerializer<'a> { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: serde::Serializer, { - let mut state = serializer.serialize_map(Some(self.components.len()))?; - for component in self.components { + let mut state = serializer.serialize_map(Some(self.entries.len()))?; + for reflect in self.entries { state.serialize_entry( - component.type_name(), - &TypedReflectSerializer::new(&**component, &self.registry.read()), + reflect.type_name(), + &TypedReflectSerializer::new(&**reflect, &self.registry.read()), )?; } state.end() diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -118,6 +126,7 @@ impl<'a> Serialize for ComponentsSerializer<'a> { #[derive(Deserialize)] #[serde(field_identifier, rename_all = "lowercase")] enum SceneField { + Resources, Entities, } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -140,7 +149,7 @@ impl<'a, 'de> DeserializeSeed<'de> for SceneDeserializer<'a> { { deserializer.deserialize_struct( SCENE_STRUCT, - &[SCENE_ENTITIES], + &[SCENE_RESOURCES, SCENE_ENTITIES], SceneVisitor { type_registry: self.type_registry, }, diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -163,9 +172,18 @@ impl<'a, 'de> Visitor<'de> for SceneVisitor<'a> { where A: MapAccess<'de>, { + let mut resources = None; let mut entities = None; while let Some(key) = map.next_key()? { match key { + SceneField::Resources => { + if resources.is_some() { + return Err(Error::duplicate_field(SCENE_RESOURCES)); + } + resources = Some(map.next_value_seed(SceneMapDeserializer { + registry: self.type_registry, + })?); + } SceneField::Entities => { if entities.is_some() { return Err(Error::duplicate_field(SCENE_ENTITIES)); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -177,22 +195,35 @@ impl<'a, 'de> Visitor<'de> for SceneVisitor<'a> { } } + let resources = resources.ok_or_else(|| Error::missing_field(SCENE_RESOURCES))?; let entities = entities.ok_or_else(|| Error::missing_field(SCENE_ENTITIES))?; - Ok(DynamicScene { entities }) + Ok(DynamicScene { + resources, + entities, + }) } fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error> where A: SeqAccess<'de>, { + let resources = seq + .next_element_seed(SceneMapDeserializer { + registry: self.type_registry, + })? + .ok_or_else(|| Error::missing_field(SCENE_RESOURCES))?; + let entities = seq .next_element_seed(SceneEntitiesDeserializer { type_registry: self.type_registry, })? .ok_or_else(|| Error::missing_field(SCENE_ENTITIES))?; - Ok(DynamicScene { entities }) + Ok(DynamicScene { + resources, + entities, + }) } } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -281,7 +312,7 @@ impl<'a, 'de> Visitor<'de> for SceneEntityVisitor<'a> { A: SeqAccess<'de>, { let components = seq - .next_element_seed(ComponentDeserializer { + .next_element_seed(SceneMapDeserializer { registry: self.registry, })? .ok_or_else(|| Error::missing_field(ENTITY_FIELD_COMPONENTS))?; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -304,7 +335,7 @@ impl<'a, 'de> Visitor<'de> for SceneEntityVisitor<'a> { return Err(Error::duplicate_field(ENTITY_FIELD_COMPONENTS)); } - components = Some(map.next_value_seed(ComponentDeserializer { + components = Some(map.next_value_seed(SceneMapDeserializer { registry: self.registry, })?); } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -321,32 +352,32 @@ impl<'a, 'de> Visitor<'de> for SceneEntityVisitor<'a> { } } -pub struct ComponentDeserializer<'a> { +pub struct SceneMapDeserializer<'a> { pub registry: &'a TypeRegistry, } -impl<'a, 'de> DeserializeSeed<'de> for ComponentDeserializer<'a> { +impl<'a, 'de> DeserializeSeed<'de> for SceneMapDeserializer<'a> { type Value = Vec<Box<dyn Reflect>>; fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error> where D: serde::Deserializer<'de>, { - deserializer.deserialize_map(ComponentVisitor { + deserializer.deserialize_map(SceneMapVisitor { registry: self.registry, }) } } -struct ComponentVisitor<'a> { +struct SceneMapVisitor<'a> { pub registry: &'a TypeRegistry, } -impl<'a, 'de> Visitor<'de> for ComponentVisitor<'a> { +impl<'a, 'de> Visitor<'de> for SceneMapVisitor<'a> { type Value = Vec<Box<dyn Reflect>>; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { - formatter.write_str("map of components") + formatter.write_str("map of reflect types") } fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error> diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -354,23 +385,23 @@ impl<'a, 'de> Visitor<'de> for ComponentVisitor<'a> { A: MapAccess<'de>, { let mut added = HashSet::new(); - let mut components = Vec::new(); + let mut entries = Vec::new(); while let Some(registration) = map.next_key_seed(TypeRegistrationDeserializer::new(self.registry))? { if !added.insert(registration.type_id()) { return Err(Error::custom(format_args!( - "duplicate component: `{}`", + "duplicate reflect type: `{}`", registration.type_name() ))); } - components.push( + entries.push( map.next_value_seed(TypedReflectDeserializer::new(registration, self.registry))?, ); } - Ok(components) + Ok(entries) } fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error> diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -1,8 +1,6 @@ //! This example illustrates loading scenes from files. -use std::fs::File; -use std::io::Write; - use bevy::{prelude::*, tasks::IoTaskPool, utils::Duration}; +use std::{fs::File, io::Write}; fn main() { App::new() diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -14,6 +12,7 @@ fn main() { })) .register_type::<ComponentA>() .register_type::<ComponentB>() + .register_type::<ResourceA>() .add_systems( Startup, (save_scene_system, load_scene_system, infotext_system), diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -57,6 +56,13 @@ impl FromWorld for ComponentB { } } +// Resources can be serialized in scenes as well, with the same requirements `Component`s have. +#[derive(Resource, Reflect, Default)] +#[reflect(Resource)] +struct ResourceA { + pub score: u32, +} + // The initial scene file will be loaded below and not change when the scene is saved const SCENE_FILE_PATH: &str = "scenes/load_scene_example.scn.ron"; diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -75,7 +81,10 @@ fn load_scene_system(mut commands: Commands, asset_server: Res<AssetServer>) { // This system logs all ComponentA components in our world. Try making a change to a ComponentA in // load_scene_example.scn. You should immediately see the changes appear in the console. -fn log_system(query: Query<(Entity, &ComponentA), Changed<ComponentA>>) { +fn log_system( + query: Query<(Entity, &ComponentA), Changed<ComponentA>>, + res: Option<Res<ResourceA>>, +) { for (entity, component_a) in &query { info!(" Entity({})", entity.index()); info!( diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -83,6 +92,11 @@ fn log_system(query: Query<(Entity, &ComponentA), Changed<ComponentA>>) { component_a.x, component_a.y ); } + if let Some(res) = res { + if res.is_added() { + info!(" New ResourceA: {{ score: {} }}\n", res.score); + } + } } fn save_scene_system(world: &mut World) { diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -97,6 +111,7 @@ fn save_scene_system(world: &mut World) { Transform::IDENTITY, )); scene_world.spawn(ComponentA { x: 3.0, y: 4.0 }); + scene_world.insert_resource(ResourceA { score: 1 }); // The TypeRegistry resource contains information about all registered types (including // components). This is used to construct scenes.
diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -144,13 +157,59 @@ impl<'w> DynamicSceneBuilder<'w> { drop(type_registry); self } + + /// Extract resources from the builder's [`World`]. + /// + /// Only resources registered in the builder's [`AppTypeRegistry`] will be extracted. + /// Re-extracting a resource that was already extracted will have no effect. + /// ``` + /// # use bevy_scene::DynamicSceneBuilder; + /// # use bevy_app::AppTypeRegistry; + /// # use bevy_ecs::prelude::{ReflectResource, Resource, World}; + /// # use bevy_reflect::Reflect; + /// #[derive(Resource, Default, Reflect)] + /// #[reflect(Resource)] + /// struct MyResource; + /// + /// # let mut world = World::default(); + /// # world.init_resource::<AppTypeRegistry>(); + /// world.insert_resource(MyResource); + /// + /// let mut builder = DynamicSceneBuilder::from_world(&world); + /// builder.extract_resources(); + /// let scene = builder.build(); + /// ``` + pub fn extract_resources(&mut self) -> &mut Self { + let type_registry = self.type_registry.read(); + for (component_id, _) in self.original_world.storages().resources.iter() { + let mut extract_and_push = || { + let type_id = self + .original_world + .components() + .get_info(component_id)? + .type_id()?; + let resource = type_registry + .get(type_id)? + .data::<ReflectResource>()? + .reflect(self.original_world)?; + self.extracted_resources + .insert(component_id, resource.clone_value()); + Some(()) + }; + extract_and_push(); + } + + drop(type_registry); + self + } } #[cfg(test)] mod tests { use bevy_app::AppTypeRegistry; use bevy_ecs::{ - component::Component, prelude::Entity, query::With, reflect::ReflectComponent, world::World, + component::Component, prelude::Entity, prelude::Resource, query::With, + reflect::ReflectComponent, reflect::ReflectResource, world::World, }; use bevy_reflect::Reflect; diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -160,10 +219,15 @@ mod tests { #[derive(Component, Reflect, Default, Eq, PartialEq, Debug)] #[reflect(Component)] struct ComponentA; + #[derive(Component, Reflect, Default, Eq, PartialEq, Debug)] #[reflect(Component)] struct ComponentB; + #[derive(Resource, Reflect, Default, Eq, PartialEq, Debug)] + #[reflect(Resource)] + struct ResourceA; + #[test] fn extract_one_entity() { let mut world = World::default(); diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -303,4 +367,41 @@ mod tests { assert_eq!(scene.entities.len(), 1); assert_eq!(scene.entities[0].entity, entity_a.index()); } + + #[test] + fn extract_one_resource() { + let mut world = World::default(); + + let atr = AppTypeRegistry::default(); + atr.write().register::<ResourceA>(); + world.insert_resource(atr); + + world.insert_resource(ResourceA); + + let mut builder = DynamicSceneBuilder::from_world(&world); + builder.extract_resources(); + let scene = builder.build(); + + assert_eq!(scene.resources.len(), 1); + assert!(scene.resources[0].represents::<ResourceA>()); + } + + #[test] + fn extract_one_resource_twice() { + let mut world = World::default(); + + let atr = AppTypeRegistry::default(); + atr.write().register::<ResourceA>(); + world.insert_resource(atr); + + world.insert_resource(ResourceA); + + let mut builder = DynamicSceneBuilder::from_world(&world); + builder.extract_resources(); + builder.extract_resources(); + let scene = builder.build(); + + assert_eq!(scene.resources.len(), 1); + assert!(scene.resources[0].represents::<ResourceA>()); + } } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -394,7 +425,7 @@ mod tests { use crate::{DynamicScene, DynamicSceneBuilder}; use bevy_app::AppTypeRegistry; use bevy_ecs::entity::EntityMap; - use bevy_ecs::prelude::{Component, ReflectComponent, World}; + use bevy_ecs::prelude::{Component, ReflectComponent, ReflectResource, Resource, World}; use bevy_reflect::{FromReflect, Reflect, ReflectSerialize}; use bincode::Options; use serde::de::DeserializeSeed; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -429,6 +460,12 @@ mod tests { }, } + #[derive(Resource, Reflect, Default)] + #[reflect(Resource)] + struct MyResource { + foo: i32, + } + fn create_world() -> World { let mut world = World::new(); let registry = AppTypeRegistry::default(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -443,6 +480,7 @@ mod tests { registry.register_type_data::<String, ReflectSerialize>(); registry.register::<[usize; 3]>(); registry.register::<(f32, f32)>(); + registry.register::<MyResource>(); } world.insert_resource(registry); world diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -456,11 +494,19 @@ mod tests { let b = world.spawn((Foo(123), Bar(345))).id(); let c = world.spawn((Foo(123), Bar(345), Baz(789))).id(); + world.insert_resource(MyResource { foo: 123 }); + let mut builder = DynamicSceneBuilder::from_world(&world); builder.extract_entities([a, b, c].into_iter()); + builder.extract_resources(); let scene = builder.build(); let expected = r#"( + resources: { + "bevy_scene::serde::tests::MyResource": ( + foo: 123, + ), + }, entities: { 0: ( components: { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -493,6 +539,11 @@ mod tests { let world = create_world(); let input = r#"( + resources: { + "bevy_scene::serde::tests::MyResource": ( + foo: 123, + ), + }, entities: { 0: ( components: { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -520,6 +571,11 @@ mod tests { }; let scene = scene_deserializer.deserialize(&mut deserializer).unwrap(); + assert_eq!( + 1, + scene.resources.len(), + "expected `resources` to contain 1 resource" + ); assert_eq!( 3, scene.entities.len(), diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -530,6 +586,11 @@ mod tests { let mut dst_world = create_world(); scene.write_to_world(&mut dst_world, &mut map).unwrap(); + let my_resource = dst_world.get_resource::<MyResource>(); + assert!(my_resource.is_some()); + let my_resource = my_resource.unwrap(); + assert_eq!(my_resource.foo, 123); + assert_eq!(3, dst_world.query::<&Foo>().iter(&dst_world).count()); assert_eq!(2, dst_world.query::<&Bar>().iter(&dst_world).count()); assert_eq!(1, dst_world.query::<&Baz>().iter(&dst_world).count()); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -554,10 +615,10 @@ mod tests { assert_eq!( vec![ - 1, 0, 1, 37, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, 58, 115, 101, 114, - 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, 111, 109, 112, 111, - 110, 101, 110, 116, 1, 2, 3, 102, 102, 166, 63, 205, 204, 108, 64, 1, 12, 72, 101, - 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 + 0, 1, 0, 1, 37, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, 58, 115, 101, + 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, 111, 109, 112, + 111, 110, 101, 110, 116, 1, 2, 3, 102, 102, 166, 63, 205, 204, 108, 64, 1, 12, 72, + 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 ], serialized_scene ); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -594,11 +655,11 @@ mod tests { assert_eq!( vec![ - 145, 129, 0, 145, 129, 217, 37, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, - 58, 115, 101, 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, - 111, 109, 112, 111, 110, 101, 110, 116, 147, 147, 1, 2, 3, 146, 202, 63, 166, 102, - 102, 202, 64, 108, 204, 205, 129, 165, 84, 117, 112, 108, 101, 172, 72, 101, 108, - 108, 111, 32, 87, 111, 114, 108, 100, 33 + 146, 128, 129, 0, 145, 129, 217, 37, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, + 58, 58, 115, 101, 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, + 67, 111, 109, 112, 111, 110, 101, 110, 116, 147, 147, 1, 2, 3, 146, 202, 63, 166, + 102, 102, 202, 64, 108, 204, 205, 129, 165, 84, 117, 112, 108, 101, 172, 72, 101, + 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 ], buf ); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -635,12 +696,12 @@ mod tests { assert_eq!( vec![ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, 58, 115, 101, 114, 100, 101, - 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, 111, 109, 112, 111, 110, 101, - 110, 116, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 102, 102, 166, 63, 205, 204, 108, 64, 1, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 72, 101, - 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 98, 101, 118, 121, 95, 115, 99, 101, 110, 101, 58, 58, + 115, 101, 114, 100, 101, 58, 58, 116, 101, 115, 116, 115, 58, 58, 77, 121, 67, 111, + 109, 112, 111, 110, 101, 110, 116, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 102, 102, 166, 63, 205, 204, 108, 64, 1, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33 ], serialized_scene );
Use scenes to serialize and deserialize resources ## Problem Serializing and deserializing resources is a common and important task. Currently, this must be done manually. However, we already have a tool for this serialization: `Scenes`. Each `Scene` stores a `World`, which (now) includes resources, but the rest of the machinery is missing. ## Proposed solution Update the `Scene` machinery to handle resources as well. This should be reasonably straightforward (we can reflect resources, and we get access to the whole world when loading / saving / storing scenes), but fleshing out the rest of the API will be a fair bit of work. The hardest part will be updating the `serde` `.ron` format: this presumes that only entities are included. Our [scene example](https://github.com/bevyengine/bevy/blob/main/examples/scene/scene.rs) should also be updated to show how to serialize / deserialize resources. ## Alternatives considered We could make a distinct serialization strategy for resources. This makes sense to include as part of scenes because: 1. Common uses of scenes (saving / loading games, grabbing scenes from editors, networking) often include critical resources (current score, global illumination settings, difficulty settings) that should be logically batched together. 2. Refactoring between entities and resources is very common, and two seperate strategies would cause frustrating refactoring pain. 3. We're already storing a `World` everywhere for scenes. ## Context Before #1144, the `World` only stored entities and components. This code hasn't been updated to work for resources too yet.
> we can reflect resources I don't think we can actually. I'm interested in fixing this. These should be the implementation steps: - create `ReflectResource` (something like #1260, but updated and with change detection) - add `#derive(Reflect)`, and `#reflect(Resource)` to bevy's relevant resources - add resources to `DynamicScene`s - add resources to `SceneSerializer` and `SceneDeserializer`
2022-12-04T11:57:23Z
1.67
2023-07-10T00:15:28Z
735f9b60241000f49089ae587ba7d88bf2a5d932
[ "dynamic_scene_builder::tests::extract_entity_order", "serde::tests::should_roundtrip_bincode", "serde::tests::should_roundtrip_messagepack", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_query", "serde::tests::should_roundtrip_postcard", "serde::tests::should_deserialize", "serde::tests::should_serialize", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::remove_componentless_entity", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "dynamic_scene_builder::tests::extract_one_entity", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
5,781
bevyengine__bevy-5781
[ "4154" ]
f9cc91d5a1591a0dad831dbf3f1cb66fe90b2462
diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -470,7 +470,12 @@ impl<'a> ReflectMeta<'a> { &self, where_clause_options: &WhereClauseOptions, ) -> proc_macro2::TokenStream { - crate::registration::impl_get_type_registration(self, where_clause_options, None) + crate::registration::impl_get_type_registration( + self, + where_clause_options, + None, + Option::<std::iter::Empty<&Type>>::None, + ) } /// The collection of docstrings for this type, if any. diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -502,6 +507,7 @@ impl<'a> ReflectStruct<'a> { self.meta(), where_clause_options, self.serialization_data(), + Some(self.active_types().iter()), ) } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -512,22 +518,21 @@ impl<'a> ReflectStruct<'a> { .collect() } - /// Get an iterator of fields which are exposed to the reflection API + /// Get an iterator of fields which are exposed to the reflection API. pub fn active_fields(&self) -> impl Iterator<Item = &StructField<'a>> { - self.fields + self.fields() .iter() .filter(|field| field.attrs.ignore.is_active()) } /// Get an iterator of fields which are ignored by the reflection API pub fn ignored_fields(&self) -> impl Iterator<Item = &StructField<'a>> { - self.fields + self.fields() .iter() .filter(|field| field.attrs.ignore.is_ignored()) } /// The complete set of fields in this struct. - #[allow(dead_code)] pub fn fields(&self) -> &[StructField<'a>] { &self.fields } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs @@ -573,6 +578,21 @@ impl<'a> ReflectEnum<'a> { pub fn where_clause_options(&self) -> WhereClauseOptions { WhereClauseOptions::new_with_fields(self.meta(), self.active_types().into_boxed_slice()) } + + /// Returns the `GetTypeRegistration` impl as a `TokenStream`. + /// + /// Returns a specific implementation for enums and this method should be preferred over the generic [`get_type_registration`](crate::ReflectMeta) method + pub fn get_type_registration( + &self, + where_clause_options: &WhereClauseOptions, + ) -> proc_macro2::TokenStream { + crate::registration::impl_get_type_registration( + self.meta(), + where_clause_options, + None, + Some(self.active_fields().map(|field| &field.data.ty)), + ) + } } impl<'a> EnumVariant<'a> { diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs b/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/impls/enums.rs @@ -84,9 +84,7 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream let type_path_impl = impl_type_path(reflect_enum.meta()); - let get_type_registration_impl = reflect_enum - .meta() - .get_type_registration(&where_clause_options); + let get_type_registration_impl = reflect_enum.get_type_registration(&where_clause_options); let (impl_generics, ty_generics, where_clause) = reflect_enum.meta().type_path().generics().split_for_impl(); diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs @@ -4,17 +4,29 @@ use crate::derive_data::ReflectMeta; use crate::serialization::SerializationDataDef; use crate::utility::WhereClauseOptions; use quote::quote; +use syn::Type; /// Creates the `GetTypeRegistration` impl for the given type data. #[allow(clippy::too_many_arguments)] -pub(crate) fn impl_get_type_registration( +pub(crate) fn impl_get_type_registration<'a>( meta: &ReflectMeta, where_clause_options: &WhereClauseOptions, serialization_data: Option<&SerializationDataDef>, + type_dependencies: Option<impl Iterator<Item = &'a Type>>, ) -> proc_macro2::TokenStream { let type_path = meta.type_path(); let bevy_reflect_path = meta.bevy_reflect_path(); let registration_data = meta.attrs().idents(); + + let type_deps_fn = type_dependencies.map(|deps| { + quote! { + #[inline(never)] + fn register_type_dependencies(registry: &mut #bevy_reflect_path::TypeRegistry) { + #(<#deps as #bevy_reflect_path::__macro_exports::RegisterForReflection>::__register(registry);)* + } + } + }); + let (impl_generics, ty_generics, where_clause) = type_path.generics().split_for_impl(); let where_reflect_clause = where_clause_options.extend_where_clause(where_clause); diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/registration.rs @@ -44,6 +56,8 @@ pub(crate) fn impl_get_type_registration( #(registration.insert::<#registration_data>(#bevy_reflect_path::FromType::<Self>::from_type());)* registration } + + #type_deps_fn } } } diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs --- a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs @@ -217,11 +217,15 @@ impl<'a, 'b> WhereClauseOptions<'a, 'b> { // `TypePath` is always required for active fields since they are used to // construct `NamedField` and `UnnamedField` instances for the `Typed` impl. - Some( - self.active_fields - .iter() - .map(move |ty| quote!(#ty : #reflect_bound + #bevy_reflect_path::TypePath)), - ) + // Likewise, `GetTypeRegistration` is always required for active fields since + // they are used to register the type's dependencies. + Some(self.active_fields.iter().map(move |ty| { + quote!( + #ty : #reflect_bound + + #bevy_reflect_path::TypePath + + #bevy_reflect_path::__macro_exports::RegisterForReflection + ) + })) } } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1,5 +1,5 @@ use crate::std_traits::ReflectDefault; -use crate::{self as bevy_reflect, ReflectFromPtr, ReflectFromReflect, ReflectOwned}; +use crate::{self as bevy_reflect, ReflectFromPtr, ReflectFromReflect, ReflectOwned, TypeRegistry}; use crate::{ impl_type_path, map_apply, map_partial_eq, Array, ArrayInfo, ArrayIter, DynamicEnum, DynamicMap, Enum, EnumInfo, FromReflect, FromType, GetTypeRegistration, List, ListInfo, diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -221,7 +221,7 @@ impl_reflect_value!(::std::ffi::OsString(Debug, Hash, PartialEq)); macro_rules! impl_reflect_for_veclike { ($ty:path, $insert:expr, $remove:expr, $push:expr, $pop:expr, $sub:ty) => { - impl<T: FromReflect + TypePath> List for $ty { + impl<T: FromReflect + TypePath + GetTypeRegistration> List for $ty { #[inline] fn get(&self, index: usize) -> Option<&dyn Reflect> { <$sub>::get(self, index).map(|value| value as &dyn Reflect) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -280,7 +280,7 @@ macro_rules! impl_reflect_for_veclike { } } - impl<T: FromReflect + TypePath> Reflect for $ty { + impl<T: FromReflect + TypePath + GetTypeRegistration> Reflect for $ty { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -347,7 +347,7 @@ macro_rules! impl_reflect_for_veclike { } } - impl<T: FromReflect + TypePath> Typed for $ty { + impl<T: FromReflect + TypePath + GetTypeRegistration> Typed for $ty { fn type_info() -> &'static TypeInfo { static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); CELL.get_or_insert::<Self, _>(|| TypeInfo::List(ListInfo::new::<Self, T>())) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -356,15 +356,19 @@ macro_rules! impl_reflect_for_veclike { impl_type_path!($ty); - impl<T: FromReflect + TypePath> GetTypeRegistration for $ty { + impl<T: FromReflect + TypePath + GetTypeRegistration> GetTypeRegistration for $ty { fn get_type_registration() -> TypeRegistration { let mut registration = TypeRegistration::of::<$ty>(); registration.insert::<ReflectFromPtr>(FromType::<$ty>::from_type()); registration } + + fn register_type_dependencies(registry: &mut TypeRegistry) { + registry.register::<T>(); + } } - impl<T: FromReflect + TypePath> FromReflect for $ty { + impl<T: FromReflect + TypePath + GetTypeRegistration> FromReflect for $ty { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::List(ref_list) = reflect.reflect_ref() { let mut new_list = Self::with_capacity(ref_list.len()); diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -401,8 +405,8 @@ macro_rules! impl_reflect_for_hashmap { ($ty:path) => { impl<K, V, S> Map for $ty where - K: FromReflect + TypePath + Eq + Hash, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Hash, + V: FromReflect + TypePath + GetTypeRegistration, S: TypePath + BuildHasher + Send + Sync, { fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect> { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -498,8 +502,8 @@ macro_rules! impl_reflect_for_hashmap { impl<K, V, S> Reflect for $ty where - K: FromReflect + TypePath + Eq + Hash, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Hash, + V: FromReflect + TypePath + GetTypeRegistration, S: TypePath + BuildHasher + Send + Sync, { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -567,8 +571,8 @@ macro_rules! impl_reflect_for_hashmap { impl<K, V, S> Typed for $ty where - K: FromReflect + TypePath + Eq + Hash, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Hash, + V: FromReflect + TypePath + GetTypeRegistration, S: TypePath + BuildHasher + Send + Sync, { fn type_info() -> &'static TypeInfo { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -579,8 +583,8 @@ macro_rules! impl_reflect_for_hashmap { impl<K, V, S> GetTypeRegistration for $ty where - K: FromReflect + TypePath + Eq + Hash, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Hash, + V: FromReflect + TypePath + GetTypeRegistration, S: TypePath + BuildHasher + Send + Sync, { fn get_type_registration() -> TypeRegistration { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -588,12 +592,17 @@ macro_rules! impl_reflect_for_hashmap { registration.insert::<ReflectFromPtr>(FromType::<Self>::from_type()); registration } + + fn register_type_dependencies(registry: &mut TypeRegistry) { + registry.register::<K>(); + registry.register::<V>(); + } } impl<K, V, S> FromReflect for $ty where - K: FromReflect + TypePath + Eq + Hash, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Hash, + V: FromReflect + TypePath + GetTypeRegistration, S: TypePath + BuildHasher + Default + Send + Sync, { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -624,8 +633,8 @@ impl_type_path!(::bevy_utils::hashbrown::HashMap<K, V, S>); impl<K, V> Map for ::std::collections::BTreeMap<K, V> where - K: FromReflect + TypePath + Eq + Ord, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Ord, + V: FromReflect + TypePath + GetTypeRegistration, { fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect> { key.downcast_ref::<K>() diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -720,8 +729,8 @@ where impl<K, V> Reflect for ::std::collections::BTreeMap<K, V> where - K: FromReflect + TypePath + Eq + Ord, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Ord, + V: FromReflect + TypePath + GetTypeRegistration, { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -788,8 +797,8 @@ where impl<K, V> Typed for ::std::collections::BTreeMap<K, V> where - K: FromReflect + TypePath + Eq + Ord, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Ord, + V: FromReflect + TypePath + GetTypeRegistration, { fn type_info() -> &'static TypeInfo { static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -799,8 +808,8 @@ where impl<K, V> GetTypeRegistration for ::std::collections::BTreeMap<K, V> where - K: FromReflect + TypePath + Eq + Ord, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Ord, + V: FromReflect + TypePath + GetTypeRegistration, { fn get_type_registration() -> TypeRegistration { let mut registration = TypeRegistration::of::<Self>(); diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -811,8 +820,8 @@ where impl<K, V> FromReflect for ::std::collections::BTreeMap<K, V> where - K: FromReflect + TypePath + Eq + Ord, - V: FromReflect + TypePath, + K: FromReflect + TypePath + GetTypeRegistration + Eq + Ord, + V: FromReflect + TypePath + GetTypeRegistration, { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::Map(ref_map) = reflect.reflect_ref() { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -831,7 +840,7 @@ where impl_type_path!(::std::collections::BTreeMap<K, V>); -impl<T: Reflect + TypePath, const N: usize> Array for [T; N] { +impl<T: Reflect + TypePath + GetTypeRegistration, const N: usize> Array for [T; N] { #[inline] fn get(&self, index: usize) -> Option<&dyn Reflect> { <[T]>::get(self, index).map(|value| value as &dyn Reflect) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -860,7 +869,7 @@ impl<T: Reflect + TypePath, const N: usize> Array for [T; N] { } } -impl<T: Reflect + TypePath, const N: usize> Reflect for [T; N] { +impl<T: Reflect + TypePath + GetTypeRegistration, const N: usize> Reflect for [T; N] { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -942,7 +951,7 @@ impl<T: Reflect + TypePath, const N: usize> Reflect for [T; N] { } } -impl<T: FromReflect + TypePath, const N: usize> FromReflect for [T; N] { +impl<T: FromReflect + TypePath + GetTypeRegistration, const N: usize> FromReflect for [T; N] { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::Array(ref_array) = reflect.reflect_ref() { let mut temp_vec = Vec::with_capacity(ref_array.len()); diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -956,7 +965,7 @@ impl<T: FromReflect + TypePath, const N: usize> FromReflect for [T; N] { } } -impl<T: Reflect + TypePath, const N: usize> Typed for [T; N] { +impl<T: Reflect + TypePath + GetTypeRegistration, const N: usize> Typed for [T; N] { fn type_info() -> &'static TypeInfo { static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); CELL.get_or_insert::<Self, _>(|| TypeInfo::Array(ArrayInfo::new::<Self, T>(N))) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -975,37 +984,27 @@ impl<T: TypePath, const N: usize> TypePath for [T; N] { } } -// TODO: -// `FromType::from_type` requires `Deserialize<'de>` to be implemented for `T`. -// Currently serde only supports `Deserialize<'de>` for arrays up to size 32. -// This can be changed to use const generics once serde utilizes const generics for arrays. -// Tracking issue: https://github.com/serde-rs/serde/issues/1937 -macro_rules! impl_array_get_type_registration { - ($($N:expr)+) => { - $( - impl<T: Reflect + TypePath> GetTypeRegistration for [T; $N] { - fn get_type_registration() -> TypeRegistration { - TypeRegistration::of::<[T; $N]>() - } - } - )+ - }; -} +impl<T: Reflect + TypePath + GetTypeRegistration, const N: usize> GetTypeRegistration for [T; N] { + fn get_type_registration() -> TypeRegistration { + TypeRegistration::of::<[T; N]>() + } -impl_array_get_type_registration! { - 0 1 2 3 4 5 6 7 8 9 - 10 11 12 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 27 28 29 - 30 31 32 + fn register_type_dependencies(registry: &mut TypeRegistry) { + registry.register::<T>(); + } } -impl<T: FromReflect + TypePath> GetTypeRegistration for Option<T> { +impl<T: FromReflect + TypePath + GetTypeRegistration> GetTypeRegistration for Option<T> { fn get_type_registration() -> TypeRegistration { TypeRegistration::of::<Option<T>>() } + + fn register_type_dependencies(registry: &mut TypeRegistry) { + registry.register::<T>(); + } } -impl<T: FromReflect + TypePath> Enum for Option<T> { +impl<T: FromReflect + TypePath + GetTypeRegistration> Enum for Option<T> { fn field(&self, _name: &str) -> Option<&dyn Reflect> { None } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1076,7 +1075,7 @@ impl<T: FromReflect + TypePath> Enum for Option<T> { } } -impl<T: FromReflect + TypePath> Reflect for Option<T> { +impl<T: FromReflect + TypePath + GetTypeRegistration> Reflect for Option<T> { #[inline] fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1189,7 +1188,7 @@ impl<T: FromReflect + TypePath> Reflect for Option<T> { } } -impl<T: FromReflect + TypePath> FromReflect for Option<T> { +impl<T: FromReflect + TypePath + GetTypeRegistration> FromReflect for Option<T> { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::Enum(dyn_enum) = reflect.reflect_ref() { match dyn_enum.variant_name() { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1227,7 +1226,7 @@ impl<T: FromReflect + TypePath> FromReflect for Option<T> { } } -impl<T: FromReflect + TypePath> Typed for Option<T> { +impl<T: FromReflect + TypePath + GetTypeRegistration> Typed for Option<T> { fn type_info() -> &'static TypeInfo { static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); CELL.get_or_insert::<Self, _>(|| { diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1392,7 +1391,7 @@ where } } -impl<T: FromReflect + Clone + TypePath> List for Cow<'static, [T]> { +impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> List for Cow<'static, [T]> { fn get(&self, index: usize) -> Option<&dyn Reflect> { self.as_ref().get(index).map(|x| x as &dyn Reflect) } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1451,7 +1450,7 @@ impl<T: FromReflect + Clone + TypePath> List for Cow<'static, [T]> { } } -impl<T: FromReflect + Clone + TypePath> Reflect for Cow<'static, [T]> { +impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> Reflect for Cow<'static, [T]> { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) } diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -1518,20 +1517,26 @@ impl<T: FromReflect + Clone + TypePath> Reflect for Cow<'static, [T]> { } } -impl<T: FromReflect + Clone + TypePath> Typed for Cow<'static, [T]> { +impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> Typed for Cow<'static, [T]> { fn type_info() -> &'static TypeInfo { static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new(); CELL.get_or_insert::<Self, _>(|| TypeInfo::List(ListInfo::new::<Self, T>())) } } -impl<T: FromReflect + Clone + TypePath> GetTypeRegistration for Cow<'static, [T]> { +impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> GetTypeRegistration + for Cow<'static, [T]> +{ fn get_type_registration() -> TypeRegistration { TypeRegistration::of::<Cow<'static, [T]>>() } + + fn register_type_dependencies(registry: &mut TypeRegistry) { + registry.register::<T>(); + } } -impl<T: FromReflect + Clone + TypePath> FromReflect for Cow<'static, [T]> { +impl<T: FromReflect + Clone + TypePath + GetTypeRegistration> FromReflect for Cow<'static, [T]> { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::List(ref_list) = reflect.reflect_ref() { let mut temp_vec = Vec::with_capacity(ref_list.len()); diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -481,9 +481,11 @@ mod tuple_struct; mod type_info; mod type_path; mod type_registry; + mod impls { #[cfg(feature = "glam")] mod glam; + #[cfg(feature = "bevy_math")] mod math { mod direction; diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -491,6 +493,7 @@ mod impls { mod primitives3d; mod rect; } + #[cfg(feature = "smallvec")] mod smallvec; #[cfg(feature = "smol_str")] diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -3,8 +3,8 @@ use bevy_utils::all_tuples; use crate::{ self as bevy_reflect, utility::GenericTypePathCell, FromReflect, GetTypeRegistration, Reflect, - ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, TypeRegistration, Typed, - UnnamedField, + ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, TypeRegistration, TypeRegistry, + Typed, UnnamedField, }; use crate::{ReflectKind, TypePathTable}; use std::any::{Any, TypeId}; diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -461,7 +461,7 @@ pub fn tuple_debug(dyn_tuple: &dyn Tuple, f: &mut Formatter<'_>) -> std::fmt::Re macro_rules! impl_reflect_tuple { {$($index:tt : $name:tt),*} => { - impl<$($name: Reflect + TypePath),*> Tuple for ($($name,)*) { + impl<$($name: Reflect + TypePath + GetTypeRegistration),*> Tuple for ($($name,)*) { #[inline] fn field(&self, index: usize) -> Option<&dyn Reflect> { match index { diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -512,7 +512,7 @@ macro_rules! impl_reflect_tuple { } } - impl<$($name: Reflect + TypePath),*> Reflect for ($($name,)*) { + impl<$($name: Reflect + TypePath + GetTypeRegistration),*> Reflect for ($($name,)*) { fn get_represented_type_info(&self) -> Option<&'static TypeInfo> { Some(<Self as Typed>::type_info()) } diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -575,7 +575,7 @@ macro_rules! impl_reflect_tuple { } } - impl <$($name: Reflect + TypePath),*> Typed for ($($name,)*) { + impl <$($name: Reflect + TypePath + GetTypeRegistration),*> Typed for ($($name,)*) { fn type_info() -> &'static TypeInfo { static CELL: $crate::utility::GenericTypeInfoCell = $crate::utility::GenericTypeInfoCell::new(); CELL.get_or_insert::<Self, _>(|| { diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -588,14 +588,17 @@ macro_rules! impl_reflect_tuple { } } - - impl<$($name: Reflect + TypePath),*> GetTypeRegistration for ($($name,)*) { + impl<$($name: Reflect + TypePath + GetTypeRegistration),*> GetTypeRegistration for ($($name,)*) { fn get_type_registration() -> TypeRegistration { TypeRegistration::of::<($($name,)*)>() } + + fn register_type_dependencies(_registry: &mut TypeRegistry) { + $(_registry.register::<$name>();)* + } } - impl<$($name: FromReflect + TypePath),*> FromReflect for ($($name,)*) + impl<$($name: FromReflect + TypePath + GetTypeRegistration),*> FromReflect for ($($name,)*) { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { if let ReflectRef::Tuple(_ref_tuple) = reflect.reflect_ref() { diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -56,8 +56,15 @@ impl Debug for TypeRegistryArc { /// See the [crate-level documentation] for more information on type registration. /// /// [crate-level documentation]: crate -pub trait GetTypeRegistration { +pub trait GetTypeRegistration: 'static { + /// Returns the default [`TypeRegistration`] for this type. fn get_type_registration() -> TypeRegistration; + /// Registers other types needed by this type. + /// + /// This method is called by [`TypeRegistry::register`] to register any other required types. + /// Often, this is done for fields of structs and enum variants to ensure all types are properly registered. + #[allow(unused_variables)] + fn register_type_dependencies(registry: &mut TypeRegistry) {} } impl Default for TypeRegistry { diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -100,39 +107,132 @@ impl TypeRegistry { registry } - /// Registers the type `T`, adding reflect data as specified in the [`Reflect`] derive: - /// ```ignore (Neither bevy_ecs nor serde "derive" are available.) - /// #[derive(Component, serde::Serialize, serde::Deserialize, Reflect)] - /// #[reflect(Component, Serialize, Deserialize)] // will register ReflectComponent, ReflectSerialize, ReflectDeserialize + /// Attempts to register the type `T` if it has not yet been registered already. + /// + /// This will also recursively register any type dependencies as specified by [`GetTypeRegistration::register_type_dependencies`]. + /// When deriving `Reflect`, this will generally be all the fields of the struct or enum variant. + /// As with any type registration, these type dependencies will not be registered more than once. + /// + /// If the registration for type `T` already exists, it will not be registered again and neither will its type dependencies. + /// To register the type, overwriting any existing registration, use [register](Self::overwrite_registration) instead. + /// + /// Additionally, this will add any reflect [type data](TypeData) as specified in the [`Reflect`] derive. + /// + /// # Example + /// + /// ``` + /// # use std::any::TypeId; + /// # use bevy_reflect::{Reflect, TypeRegistry, std_traits::ReflectDefault}; + /// #[derive(Reflect, Default)] + /// #[reflect(Default)] + /// struct Foo { + /// name: Option<String>, + /// value: i32 + /// } + /// + /// let mut type_registry = TypeRegistry::default(); + /// + /// type_registry.register::<Foo>(); + /// + /// // The main type + /// assert!(type_registry.contains(TypeId::of::<Foo>())); + /// + /// // Its type dependencies + /// assert!(type_registry.contains(TypeId::of::<Option<String>>())); + /// assert!(type_registry.contains(TypeId::of::<i32>())); + /// + /// // Its type data + /// assert!(type_registry.get_type_data::<ReflectDefault>(TypeId::of::<Foo>()).is_some()); /// ``` pub fn register<T>(&mut self) where T: GetTypeRegistration, { - self.add_registration(T::get_type_registration()); + if self.register_internal(TypeId::of::<T>(), T::get_type_registration) { + T::register_type_dependencies(self); + } + } + + /// Attempts to register the type described by `registration`. + /// + /// If the registration for the type already exists, it will not be registered again. + /// + /// To forcibly register the type, overwriting any existing registration, use the + /// [`overwrite_registration`](Self::overwrite_registration) method instead. + /// + /// This method will _not_ register type dependencies. + /// Use [`register`](Self::register) to register a type with its dependencies. + /// + /// Returns `true` if the registration was added and `false` if it already exists. + pub fn add_registration(&mut self, registration: TypeRegistration) -> bool { + let type_id = registration.type_id(); + self.register_internal(type_id, || registration) } /// Registers the type described by `registration`. - pub fn add_registration(&mut self, registration: TypeRegistration) { - if self.registrations.contains_key(&registration.type_id()) { - return; + /// + /// If the registration for the type already exists, it will be overwritten. + /// + /// To avoid overwriting existing registrations, it's recommended to use the + /// [`register`](Self::register) or [`add_registration`](Self::add_registration) methods instead. + /// + /// This method will _not_ register type dependencies. + /// Use [`register`](Self::register) to register a type with its dependencies. + pub fn overwrite_registration(&mut self, registration: TypeRegistration) { + Self::update_registration_indices( + &registration, + &mut self.short_path_to_id, + &mut self.type_path_to_id, + &mut self.ambiguous_names, + ); + self.registrations + .insert(registration.type_id(), registration); + } + + /// Internal method to register a type with a given [`TypeId`] and [`TypeRegistration`]. + /// + /// By using this method, we are able to reduce the number of `TypeId` hashes and lookups needed + /// to register a type. + /// + /// This method is internal to prevent users from accidentally registering a type with a `TypeId` + /// that does not match the type in the `TypeRegistration`. + fn register_internal( + &mut self, + type_id: TypeId, + get_registration: impl FnOnce() -> TypeRegistration, + ) -> bool { + match self.registrations.entry(type_id) { + bevy_utils::hashbrown::hash_map::Entry::Occupied(_) => false, + bevy_utils::hashbrown::hash_map::Entry::Vacant(entry) => { + let registration = get_registration(); + Self::update_registration_indices( + &registration, + &mut self.short_path_to_id, + &mut self.type_path_to_id, + &mut self.ambiguous_names, + ); + entry.insert(registration); + true + } } + } + /// Internal method to register additional lookups for a given [`TypeRegistration`]. + fn update_registration_indices( + registration: &TypeRegistration, + short_path_to_id: &mut HashMap<&'static str, TypeId>, + type_path_to_id: &mut HashMap<&'static str, TypeId>, + ambiguous_names: &mut HashSet<&'static str>, + ) { let short_name = registration.type_info().type_path_table().short_path(); - if self.short_path_to_id.contains_key(short_name) - || self.ambiguous_names.contains(short_name) - { + if short_path_to_id.contains_key(short_name) || ambiguous_names.contains(short_name) { // name is ambiguous. fall back to long names for all ambiguous types - self.short_path_to_id.remove(short_name); - self.ambiguous_names.insert(short_name); + short_path_to_id.remove(short_name); + ambiguous_names.insert(short_name); } else { - self.short_path_to_id - .insert(short_name, registration.type_id()); + short_path_to_id.insert(short_name, registration.type_id()); } - self.type_path_to_id - .insert(registration.type_info().type_path(), registration.type_id()); - self.registrations - .insert(registration.type_id(), registration); + type_path_to_id.insert(registration.type_info().type_path(), registration.type_id()); } /// Registers the type data `D` for type `T`. diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -162,6 +262,10 @@ impl TypeRegistry { data.insert(D::from_type()); } + pub fn contains(&self, type_id: TypeId) -> bool { + self.registrations.contains_key(&type_id) + } + /// Returns a reference to the [`TypeRegistration`] of the type with the /// given [`TypeId`]. /// diff --git a/crates/bevy_render/src/render_asset.rs b/crates/bevy_render/src/render_asset.rs --- a/crates/bevy_render/src/render_asset.rs +++ b/crates/bevy_render/src/render_asset.rs @@ -7,10 +7,12 @@ use bevy_ecs::{ system::{StaticSystemParam, SystemParam, SystemParamItem, SystemState}, world::{FromWorld, Mut}, }; +use bevy_reflect::std_traits::ReflectDefault; use bevy_reflect::{ utility::{reflect_hasher, NonGenericTypeInfoCell}, - FromReflect, Reflect, ReflectKind, ReflectMut, ReflectOwned, ReflectRef, TypeInfo, TypePath, - Typed, ValueInfo, + FromReflect, FromType, GetTypeRegistration, Reflect, ReflectDeserialize, ReflectFromPtr, + ReflectFromReflect, ReflectKind, ReflectMut, ReflectOwned, ReflectRef, ReflectSerialize, + TypeInfo, TypePath, TypeRegistration, Typed, ValueInfo, }; use bevy_utils::{thiserror::Error, HashMap, HashSet}; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_render/src/render_asset.rs b/crates/bevy_render/src/render_asset.rs --- a/crates/bevy_render/src/render_asset.rs +++ b/crates/bevy_render/src/render_asset.rs @@ -155,6 +157,18 @@ impl Reflect for RenderAssetUsages { } } +impl GetTypeRegistration for RenderAssetUsages { + fn get_type_registration() -> TypeRegistration { + let mut registration = TypeRegistration::of::<Self>(); + registration.insert::<ReflectSerialize>(FromType::<Self>::from_type()); + registration.insert::<ReflectDeserialize>(FromType::<Self>::from_type()); + registration.insert::<ReflectDefault>(FromType::<Self>::from_type()); + registration.insert::<ReflectFromReflect>(FromType::<Self>::from_type()); + registration.insert::<ReflectFromPtr>(FromType::<Self>::from_type()); + registration + } +} + impl FromReflect for RenderAssetUsages { fn from_reflect(reflect: &dyn Reflect) -> Option<Self> { let raw_value = *reflect.as_any().downcast_ref::<u8>()?; diff --git a/examples/reflection/generic_reflection.rs b/examples/reflection/generic_reflection.rs --- a/examples/reflection/generic_reflection.rs +++ b/examples/reflection/generic_reflection.rs @@ -12,8 +12,10 @@ fn main() { .run(); } +/// The `#[derive(Reflect)]` macro will automatically add any required bounds to `T`, +/// such as `Reflect` and `GetTypeRegistration`. #[derive(Reflect)] -struct MyType<T: Reflect> { +struct MyType<T> { value: T, }
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -535,9 +538,48 @@ pub use erased_serde; extern crate alloc; +/// Exports used by the reflection macros. +/// +/// These are not meant to be used directly and are subject to breaking changes. #[doc(hidden)] pub mod __macro_exports { - pub use bevy_utils::uuid::generate_composite_uuid; + use crate::{ + DynamicArray, DynamicEnum, DynamicList, DynamicMap, DynamicStruct, DynamicTuple, + DynamicTupleStruct, GetTypeRegistration, TypeRegistry, + }; + + /// A wrapper trait around [`GetTypeRegistration`]. + /// + /// This trait is used by the derive macro to recursively register all type dependencies. + /// It's used instead of `GetTypeRegistration` directly to avoid making dynamic types also + /// implement `GetTypeRegistration` in order to be used as active fields. + /// + /// This trait has a blanket implementation for all types that implement `GetTypeRegistration` + /// and manual implementations for all dynamic types (which simply do nothing). + pub trait RegisterForReflection { + #[allow(unused_variables)] + fn __register(registry: &mut TypeRegistry) {} + } + + impl<T: GetTypeRegistration> RegisterForReflection for T { + fn __register(registry: &mut TypeRegistry) { + registry.register::<T>(); + } + } + + impl RegisterForReflection for DynamicEnum {} + + impl RegisterForReflection for DynamicTupleStruct {} + + impl RegisterForReflection for DynamicStruct {} + + impl RegisterForReflection for DynamicMap {} + + impl RegisterForReflection for DynamicList {} + + impl RegisterForReflection for DynamicArray {} + + impl RegisterForReflection for DynamicTuple {} } #[cfg(test)] diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1002,6 +1044,124 @@ mod tests { assert_eq!(new_foo, expected_new_foo); } + #[test] + fn should_auto_register_fields() { + #[derive(Reflect)] + struct Foo { + bar: Bar, + } + + #[derive(Reflect)] + enum Bar { + Variant(Baz), + } + + #[derive(Reflect)] + struct Baz(usize); + + // === Basic === // + let mut registry = TypeRegistry::empty(); + registry.register::<Foo>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `Foo`" + ); + + // === Option === // + let mut registry = TypeRegistry::empty(); + registry.register::<Option<Foo>>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `Option<Foo>`" + ); + + // === Tuple === // + let mut registry = TypeRegistry::empty(); + registry.register::<(Foo, Foo)>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `(Foo, Foo)`" + ); + + // === Array === // + let mut registry = TypeRegistry::empty(); + registry.register::<[Foo; 3]>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `[Foo; 3]`" + ); + + // === Vec === // + let mut registry = TypeRegistry::empty(); + registry.register::<Vec<Foo>>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `Vec<Foo>`" + ); + + // === HashMap === // + let mut registry = TypeRegistry::empty(); + registry.register::<HashMap<i32, Foo>>(); + + assert!( + registry.contains(TypeId::of::<Bar>()), + "registry should contain auto-registered `Bar` from `HashMap<i32, Foo>`" + ); + } + + #[test] + fn should_allow_dynamic_fields() { + #[derive(Reflect)] + #[reflect(from_reflect = false)] + struct MyStruct( + DynamicEnum, + DynamicTupleStruct, + DynamicStruct, + DynamicMap, + DynamicList, + DynamicArray, + DynamicTuple, + i32, + ); + + assert_impl_all!(MyStruct: Reflect, GetTypeRegistration); + + let mut registry = TypeRegistry::empty(); + registry.register::<MyStruct>(); + + assert_eq!(2, registry.iter().count()); + assert!(registry.contains(TypeId::of::<MyStruct>())); + assert!(registry.contains(TypeId::of::<i32>())); + } + + #[test] + fn should_not_auto_register_existing_types() { + #[derive(Reflect)] + struct Foo { + bar: Bar, + } + + #[derive(Reflect, Default)] + struct Bar(usize); + + let mut registry = TypeRegistry::empty(); + registry.register::<Bar>(); + registry.register_type_data::<Bar, ReflectDefault>(); + registry.register::<Foo>(); + + assert!( + registry + .get_type_data::<ReflectDefault>(TypeId::of::<Bar>()) + .is_some(), + "registry should contain existing registration for `Bar`" + ); + } + #[test] fn reflect_serialize() { #[derive(Reflect)] diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1981,6 +2141,39 @@ bevy_reflect::tests::Test { let _ = <RecurseB as TypePath>::type_path(); } + #[test] + fn recursive_registration_does_not_hang() { + #[derive(Reflect)] + struct Recurse<T>(T); + + let mut registry = TypeRegistry::empty(); + + registry.register::<Recurse<Recurse<()>>>(); + + #[derive(Reflect)] + #[reflect(no_field_bounds)] + struct SelfRecurse { + recurse: Vec<SelfRecurse>, + } + + registry.register::<SelfRecurse>(); + + #[derive(Reflect)] + #[reflect(no_field_bounds)] + enum RecurseA { + Recurse(RecurseB), + } + + #[derive(Reflect)] + struct RecurseB { + vector: Vec<RecurseA>, + } + + registry.register::<RecurseA>(); + assert!(registry.contains(TypeId::of::<RecurseA>())); + assert!(registry.contains(TypeId::of::<RecurseB>())); + } + #[test] fn can_opt_out_type_path() { #[derive(Reflect)] diff --git a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs --- a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs @@ -1,4 +1,4 @@ -use bevy_reflect::{Reflect, TypePath}; +use bevy_reflect::{GetField, Reflect, Struct, TypePath}; #[derive(Reflect)] #[reflect(from_reflect = false)] diff --git a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs --- a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.rs @@ -11,7 +11,7 @@ struct Foo<T> { struct NoReflect(f32); fn main() { - let mut foo: Box<dyn Reflect> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) }); + let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) }); // foo doesn't implement Reflect because NoReflect doesn't implement Reflect foo.get_field::<NoReflect>("a").unwrap(); } diff --git a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr --- a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr @@ -1,16 +1,34 @@ -error[E0599]: no method named `get_field` found for struct `Box<(dyn Reflect + 'static)>` in the current scope - --> tests/reflect_derive/generics.fail.rs:16:9 - | -16 | foo.get_field::<NoReflect>("a").unwrap(); - | ^^^^^^^^^ method not found in `Box<dyn Reflect>` - error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied - --> tests/reflect_derive/generics.fail.rs:14:37 + --> tests/reflect_derive/generics.fail.rs:16:21 + | +16 | foo.get_field::<NoReflect>("a").unwrap(); + | --------- ^^^^^^^^^ the trait `Reflect` is not implemented for `NoReflect` + | | + | required by a bound introduced by this call + | + = help: the following other types implement trait `Reflect`: + bool + char + isize + i8 + i16 + i32 + i64 + i128 + and $N others +note: required by a bound in `bevy_reflect::GetField::get_field` + --> /home/runner/work/bevy/bevy/crates/bevy_reflect/src/struct_trait.rs:242:21 + | +242 | fn get_field<T: Reflect>(&self, name: &str) -> Option<&T>; + | ^^^^^^^ required by this bound in `GetField::get_field` + +error[E0277]: the trait bound `NoReflect: GetTypeRegistration` is not satisfied + --> tests/reflect_derive/generics.fail.rs:14:36 | -14 | let mut foo: Box<dyn Reflect> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reflect` is not implemented for `NoReflect` +14 | let mut foo: Box<dyn Struct> = Box::new(Foo::<NoReflect> { a: NoReflect(42.0) }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GetTypeRegistration` is not implemented for `NoReflect` | - = help: the following other types implement trait `Reflect`: + = help: the following other types implement trait `GetTypeRegistration`: bool char isize diff --git a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr --- a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr @@ -20,7 +38,8 @@ error[E0277]: the trait bound `NoReflect: Reflect` is not satisfied i64 i128 and $N others -note: required for `Foo<NoReflect>` to implement `Reflect` + = note: required for `NoReflect` to implement `RegisterForReflection` +note: required for `Foo<NoReflect>` to implement `bevy_reflect::Struct` --> tests/reflect_derive/generics.fail.rs:3:10 | 3 | #[derive(Reflect)] diff --git a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr --- a/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr +++ b/crates/bevy_reflect_compile_fail_tests/tests/reflect_derive/generics.fail.stderr @@ -28,5 +47,5 @@ note: required for `Foo<NoReflect>` to implement `Reflect` 4 | #[reflect(from_reflect = false)] 5 | struct Foo<T> { | ^^^^^^ - = note: required for the cast from `Box<Foo<NoReflect>>` to `Box<(dyn Reflect + 'static)>` + = note: required for the cast from `Box<Foo<NoReflect>>` to `Box<(dyn bevy_reflect::Struct + 'static)>` = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)
Recursive Type Registration ## What problem does this solve or what need does it fill? Currently registering a type only creates a registration for itself. Registering a type will not register the types of its fields. This means every intermediate field type must be manually registered. This would make deserialization difficult to manage for deeply nested structures. ## What solution would you like? Type registration should be recursive. Upon registering a type, it's field types should be registered. This should continue recursively until a value type has been reached, or if a type had already been registered. This may increase app load times, but provide a much better developer UX when using the TypeRegistry to handle serialization. ## What alternative(s) have you considered? Register every type manually.
I'm strongly in favor of this: this will improve ergonomics significantly. It's also required for automatic registration of component and resource types to work properly. We could also likely remove the default type registrations in bevy_core too, since they would be transitively registered by any type that needs them. Also in favor of this. Just as long as the duplication logic is handled in the registry itself and not by the macro (if that was even an option haha). I just _know_ users— including myself— are going to be accidentally re-registering things that got picked up by a field registration. This is probably doable as a follow-up to #4042 by just inverting the flow of control of GetTypeRegistration to have a type register itself and its fields into a TypeRegistry. I'm open to considering this, especially if we can show that this doesn't meaningfully affect startup times in complicated apps. Only recursing when a type isn't registered yet will avoid _truly bad_ time complexity, but this still forces an extra hashmap lookup of every type id of every field of every registered struct. Ideally we could/should do this at compile time, but both const Any/TypeId functions both aren't const yet, nor is inventory available for this kind of use. I'm also not convinced that repeatedly fetching the TypeRegistry resource, getting a write lock, and inserting registrations for each type is going to be any faster than doing a HashMap::contains_key check for every field in a type, which would eventually amortize to a one layer check since most of the constituent fields will already have been registered.
2022-08-24T06:26:00Z
1.76
2024-03-04T21:52:01Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_apply", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_allow_generics", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::option_should_impl_typed", "impls::std::tests::path_should_from_reflect", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "list::tests::test_into_iter", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::parsed_path_get_field", "path::tests::reflect_path", "serde::de::tests::should_deserialize_value", "serde::de::tests::should_deserialized_typed", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::de::tests::enum_should_deserialize", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::de::tests::should_deserialize_option", "tests::as_reflect", "serde::de::tests::should_deserialize_self_describing_binary", "serde::ser::tests::should_serialize_dynamic_option", "serde::tests::should_roundtrip_proxied_dynamic", "tests::assert_impl_reflect_macro_on_all", "serde::tests::test_serialization_struct", "serde::ser::tests::enum_should_serialize", "serde::ser::tests::should_serialize_option", "serde::ser::tests::should_serialize_non_self_describing_binary", "tests::custom_debug_function", "serde::tests::test_serialization_tuple_struct", "serde::ser::tests::should_serialize", "serde::de::tests::should_deserialize", "tests::docstrings::fields_should_contain_docs", "tests::docstrings::should_contain_docs", "tests::can_opt_out_type_path", "tests::docstrings::should_not_contain_docs", "serde::ser::tests::should_serialize_self_describing_binary", "tests::docstrings::variants_should_contain_docs", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::from_reflect_should_use_default_container_attribute", "tests::dynamic_types_debug_format", "tests::from_reflect_should_use_default_field_attributes", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::glam::vec3_apply_dynamic", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "tests::into_reflect", "tests::glam::quat_deserialization", "tests::multiple_reflect_lists", "tests::multiple_reflect_value_lists", "tests::glam::quat_serialization", "tests::glam::vec3_serialization", "tests::not_dynamic_names", "tests::recursive_typed_storage_does_not_hang", "tests::glam::vec3_deserialization", "tests::reflect_downcast", "tests::reflect_ignore", "tests::reflect_complex_patch", "tests::reflect_map", "tests::reflect_map_no_hash - should panic", "tests::reflect_struct", "tests::reflect_take", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::reflect_type_path", "tests::should_allow_custom_where_with_assoc_type", "tests::reflect_type_info", "tests::should_allow_empty_custom_where", "tests::should_allow_multiple_custom_where", "tests::should_drain_fields", "tests::should_permit_higher_ranked_lifetimes", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_call_from_reflect_dynamically", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::should_reflect_debug", "tests::std_type_paths", "type_registry::test::test_reflect_from_ptr", "tests::reflect_serialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 41)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 51)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 28)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 59)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 10)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 20)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 165)", "crates/bevy_reflect/src/lib.rs - (line 291)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 125)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 26)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/lib.rs - (line 34)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 95)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 439)", "crates/bevy_reflect/src/lib.rs - (line 151)", "crates/bevy_reflect/src/lib.rs - (line 309)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 442)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 159)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 448)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 224)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 21)", "crates/bevy_reflect/src/array.rs - array::Array (line 30)", "crates/bevy_reflect/src/lib.rs - (line 242)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 527)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 473)", "crates/bevy_reflect/src/lib.rs - (line 137)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 369)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 57)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 311)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 323)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 25)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 24)", "crates/bevy_reflect/src/lib.rs - (line 211)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 335)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 77)", "crates/bevy_reflect/src/lib.rs - (line 101)", "crates/bevy_reflect/src/lib.rs - (line 270)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 181)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 145)", "crates/bevy_reflect/src/lib.rs - (line 172)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 175)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 485)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/list.rs - list::List (line 37)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 211)", "crates/bevy_reflect/src/lib.rs - (line 80)", "crates/bevy_reflect/src/lib.rs - (line 186)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 122)", "crates/bevy_reflect/src/lib.rs - (line 352)" ]
[ "tests/reflect_derive/custom_where.fail.rs [should fail to compile]", "tests/reflect_derive/from_reflect.fail.rs [should fail to compile]", "tests/reflect_derive/bounds.pass.rs [should pass]", "tests/reflect_derive/custom_where.pass.rs [should pass]", "tests/reflect_derive/from_reflect.pass.rs [should pass]", "tests/reflect_derive/generics_structs.pass.rs [should pass]", "tests/reflect_derive/lifetimes.pass.rs [should pass]", "tests/reflect_derive/nested.pass.rs [should pass]" ]
[ "test" ]
[]
auto_2025-06-08
bevyengine/bevy
1,070
bevyengine__bevy-1070
[ "1036" ]
51650f114fbf31fc89db7bd69542dc21edf2dcb7
diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -1,11 +1,9 @@ use crate::Node; -use bevy_app::{EventReader, Events}; use bevy_core::FloatOrd; use bevy_ecs::prelude::*; use bevy_input::{mouse::MouseButton, touch::Touches, Input}; -use bevy_math::Vec2; use bevy_transform::components::GlobalTransform; -use bevy_window::CursorMoved; +use bevy_window::Windows; #[derive(Copy, Clone, Eq, PartialEq, Debug)] pub enum Interaction { diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -34,15 +32,13 @@ impl Default for FocusPolicy { #[derive(Default)] pub struct State { - cursor_moved_event_reader: EventReader<CursorMoved>, - cursor_position: Vec2, hovered_entity: Option<Entity>, } pub fn ui_focus_system( mut state: Local<State>, + windows: Res<Windows>, mouse_button_input: Res<Input<MouseButton>>, - cursor_moved_events: Res<Events<CursorMoved>>, touches_input: Res<Touches>, mut node_query: Query<( Entity, diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -85,8 +83,8 @@ pub fn ui_focus_system( let min = ui_position - extents; let max = ui_position + extents; // if the current cursor position is within the bounds of the node, consider it for clicking - if (min.x..max.x).contains(&state.cursor_position.x) - && (min.y..max.y).contains(&state.cursor_position.y) + if (min.x..max.x).contains(&cursor_position.x) + && (min.y..max.y).contains(&cursor_position.y) { Some((entity, focus_policy, interaction, FloatOrd(position.z))) } else {
diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -52,12 +48,14 @@ pub fn ui_focus_system( Option<&FocusPolicy>, )>, ) { - if let Some(cursor_moved) = state.cursor_moved_event_reader.latest(&cursor_moved_events) { - state.cursor_position = cursor_moved.position; - } - if let Some(touch) = touches_input.get_pressed(0) { - state.cursor_position = touch.position(); - } + let cursor_position = if let Some(cursor_position) = windows + .get_primary() + .and_then(|window| window.cursor_position()) + { + cursor_position + } else { + return; + }; if mouse_button_input.just_released(MouseButton::Left) || touches_input.just_released(0) { for (_entity, _node, _global_transform, interaction, _focus_policy) in node_query.iter_mut()
ButtonBundle starts up with Hovered Interaction. **Bevy version** bevy = { git = "https://github.com/bevyengine/bevy", version = "0.3.0" } **Operating system & version** Windows 10 **What you did** ``` use bevy::prelude::*; struct Output { msg: String, msg_prev: String, } impl Default for Output { fn default() -> Self { Output { msg: String::new(), msg_prev: String::new(), } } } fn main() { App::build() .add_plugins(DefaultPlugins) .add_startup_system(setup) .add_system(interaction) .init_resource::<Output>() .add_system(debug) .run(); } fn setup(cmds: &mut Commands) { cmds.spawn(CameraUiBundle::default()); cmds.spawn(ButtonBundle { style: Style { size: Size::new(Val::Px(120.0), Val::Px(120.0)), ..Default::default() }, ..Default::default() }); } fn interaction(mut output: ResMut<Output>, i_query: Query<&Interaction>) { for a in i_query.iter() { match *a { Interaction::Clicked => output.msg = "Clicked".to_string(), Interaction::Hovered => output.msg = "Hover".to_string(), Interaction::None => output.msg = "Normal".to_string(), } } } fn debug(mut mut_res: ResMut<Output>) { if mut_res.msg != mut_res.msg_prev { println!("{}", mut_res.msg); mut_res.msg_prev = mut_res.msg.clone(); } } ``` **What you expected to happen** I expected to start my application with `Interaction::None`. **What actually happened** > Normal > Dec 08 21:09:46.756 WARN wgpu_core::device: Failed to parse shader SPIR-V code: UnsupportedBuiltIn(4) > Dec 08 21:09:46.756 WARN wgpu_core::device: Shader module will not be validated > Hover **Additional information** - I am not sure if the **WARN** messages are relevant, though I found it odd that they show up between the change in state. - If setup is changed to add a second button, `Interaction::Hovered` never happens. - If the mouse is within the bounds of the window, `Interaction::Hovered` never happens. - If the mouse is within the bounds of the button, `Interaction::Hovered` occurs as expected.
the issue is that before you move your mouse, it uses the default value for a position which is `(0, 0)` so over your button in the corner... it's the default value of [this field](https://github.com/bevyengine/bevy/blob/c54179b1829e90d6da8323b67bbab8fe3d4af4b4/crates/bevy_ui/src/focus.rs#L38). This should be fixed, maybe by using an option to ignore mouse interaction before the mouse has been moved for the first time. for your issue with two buttons, as you are using a single resource to keep the state of all your buttons, you can only see the state of one button (the last added) if you change your system like this: ```rust fn interaction(mut output: ResMut<Output>, i_query: Query<&Interaction, Changed<Interaction>>) { for a in i_query.iter() { eprintln!("{:?}", a); match *a { Interaction::Clicked => output.msg = "Clicked".to_string(), Interaction::Hovered => output.msg = "Hover".to_string(), Interaction::None => output.msg = "Normal".to_string(), } } } ``` you should see all interactions. I added a filter `Changed<Interaction>` to the query to not be flooded every frame Thank you for the input. I'm still trying to figure out some of the `Query` stuff. As for the position, it would be better if the position could be determined prior to events. Otherwise, you could end up with the reverse situation of `Hovered` not triggering when it should. While this is such a minor issue, it would prevent odd behavior that makes UI feel a little clunky.
2020-12-15T09:47:12Z
0.3
2021-04-27T23:51:09Z
51650f114fbf31fc89db7bd69542dc21edf2dcb7
[ "update::tests::test_ui_z_system" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
763
bevyengine__bevy-763
[ "762" ]
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -263,6 +263,9 @@ macro_rules! impl_or_query { true $( && $T.should_skip(n) )+ } } + + unsafe impl<$( $T: ReadOnlyFetch ),+> ReadOnlyFetch for Or<($( $T ),+)> {} + unsafe impl<$( $T: ReadOnlyFetch ),+> ReadOnlyFetch for FetchOr<($( $T ),+)> {} }; } diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -320,6 +323,7 @@ impl<'a, T: Component> Query for Mutated<'a, T> { #[doc(hidden)] pub struct FetchMutated<T>(NonNull<T>, NonNull<bool>); +unsafe impl<T> ReadOnlyFetch for FetchMutated<T> {} impl<'a, T: Component> Fetch<'a> for FetchMutated<T> { type Item = Mutated<'a, T>;
diff --git a/crates/bevy_ecs/src/system/into_system.rs b/crates/bevy_ecs/src/system/into_system.rs --- a/crates/bevy_ecs/src/system/into_system.rs +++ b/crates/bevy_ecs/src/system/into_system.rs @@ -489,6 +489,43 @@ mod tests { assert!(*resources.get::<bool>().unwrap(), "system ran"); } + #[test] + fn or_query_set_system() { + // Regression test for issue #762 + use crate::{Added, Changed, Mutated, Or}; + fn query_system( + mut ran: ResMut<bool>, + set: QuerySet<( + Query<Or<(Changed<A>, Changed<B>)>>, + Query<Or<(Added<A>, Added<B>)>>, + Query<Or<(Mutated<A>, Mutated<B>)>>, + )>, + ) { + let changed = set.q0().iter().count(); + let added = set.q1().iter().count(); + let mutated = set.q2().iter().count(); + + assert_eq!(changed, 1); + assert_eq!(added, 1); + assert_eq!(mutated, 0); + + *ran = true; + } + + let mut world = World::default(); + let mut resources = Resources::default(); + resources.insert(false); + world.spawn((A, B)); + + let mut schedule = Schedule::default(); + schedule.add_stage("update"); + schedule.add_system_to_stage("update", query_system.system()); + + schedule.run(&mut world, &mut resources); + + assert!(*resources.get::<bool>().unwrap(), "system ran"); + } + #[test] fn changed_resource_system() { fn incr_e_on_flip(_run_on_flip: ChangedRes<bool>, mut i: Mut<i32>) {
Query using the Or operator do not provide .iter() method, only iter_mut(). **Bevy version** Following version, containing changes on query: 9cc6368b28a2df2dff652ae1a087f74fd0362a6a **Operating system & version** Ubuntu 20.04 **What you did** The following query, that contains an Or, does not have the .iter() method, only iter_mut() ```rust mut query_changed_camera: Query<( &Camera, Or<(Changed<OrthographicProjection>, Changed<Transform>)>, )>, ``` ```rust for (camera, (camera_ortho, camera_transform)) in query_changed_camera.iter() { ``` **What you expected to happen** Should have compiled **What actually happened** Compilation failed: ```rust error[E0277]: the trait bound `bevy_hecs::query::FetchOr<(bevy_hecs::query::FetchChanged<bevy::render::camera::OrthographicProjection>, bevy_hecs::query::FetchChanged<bevy::prelude::Transform>)>: bevy::ecs::ReadOnlyFetch` is not satisfied --> src/cursor_2dworld_pos_plugin.rs:62:76 | 62 | for (camera, (camera_ortho, camera_transform)) in query_changed_camera.iter() { | ^^^^ the trait `bevy::ecs::ReadOnlyFetch` is not implemented for `bevy_hecs::query::FetchOr<(bevy_hecs::query::FetchChanged<bevy::render::camera::OrthographicProjection>, bevy_hecs::query::FetchChanged<bevy::prelude::Transform>)>` | = note: required because of the requirements on the impl of `bevy::ecs::ReadOnlyFetch` for `(bevy_hecs::query::FetchRead<bevy::render::camera::Camera>, bevy_hecs::query::FetchOr<(bevy_hecs::query::FetchChanged<bevy::render::camera::OrthographicProjection>, bevy_hecs::query::FetchChanged<bevy::prelude::Transform>)>)` ``` **Additional information** Using the .iter_mut() method works, so, nothing critical here. As discussed in the discord, the culprit is the 'Or' , not the Changed. it can be the same issue as #753 , but we were not sure on discord, so filing another issue.
2020-11-01T15:30:51Z
0.2
2020-11-02T00:51:52Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "resource::resources::tests::thread_local_resource", "resource::resource_query::tests::changed_resource", "resource::resources::tests::resource", "resource::resource_query::tests::or_changed_resource", "resource::resources::tests::thread_local_resource_ref_aliasing", "resource::resources::tests::resource_double_mut_panic", "resource::resources::tests::thread_local_resource_mut_ref_aliasing", "resource::resources::tests::thread_local_resource_panic", "system::commands::tests::command_buffer", "system::into_system::tests::conflicting_query_immut_system", "system::into_system::tests::conflicting_query_sets_system", "system::into_system::tests::conflicting_query_with_query_set_system", "system::into_system::tests::conflicting_query_mut_system", "system::into_system::tests::changed_resource_system", "system::into_system::tests::query_set_system", "system::into_system::tests::query_system_gets", "schedule::parallel_executor::tests::cross_stage_archetype_change_prepare", "schedule::parallel_executor::tests::intra_stage_archetype_change_prepare", "schedule::parallel_executor::tests::schedule" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
719
bevyengine__bevy-719
[ "698" ]
b3541a9a3131d44510d87b00d1106c92b05a7639
diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -671,62 +671,102 @@ impl World { /// assert_eq!(*world.get::<bool>(e).unwrap(), true); /// ``` pub fn remove<T: Bundle>(&mut self, entity: Entity) -> Result<T, ComponentError> { - use std::collections::hash_map::Entry; - self.flush(); let loc = self.entities.get_mut(entity)?; unsafe { - let removed = T::with_static_ids(|ids| ids.iter().copied().collect::<HashSet<_>>()); - let info = self.archetypes[loc.archetype as usize] - .types() - .iter() - .cloned() - .filter(|x| !removed.contains(&x.id())) - .collect::<Vec<_>>(); - let elements = info.iter().map(|x| x.id()).collect::<Vec<_>>(); - let target = match self.index.entry(elements) { - Entry::Occupied(x) => *x.get(), - Entry::Vacant(x) => { - self.archetypes.push(Archetype::new(info)); - let index = (self.archetypes.len() - 1) as u32; - x.insert(index); - self.archetype_generation += 1; - index - } - }; + let to_remove = T::with_static_ids(|ids| ids.iter().copied().collect::<HashSet<_>>()); + let old_index = loc.index; let source_arch = &self.archetypes[loc.archetype as usize]; let bundle = T::get(|ty, size| source_arch.get_dynamic(ty, size, old_index))?; - let (source_arch, target_arch) = index2( - &mut self.archetypes, - loc.archetype as usize, - target as usize, - ); - let target_index = target_arch.allocate(entity); - loc.archetype = target; - loc.index = target_index; - let removed_components = &mut self.removed_components; - if let Some(moved) = - source_arch.move_to(old_index, |src, ty, size, is_added, is_mutated| { - // Only move the components present in the target archetype, i.e. the non-removed ones. - if let Some(dst) = target_arch.get_dynamic(ty, size, target_index) { - ptr::copy_nonoverlapping(src, dst.as_ptr(), size); - let state = target_arch.get_type_state_mut(ty).unwrap(); - *state.added().as_ptr().add(target_index) = is_added; - *state.mutated().as_ptr().add(target_index) = is_mutated; - } else { - let removed_entities = - removed_components.entry(ty).or_insert_with(Vec::new); - removed_entities.push(entity); - } - }) - { - self.entities.get_mut(moved).unwrap().index = old_index; + match self.remove_bundle_internal(entity, to_remove) { + Ok(_) => Ok(bundle), + Err(err) => Err(err), } - Ok(bundle) } } + fn remove_bundle_internal<S: core::hash::BuildHasher>( + &mut self, + entity: Entity, + to_remove: std::collections::HashSet<TypeId, S>, + ) -> Result<(), ComponentError> { + use std::collections::hash_map::Entry; + + let loc = self.entities.get_mut(entity)?; + let info = self.archetypes[loc.archetype as usize] + .types() + .iter() + .cloned() + .filter(|x| !to_remove.contains(&x.id())) + .collect::<Vec<_>>(); + let elements = info.iter().map(|x| x.id()).collect::<Vec<_>>(); + let target = match self.index.entry(elements) { + Entry::Occupied(x) => *x.get(), + Entry::Vacant(x) => { + self.archetypes.push(Archetype::new(info)); + let index = (self.archetypes.len() - 1) as u32; + x.insert(index); + self.archetype_generation += 1; + index + } + }; + let old_index = loc.index; + let (source_arch, target_arch) = index2( + &mut self.archetypes, + loc.archetype as usize, + target as usize, + ); + let target_index = unsafe { target_arch.allocate(entity) }; + loc.archetype = target; + loc.index = target_index; + let removed_components = &mut self.removed_components; + if let Some(moved) = unsafe { + source_arch.move_to(old_index, |src, ty, size, is_added, is_mutated| { + // Only move the components present in the target archetype, i.e. the non-removed ones. + if let Some(dst) = target_arch.get_dynamic(ty, size, target_index) { + ptr::copy_nonoverlapping(src, dst.as_ptr(), size); + let state = target_arch.get_type_state_mut(ty).unwrap(); + *state.added().as_ptr().add(target_index) = is_added; + *state.mutated().as_ptr().add(target_index) = is_mutated; + } else { + let removed_entities = removed_components.entry(ty).or_insert_with(Vec::new); + removed_entities.push(entity); + } + }) + } { + self.entities.get_mut(moved).unwrap().index = old_index; + } + Ok(()) + } + + /// Remove components from `entity` + /// + /// Fallback method for `remove` when one of the component in `T` is not present in `entity`. + /// In this case, the missing component will be skipped. + /// + /// See `remove`. + pub fn remove_one_by_one<T: Bundle>(&mut self, entity: Entity) -> Result<(), ComponentError> { + self.flush(); + + let to_remove = T::with_static_ids(|ids| ids.iter().copied().collect::<HashSet<_>>()); + for component_to_remove in to_remove.into_iter() { + let loc = self.entities.get(entity)?; + if loc.archetype == 0 { + return Err(ComponentError::NoSuchEntity); + } + if self.archetypes[loc.archetype as usize].has_dynamic(component_to_remove) { + let mut single_component_hashset = std::collections::HashSet::new(); + single_component_hashset.insert(component_to_remove); + match self.remove_bundle_internal(entity, single_component_hashset) { + Ok(_) | Err(ComponentError::MissingComponent(_)) => (), + Err(err) => return Err(err), + }; + } + } + Ok(()) + } + /// Remove the `T` component from `entity` /// /// See `remove`. diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -1,7 +1,7 @@ use super::SystemId; use crate::resource::{Resource, Resources}; use bevy_hecs::{Bundle, Component, DynamicBundle, Entity, EntityReserver, World}; -use bevy_utils::tracing::debug; +use bevy_utils::tracing::{debug, warn}; use std::marker::PhantomData; /// A [World] mutation diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -126,7 +126,30 @@ where T: Bundle + Send + Sync + 'static, { fn write(self: Box<Self>, world: &mut World, _resources: &mut Resources) { - world.remove::<T>(self.entity).unwrap(); + match world.remove::<T>(self.entity) { + Ok(_) => (), + Err(bevy_hecs::ComponentError::MissingComponent(e)) => { + warn!( + "Failed to remove components {:?} with error: {}. Falling back to inefficient one-by-one component removing.", + std::any::type_name::<T>(), + e + ); + if let Err(e) = world.remove_one_by_one::<T>(self.entity) { + debug!( + "Failed to remove components {:?} with error: {}", + std::any::type_name::<T>(), + e + ); + } + } + Err(e) => { + debug!( + "Failed to remove components {:?} with error: {}", + std::any::type_name::<T>(), + e + ); + } + } } }
diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -329,4 +352,32 @@ mod tests { .collect::<Vec<_>>(); assert_eq!(results2, vec![]); } + + #[test] + fn remove_components() { + let mut world = World::default(); + let mut resources = Resources::default(); + let mut command_buffer = Commands::default(); + command_buffer.set_entity_reserver(world.get_entity_reserver()); + command_buffer.spawn((1u32, 2u64)); + let entity = command_buffer.current_entity().unwrap(); + command_buffer.apply(&mut world, &mut resources); + let results_before = world + .query::<(&u32, &u64)>() + .map(|(a, b)| (*a, *b)) + .collect::<Vec<_>>(); + assert_eq!(results_before, vec![(1u32, 2u64)]); + + // test component removal + command_buffer.remove_one::<u32>(entity); + command_buffer.remove::<(u32, u64)>(entity); + command_buffer.apply(&mut world, &mut resources); + let results_after = world + .query::<(&u32, &u64)>() + .map(|(a, b)| (*a, *b)) + .collect::<Vec<_>>(); + assert_eq!(results_after, vec![]); + let results_after_u64 = world.query::<&u64>().map(|a| *a).collect::<Vec<_>>(); + assert_eq!(results_after_u64, vec![]); + } }
removing a bundle from an entity when one of the component has already been removed crashes On bevy master, , when removing a bundle from an entity when one of the component has already been removed, it crashes with this `unwrap`: https://github.com/bevyengine/bevy/blob/master/crates/bevy_ecs/src/system/commands.rs#L150 When using `remove_one` instead of `remove` to remove a component, it never crashes even if the component is not present on the entity. This is because `remove_one` checks for the presence of the component before removing it: https://github.com/bevyengine/bevy/blob/master/crates/bevy_ecs/src/system/commands.rs#L129 In the spirit of #649 and #651, I was thinking of removing the `unwrap` with a log, but that would mean that the other remaining components from the bundle won't be removed which may be an unexpected behaviour for the user. The other way around this would be, when a bundle fails to remove, to try to remove each component of the bundle one by one, but I'm not sure if that's a good fix... What do you think? <details> <summary>example code to reproduce the issue</summary> `remove_tag1` will never fail even though it just removes `Tag1` from every entity, `remove_tag12` will crash one `Tag1` are removed. ```rust use bevy::prelude::*; struct Tag1; struct Tag2; fn main() { App::build() .add_default_plugins() .add_startup_system(startup_system.system()) .add_system(count.system()) .add_system(remove_tag1.system()) .add_system(remove_tag12.system()) .run(); } fn startup_system(mut commands: Commands) { println!("setup"); commands.spawn((Tag1, Tag2)); commands.spawn((Tag1,)); } fn count(mut tag1_query: Query<&Tag1>, mut tag2_query: Query<&Tag2>) { println!("counting tags"); println!("- tag1 count: {}", tag1_query.iter().iter().len()); println!("- tag2 count: {}", tag2_query.iter().iter().len()); } fn remove_tag1(mut commands: Commands, mut entity_query: Query<Entity>) { let mut removed = 0; for entity in &mut entity_query.iter() { commands.remove_one::<Tag1>(entity); removed += 1; } println!("removed {} Tag1", removed); } fn remove_tag12(mut commands: Commands, mut entity_query: Query<(Entity, &Tag2)>) { let mut removed = 0; for (entity, _tag2) in &mut entity_query.iter() { commands.remove::<(Tag1, Tag2)>(entity); removed += 1; } println!("removed {} Tag1 & Tag2", removed); } ``` </details>
Here's my take at fixing the situation: https://github.com/bevyengine/bevy/pull/710
2020-10-22T19:22:09Z
0.3
2021-04-27T23:50:53Z
51650f114fbf31fc89db7bd69542dc21edf2dcb7
[ "system::commands::tests::remove_components" ]
[ "resource::resources::tests::thread_local_resource", "resource::resources::tests::resource", "resource::resources::tests::thread_local_resource_ref_aliasing", "resource::resources::tests::resource_double_mut_panic", "resource::resources::tests::thread_local_resource_mut_ref_aliasing", "resource::resources::tests::thread_local_resource_panic", "system::commands::tests::command_buffer", "system::into_system::tests::conflicting_changed_and_mutable_resource", "system::into_system::tests::changed_resource_or_system", "system::into_system::tests::changed_resource_system", "system::into_system::tests::conflicting_query_with_query_set_system", "system::into_system::tests::conflicting_query_sets_system", "system::into_system::tests::conflicting_query_mut_system", "system::into_system::tests::conflicting_query_immut_system", "system::into_system::tests::nonconflicting_system_resources", "system::into_system::tests::conflicting_system_resources", "system::into_system::tests::conflicting_system_local_resources", "system::into_system::tests::conflicting_system_resources_reverse_order", "system::into_system::tests::conflicting_system_resources_multiple_mutable", "system::into_system::tests::or_query_set_system", "system::into_system::tests::query_set_system", "system::into_system::tests::query_system_gets", "schedule::parallel_executor::tests::intra_stage_archetype_change_prepare", "schedule::parallel_executor::tests::cross_stage_archetype_change_prepare", "schedule::parallel_executor::tests::schedule" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
671
bevyengine__bevy-671
[ "456" ]
53d6d1050639e3b4448ef3f57aa63402d72511a6
diff --git a/crates/bevy_app/src/app_builder.rs b/crates/bevy_app/src/app_builder.rs --- a/crates/bevy_app/src/app_builder.rs +++ b/crates/bevy_app/src/app_builder.rs @@ -227,6 +227,14 @@ impl AppBuilder { self } + pub fn add_thread_local_resource<T>(&mut self, resource: T) -> &mut Self + where + T: 'static, + { + self.app.resources.insert_thread_local(resource); + self + } + pub fn init_resource<R>(&mut self) -> &mut Self where R: FromResources + Send + Sync + 'static, diff --git a/crates/bevy_app/src/app_builder.rs b/crates/bevy_app/src/app_builder.rs --- a/crates/bevy_app/src/app_builder.rs +++ b/crates/bevy_app/src/app_builder.rs @@ -237,6 +245,16 @@ impl AppBuilder { self } + pub fn init_thread_local_resource<R>(&mut self) -> &mut Self + where + R: FromResources + 'static, + { + let resource = R::from_resources(&self.app.resources); + self.app.resources.insert_thread_local(resource); + + self + } + pub fn set_runner(&mut self, run_fn: impl Fn(App) + 'static) -> &mut Self { self.app.runner = Box::new(run_fn); self diff --git a/crates/bevy_ecs/hecs/src/borrow.rs b/crates/bevy_ecs/hecs/src/borrow.rs --- a/crates/bevy_ecs/hecs/src/borrow.rs +++ b/crates/bevy_ecs/hecs/src/borrow.rs @@ -22,14 +22,17 @@ use core::{ use crate::{archetype::Archetype, Component, MissingComponent}; +/// Atomically enforces Rust-style borrow checking at runtime #[derive(Debug)] pub struct AtomicBorrow(AtomicUsize); impl AtomicBorrow { + /// Creates a new AtomicBorrow pub const fn new() -> Self { Self(AtomicUsize::new(0)) } + /// Starts a new immutable borrow. This can be called any number of times pub fn borrow(&self) -> bool { let value = self.0.fetch_add(1, Ordering::Acquire).wrapping_add(1); if value == 0 { diff --git a/crates/bevy_ecs/hecs/src/borrow.rs b/crates/bevy_ecs/hecs/src/borrow.rs --- a/crates/bevy_ecs/hecs/src/borrow.rs +++ b/crates/bevy_ecs/hecs/src/borrow.rs @@ -44,18 +47,21 @@ impl AtomicBorrow { } } + /// Starts a new mutable borrow. This must be unique. It cannot be done in parallel with other borrows or borrow_muts pub fn borrow_mut(&self) -> bool { self.0 .compare_exchange(0, UNIQUE_BIT, Ordering::Acquire, Ordering::Relaxed) .is_ok() } + /// Release an immutable borrow. pub fn release(&self) { let value = self.0.fetch_sub(1, Ordering::Release); debug_assert!(value != 0, "unbalanced release"); debug_assert!(value & UNIQUE_BIT == 0, "shared release of unique borrow"); } + /// Release a mutable borrow. pub fn release_mut(&self) { let value = self.0.fetch_and(!UNIQUE_BIT, Ordering::Release); debug_assert_ne!(value & UNIQUE_BIT, 0, "unique release of shared borrow"); diff --git a/crates/bevy_ecs/hecs/src/lib.rs b/crates/bevy_ecs/hecs/src/lib.rs --- a/crates/bevy_ecs/hecs/src/lib.rs +++ b/crates/bevy_ecs/hecs/src/lib.rs @@ -76,7 +76,7 @@ mod serde; mod world; pub use archetype::{Archetype, TypeState}; -pub use borrow::{Ref, RefMut}; +pub use borrow::{AtomicBorrow, Ref, RefMut}; pub use bundle::{Bundle, DynamicBundle, MissingComponent}; pub use entities::{Entity, EntityReserver, Location, NoSuchEntity}; pub use entity_builder::{BuiltEntity, EntityBuilder}; diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -1,9 +1,15 @@ use super::{FetchResource, ResourceQuery}; use crate::system::SystemId; -use bevy_hecs::{Archetype, Entity, Ref, RefMut, TypeInfo, TypeState}; +use bevy_hecs::{Archetype, AtomicBorrow, Entity, Ref, RefMut, TypeInfo, TypeState}; use bevy_utils::HashMap; use core::any::TypeId; -use std::ptr::NonNull; +use downcast_rs::{impl_downcast, Downcast}; +use std::{ + fmt::Debug, + ops::{Deref, DerefMut}, + ptr::NonNull, + thread::ThreadId, +}; /// A Resource type pub trait Resource: Send + Sync + 'static {} diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -22,10 +28,76 @@ pub enum ResourceIndex { System(SystemId), } +// TODO: consider using this for normal resources (would require change tracking) +trait ResourceStorage: Downcast {} +impl_downcast!(ResourceStorage); + +struct StoredResource<T: 'static> { + value: T, + atomic_borrow: AtomicBorrow, +} + +pub struct VecResourceStorage<T: 'static> { + stored: Vec<StoredResource<T>>, +} + +impl<T: 'static> VecResourceStorage<T> { + fn get(&self, index: usize) -> Option<ResourceRef<'_, T>> { + self.stored + .get(index) + .map(|stored| ResourceRef::new(&stored.value, &stored.atomic_borrow)) + } + + fn get_mut(&self, index: usize) -> Option<ResourceRefMut<'_, T>> { + self.stored.get(index).map(|stored| + // SAFE: ResourceRefMut ensures that this borrow is unique + unsafe { + let value = &stored.value as *const T as *mut T; + ResourceRefMut::new(&mut *value, &stored.atomic_borrow) + }) + } + + fn push(&mut self, resource: T) { + self.stored.push(StoredResource { + atomic_borrow: AtomicBorrow::new(), + value: resource, + }) + } + + fn set(&mut self, index: usize, resource: T) { + self.stored[index].value = resource; + } + + fn is_empty(&self) -> bool { + self.stored.is_empty() + } +} + +impl<T: 'static> Default for VecResourceStorage<T> { + fn default() -> Self { + Self { + stored: Default::default(), + } + } +} + +impl<T: 'static> ResourceStorage for VecResourceStorage<T> {} + /// A collection of resource instances identified by their type. -#[derive(Debug, Default)] pub struct Resources { pub(crate) resource_data: HashMap<TypeId, ResourceData>, + thread_local_data: HashMap<TypeId, Box<dyn ResourceStorage>>, + main_thread_id: ThreadId, +} + +impl Default for Resources { + fn default() -> Self { + Resources { + resource_data: Default::default(), + thread_local_data: Default::default(), + main_thread_id: std::thread::current().id(), + } + } } impl Resources { diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -33,6 +105,26 @@ impl Resources { self.insert_resource(resource, ResourceIndex::Global); } + pub fn insert_thread_local<T: 'static>(&mut self, resource: T) { + self.check_thread_local(); + let entry = self + .thread_local_data + .entry(TypeId::of::<T>()) + .or_insert_with(|| Box::new(VecResourceStorage::<T>::default())); + let resources = entry.downcast_mut::<VecResourceStorage<T>>().unwrap(); + if resources.is_empty() { + resources.push(resource); + } else { + resources.set(0, resource); + } + } + + fn check_thread_local(&self) { + if std::thread::current().id() != self.main_thread_id { + panic!("Attempted to access a thread local resource off of the main thread.") + } + } + pub fn contains<T: Resource>(&self) -> bool { self.get_resource::<T>(ResourceIndex::Global).is_some() } diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -45,6 +137,26 @@ impl Resources { self.get_resource_mut(ResourceIndex::Global) } + pub fn get_thread_local<T: 'static>(&self) -> Option<ResourceRef<'_, T>> { + self.check_thread_local(); + self.thread_local_data + .get(&TypeId::of::<T>()) + .and_then(|storage| { + let resources = storage.downcast_ref::<VecResourceStorage<T>>().unwrap(); + resources.get(0) + }) + } + + pub fn get_thread_local_mut<T: 'static>(&self) -> Option<ResourceRefMut<'_, T>> { + self.check_thread_local(); + self.thread_local_data + .get(&TypeId::of::<T>()) + .and_then(|storage| { + let resources = storage.downcast_ref::<VecResourceStorage<T>>().unwrap(); + resources.get_mut(0) + }) + } + /// Returns a clone of the underlying resource, this is helpful when borrowing something /// cloneable (like a task pool) without taking a borrow on the resource map pub fn get_cloned<T: Resource + Clone>(&self) -> Option<T> { diff --git a/crates/bevy_gilrs/src/gilrs_system.rs b/crates/bevy_gilrs/src/gilrs_system.rs --- a/crates/bevy_gilrs/src/gilrs_system.rs +++ b/crates/bevy_gilrs/src/gilrs_system.rs @@ -1,34 +1,16 @@ use crate::converter::{convert_axis, convert_button, convert_gamepad_id}; use bevy_app::Events; -use bevy_ecs::{Res, ResMut}; +use bevy_ecs::{Resources, World}; use bevy_input::prelude::*; use gilrs::{Button, EventType, Gilrs}; -use std::sync::{Arc, Mutex}; -// TODO: remove this if/when bevy_ecs supports thread local resources -#[derive(Debug)] -struct GilrsSendWrapper(Gilrs); - -unsafe impl Send for GilrsSendWrapper {} - -#[derive(Debug)] -pub struct GilrsArcMutexWrapper(Arc<Mutex<GilrsSendWrapper>>); - -impl GilrsArcMutexWrapper { - pub fn new(gilrs: Gilrs) -> GilrsArcMutexWrapper { - GilrsArcMutexWrapper(Arc::new(Mutex::new(GilrsSendWrapper(gilrs)))) - } -} - -pub fn gilrs_startup_system( - gilrs: Res<GilrsArcMutexWrapper>, - mut gamepad_event: ResMut<Events<GamepadEvent>>, - mut inputs: ResMut<Input<GamepadButton>>, - mut axes: ResMut<Axis<GamepadAxis>>, -) { +pub fn gilrs_startup_system(_world: &mut World, resources: &mut Resources) { + let gilrs = resources.get_thread_local::<Gilrs>().unwrap(); + let mut gamepad_event = resources.get_mut::<Events<GamepadEvent>>().unwrap(); + let mut inputs = resources.get_mut::<Input<GamepadButton>>().unwrap(); + let mut axes = resources.get_mut::<Axis<GamepadAxis>>().unwrap(); gamepad_event.update(); inputs.update(); - let gilrs = &gilrs.0.lock().unwrap().0; for (gilrs_id, gilrs_gamepad) in gilrs.gamepads() { connect_gamepad( gilrs_gamepad, diff --git a/crates/bevy_gilrs/src/gilrs_system.rs b/crates/bevy_gilrs/src/gilrs_system.rs --- a/crates/bevy_gilrs/src/gilrs_system.rs +++ b/crates/bevy_gilrs/src/gilrs_system.rs @@ -40,15 +22,14 @@ pub fn gilrs_startup_system( } } -pub fn gilrs_update_system( - gilrs: Res<GilrsArcMutexWrapper>, - mut gamepad_event: ResMut<Events<GamepadEvent>>, - mut inputs: ResMut<Input<GamepadButton>>, - mut axes: ResMut<Axis<GamepadAxis>>, -) { +pub fn gilrs_update_system(_world: &mut World, resources: &mut Resources) { + let mut gilrs = resources.get_thread_local_mut::<Gilrs>().unwrap(); + let mut gamepad_event = resources.get_mut::<Events<GamepadEvent>>().unwrap(); + let mut inputs = resources.get_mut::<Input<GamepadButton>>().unwrap(); + let mut axes = resources.get_mut::<Axis<GamepadAxis>>().unwrap(); + gamepad_event.update(); inputs.update(); - let gilrs = &mut gilrs.0.lock().unwrap().0; while let Some(gilrs_event) = gilrs.next_event() { match gilrs_event.event { EventType::Connected => { diff --git a/crates/bevy_gilrs/src/lib.rs b/crates/bevy_gilrs/src/lib.rs --- a/crates/bevy_gilrs/src/lib.rs +++ b/crates/bevy_gilrs/src/lib.rs @@ -2,8 +2,8 @@ mod converter; mod gilrs_system; use bevy_app::prelude::*; -use bevy_ecs::IntoQuerySystem; -use gilrs_system::{gilrs_startup_system, gilrs_update_system, GilrsArcMutexWrapper}; +use bevy_ecs::prelude::*; +use gilrs_system::{gilrs_startup_system, gilrs_update_system}; #[derive(Default)] pub struct GilrsPlugin; diff --git a/crates/bevy_gilrs/src/lib.rs b/crates/bevy_gilrs/src/lib.rs --- a/crates/bevy_gilrs/src/lib.rs +++ b/crates/bevy_gilrs/src/lib.rs @@ -12,9 +12,12 @@ impl Plugin for GilrsPlugin { fn build(&self, app: &mut AppBuilder) { match gilrs::Gilrs::new() { Ok(gilrs) => { - app.add_resource(GilrsArcMutexWrapper::new(gilrs)) - .add_startup_system(gilrs_startup_system.system()) - .add_system_to_stage(stage::EVENT_UPDATE, gilrs_update_system.system()); + app.add_thread_local_resource(gilrs) + .add_startup_system(gilrs_startup_system.thread_local_system()) + .add_system_to_stage( + stage::EVENT_UPDATE, + gilrs_update_system.thread_local_system(), + ); } Err(err) => log::error!("Failed to start Gilrs. {}", err), }
diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -281,6 +393,93 @@ where } } +/// Shared borrow of an entity's component +#[derive(Clone)] +pub struct ResourceRef<'a, T: 'static> { + borrow: &'a AtomicBorrow, + resource: &'a T, +} + +impl<'a, T: 'static> ResourceRef<'a, T> { + /// Creates a new resource borrow + pub fn new(resource: &'a T, borrow: &'a AtomicBorrow) -> Self { + borrow.borrow(); + Self { resource, borrow } + } +} + +unsafe impl<T: 'static> Send for ResourceRef<'_, T> {} +unsafe impl<T: 'static> Sync for ResourceRef<'_, T> {} + +impl<'a, T: 'static> Drop for ResourceRef<'a, T> { + fn drop(&mut self) { + self.borrow.release() + } +} + +impl<'a, T: 'static> Deref for ResourceRef<'a, T> { + type Target = T; + + fn deref(&self) -> &T { + self.resource + } +} + +impl<'a, T: 'static> Debug for ResourceRef<'a, T> +where + T: Debug, +{ + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + self.deref().fmt(f) + } +} + +/// Unique borrow of a resource +pub struct ResourceRefMut<'a, T: 'static> { + borrow: &'a AtomicBorrow, + resource: &'a mut T, +} + +impl<'a, T: 'static> ResourceRefMut<'a, T> { + /// Creates a new entity component mutable borrow + pub fn new(resource: &'a mut T, borrow: &'a AtomicBorrow) -> Self { + borrow.borrow_mut(); + Self { resource, borrow } + } +} + +unsafe impl<T: 'static> Send for ResourceRefMut<'_, T> {} +unsafe impl<T: 'static> Sync for ResourceRefMut<'_, T> {} + +impl<'a, T: 'static> Drop for ResourceRefMut<'a, T> { + fn drop(&mut self) { + self.borrow.release_mut(); + } +} + +impl<'a, T: 'static> Deref for ResourceRefMut<'a, T> { + type Target = T; + + fn deref(&self) -> &T { + self.resource + } +} + +impl<'a, T: 'static> DerefMut for ResourceRefMut<'a, T> { + fn deref_mut(&mut self) -> &mut T { + self.resource + } +} + +impl<'a, T: 'static> Debug for ResourceRefMut<'a, T> +where + T: Debug, +{ + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + self.deref().fmt(f) + } +} + #[cfg(test)] mod tests { use super::Resources; diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -335,4 +534,44 @@ mod tests { let _x = resources.get_mut::<i32>(); let _y = resources.get_mut::<i32>(); } + + #[test] + fn thread_local_resource() { + let mut resources = Resources::default(); + resources.insert_thread_local(123i32); + resources.insert_thread_local(456i64); + assert_eq!(*resources.get_thread_local::<i32>().unwrap(), 123); + assert_eq!(*resources.get_thread_local_mut::<i64>().unwrap(), 456); + } + + #[test] + fn thread_local_resource_ref_aliasing() { + let mut resources = Resources::default(); + resources.insert_thread_local(123i32); + let a = resources.get_thread_local::<i32>().unwrap(); + let b = resources.get_thread_local::<i32>().unwrap(); + assert_eq!(*a, 123); + assert_eq!(*b, 123); + } + + #[test] + #[should_panic] + fn thread_local_resource_mut_ref_aliasing() { + let mut resources = Resources::default(); + resources.insert_thread_local(123i32); + let _a = resources.get_thread_local::<i32>().unwrap(); + let _b = resources.get_thread_local_mut::<i32>().unwrap(); + } + + #[test] + #[should_panic] + fn thread_local_resource_panic() { + let mut resources = Resources::default(); + resources.insert_thread_local(0i32); + std::thread::spawn(move || { + let _ = resources.get_thread_local_mut::<i32>(); + }) + .join() + .unwrap(); + } }
Support !Send + !Sync Resources Hi, I have a type that's neither `Send` nor `Sync` and I can't find a way to use this data as part of the `Schedule`. `Resources`, `System` and `IntoThreadLocalSystem` all have requirements on `Send + Sync`. Would it be possible to relax this?
Supporting `!Send + !Sync` resources is definitely a common enough requirement that we should support it. We've already had folks hit this in a number of places and working around it results in ugly and/or unsafe/incorrect code. Could this also apply to Components? E.g. I have a component that's `Send` but `!Sync`, but I only access it in one system, so wrapping it in a `Mutex` is pointless. However, I don't know if there's any way to *enforce* in the AppBuilder that I'm only using it in one system when it's `!Sync`. Also, this will come up for web support, because `WinitWindows` are `!Send + !Sync` on WASM. Where is the problem with Mutex or RWLock? About components keep in mind that send and sync are requirements of hecs. `Mutex<T>` and `RWLock<T>` both require T to be Send. Additionally, some resource/component types might only work correctly when they have been accessed from the main thread. i think we should try to honor the Send/Sync semantics, otherwise we might encounter undefined behavior. Adding !Send + !Sync resources should be relatively straightforward. Supporting !Send + !Sync components will be a bit harder, but I'm 100% ok with modifying hecs to support this. I suppose wrapping a `Send + !Sync` component in a `Mutex` is *probably* not a big deal if I'm only using it in one system, since the lock should basically always succeed, costing only a couple atomic operations... Still a slight waste, but the bigger issue is probably `!Send` resources. I don't think this is a requirement. I mean you can use send + sync in wasm as long you do not create any threads. For example I have used hecs with Mutex for wasm. Faking it does work in a single threaded wasm runtime: https://github.com/bevyengine/bevy/blob/34c6f5f41bd2bff7867e269985a54036b8d96771/crates/bevy_winit/src/winit_windows.rs#L111 Supporting threads in wasm is a hard requirement IMO. This can work for the time being, but I'm sure other use cases for `!Send` will pop up. I would also caution against bare `unsafe impl Send` and at least use a wrapper type which checks thread id before accessing like the one Amethyst [uses](https://github.com/amethyst/amethyst/blob/wasm/amethyst_core/src/ss.rs). That way you at least get a panic instead of undefined behavior. Yeah, the godot-rust bindings do something similar with `LocalCellData` which panics if the thread ID is not the same
2020-10-12T19:23:01Z
0.2
2020-10-12T22:09:45Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "resource::resource_query::tests::changed_resource", "resource::resource_query::tests::or_changed_resource", "resource::resources::tests::resource", "resource::resources::tests::resource_double_mut_panic", "system::system::tests::resource_query_access", "system::system::tests::query_archetype_access", "system::commands::tests::command_buffer", "system::into_system::tests::changed_resource_system", "system::into_system::tests::query_system_gets", "schedule::parallel_executor::tests::intra_stage_archetype_change_prepare", "schedule::parallel_executor::tests::cross_stage_archetype_change_prepare", "schedule::parallel_executor::tests::schedule" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
649
bevyengine__bevy-649
[ "487" ]
ebce1f9c4a9f3e3d3b93675a99c6fabd7facacc0
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,11 @@ - This allows drop-in use of colors from most applications. - New methods `Color::rgb_linear` and `Color::rgba_linear` will accept colors already in linear sRGB (the old behavior) - Individual color-components must now be accessed through setters and getters: `.r`, `.g`, `.b`, `.a`, `.set_r`, `.set_g`, `.set_b`, `.set_a`, and the corresponding methods with the `*_linear` suffix. +- Despawning an entity multiple times causes a debug-level log message to be emitted instead of a panic [649] [552]: https://github.com/bevyengine/bevy/pull/552 [616]: https://github.com/bevyengine/bevy/pull/616 +[649]: https://github.com/bevyengine/bevy/pull/649 ## Version 0.2.1 (2020-9-20) diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -72,7 +72,9 @@ pub(crate) struct Despawn { impl WorldWriter for Despawn { fn write(self: Box<Self>, world: &mut World) { - world.despawn(self.entity).unwrap(); + if let Err(e) = world.despawn(self.entity) { + log::debug!("Failed to despawn entity {:?}: {}", self.entity, e); + } } }
diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -385,6 +387,7 @@ mod tests { let mut command_buffer = Commands::default(); command_buffer.set_entity_reserver(world.get_entity_reserver()); command_buffer.spawn((1u32, 2u64)); + let entity = command_buffer.current_entity().unwrap(); command_buffer.insert_resource(3.14f32); command_buffer.apply(&mut world, &mut resources); let results = world diff --git a/crates/bevy_ecs/src/system/commands.rs b/crates/bevy_ecs/src/system/commands.rs --- a/crates/bevy_ecs/src/system/commands.rs +++ b/crates/bevy_ecs/src/system/commands.rs @@ -394,5 +397,15 @@ mod tests { .collect::<Vec<_>>(); assert_eq!(results, vec![(1u32, 2u64)]); assert_eq!(*resources.get::<f32>().unwrap(), 3.14f32); + // test entity despawn + command_buffer.despawn(entity); + command_buffer.despawn(entity); // double despawn shouldn't panic + command_buffer.apply(&mut world, &mut resources); + let results2 = world + .query::<(&u32, &u64)>() + .iter() + .map(|(a, b)| (*a, *b)) + .collect::<Vec<_>>(); + assert_eq!(results2, vec![]); } }
Commands double (or more) despawn and NoSuchEntity Error. Right now if we despawn an Entity with Commands and by user error we despawn this Entity more than once we get the error NoSuchEntity and this error is produced by Commands internally. There is no way to cach the error by the side of the user cause despawn in Commands returns it's Self. This error is very hard to track down. It requires to check all the calls of despawn in a project, etc. But even doing so there are times where you want to despawn all the entities with a specific Compoment and this will lead to NoSuchEntity errors, the only sollution I was able to come up was to despawn those entities in a thread_local_system. I believe that silencing the error internally will be a huge gain in productivity. Maybe a call to dbg! to inform the user that more than one calls of despawn to an entity where called it will be ideal too. I do not know the overhead of all this, but a solution to this problem have to be found.
+1 for it - dealing with double despawn panics was hardest thing while developing my own game. > But even doing so there are times where you want to despawn all the entities with a specific Compoment and this will lead to NoSuchEntity errors Do you have some example code that creates this issue? Just despawn an entity two times. > Just despawn an entity two times. If you despawn something twice using an entity reference, that's a bug right? After all, keeping a stale entity reference is useless. You may need several systems to despawn an entity for several reasons. Yeah at this point I think allowing double despawns feels like the right call. The alternative is synchronization across systems that might free an entity, which imo isn't worth it. This is a tough call. I cant think of any significant problems from double despawns, whereas synchronization is a significant problem. Flecs (another popular ecs) uses this approach with success. Would an option be to return a `Result`? I think that having potential logic bugs be surfaced outweighs the need to not declare mutability. This way as a user I have a choice what path to take. Command's methods return Command so it can be nested. Seconding this. Right now, I have an entity that holds a 2d array of booleans, encapsulated in a `Grid` component. I want to draw it as a grid to the screen, so I create a sprite for every cell in the grid. However, the sprites need to be updated if the grid changes. So I use the `Changed<Grid>` query to detect this. This system basically triggers two things: 1. It deleted all previously spawned sprites. 2. It creates a new sprite for every cell in the grid. The main problem is 1. Since it uses the `Commands` interface to despawn the sprites, the actual deletion appears to happen a few frames afterwards. If the grid is changed again in the next frame, then the sprites will be despawned twice, since the previously despawned sprites haven't been fully deleted yet. This results in a panic. It is quite annoying to keep track of which entities have been despawned. I think Bevy itself should be able to do this, and ignore any double despawns. As a quick hack I thought I'd just wrap it with `panic::catch_unwind` but that doesn't work, since `Commands` is not safe to transfer across panic unwind boundaries... UPDATE: Just tried keeping track of despawned entities by adding a `Despawned` component to all entities I've despawned, and checking if an entity doesn't have `Despawned` before calling despawn on it. This doesn't work either, since the `Despawned` component is added with the same delay as despawning in the first place.
2020-10-08T23:31:24Z
0.2
2020-10-10T19:06:29Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "system::commands::tests::command_buffer" ]
[ "resource::resource_query::tests::changed_resource", "resource::resource_query::tests::or_changed_resource", "resource::resources::tests::resource", "resource::resources::tests::resource_double_mut_panic", "system::system::tests::resource_query_access", "system::system::tests::query_archetype_access", "system::into_system::tests::changed_resource_system", "system::into_system::tests::query_system_gets", "schedule::parallel_executor::tests::intra_stage_archetype_change_prepare", "schedule::parallel_executor::tests::cross_stage_archetype_change_prepare", "schedule::parallel_executor::tests::schedule" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
595
bevyengine__bevy-595
[ "594" ]
408114269b36cbc088dc9b3a0a58ba8acba21acf
diff --git a/crates/bevy_transform/src/hierarchy/child_builder.rs b/crates/bevy_transform/src/hierarchy/child_builder.rs --- a/crates/bevy_transform/src/hierarchy/child_builder.rs +++ b/crates/bevy_transform/src/hierarchy/child_builder.rs @@ -81,6 +81,10 @@ impl<'a> ChildBuilder<'a> { self } + pub fn current_entity(&self) -> Option<Entity> { + self.commands.current_entity + } + pub fn with_bundle( &mut self, components: impl DynamicBundle + Send + Sync + 'static,
diff --git a/crates/bevy_transform/src/hierarchy/child_builder.rs b/crates/bevy_transform/src/hierarchy/child_builder.rs --- a/crates/bevy_transform/src/hierarchy/child_builder.rs +++ b/crates/bevy_transform/src/hierarchy/child_builder.rs @@ -215,6 +219,7 @@ mod tests { let mut parent = None; let mut child1 = None; let mut child2 = None; + let mut child3 = None; commands .spawn((1,)) diff --git a/crates/bevy_transform/src/hierarchy/child_builder.rs b/crates/bevy_transform/src/hierarchy/child_builder.rs --- a/crates/bevy_transform/src/hierarchy/child_builder.rs +++ b/crates/bevy_transform/src/hierarchy/child_builder.rs @@ -224,14 +229,18 @@ mod tests { .spawn((2,)) .for_current_entity(|e| child1 = Some(e)) .spawn((3,)) - .for_current_entity(|e| child2 = Some(e)); + .for_current_entity(|e| child2 = Some(e)) + .spawn((4,)); + + child3 = parent.current_entity(); }); commands.apply(&mut world, &mut resources); let parent = parent.expect("parent should exist"); let child1 = child1.expect("child1 should exist"); let child2 = child2.expect("child2 should exist"); - let expected_children: SmallVec<[Entity; 8]> = smallvec![child1, child2]; + let child3 = child3.expect("child3 should exist"); + let expected_children: SmallVec<[Entity; 8]> = smallvec![child1, child2, child3]; assert_eq!( world.get::<Children>(parent).unwrap().0.clone(),
expose current_entity() in with_children (aka ChildBuilder) Big love for Bevy here (namely language choice, ECS, scope and API design ❤️ ). Thank you! While playing around with Bevy in the context of Rapier, I struggled with getting newly created entities within the context of `with_children`, as the way to get entities that I knew (`current_entity`) is not exposed on the `ChildBuilder` struct. Rapier needs references to the entities [when you build joints](https://rapier.rs/docs/user_guides/rust_bevy_plugin/the_rapier_physics_plugin#creating-joints). Thanks to the Discord I learned that it was possible to just not use `with_children` but rather collect what you need with `current_entity` and use `push_children` later. Since `with_children` seems like a expressive way to declare entity hierarchy, I'd prefer to have access to an entity within it. It also feels like there might be a larger point here wrt API simplification, things that are feeling a bit weird to me right now: - there's multiple ways to declare a hierarchy (`with_children`, `insert_children`, `push_children`), isn't one enough? - there's multiple ways to declare components for entities (`spawn`, `with`, `with_bundle`) - `current_entity` makes `CommandsInternal` feel like a stateful-iterator-esque thing and then there are methods which need to check whether the entity is even set. Might - somewhat related, I just noticed that there is also `for_current_entity` which seems to be another API to get an entity handle. I'm wondering whether these two APIs might be better dropped in favor of a variant of `spawn` which has this `FnOnce(Entity)` type as a second param - I'm also starting to appreciate the value of method chaining here and am wondering whether moving the `with_*`-fns to a new struct which is returned by `spawn` might be feasible, thereby alleviating those fns of the need to current_entity-check, aka making illegal state impossible Okay sorry these spitballs turned into the lion share of the post, I'll make a PR for the less controversial first part now :)
2020-09-28T12:14:18Z
0.2
2020-10-01T18:00:11Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "hierarchy::child_builder::tests::build_children", "hierarchy::child_builder::tests::push_and_insert_children", "transform_propagate_system::test::did_propagate", "hierarchy::hierarchy::tests::despawn_recursive", "transform_propagate_system::test::did_propagate_command_buffer", "hierarchy::hierarchy_maintenance_system::test::correct_children" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
543
bevyengine__bevy-543
[ "541" ]
9a4167ef7f5115f7fc045a881f5c865f568d34c0
diff --git a/crates/bevy_ecs/hecs/src/query_one.rs b/crates/bevy_ecs/hecs/src/query_one.rs --- a/crates/bevy_ecs/hecs/src/query_one.rs +++ b/crates/bevy_ecs/hecs/src/query_one.rs @@ -37,7 +37,11 @@ impl<'a, Q: Query> QueryOne<'a, Q> { pub fn get(&mut self) -> Option<<Q::Fetch as Fetch<'_>>::Item> { unsafe { let mut fetch = Q::Fetch::get(self.archetype, self.index)?; - Some(fetch.next()) + if fetch.should_skip() { + None + } else { + Some(fetch.next()) + } } } diff --git a/crates/bevy_ecs/hecs/src/query_one.rs b/crates/bevy_ecs/hecs/src/query_one.rs --- a/crates/bevy_ecs/hecs/src/query_one.rs +++ b/crates/bevy_ecs/hecs/src/query_one.rs @@ -104,7 +108,11 @@ where { unsafe { let mut fetch = Q::Fetch::get(self.archetype, self.index)?; - Some(fetch.next()) + if fetch.should_skip() { + None + } else { + Some(fetch.next()) + } } }
diff --git a/crates/bevy_ecs/hecs/tests/tests.rs b/crates/bevy_ecs/hecs/tests/tests.rs --- a/crates/bevy_ecs/hecs/tests/tests.rs +++ b/crates/bevy_ecs/hecs/tests/tests.rs @@ -365,3 +365,35 @@ fn remove_tracking() { "world clears result in 'removed component' states" ); } + +#[test] +fn added_tracking() { + let mut world = World::new(); + let a = world.spawn((123,)); + + assert_eq!(world.query::<&i32>().iter().count(), 1); + assert_eq!(world.query::<Added<i32>>().iter().count(), 1); + assert_eq!(world.query_mut::<&i32>().iter().count(), 1); + assert_eq!(world.query_mut::<Added<i32>>().iter().count(), 1); + assert!(world.query_one::<&i32>(a).unwrap().get().is_some()); + assert!(world.query_one::<Added<i32>>(a).unwrap().get().is_some()); + assert!(world.query_one_mut::<&i32>(a).unwrap().get().is_some()); + assert!(world + .query_one_mut::<Added<i32>>(a) + .unwrap() + .get() + .is_some()); + + world.clear_trackers(); + + assert_eq!(world.query::<&i32>().iter().count(), 1); + assert_eq!(world.query::<Added<i32>>().iter().count(), 0); + assert_eq!(world.query_mut::<&i32>().iter().count(), 1); + assert_eq!(world.query_mut::<Added<i32>>().iter().count(), 0); + assert!(world.query_one_mut::<&i32>(a).unwrap().get().is_some()); + assert!(world + .query_one_mut::<Added<i32>>(a) + .unwrap() + .get() + .is_none()); +}
Added<X> not properly filtered in QueryOne.get() and Query.get() methods With the following standalone testcase, after the second iteration when Added counting becomes 0, I think we should also see both boolean be false. The second boolean, being based QueryOne.get() has been reported by @cart to behave incorrectly in #488. But I suspect the first one, based onQuery.get() should also return false ? ```rust use bevy::prelude::*; fn main() { App::build() .add_default_plugins() .add_startup_system(startup_system.system()) .add_system(normal_system.system()) .run(); } struct Comp {} /// Startup systems are run exactly once when the app starts up. /// They run right before "normal" systems run. fn startup_system(mut commands: Commands) { commands.spawn((Comp {},)); let entity = commands.current_entity().unwrap(); commands.insert_resource(entity); } fn normal_system( entity: Res<Entity>, mut query: Query<(&Comp,)>, mut query_added: Query<(Added<Comp>,)>, ) { let mut n_comp = 0; let mut n_added = 0; for (_comp,) in &mut query.iter() { n_comp += 1; } for (_comp,) in &mut query_added.iter() { n_added += 1; } let found1 = query_added.get::<Comp>(*entity).is_some(); let mut one = query_added.entity(*entity).unwrap(); let found2 = one.get().is_some(); println!( "Count: {}, Added: {}, query.get {} query.entity.get {}", n_comp, n_added, found1, found2 ); } ```
2020-09-21T12:42:19Z
0.2
2020-10-05T17:38:13Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "added_tracking" ]
[ "bad_bundle_derive", "alias", "clear", "despawn", "derived_bundle", "query_missing_component", "dynamic_components", "build_entity", "query_batched", "query_all", "query_optional_component", "remove_missing", "random_access", "query_single_component", "query_one", "query_sparse_component", "shared_borrow", "spawn_batch", "remove_tracking", "spawn_many" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
488
bevyengine__bevy-488
[ "476" ]
74ad1c375268cedfbb3b218cfc5e86b8d54e1885
diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -1,6 +1,6 @@ use super::CameraProjection; use bevy_app::prelude::{EventReader, Events}; -use bevy_ecs::{Component, Local, Query, Res}; +use bevy_ecs::{Added, Component, Entity, Local, Query, Res}; use bevy_math::Mat4; use bevy_property::Properties; use bevy_window::{WindowCreated, WindowId, WindowResized, Windows}; diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -67,9 +68,13 @@ pub fn camera_system<T: CameraProjection + Component>( changed_window_ids.push(event.id); } - for (mut camera, mut camera_projection) in &mut query.iter() { + let mut added_cameras = vec![]; + for (entity, _camera) in &mut query_added.iter() { + added_cameras.push(entity); + } + for (entity, mut camera, mut camera_projection) in &mut query.iter() { if let Some(window) = windows.get(camera.window) { - if changed_window_ids.contains(&window.id) { + if changed_window_ids.contains(&window.id) || added_cameras.contains(&entity) { camera_projection.update(window.width as usize, window.height as usize); camera.projection_matrix = camera_projection.get_projection_matrix(); camera.depth_calculation = camera_projection.depth_calculation();
diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -38,7 +38,8 @@ pub fn camera_system<T: CameraProjection + Component>( window_resized_events: Res<Events<WindowResized>>, window_created_events: Res<Events<WindowCreated>>, windows: Res<Windows>, - mut query: Query<(&mut Camera, &mut T)>, + mut query: Query<(Entity, &mut Camera, &mut T)>, + mut query_added: Query<(Entity, Added<Camera>)>, ) { let mut changed_window_ids = Vec::new(); // handle resize events. latest events are handled first because we only want to resize each window once
Camera2dComponents spawned after frame 3 no more display anything. I reproduced the issue by modifying the sprite.rs example to not spawn on startup, but after X frames. If X >=3 the bevy logo no more appear. Is there something that needs to be done to have the 2d camera work when spawned later in the life of the application ? ```rust use bevy::prelude::*; fn main() { App::build() .add_default_plugins() .add_resource(1u32) .add_system(setup.system()) .run(); } const FRAME_SPAWN: u32 = 3; fn setup( mut commands: Commands, count: Res<u32>, asset_server: Res<AssetServer>, mut materials: ResMut<Assets<ColorMaterial>>, ) { if *count <= FRAME_SPAWN { println!("FRAME {}", *count); if *count == FRAME_SPAWN { let texture_handle = asset_server.load("assets/branding/icon.png").unwrap(); commands.spawn(Camera2dComponents::default()); commands.spawn(SpriteComponents { material: materials.add(texture_handle.into()), ..Default::default() }); println!("Camera spawned"); } commands.insert_resource(*count + 1); } } ```
Doing the same test for the example/3d_scene.rs with the Camera3dComponents gave the same strange behaviour. Spawning at frame 1 or 2 is displaying correctly, spawning starting from frame 3 nothing appears. Hmm looks like resizing the window "fixes" this problem. Printing out the `OrthographicProjection` component illustrates that the projection isn't getting updated to match the current window size. We could probably fix this by extending `camera_system` to also update projections when a camera is added. We could use an `Added<T>` query for this.
2020-09-14T08:19:21Z
0.2
2020-10-05T17:41:35Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "color::test_hex_color", "mesh::mesh::tests::test_get_vertex_bytes", "batch::batcher::tests::test_batcher_2", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_get_node_typed", "render_graph::graph::tests::test_slot_already_occupied", "render_graph::graph::tests::test_graph_edges", "renderer::render_resource::render_resource_bindings::tests::test_bind_groups", "render_graph::schedule::tests::test_render_graph_dependency_stager_loose", "render_graph::schedule::tests::test_render_graph_dependency_stager_tight", "shader::shader_reflect::tests::test_reflection", "shader::shader_reflect::tests::test_reflection_consecutive_buffer_validation" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
404
bevyengine__bevy-404
[ "333" ]
0f43fb066f42e459e2f68bc5009af47c00fdc510
diff --git a/crates/bevy_ecs/hecs/src/archetype.rs b/crates/bevy_ecs/hecs/src/archetype.rs --- a/crates/bevy_ecs/hecs/src/archetype.rs +++ b/crates/bevy_ecs/hecs/src/archetype.rs @@ -404,11 +404,15 @@ impl Archetype { size: usize, index: usize, added: bool, + mutated: bool, ) { let state = self.state.get_mut(&ty).unwrap(); if added { state.added_entities[index] = true; } + if mutated { + state.mutated_entities[index] = true; + } let ptr = (*self.data.get()) .as_ptr() .add(state.offset + size * index) diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -103,7 +103,7 @@ impl World { unsafe { let index = archetype.allocate(entity); components.put(|ptr, ty, size| { - archetype.put_dynamic(ptr, ty, size, index, true); + archetype.put_dynamic(ptr, ty, size, index, true, false); true }); self.entities.meta[entity.id as usize].location = Location { diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -547,7 +547,7 @@ impl World { // Update components in the current archetype let arch = &mut self.archetypes[loc.archetype as usize]; components.put(|ptr, ty, size| { - arch.put_dynamic(ptr, ty, size, loc.index, false); + arch.put_dynamic(ptr, ty, size, loc.index, false, true); true }); return Ok(()); diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -564,7 +564,7 @@ impl World { let old_index = mem::replace(&mut loc.index, target_index); if let Some(moved) = source_arch.move_to(old_index, |ptr, ty, size, is_added, is_mutated| { - target_arch.put_dynamic(ptr, ty, size, target_index, false); + target_arch.put_dynamic(ptr, ty, size, target_index, false, false); let type_state = target_arch.get_type_state_mut(ty).unwrap(); *type_state.added().as_ptr().add(target_index) = is_added; *type_state.mutated().as_ptr().add(target_index) = is_mutated; diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -574,7 +574,8 @@ impl World { } components.put(|ptr, ty, size| { - target_arch.put_dynamic(ptr, ty, size, target_index, true); + let had_component = source_arch.has_dynamic(ty); + target_arch.put_dynamic(ptr, ty, size, target_index, !had_component, had_component); true }); } diff --git a/crates/bevy_ecs/hecs/src/world.rs b/crates/bevy_ecs/hecs/src/world.rs --- a/crates/bevy_ecs/hecs/src/world.rs +++ b/crates/bevy_ecs/hecs/src/world.rs @@ -1020,7 +1021,8 @@ where unsafe { let index = self.archetype.allocate(entity); components.put(|ptr, ty, size| { - self.archetype.put_dynamic(ptr, ty, size, index, true); + self.archetype + .put_dynamic(ptr, ty, size, index, true, false); true }); self.entities.meta[entity.id as usize].location = Location { diff --git a/crates/bevy_ecs/src/resource/resources.rs b/crates/bevy_ecs/src/resource/resources.rs --- a/crates/bevy_ecs/src/resource/resources.rs +++ b/crates/bevy_ecs/src/resource/resources.rs @@ -234,6 +234,7 @@ impl Resources { core::mem::size_of::<T>(), index, added, + !added, ); std::mem::forget(resource); }
diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1089,7 +1089,7 @@ mod tests { } } - fn get_changed_a(world: &mut World) -> Vec<Entity> { + fn get_mutated_a(world: &mut World) -> Vec<Entity> { world .query_mut::<(Mutated<A>, Entity)>() .iter() diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1097,17 +1097,17 @@ mod tests { .collect::<Vec<Entity>>() }; - assert_eq!(get_changed_a(&mut world), vec![e1, e3]); + assert_eq!(get_mutated_a(&mut world), vec![e1, e3]); // ensure changing an entity's archetypes also moves its mutated state world.insert(e1, (C,)).unwrap(); - assert_eq!(get_changed_a(&mut world), vec![e3, e1], "changed entities list should not change (although the order will due to archetype moves)"); + assert_eq!(get_mutated_a(&mut world), vec![e3, e1], "changed entities list should not change (although the order will due to archetype moves)"); // spawning a new A entity should not change existing mutated state world.insert(e1, (A(0), B)).unwrap(); assert_eq!( - get_changed_a(&mut world), + get_mutated_a(&mut world), vec![e3, e1], "changed entities list should not change" ); diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1115,7 +1115,7 @@ mod tests { // removing an unchanged entity should not change mutated state world.despawn(e2).unwrap(); assert_eq!( - get_changed_a(&mut world), + get_mutated_a(&mut world), vec![e3, e1], "changed entities list should not change" ); diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1123,7 +1123,7 @@ mod tests { // removing a changed entity should remove it from enumeration world.despawn(e1).unwrap(); assert_eq!( - get_changed_a(&mut world), + get_mutated_a(&mut world), vec![e3], "e1 should no longer be returned" ); diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1134,8 +1134,46 @@ mod tests { .query_mut::<(Mutated<A>, Entity)>() .iter() .map(|(_a, e)| e) - .collect::<Vec<Entity>>() - .is_empty()); + .next() + .is_none()); + + let e4 = world.spawn(()); + + world.insert_one(e4, A(0)).unwrap(); + assert!(get_mutated_a(&mut world).is_empty()); + + world.insert_one(e4, A(1)).unwrap(); + assert_eq!(get_mutated_a(&mut world), vec![e4]); + + world.clear_trackers(); + + // ensure inserting multiple components set mutated state for + // already existing components and set added state for + // non existing components even when changing archetype. + world.insert(e4, (A(0), B(0))).unwrap(); + + let added_a = world + .query::<(Added<A>, Entity)>() + .iter() + .map(|(_, e)| e) + .next(); + assert!(added_a.is_none()); + + assert_eq!(get_mutated_a(&mut world), vec![e4]); + + let added_b = world + .query::<(Added<B>, Entity)>() + .iter() + .map(|(_, e)| e) + .next(); + assert!(added_b.is_some()); + + let mutated_b = world + .query_mut::<(Mutated<B>, Entity)>() + .iter() + .map(|(_, e)| e) + .next(); + assert!(mutated_b.is_none()); } #[test] diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1153,12 +1191,12 @@ mod tests { b.0 += 1; } - let a_b_changed = world + let a_b_mutated = world .query_mut::<(Mutated<A>, Mutated<B>, Entity)>() .iter() .map(|(_a, _b, e)| e) .collect::<Vec<Entity>>(); - assert_eq!(a_b_changed, vec![e2]); + assert_eq!(a_b_mutated, vec![e2]); } #[test] diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -1178,13 +1216,13 @@ mod tests { b.0 += 1; } - let a_b_changed = world + let a_b_mutated = world .query_mut::<(Or<(Mutated<A>, Mutated<B>)>, Entity)>() .iter() .map(|((_a, _b), e)| e) .collect::<Vec<Entity>>(); // e1 has mutated A, e3 has mutated B, e2 has mutated A and B, _e4 has no mutated component - assert_eq!(a_b_changed, vec![e1, e2, e3]); + assert_eq!(a_b_mutated, vec![e1, e2, e3]); } #[test]
Mutating a component with insert(_one) doesn't trigger Mutated query filter ## Expected Behavior I tried to make a small example and it should print "Tag added" once because the system with Added filter should be called once. Or maybe I'm wrong and there is another way to add a component to an entity. ## Actual Behavior "Tag added" is never printed meaning the `print_added` function is never called. ## Steps to Reproduce the Problem 1. Write a system inserting a component into an entity with insert_one or insert 1. Write a system using one of the three filter with the previous component 1. This system will not work as intented ## Specifications - Version: 0.1.3 rev=#f7131509b94b3f70eb29be092d4fd82971f547fa - Platform: Linux (Manjaro) ## Example ```rust use bevy::prelude::*; fn main() { App::build() .add_default_plugins() .add_resource(PrintTimer(Timer::from_seconds(3.0, true))) .add_startup_system(setup.system()) .add_system(add_tag_on_click.system()) .add_system(print_added.system()) .add_system(print_timed.system()) .run(); } fn setup(mut commands: Commands, mut materials: ResMut<Assets<ColorMaterial>>) { commands .spawn(UiCameraComponents::default()) .spawn(ButtonComponents { material: materials.add(Color::RED.into()), style: Style { size: Size::new(Val::Percent(100.0), Val::Percent(100.0)), ..Default::default() }, ..Default::default() }); } struct Tag; fn add_tag_on_click(mut commands: Commands, mut query: Query<(Mutated<Interaction>, Entity)>) { for (interaction, entity) in &mut query.iter() { if let Interaction::Clicked = *interaction { println!("Click on {:?}", entity); commands.insert_one(entity, Tag); println!("Tag inserted"); } } } fn print_added(_: Added<Tag>) { println!("Tag added"); } struct PrintTimer(Timer); fn print_timed(time: Res<Time>, mut timer: ResMut<PrintTimer>, mut query: Query<&Tag>) { timer.0.tick(time.delta_seconds); if timer.0.finished { for (i, _) in &mut query.iter().iter().enumerate() { println!("I'm Tag #{}", i); } } } ```
I did a bit of digging and the problem is the two systems `add_tag_on_click` and `print_added` run on the same stage. So when the component is added, the Added system has probably already been run and on each iteration the trackers are cleared. The solution is to add `print_added` to POST_UPDATE stage and it works fine, the mistake was in my code. However, when you insert an already existing component into an entity, it is not flagged as mutated (see `World::insert()` and `Archetype::put_dynamic`). I made a showcase of this where the expected behaviour would be to print "Tag added" on the first click and then "Tag mutated" on all other clicks but "Tag mutated" is never printed. ```rust use bevy::prelude::{stage::POST_UPDATE, *}; fn main() { App::build() .add_default_plugins() .add_startup_system(setup.system()) .add_system(add_tag_on_click.system()) .add_system_to_stage(POST_UPDATE, print_added.system()) .add_system_to_stage(POST_UPDATE, print_mutated.system()) .run(); } fn setup(mut commands: Commands, mut materials: ResMut<Assets<ColorMaterial>>) { commands .spawn(UiCameraComponents::default()) .spawn(ButtonComponents { material: materials.add(Color::RED.into()), style: Style { size: Size::new(Val::Percent(100.0), Val::Percent(100.0)), ..Default::default() }, ..Default::default() }); } struct Tag; fn add_tag_on_click(mut commands: Commands, mut query: Query<(Mutated<Interaction>, Entity)>) { for (interaction, entity) in &mut query.iter() { if let Interaction::Clicked = *interaction { println!("Click on {:?}", entity); commands.insert_one(entity, Tag); println!("Tag inserted"); } } } fn print_added(_: Added<Tag>) { println!("Tag added"); } fn print_mutated(_: Mutated<Tag>) { println!("Tag mutated"); } ```
2020-08-31T15:03:18Z
0.2
2020-11-05T01:51:55Z
9cc6368b28a2df2dff652ae1a087f74fd0362a6a
[ "query::tests::mutated_trackers" ]
[ "entities::tests::entity_bits_roundtrip", "query::tests::access_order", "query::tests::changed_query", "query::tests::multiple_mutated_query", "query::tests::or_mutated_query", "query::tests::added_queries", "added_tracking", "derived_bundle", "clear", "alias", "build_entity", "bad_bundle_derive", "despawn", "query_one", "query_missing_component", "query_batched", "query_single_component", "dynamic_components", "remove_missing", "query_all", "query_sparse_component", "random_access", "shared_borrow", "query_optional_component", "spawn_batch", "remove_tracking", "spawn_many", "src/entity_builder.rs - entity_builder::EntityBuilder (line 37)", "src/world.rs - world::World::query_one_mut (line 368)", "src/world.rs - world::World::query_one (line 341)", "src/world.rs - world::World::spawn_batch (line 123)", "src/lib.rs - (line 29)", "src/world.rs - world::World::query_one_mut_unchecked (line 397)", "src/world.rs - world::World::iter (line 474)", "src/world.rs - world::World::spawn (line 80)", "src/query.rs - query::Or (line 326)", "src/world.rs - world::World::query (line 243)", "src/world.rs - world::World::query_unchecked (line 316)", "src/query.rs - query::QueryBorrow::with (line 769)", "src/query.rs - query::Without (line 584)", "src/world.rs - world::World::insert (line 503)", "src/query.rs - query::QueryBorrow::without (line 792)", "src/query.rs - query::With (line 649)", "src/world.rs - world::World::query_mut (line 279)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
386
bevyengine__bevy-386
[ "352" ]
db8ec7d55ffc966f8ee62722156aaaa3f3bb8a56
diff --git a/crates/bevy_transform/src/hierarchy/hierarchy.rs b/crates/bevy_transform/src/hierarchy/hierarchy.rs --- a/crates/bevy_transform/src/hierarchy/hierarchy.rs +++ b/crates/bevy_transform/src/hierarchy/hierarchy.rs @@ -1,4 +1,4 @@ -use crate::components::Children; +use crate::components::{Children, Parent}; use bevy_ecs::{Commands, Entity, Query, World, WorldWriter}; pub fn run_on_hierarchy<T, S>( diff --git a/crates/bevy_transform/src/hierarchy/hierarchy.rs b/crates/bevy_transform/src/hierarchy/hierarchy.rs --- a/crates/bevy_transform/src/hierarchy/hierarchy.rs +++ b/crates/bevy_transform/src/hierarchy/hierarchy.rs @@ -44,6 +44,18 @@ pub struct DespawnRecursive { } fn despawn_with_children_recursive(world: &mut World, entity: Entity) { + // first, make the entity's own parent forget about it + if let Ok(parent) = world.get::<Parent>(entity) { + if let Ok(mut children) = world.get_mut::<Children>(parent.0) { + children.retain(|c| *c != entity); + } + } + // then despawn the entity and all of its children + despawn_with_children_recursive_inner(world, entity); +} + +// Should only be called by `despawn_with_children_recursive`! +fn despawn_with_children_recursive_inner(world: &mut World, entity: Entity) { if let Some(children) = world .get::<Children>(entity) .ok()
diff --git a/crates/bevy_transform/src/hierarchy/hierarchy.rs b/crates/bevy_transform/src/hierarchy/hierarchy.rs --- a/crates/bevy_transform/src/hierarchy/hierarchy.rs +++ b/crates/bevy_transform/src/hierarchy/hierarchy.rs @@ -78,32 +90,41 @@ impl DespawnRecursiveExt for Commands { #[cfg(test)] mod tests { use super::DespawnRecursiveExt; - use crate::hierarchy::BuildChildren; - use bevy_ecs::{Commands, Entity, Resources, World}; + use crate::{components::Children, hierarchy::BuildChildren}; + use bevy_ecs::{Commands, Resources, World}; #[test] fn despawn_recursive() { let mut world = World::default(); let mut resources = Resources::default(); let mut command_buffer = Commands::default(); - let parent_entity = Entity::new(); command_buffer.spawn((0u32, 0u64)).with_children(|parent| { parent.spawn((0u32, 0u64)); }); - command_buffer - .spawn_as_entity(parent_entity, (1u32, 2u64)) - .with_children(|parent| { - parent.spawn((1u32, 2u64)).with_children(|parent| { - parent.spawn((1u32, 2u64)); + // Create a grandparent entity which will _not_ be deleted + command_buffer.spawn((1u32, 1u64)); + let grandparent_entity = command_buffer.current_entity().unwrap(); + + command_buffer.with_children(|parent| { + // Add a child to the grandparent (the "parent"), which will get deleted + parent.spawn((2u32, 2u64)); + // All descendents of the "parent" should also be deleted. + parent.with_children(|parent| { + parent.spawn((3u32, 3u64)).with_children(|parent| { + // child + parent.spawn((4u32, 4u64)); }); - parent.spawn((1u32, 2u64)); + parent.spawn((5u32, 5u64)); }); + }); command_buffer.spawn((0u32, 0u64)); command_buffer.apply(&mut world, &mut resources); + let parent_entity = world.get::<Children>(grandparent_entity).unwrap()[0]; + command_buffer.despawn_recursive(parent_entity); command_buffer.apply(&mut world, &mut resources); diff --git a/crates/bevy_transform/src/hierarchy/hierarchy.rs b/crates/bevy_transform/src/hierarchy/hierarchy.rs --- a/crates/bevy_transform/src/hierarchy/hierarchy.rs +++ b/crates/bevy_transform/src/hierarchy/hierarchy.rs @@ -113,8 +134,20 @@ mod tests { .map(|(a, b)| (*a, *b)) .collect::<Vec<_>>(); + { + let children = world.get::<Children>(grandparent_entity).unwrap(); + assert_eq!( + children.iter().any(|&i| i == parent_entity), + false, + "grandparent should no longer know about its child which has been removed" + ); + } + // parent_entity and its children should be deleted, - // the (0, 0) tuples remaining. - assert_eq!(results, vec![(0u32, 0u64), (0u32, 0u64), (0u32, 0u64)]); + // the grandparent tuple (1, 1) and (0, 0) tuples remaining. + assert_eq!( + results, + vec![(0u32, 0u64), (0u32, 0u64), (0u32, 0u64), (1u32, 1u64)] + ); } }
Despawned Node Entities are not removed from their parent Node's Children An entity that is despawned doesn't appear to be removed from the `Children` component of their parent Node. I'm not sure this is a bug, but I could see it eventually effective performance for a long running game that both spawns and despawns a lot of entities within a parent and iterates over the Children object a lot. I think this is related to #351. **Example Reproduction** ``` use bevy::prelude::*; /// This example illustrates how to create a button that changes color and text based on its interaction state. fn main() { App::build() .add_default_plugins() .init_resource::<ButtonMaterials>() .init_resource::<ButtonCount>() .add_startup_system(setup.system()) .add_system(button_system.system()) .run(); } fn button_system( mut commands: Commands, button_materials: Res<ButtonMaterials>, asset_server: Res<AssetServer>, mut button_count: ResMut<ButtonCount>, mut interaction_query: Query<( Entity, &Button, Mutated<Interaction>, &mut Handle<ColorMaterial>, &Children, )>, mut root_query: Query<(Entity, &Root, &Children)>, ) { for (e, _, interaction, mut material, _) in &mut interaction_query.iter() { match *interaction { Interaction::Clicked => { let font = asset_server .get_handle("assets/fonts/FiraMono-Medium.ttf") .unwrap(); // we're going to remvoe the button commands.despawn_recursive(e); // spawn a new button in the same spot for (parent, _, children) in &mut root_query.iter() { println!("Now have: {} children", children.0.len()); let e = spawn_button_node( &mut commands, &button_materials, font, &(format!("Button {}", button_count.0))[..], ); button_count.0 = button_count.0 + 1; commands.push_children(parent, &[e]); break; } } Interaction::Hovered => { *material = button_materials.hovered; } Interaction::None => { *material = button_materials.normal; } } } } fn setup( mut commands: Commands, asset_server: Res<AssetServer>, button_materials: Res<ButtonMaterials>, ) { let font = asset_server .load("assets/fonts/FiraMono-Medium.ttf") .unwrap(); let root = Entity::new(); commands .spawn(UiCameraComponents::default()) .spawn_as_entity( root, NodeComponents { style: Style { size: Size::new(Val::Percent(100.0), Val::Percent(100.0)), flex_direction: FlexDirection::ColumnReverse, justify_content: JustifyContent::FlexStart, align_items: AlignItems::Center, ..Default::default() }, ..Default::default() }, ) .with(Root); let button = spawn_button_node(&mut commands, &button_materials, font, "First button"); commands.push_children(root, &[button]); } struct ButtonMaterials { normal: Handle<ColorMaterial>, hovered: Handle<ColorMaterial>, pressed: Handle<ColorMaterial>, } impl FromResources for ButtonMaterials { fn from_resources(resources: &Resources) -> Self { let mut materials = resources.get_mut::<Assets<ColorMaterial>>().unwrap(); ButtonMaterials { normal: materials.add(Color::rgb(0.02, 0.02, 0.02).into()), hovered: materials.add(Color::rgb(0.05, 0.05, 0.05).into()), pressed: materials.add(Color::rgb(0.1, 0.5, 0.1).into()), } } } #[derive(Default)] struct ButtonCount(u32); struct Root; fn spawn_button_node( commands: &mut Commands, mats: &Res<ButtonMaterials>, font: Handle<Font>, label: &str, ) -> Entity { let e = Entity::new(); commands .spawn_as_entity( e, ButtonComponents { style: Style { size: Size::new(Val::Px(300.0), Val::Px(65.0)), // center button margin: Rect::all(Val::Auto), // horizontally center child text justify_content: JustifyContent::Center, // vertically center child text align_items: AlignItems::Center, ..Default::default() }, material: mats.normal, ..Default::default() }, ) .with_children(|parent| { parent.spawn(TextComponents { text: Text { value: label.to_string(), font: font, style: TextStyle { font_size: 28.0, color: Color::rgb(0.8, 0.8, 0.8), }, }, ..Default::default() }); }); e } ``` **Result** ``` > cargo run Now have: 1 children Now have: 2 children Now have: 3 children Now have: 4 children Now have: 5 children Now have: 6 children Now have: 7 children Now have: 8 children Now have: 9 children Now have: 10 children Now have: 11 children ``` My expectation is that despawned children are eventually removed from the `Parent` component. I don't expect it to be immediatey, so I wouldn't be surprised to occasionally see `3 children` in my Parent even if there's only 1 child still alive, but I do expect them to be removed eventually.
@karroffel or @cart This behavior is also leading to a crash if you later call `.despawn_recursive` on the entity that has the no longer existing child: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoSuchEntity', /Users/noah/.cargo/git/checkouts/bevy-f7ffde730c324c74/89a1d36/crates/bevy_transform/src/hierarchy/hierarchy.rs:57:27 stack backtrace: ... 7: core::panicking::panic_fmt 8: core::option::expect_none_failed 9: core::result::Result<T,E>::unwrap **10: bevy_transform::hierarchy::hierarchy::despawn_with_children_recursive** **11: bevy_transform::hierarchy::hierarchy::despawn_with_children_recursive** 12: <bevy_transform::hierarchy::hierarchy::DespawnRecursive as bevy_ecs::system::commands::WorldWriter>::write 13: bevy_ecs::system::commands::Commands::apply 14: <Func as bevy_ecs::system::into_system::IntoQuerySystem<(bevy_ecs::system::commands::Commands,),(Ra,Rb,Rc,Rd,Re),(A,B,C)>>::system::{{closure}} 15: <bevy_ecs::system::into_system::SystemFn<State,F,ThreadLocalF,Init,SetArchetypeAccess> as bevy_ecs::system::system::System>::run_thread_local 16: bevy_ecs::schedule::parallel_executor::ExecutorStage::run 17: bevy_ecs::schedule::parallel_executor::ParallelExecutor::run 18: bevy_app::app::App::update ... ``` This happens due to this `.unwrap()` ignoring the `NoSuchEntity` error in the result: https://github.com/bevyengine/bevy/blob/63fd4ae33324e1720d2b473f3619cf314b7a7044/crates/bevy_transform/src/hierarchy/hierarchy.rs#L57 Would you rather incorporate the crashing behavior for spurious children into this issue, or would you rather I create a separate issue for that? I _think_ the problem is that this function doesn't check for and remove the root `entity` from the children of its own parent. Does that sound right, @cart? I'd be willing to make a PR for this, but I'm not yet sure how to look up a parent efficiently. https://github.com/bevyengine/bevy/blob/db8ec7d55ffc966f8ee62722156aaaa3f3bb8a56/crates/bevy_transform/src/hierarchy/hierarchy.rs#L46-L58 @CleanCut The `entity` should have a `Parent` component on it that has a reference to its parent entity @ncallaway I should have guessed that--otherwise it would be extremely inefficient to ever discover your own parent, which would make composing transformation matrices insanely expensive! I'll take a shot at making a pull request.
2020-08-29T04:56:04Z
0.1
2020-09-02T02:57:34Z
2667c24656b74fb6d3ee17206494f990678e52b3
[ "hierarchy::hierarchy::tests::despawn_recursive" ]
[ "hierarchy::child_builder::tests::build_children", "hierarchy::child_builder::tests::push_and_insert_children", "transform_propagate_system::test::did_propagate_command_buffer", "local_transform_systems::test::correct_local_transformation", "transform_systems::test::correct_world_transformation", "hierarchy::hierarchy_maintenance_system::test::correct_children", "transform_propagate_system::test::did_propagate" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,934
bevyengine__bevy-13934
[ "13933" ]
e34ecf2f8669947cb5858337dc169c3a115c1ea3
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 @@ -1321,7 +1321,6 @@ fn insert_resource<R: Resource>(resource: R) -> impl Command { fn log_components(entity: Entity, world: &mut World) { let debug_infos: Vec<_> = world .inspect_entity(entity) - .into_iter() .map(|component_info| component_info.name()) .collect(); info!("Entity {:?}: {:?}", entity, debug_infos); 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 @@ -479,7 +479,7 @@ impl World { /// Returns the components of an [`Entity`] through [`ComponentInfo`]. #[inline] - pub fn inspect_entity(&self, entity: Entity) -> Vec<&ComponentInfo> { + pub fn inspect_entity(&self, entity: Entity) -> impl Iterator<Item = &ComponentInfo> { let entity_location = self .entities() .get(entity) 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 @@ -498,7 +498,6 @@ impl World { archetype .components() .filter_map(|id| self.components().get_info(id)) - .collect() } /// Returns an [`EntityWorldMut`] for the given `entity` (if it exists) or spawns one if it doesn't exist.
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 @@ -3162,31 +3161,31 @@ mod tests { let bar_id = TypeId::of::<Bar>(); let baz_id = TypeId::of::<Baz>(); assert_eq!( - to_type_ids(world.inspect_entity(ent0)), + to_type_ids(world.inspect_entity(ent0).collect()), [Some(foo_id), Some(bar_id), Some(baz_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent1)), + to_type_ids(world.inspect_entity(ent1).collect()), [Some(foo_id), Some(bar_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent2)), + to_type_ids(world.inspect_entity(ent2).collect()), [Some(bar_id), Some(baz_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent3)), + to_type_ids(world.inspect_entity(ent3).collect()), [Some(foo_id), Some(baz_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent4)), + to_type_ids(world.inspect_entity(ent4).collect()), [Some(foo_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent5)), + to_type_ids(world.inspect_entity(ent5).collect()), [Some(bar_id)].into() ); assert_eq!( - to_type_ids(world.inspect_entity(ent6)), + to_type_ids(world.inspect_entity(ent6).collect()), [Some(baz_id)].into() ); }
World::inspect_entity should return an iterator, not Vec ## What problem does this solve or what need does it fill? It's pretty uncommon for us to return `Vec`s in the API, and Iterators are generally more useful (since you can just collect them into a Vec immediately anyways). The current code even converts it from an iterator at the end: https://github.com/bevyengine/bevy/blob/e34ecf2f8669947cb5858337dc169c3a115c1ea3/crates/bevy_ecs/src/world/mod.rs#L498-L502 ## What solution would you like? Make `World::inspect_entity` return an `impl Iterator<Item=&ComponentInfo>` instead of a `Vec<&ComponentInfo>`.
2024-06-19T20:08:55Z
1.78
2024-06-19T21:23:56Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_new", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_expiration", "bundle::tests::component_hook_order_recursive_multiple", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_comparison", "entity::map_entities::tests::world_scope_reserves_generations", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_display", "entity::tests::entity_const", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_update", "event::tests::test_event_reader_len_filled", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_dynamic_component", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_listeners", "observer::tests::observer_no_target", "observer::tests::observer_multiple_matches", "observer::tests::observer_multiple_components", "observer::tests::observer_multiple_events", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::builder::tests::builder_static_components", "observer::tests::observer_order_insert_remove", "observer::tests::observer_order_spawn_despawn", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_transmute", "query::builder::tests::builder_dynamic_components", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_with_without_dynamic", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_order_recursive", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::world_query_metadata_collision", "query::state::tests::can_transmute_added", "query::fetch::tests::world_query_phantom_data", "query::state::tests::can_generalize_with_option", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_mut_fetch", "query::tests::multi_storage_query", "query::tests::any_query", "query::state::tests::join", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::has_query", "query::tests::many_entities", "query::state::tests::join_with_get", "query::tests::query", "query::iter::tests::query_sort_after_next - 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::tests::query_iter_combinations_sparse", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::right_world_get_many - should panic", "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::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::insert_reflected", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::schedules", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::unknown_schedule", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::stepping::simple_executor", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::blob_vec::tests::blob_vec", "schedule::stepping::tests::verify_cursor", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::aligned_zst", "storage::sparse_set::tests::sparse_sets", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::resize_test", "storage::sparse_set::tests::sparse_set", "system::builder::tests::local_builder", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::table::tests::table", "system::builder::tests::multi_param_builder", "system::builder::tests::query_builder", "system::commands::tests::append", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::commands::tests::commands", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::system::tests::command_processing", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system::tests::run_system_once", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::system_ordering::order_exclusive_systems", "system::system::tests::non_send_resources", "system::commands::tests::remove_components_by_id", "system::system_name::tests::test_system_name_regular_param", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::system::tests::run_two_systems", "schedule::tests::conditions::system_with_condition", "system::system_name::tests::test_system_name_exclusive_param", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::stepping::tests::step_run_if_false", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::tests::system_ambiguity::read_only", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system_param::tests::system_param_flexibility", "event::tests::test_event_iter_nth", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system_registry::tests::change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_phantom_data", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system_param::tests::system_param_const_generics", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::schedule::tests::inserts_a_sync_point", "system::system_param::tests::system_param_struct_variants", "schedule::schedule::tests::disable_auto_sync_points", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::system_registry::tests::local_variables", "system::system_param::tests::non_sync_local", "system::system_param::tests::system_param_where_clause", "system::system_registry::tests::output_values", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::system_execution::run_system", "system::system_param::tests::system_param_private_fields", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::exclusive_system", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_name_collision", "system::tests::assert_systems", "schedule::condition::tests::run_condition_combinators", "system::system_param::tests::param_set_non_send_first", "system::tests::can_have_16_parameters", "schedule::condition::tests::run_condition", "system::tests::commands_param_set", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_and_without", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::conflicting_query_sets_system - should panic", "system::tests::get_system_conflicts", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::long_life_test", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::immutable_mut_test", "system::tests::disjoint_query_mut_read_component_system", "schedule::tests::system_ordering::order_systems", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::convert_mut_to_immut", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::local_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_system", "system::tests::into_iter_impl", "query::tests::par_iter_mut_change_detection", "event::tests::test_events_par_iter", "system::tests::non_send_option_system", "system::tests::non_send_system", "system::tests::changed_resource_system", "system::tests::nonconflicting_system_resources", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::pipe_change_detection", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::query_is_empty", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "system::tests::simple_system", "system::tests::query_set_system", "system::tests::read_system_state", "system::tests::or_param_set_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::panic_inside_system - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "system::tests::removal_tracking", "tests::add_remove_components", "tests::added_queries", "tests::changed_query", "tests::added_tracking", "tests::clear_entities", "system::tests::world_collections_system", "tests::bundle_derive", "system::tests::test_combinator_clone", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::changed_trackers", "tests::changed_trackers_sparse", "tests::empty_spawn", "tests::insert_overwrite_drop", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::par_for_each_dense", "tests::par_for_each_sparse", "tests::query_filter_with_for_each", "tests::query_filter_with", "tests::query_filter_with_sparse_for_each", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_filter_with_sparse", "tests::query_get", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component", "tests::query_single_component_for_each", "tests::random_access", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::remove_missing", "tests::remove", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::remove_tracking", "tests::reserve_entities_across_worlds", "query::tests::query_filtered_exactsizeiterator_len", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "tests::stateful_query_handles_new_archetype", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::disjoint_access", "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_ref_get_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "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::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 935) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 992) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 943) - 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/component.rs - component::StorageType (line 171)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1008)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 752)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 98)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1194)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1208)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 214) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 544)", "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/schedule/condition.rs - schedule::condition::Condition::xnor (line 412) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - 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::xnor (line 379) - 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/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 726)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 735)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 568)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 58)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 203)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 871)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 764)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1049)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/event/reader.rs - event::reader::ManualEventReader (line 126)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1625)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 204)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 85)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 743)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 671)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1648)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 453)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 625)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 621)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 548)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 37)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 833)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 903)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 958)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 668)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 356)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1328)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 282)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 1002)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 189)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 460) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 423)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1064)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 721)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 608)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1544) - compile fail", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 772)", "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::resource_equals (line 587)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 370)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1087)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 718)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 246)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 471)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 42)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 40)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1110)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 555)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 311)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 666)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 870)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1520)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1004)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 465)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 905)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 624)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 581)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 60)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 777)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 958)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 319)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 348)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1383)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1566)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 114) - compile", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "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>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 47)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1481)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 897)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1659)", "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_mut (line 455)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 752)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 775)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 383)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1551)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 76)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 269)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1508)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1683)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1511)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 431)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1738)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 304)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 364)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1706)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 181)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1455)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 222)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 330)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1330)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 198)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1626)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1599)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1763)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 446)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1540)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 403)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,886
bevyengine__bevy-13886
[ "13885" ]
836b6c4409fbb2a9b16a972c26de631e859a6581
diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -370,6 +370,7 @@ impl Archetype { // SAFETY: We are creating an archetype that includes this component so it must exist let info = unsafe { components.get_info_unchecked(component_id) }; info.update_archetype_flags(&mut flags); + observers.update_archetype_flags(component_id, &mut flags); archetype_components.insert( component_id, ArchetypeComponentInfo {
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 @@ -400,6 +400,10 @@ mod tests { #[derive(Component)] struct C; + #[derive(Component)] + #[component(storage = "SparseSet")] + struct S; + #[derive(Event)] struct EventA; 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 @@ -444,6 +448,22 @@ mod tests { assert_eq!(3, world.resource::<R>().0); } + #[test] + fn observer_order_insert_remove_sparse() { + let mut world = World::new(); + world.init_resource::<R>(); + + world.observe(|_: Trigger<OnAdd, S>, mut res: ResMut<R>| res.assert_order(0)); + world.observe(|_: Trigger<OnInsert, S>, mut res: ResMut<R>| res.assert_order(1)); + world.observe(|_: Trigger<OnRemove, S>, mut res: ResMut<R>| res.assert_order(2)); + + let mut entity = world.spawn_empty(); + entity.insert(S); + entity.remove::<S>(); + entity.flush(); + assert_eq!(3, world.resource::<R>().0); + } + #[test] fn observer_order_recursive() { let mut world = World::new();
Observers don't trigger for Sparse components Bevy version: 0.14.0-rc.3 `Trigger<OnAdd, C>`, `Trigger<OnUpdate, C>`, `Trigger<OnRemove, C>` don't seem to trigger if the component is Sparse, not Dense.
FYI @cart @james-j-obrien
2024-06-17T00:14:44Z
1.78
2024-06-17T15:30:12Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "observer::tests::observer_order_insert_remove_sparse" ]
[ "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::as_deref_mut", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_bits_roundtrip", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::world_scope_reserves_generations", "change_detection::tests::change_tick_wraparound", "entity::tests::entity_const", "bundle::tests::component_hook_order_recursive_multiple", "entity::tests::entity_comparison", "change_detection::tests::change_tick_scan", "entity::tests::entity_display", "change_detection::tests::change_expiration", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_empty", "event::tests::test_events_drain_and_read", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_kind", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "label::tests::dyn_eq_object_safe", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_component", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_components", "observer::tests::observer_multiple_listeners", "observer::tests::observer_multiple_matches", "observer::tests::observer_multiple_events", "observer::tests::observer_no_target", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_access_extend", "query::access::tests::read_all_access_conflicts", "observer::tests::observer_order_insert_remove", "query::access::tests::filtered_combined_access", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_components", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_static", "observer::tests::observer_order_recursive", "observer::tests::observer_order_spawn_despawn", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_sorts", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_changed", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::get_many_unchecked_manual_uniqueness", "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::join", "query::state::tests::join_with_get", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::many_entities", "query::tests::has_query", "query::tests::multi_storage_query", "query::tests::query", "query::tests::any_query", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected", "query::tests::self_conflicting_worldquery - should panic", "query::tests::query_iter_combinations", "query::tests::mut_to_immut_query_methods_have_immut_item", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::derived_worldqueries", "schedule::set::tests::test_derive_schedule_label", "schedule::executor::simple::skip_automatic_sync_points", "reflect::entity_commands::tests::remove_reflected_with_registry", "schedule::set::tests::test_derive_system_set", "query::tests::query_filtered_iter_combinations", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::unknown_schedule", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::stepping::simple_executor", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::stepping::tests::verify_cursor", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::sparse_set::tests::sparse_set", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::resize_test", "storage::table::tests::table", "system::builder::tests::local_builder", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::ambiguous_with_label", "storage::sparse_set::tests::sparse_sets", "system::commands::tests::append", "system::builder::tests::query_builder", "system::commands::tests::commands", "system::builder::tests::multi_param_builder", "schedule::tests::system_ambiguity::events", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::exclusive", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::nonsend", "system::commands::tests::remove_components_by_id", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::one_of_everything", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_execution::run_exclusive_system", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::function_system::tests::into_system_type_id_consistency", "system::system::tests::run_system_once", "system::system::tests::non_send_resources", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::conditions::system_with_condition", "system::system::tests::run_two_systems", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ambiguity::read_world", "system::system::tests::command_processing", "schedule::schedule::tests::configure_set_on_new_schedule", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_exclusive_param", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_flexibility", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::system_ambiguity::correct_ambiguities", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_private_fields", "schedule::schedule::tests::disable_auto_sync_points", "schedule::condition::tests::multiple_run_conditions", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_field_limit", "event::tests::test_event_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::schedule::tests::inserts_a_sync_point", "system::system_registry::tests::input_values", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::set::tests::test_schedule_label", "system::system_registry::tests::exclusive_system", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::system_registry::tests::nested_systems", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::output_values", "system::system_param::tests::system_param_generic_bounds", "system::tests::assert_systems", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_struct_variants", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::conditions::system_conditions_and_change_detection", "system::tests::any_of_has_filter_with_when_both_have_it", "system::system_param::tests::non_sync_local", "schedule::tests::system_execution::run_system", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::system_registry::tests::change_detection", "system::system_registry::tests::local_variables", "schedule::tests::system_ambiguity::read_only", "system::tests::get_system_conflicts", "system::system_param::tests::param_set_non_send_first", "system::tests::long_life_test", "system::tests::can_have_16_parameters", "system::tests::immutable_mut_test", "system::tests::commands_param_set", "system::tests::any_of_and_without", "system::tests::assert_system_does_not_conflict - should panic", "system::system_param::tests::param_set_non_send_second", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::changed_resource_system", "schedule::condition::tests::run_condition", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "schedule::condition::tests::run_condition_combinators", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_system", "system::tests::non_send_option_system", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::option_has_no_filter_with - should panic", "query::tests::par_iter_mut_change_detection", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::query_validates_world_id - should panic", "system::tests::read_system_state", "system::tests::panic_inside_system - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::into_iter_impl", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::or_expanded_with_and_without_common", "system::tests::disjoint_query_mut_read_component_system", "system::tests::or_has_filter_with", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::or_with_without_and_compatible_with_without", "system::tests::simple_system", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::local_system", "system::tests::or_param_set_system", "system::tests::nonconflicting_system_resources", "system::tests::query_is_empty", "system::tests::query_set_system", "schedule::tests::system_ordering::order_systems", "system::tests::or_expanded_nested_with_and_without_common", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::removal_tracking", "event::tests::test_events_par_iter", "system::tests::system_state_archetype_update", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_change_detection", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "tests::changed_query", "tests::added_tracking", "tests::add_remove_components", "tests::added_queries", "tests::bundle_derive", "tests::clear_entities", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::empty_spawn", "system::tests::world_collections_system", "system::tests::test_combinator_clone", "tests::changed_trackers", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop_sparse", "tests::exact_size_query", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::insert_overwrite_drop", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::insert_or_spawn_batch_invalid", "tests::non_send_resource", "tests::multiple_worlds_same_query_iter - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_panic - should panic", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::query_filter_with", "tests::query_all_for_each", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_single_component_for_each", "tests::query_sparse_component", "tests::query_optional_component_table", "tests::random_access", "tests::ref_and_mut_query_panic - should panic", "tests::remove", "tests::remove_missing", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::remove_tracking", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "tests::test_is_archetypal_size_hints", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible", "query::tests::query_filtered_exactsizeiterator_len", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::identifier::tests::world_id_exclusive_system_param", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_mut_by_id", "world::tests::get_resource_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iter_resources", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::test_verify_unique_entities", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 992) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 935) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 943) - compile", "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/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 171)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1008)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 752)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 544)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 98)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 36)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1208)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1194)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 266) - compile fail", "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::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/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::xnor (line 379) - compile fail", "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/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 726)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 735)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 207)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 204)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1648)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 58)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 85)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 671)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 37)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 568)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 764)", "crates/bevy_ecs/src/event/reader.rs - event::reader::ManualEventReader (line 126)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 871)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1625)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 668)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 156)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 244)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 103)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 170)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 203)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 126)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1049)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 219)", "crates/bevy_ecs/src/lib.rs - (line 316)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 188)", "crates/bevy_ecs/src/lib.rs - (line 341)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 743)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 621)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 138)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 625)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 1002)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 718)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 587)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 903)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 548)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 453)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1328)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 189)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 356)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 772)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 460) - compile fail", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1544) - compile fail", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 471)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1520)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 958)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 40)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 833)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 721)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 282)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 42)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 870)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 311)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1087)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 370)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 423)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 555)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 246)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1004)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 666)", "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 167)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 608)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 465)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1064)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 624)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 581)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 905)", "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>::iter_inner (line 1551)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1110)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1508)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 958)", "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>::iter_mut (line 455)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 240)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 114) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 775)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "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>::get_mut (line 943)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 319)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 60)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 47)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 777)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 348)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 383)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 752)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 181)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 76)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 431)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1383)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 897)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1481)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1330)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 269)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 222)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 198)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1455)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1738)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2114)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1599)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1195)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 304)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 257)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2337)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1566)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2694)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 446)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 364)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1511)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1844)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 531)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1054)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1129)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1683)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1033)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1226)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1159)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 566)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1540)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1659)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 825)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1086)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 883)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1763)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1706)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 601)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1626)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 916)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 330)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2359)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 736)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2436)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 403)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 412)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 794)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1007)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 688)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1732)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,848
bevyengine__bevy-13848
[ "13844" ]
2cffd14923c9e217dc98881af6c8926fe4dc65ea
diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -4,6 +4,7 @@ use bevy_ecs::{ schedule::{IntoSystemConfigs, ScheduleLabel}, world::FromWorld, }; +use bevy_utils::tracing::warn; use crate::state::{ setup_state_transitions_in_world, ComputedStates, FreelyMutableState, NextState, State, diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -70,6 +71,9 @@ impl AppExtStates for SubApp { exited: None, entered: Some(state), }); + } else { + let name = std::any::type_name::<S>(); + warn!("State {} is already initialized.", name); } self diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -87,6 +91,16 @@ impl AppExtStates for SubApp { exited: None, entered: Some(state), }); + } else { + // Overwrite previous state and initial event + self.insert_resource::<State<S>>(State::new(state.clone())); + self.world_mut() + .resource_mut::<Events<StateTransitionEvent<S>>>() + .clear(); + self.world_mut().send_event(StateTransitionEvent { + exited: None, + entered: Some(state), + }); } self diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -109,6 +123,9 @@ impl AppExtStates for SubApp { exited: None, entered: state, }); + } else { + let name = std::any::type_name::<S>(); + warn!("Computed state {} is already initialized.", name); } self diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -132,6 +149,9 @@ impl AppExtStates for SubApp { exited: None, entered: state, }); + } else { + let name = std::any::type_name::<S>(); + warn!("Sub state {} is already initialized.", name); } self
diff --git a/crates/bevy_state/src/app.rs b/crates/bevy_state/src/app.rs --- a/crates/bevy_state/src/app.rs +++ b/crates/bevy_state/src/app.rs @@ -192,3 +212,62 @@ impl Plugin for StatesPlugin { schedule.insert_after(PreUpdate, StateTransition); } } + +#[cfg(test)] +mod tests { + use crate::{ + self as bevy_state, + state::{State, StateTransition, StateTransitionEvent}, + }; + use bevy_app::App; + use bevy_ecs::event::Events; + use bevy_state_macros::States; + + use super::AppExtStates; + + #[derive(States, Default, PartialEq, Eq, Hash, Debug, Clone)] + enum TestState { + #[default] + A, + B, + C, + } + + #[test] + fn insert_state_can_overwrite_init_state() { + let mut app = App::new(); + + app.init_state::<TestState>(); + app.insert_state(TestState::B); + + let world = app.world_mut(); + world.run_schedule(StateTransition); + + assert_eq!(world.resource::<State<TestState>>().0, TestState::B); + let events = world.resource::<Events<StateTransitionEvent<TestState>>>(); + assert_eq!(events.len(), 1); + let mut reader = events.get_reader(); + let last = reader.read(events).last().unwrap(); + assert_eq!(last.exited, None); + assert_eq!(last.entered, Some(TestState::B)); + } + + #[test] + fn insert_state_can_overwrite_insert_state() { + let mut app = App::new(); + + app.insert_state(TestState::B); + app.insert_state(TestState::C); + + let world = app.world_mut(); + world.run_schedule(StateTransition); + + assert_eq!(world.resource::<State<TestState>>().0, TestState::C); + let events = world.resource::<Events<StateTransitionEvent<TestState>>>(); + assert_eq!(events.len(), 1); + let mut reader = events.get_reader(); + let last = reader.read(events).last().unwrap(); + assert_eq!(last.exited, None); + assert_eq!(last.entered, Some(TestState::C)); + } +}
OnEnter triggers twice and OnExit is not triggered ## Bevy version 0.13.2 ## \[Optional\] Relevant system information Ubuntu 22.04.4 LTS 64-bit ## Minimal project with the issue ```rust use bevy::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .insert_state(AppState::A) .insert_state(AppState::B) .add_systems(OnEnter(AppState::A), setup_a) .add_systems(OnEnter(AppState::B), setup_b) .add_systems(OnExit(AppState::A), cleanup_a) .add_systems(OnExit(AppState::B), cleanup_b) .run(); } #[derive(States, Debug, Clone, PartialEq, Eq, Hash)] enum AppState { A, B, } fn setup_a() { info!("setting up A"); } fn setup_b() { info!("setting up B"); } fn cleanup_a() { info!("cleaning up A"); } fn cleanup_b() { info!("cleaning up B"); } ``` ## The Output ``` 2024-06-14T14:30:43.872719Z INFO minimalstateissue: setting up B 2024-06-14T14:30:43.872759Z INFO minimalstateissue: setting up B ``` ## Expected Output ``` 2024-06-14T14:30:43.872719Z INFO minimalstateissue: setting up A 2024-06-14T14:30:43.872719Z INFO minimalstateissue: cleaning up A 2024-06-14T14:30:43.872759Z INFO minimalstateissue: setting up B ``` OR ``` 2024-06-14T14:30:43.872759Z INFO minimalstateissue: setting up B ``` depending on the intended behaviour (I can say that what happens now is not intended behaviour).
2024-06-14T16:17:31Z
1.78
2024-09-07T19:14:04Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "app::tests::insert_state_can_overwrite_insert_state", "app::tests::insert_state_can_overwrite_init_state" ]
[ "condition::tests::distributive_run_if_compiles", "state::tests::same_state_transition_should_emit_event_and_not_run_schedules", "state::tests::computed_state_with_a_single_source_is_correctly_derived", "state::tests::sub_state_exists_only_when_allowed_but_can_be_modified_freely", "state::tests::same_state_transition_should_propagate_to_computed_state", "state::tests::same_state_transition_should_propagate_to_sub_state", "state::tests::complex_computed_state_gets_derived_correctly", "state::tests::substate_of_computed_states_works_appropriately", "state::tests::computed_state_transitions_are_produced_correctly", "state::tests::check_transition_orders", "crates/bevy_state/src/state/computed_states.rs - state::computed_states::ComputedStates (line 54)", "crates/bevy_state/src/state/transitions.rs - state::transitions::StateTransition (line 46)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 12)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 36)", "crates/bevy_state/src/state/resources.rs - state::resources::NextState (line 98)", "crates/bevy_state/src/state/computed_states.rs - state::computed_states::ComputedStates (line 15)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 56)", "crates/bevy_state/src/state/resources.rs - state::resources::State (line 26)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 100)", "crates/bevy_state/src/state_scoped.rs - state_scoped::StateScoped (line 20)", "crates/bevy_state/src/condition.rs - condition::state_changed (line 127)", "crates/bevy_state/src/condition.rs - condition::state_exists (line 11)", "crates/bevy_state/src/condition.rs - condition::in_state (line 57)", "crates/bevy_state/src/state/states.rs - state::states::States (line 22)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,817
bevyengine__bevy-13817
[ "13815" ]
2825ac8a8e69b4c816e3ca67df2f841904ac7b69
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -439,12 +439,7 @@ impl App { plugin: Box<dyn Plugin>, ) -> Result<&mut Self, AppError> { debug!("added plugin: {}", plugin.name()); - if plugin.is_unique() - && !self - .main_mut() - .plugin_names - .insert(plugin.name().to_string()) - { + if plugin.is_unique() && self.main_mut().plugin_names.contains(plugin.name()) { Err(AppError::DuplicatePlugin { plugin_name: plugin.name().to_string(), })?; diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -459,6 +454,9 @@ impl App { self.main_mut().plugin_build_depth += 1; let result = catch_unwind(AssertUnwindSafe(|| plugin.build(self))); + self.main_mut() + .plugin_names + .insert(plugin.name().to_string()); self.main_mut().plugin_build_depth -= 1; if let Err(payload) = result {
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1275,6 +1273,21 @@ mod tests { .init_resource::<TestResource>(); } + #[test] + /// Plugin should not be considered inserted while it's being built + /// + /// bug: <https://github.com/bevyengine/bevy/issues/13815> + fn plugin_should_not_be_added_during_build_time() { + pub struct Foo; + + impl Plugin for Foo { + fn build(&self, app: &mut App) { + assert!(!app.is_plugin_added::<Self>()); + } + } + + App::new().add_plugins(Foo); + } #[test] fn events_should_be_updated_once_per_update() { #[derive(Event, Clone)]
is_plugin_added is always true for Self ## Bevy version 0.14.0-rc.2 ## What you did The following program panics in Bevy 0.14.0-rc.2, but runs successfully in 0.13.2 ```rust use bevy::prelude::*; fn main() { let app = App::new().add_plugins(Foo); } pub struct Foo; impl Plugin for Foo { fn build(&self, app: &mut App) { if app.is_plugin_added::<Self>() { panic!() } } } ``` ## What went wrong Either the previous behavior should be restored, or we should document it in the migration guide. ## Additional information
2024-06-11T22:18:39Z
1.78
2024-06-14T19:51:44Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "app::tests::plugin_should_not_be_added_during_build_time" ]
[ "app::tests::app_exit_size", "app::tests::test_derive_app_label", "plugin_group::tests::add_after", "app::tests::initializing_resources_from_world", "app::tests::can_add_two_plugins", "app::tests::can_add_twice_the_same_plugin_with_different_type_param", "app::tests::can_add_twice_the_same_plugin_not_unique", "plugin_group::tests::add_before", "plugin_group::tests::add_conflicting_subgroup", "plugin_group::tests::add_basic_subgroup", "app::tests::cant_call_app_run_from_plugin_build - should panic", "app::tests::cant_add_twice_the_same_plugin - should panic", "plugin_group::tests::basic_ordering", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist", "plugin_group::tests::readd", "plugin_group::tests::readd_after", "plugin_group::tests::readd_before", "app::tests::test_is_plugin_added_works_during_finish - should panic", "app::tests::test_extract_sees_changes", "app::tests::events_should_be_updated_once_per_update", "app::tests::runner_returns_correct_exit_code", "app::tests::regression_test_10385", "app::tests::test_update_clears_trackers_once", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 18) - compile", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 30) - compile", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 42)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 29)", "crates/bevy_app/src/app.rs - app::App::insert_non_send_resource (line 411)", "crates/bevy_app/src/app.rs - app::App (line 56)", "crates/bevy_app/src/plugin_group.rs - plugin_group::NoopPluginGroup (line 229)", "crates/bevy_app/src/app.rs - app::App::set_runner (line 183)", "crates/bevy_app/src/app.rs - app::App::add_event (line 327)", "crates/bevy_app/src/app.rs - app::App::init_resource (line 378)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp (line 23)", "crates/bevy_app/src/app.rs - app::App::add_systems (line 271)", "crates/bevy_app/src/app.rs - app::App::insert_resource (line 352)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,763
bevyengine__bevy-13763
[ "13711" ]
7c9c6ff27f483d592a3591be4c80f7e0316496e5
diff --git a/crates/bevy_state/src/lib.rs b/crates/bevy_state/src/lib.rs --- a/crates/bevy_state/src/lib.rs +++ b/crates/bevy_state/src/lib.rs @@ -47,8 +47,9 @@ pub mod prelude { pub use crate::condition::*; #[doc(hidden)] pub use crate::state::{ - last_transition, ComputedStates, NextState, OnEnter, OnExit, OnTransition, State, StateSet, - StateTransition, StateTransitionEvent, StateTransitionSteps, States, SubStates, + last_transition, ComputedStates, EnterSchedules, ExitSchedules, NextState, OnEnter, OnExit, + OnTransition, State, StateSet, StateTransition, StateTransitionEvent, States, SubStates, + TransitionSchedules, }; #[doc(hidden)] pub use crate::state_scoped::StateScoped; diff --git a/crates/bevy_state/src/state/freely_mutable_state.rs b/crates/bevy_state/src/state/freely_mutable_state.rs --- a/crates/bevy_state/src/state/freely_mutable_state.rs +++ b/crates/bevy_state/src/state/freely_mutable_state.rs @@ -17,27 +17,33 @@ use super::{take_next_state, transitions::*}; pub trait FreelyMutableState: States { /// This function registers all the necessary systems to apply state changes and run transition schedules fn register_state(schedule: &mut Schedule) { + schedule.configure_sets(( + ApplyStateTransition::<Self>::default() + .in_set(StateTransitionSteps::DependentTransitions), + ExitSchedules::<Self>::default().in_set(StateTransitionSteps::ExitSchedules), + TransitionSchedules::<Self>::default() + .in_set(StateTransitionSteps::TransitionSchedules), + EnterSchedules::<Self>::default().in_set(StateTransitionSteps::EnterSchedules), + )); + schedule .add_systems( - apply_state_transition::<Self>.in_set(ApplyStateTransition::<Self>::apply()), - ) - .add_systems( - last_transition::<Self> - .pipe(run_enter::<Self>) - .in_set(StateTransitionSteps::EnterSchedules), + apply_state_transition::<Self>.in_set(ApplyStateTransition::<Self>::default()), ) .add_systems( last_transition::<Self> .pipe(run_exit::<Self>) - .in_set(StateTransitionSteps::ExitSchedules), + .in_set(ExitSchedules::<Self>::default()), ) .add_systems( last_transition::<Self> .pipe(run_transition::<Self>) - .in_set(StateTransitionSteps::TransitionSchedules), + .in_set(TransitionSchedules::<Self>::default()), ) - .configure_sets( - ApplyStateTransition::<Self>::apply().in_set(StateTransitionSteps::RootTransitions), + .add_systems( + last_transition::<Self> + .pipe(run_enter::<Self>) + .in_set(EnterSchedules::<Self>::default()), ); } } diff --git a/crates/bevy_state/src/state/state_set.rs b/crates/bevy_state/src/state/state_set.rs --- a/crates/bevy_state/src/state/state_set.rs +++ b/crates/bevy_state/src/state/state_set.rs @@ -10,7 +10,8 @@ use self::sealed::StateSetSealed; use super::{ computed_states::ComputedStates, internal_apply_state_transition, last_transition, run_enter, run_exit, run_transition, sub_states::SubStates, take_next_state, ApplyStateTransition, - NextState, State, StateTransitionEvent, StateTransitionSteps, States, + EnterSchedules, ExitSchedules, NextState, State, StateTransitionEvent, StateTransitionSteps, + States, TransitionSchedules, }; mod sealed { diff --git a/crates/bevy_state/src/state/state_set.rs b/crates/bevy_state/src/state/state_set.rs --- a/crates/bevy_state/src/state/state_set.rs +++ b/crates/bevy_state/src/state/state_set.rs @@ -114,27 +115,35 @@ impl<S: InnerStateSet> StateSet for S { internal_apply_state_transition(event, commands, current_state, new_state); }; + schedule.configure_sets(( + ApplyStateTransition::<T>::default() + .in_set(StateTransitionSteps::DependentTransitions) + .after(ApplyStateTransition::<S::RawState>::default()), + ExitSchedules::<T>::default() + .in_set(StateTransitionSteps::ExitSchedules) + .before(ExitSchedules::<S::RawState>::default()), + TransitionSchedules::<T>::default().in_set(StateTransitionSteps::TransitionSchedules), + EnterSchedules::<T>::default() + .in_set(StateTransitionSteps::EnterSchedules) + .after(EnterSchedules::<S::RawState>::default()), + )); + schedule - .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::apply())) - .add_systems( - last_transition::<T> - .pipe(run_enter::<T>) - .in_set(StateTransitionSteps::EnterSchedules), - ) + .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::default())) .add_systems( last_transition::<T> .pipe(run_exit::<T>) - .in_set(StateTransitionSteps::ExitSchedules), + .in_set(ExitSchedules::<T>::default()), ) .add_systems( last_transition::<T> .pipe(run_transition::<T>) - .in_set(StateTransitionSteps::TransitionSchedules), + .in_set(TransitionSchedules::<T>::default()), ) - .configure_sets( - ApplyStateTransition::<T>::apply() - .in_set(StateTransitionSteps::DependentTransitions) - .after(ApplyStateTransition::<S::RawState>::apply()), + .add_systems( + last_transition::<T> + .pipe(run_enter::<T>) + .in_set(EnterSchedules::<T>::default()), ); } diff --git a/crates/bevy_state/src/state/state_set.rs b/crates/bevy_state/src/state/state_set.rs --- a/crates/bevy_state/src/state/state_set.rs +++ b/crates/bevy_state/src/state/state_set.rs @@ -186,27 +195,35 @@ impl<S: InnerStateSet> StateSet for S { internal_apply_state_transition(event, commands, current_state_res, new_state); }; + schedule.configure_sets(( + ApplyStateTransition::<T>::default() + .in_set(StateTransitionSteps::DependentTransitions) + .after(ApplyStateTransition::<S::RawState>::default()), + ExitSchedules::<T>::default() + .in_set(StateTransitionSteps::ExitSchedules) + .before(ExitSchedules::<S::RawState>::default()), + TransitionSchedules::<T>::default().in_set(StateTransitionSteps::TransitionSchedules), + EnterSchedules::<T>::default() + .in_set(StateTransitionSteps::EnterSchedules) + .after(EnterSchedules::<S::RawState>::default()), + )); + schedule - .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::apply())) - .add_systems( - last_transition::<T> - .pipe(run_enter::<T>) - .in_set(StateTransitionSteps::EnterSchedules), - ) + .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::default())) .add_systems( last_transition::<T> .pipe(run_exit::<T>) - .in_set(StateTransitionSteps::ExitSchedules), + .in_set(ExitSchedules::<T>::default()), ) .add_systems( last_transition::<T> .pipe(run_transition::<T>) - .in_set(StateTransitionSteps::TransitionSchedules), + .in_set(TransitionSchedules::<T>::default()), ) - .configure_sets( - ApplyStateTransition::<T>::apply() - .in_set(StateTransitionSteps::DependentTransitions) - .after(ApplyStateTransition::<S::RawState>::apply()), + .add_systems( + last_transition::<T> + .pipe(run_enter::<T>) + .in_set(EnterSchedules::<T>::default()), ); } } diff --git a/crates/bevy_state/src/state/state_set.rs b/crates/bevy_state/src/state/state_set.rs --- a/crates/bevy_state/src/state/state_set.rs +++ b/crates/bevy_state/src/state/state_set.rs @@ -243,16 +260,25 @@ macro_rules! impl_state_set_sealed_tuples { internal_apply_state_transition(event, commands, current_state, new_state); }; - schedule - .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::apply())) - .add_systems(last_transition::<T>.pipe(run_enter::<T>).in_set(StateTransitionSteps::EnterSchedules)) - .add_systems(last_transition::<T>.pipe(run_exit::<T>).in_set(StateTransitionSteps::ExitSchedules)) - .add_systems(last_transition::<T>.pipe(run_transition::<T>).in_set(StateTransitionSteps::TransitionSchedules)) - .configure_sets( - ApplyStateTransition::<T>::apply() + schedule.configure_sets(( + ApplyStateTransition::<T>::default() .in_set(StateTransitionSteps::DependentTransitions) - $(.after(ApplyStateTransition::<$param::RawState>::apply()))* - ); + $(.after(ApplyStateTransition::<$param::RawState>::default()))*, + ExitSchedules::<T>::default() + .in_set(StateTransitionSteps::ExitSchedules) + $(.before(ExitSchedules::<$param::RawState>::default()))*, + TransitionSchedules::<T>::default() + .in_set(StateTransitionSteps::TransitionSchedules), + EnterSchedules::<T>::default() + .in_set(StateTransitionSteps::EnterSchedules) + $(.after(EnterSchedules::<$param::RawState>::default()))*, + )); + + schedule + .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_exit::<T>).in_set(ExitSchedules::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_transition::<T>).in_set(TransitionSchedules::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_enter::<T>).in_set(EnterSchedules::<T>::default())); } fn register_sub_state_systems_in_schedule<T: SubStates<SourceStates = Self>>( diff --git a/crates/bevy_state/src/state/state_set.rs b/crates/bevy_state/src/state/state_set.rs --- a/crates/bevy_state/src/state/state_set.rs +++ b/crates/bevy_state/src/state/state_set.rs @@ -288,16 +314,25 @@ macro_rules! impl_state_set_sealed_tuples { internal_apply_state_transition(event, commands, current_state_res, new_state); }; - schedule - .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::apply())) - .add_systems(last_transition::<T>.pipe(run_enter::<T>).in_set(StateTransitionSteps::EnterSchedules)) - .add_systems(last_transition::<T>.pipe(run_exit::<T>).in_set(StateTransitionSteps::ExitSchedules)) - .add_systems(last_transition::<T>.pipe(run_transition::<T>).in_set(StateTransitionSteps::TransitionSchedules)) - .configure_sets( - ApplyStateTransition::<T>::apply() + schedule.configure_sets(( + ApplyStateTransition::<T>::default() .in_set(StateTransitionSteps::DependentTransitions) - $(.after(ApplyStateTransition::<$param::RawState>::apply()))* - ); + $(.after(ApplyStateTransition::<$param::RawState>::default()))*, + ExitSchedules::<T>::default() + .in_set(StateTransitionSteps::ExitSchedules) + $(.before(ExitSchedules::<$param::RawState>::default()))*, + TransitionSchedules::<T>::default() + .in_set(StateTransitionSteps::TransitionSchedules), + EnterSchedules::<T>::default() + .in_set(StateTransitionSteps::EnterSchedules) + $(.after(EnterSchedules::<$param::RawState>::default()))*, + )); + + schedule + .add_systems(apply_state_transition.in_set(ApplyStateTransition::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_exit::<T>).in_set(ExitSchedules::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_transition::<T>).in_set(TransitionSchedules::<T>::default())) + .add_systems(last_transition::<T>.pipe(run_enter::<T>).in_set(EnterSchedules::<T>::default())); } } }; diff --git a/crates/bevy_state/src/state/sub_states.rs b/crates/bevy_state/src/state/sub_states.rs --- a/crates/bevy_state/src/state/sub_states.rs +++ b/crates/bevy_state/src/state/sub_states.rs @@ -150,7 +150,7 @@ pub trait SubStates: States + FreelyMutableState { /// /// This can either be a single type that implements [`States`], or a tuple /// containing multiple types that implement [`States`], or any combination of - /// types implementing [`States`] and Options of types implementing [`States`] + /// types implementing [`States`] and Options of types implementing [`States`]. type SourceStates: StateSet; /// This function gets called whenever one of the [`SourceStates`](Self::SourceStates) changes. diff --git a/crates/bevy_state/src/state/transitions.rs b/crates/bevy_state/src/state/transitions.rs --- a/crates/bevy_state/src/state/transitions.rs +++ b/crates/bevy_state/src/state/transitions.rs @@ -53,30 +53,58 @@ pub struct StateTransitionEvent<S: States> { pub entered: Option<S>, } -/// Applies manual state transitions using [`NextState<S>`]. +/// Applies state transitions and runs transitions schedules in order. /// /// These system sets are run sequentially, in the order of the enum variants. #[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)] -pub enum StateTransitionSteps { - /// Parentless states apply their [`NextState<S>`]. - RootTransitions, - /// States with parents apply their computation and [`NextState<S>`]. +pub(crate) enum StateTransitionSteps { + /// States apply their transitions from [`NextState`] and compute functions based on their parent states. DependentTransitions, - /// Exit schedules are executed. + /// Exit schedules are executed in leaf to root order ExitSchedules, - /// Transition schedules are executed. + /// Transition schedules are executed in arbitrary order. TransitionSchedules, - /// Enter schedules are executed. + /// Enter schedules are executed in root to leaf order. EnterSchedules, } -/// Defines a system set to aid with dependent state ordering #[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)] -pub struct ApplyStateTransition<S: States>(PhantomData<S>); +/// System set that runs exit schedule(s) for state `S`. +pub struct ExitSchedules<S: States>(PhantomData<S>); -impl<S: States> ApplyStateTransition<S> { - pub(crate) fn apply() -> Self { - Self(PhantomData) +impl<S: States> Default for ExitSchedules<S> { + fn default() -> Self { + Self(Default::default()) + } +} + +#[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)] +/// System set that runs transition schedule(s) for state `S`. +pub struct TransitionSchedules<S: States>(PhantomData<S>); + +impl<S: States> Default for TransitionSchedules<S> { + fn default() -> Self { + Self(Default::default()) + } +} + +#[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)] +/// System set that runs enter schedule(s) for state `S`. +pub struct EnterSchedules<S: States>(PhantomData<S>); + +impl<S: States> Default for EnterSchedules<S> { + fn default() -> Self { + Self(Default::default()) + } +} + +/// System set that applies transitions for state `S`. +#[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)] +pub(crate) struct ApplyStateTransition<S: States>(PhantomData<S>); + +impl<S: States> Default for ApplyStateTransition<S> { + fn default() -> Self { + Self(Default::default()) } } diff --git a/crates/bevy_state/src/state/transitions.rs b/crates/bevy_state/src/state/transitions.rs --- a/crates/bevy_state/src/state/transitions.rs +++ b/crates/bevy_state/src/state/transitions.rs @@ -151,7 +179,6 @@ pub fn setup_state_transitions_in_world( let mut schedule = Schedule::new(StateTransition); schedule.configure_sets( ( - StateTransitionSteps::RootTransitions, StateTransitionSteps::DependentTransitions, StateTransitionSteps::ExitSchedules, StateTransitionSteps::TransitionSchedules, diff --git a/examples/state/custom_transitions.rs b/examples/state/custom_transitions.rs --- a/examples/state/custom_transitions.rs +++ b/examples/state/custom_transitions.rs @@ -13,10 +13,7 @@ use std::marker::PhantomData; -use bevy::{ - dev_tools::states::*, ecs::schedule::ScheduleLabel, prelude::*, - state::state::StateTransitionSteps, -}; +use bevy::{dev_tools::states::*, ecs::schedule::ScheduleLabel, prelude::*}; use custom_transitions::*; diff --git a/examples/state/custom_transitions.rs b/examples/state/custom_transitions.rs --- a/examples/state/custom_transitions.rs +++ b/examples/state/custom_transitions.rs @@ -72,16 +69,16 @@ mod custom_transitions { // State transitions are handled in three ordered steps, exposed as system sets. // We can add our systems to them, which will run the corresponding schedules when they're evaluated. // These are: - // - [`StateTransitionSteps::ExitSchedules`] - // - [`StateTransitionSteps::TransitionSchedules`] - // - [`StateTransitionSteps::EnterSchedules`] - .in_set(StateTransitionSteps::EnterSchedules), + // - [`ExitSchedules`] - Ran from leaf-states to root-states, + // - [`TransitionSchedules`] - Ran in arbitrary order, + // - [`EnterSchedules`] - Ran from root-states to leaf-states. + .in_set(EnterSchedules::<S>::default()), ) .add_systems( StateTransition, last_transition::<S> .pipe(run_reexit::<S>) - .in_set(StateTransitionSteps::ExitSchedules), + .in_set(ExitSchedules::<S>::default()), ); } }
diff --git a/crates/bevy_state/src/state/mod.rs b/crates/bevy_state/src/state/mod.rs --- a/crates/bevy_state/src/state/mod.rs +++ b/crates/bevy_state/src/state/mod.rs @@ -508,14 +508,13 @@ mod tests { #[test] fn same_state_transition_should_emit_event_and_not_run_schedules() { let mut world = World::new(); + setup_state_transitions_in_world(&mut world, None); EventRegistry::register_event::<StateTransitionEvent<SimpleState>>(&mut world); world.init_resource::<State<SimpleState>>(); - let mut schedules = Schedules::new(); - let mut apply_changes = Schedule::new(StateTransition); - SimpleState::register_state(&mut apply_changes); - schedules.insert(apply_changes); + let mut schedules = world.resource_mut::<Schedules>(); + let apply_changes = schedules.get_mut(StateTransition).unwrap(); + SimpleState::register_state(apply_changes); - world.insert_resource(TransitionCounter::default()); let mut on_exit = Schedule::new(OnExit(SimpleState::A)); on_exit.add_systems(|mut c: ResMut<TransitionCounter>| c.exit += 1); schedules.insert(on_exit); diff --git a/crates/bevy_state/src/state/mod.rs b/crates/bevy_state/src/state/mod.rs --- a/crates/bevy_state/src/state/mod.rs +++ b/crates/bevy_state/src/state/mod.rs @@ -528,9 +527,7 @@ mod tests { let mut on_enter = Schedule::new(OnEnter(SimpleState::A)); on_enter.add_systems(|mut c: ResMut<TransitionCounter>| c.enter += 1); schedules.insert(on_enter); - - world.insert_resource(schedules); - setup_state_transitions_in_world(&mut world, None); + world.insert_resource(TransitionCounter::default()); world.run_schedule(StateTransition); assert_eq!(world.resource::<State<SimpleState>>().0, SimpleState::A); diff --git a/crates/bevy_state/src/state/mod.rs b/crates/bevy_state/src/state/mod.rs --- a/crates/bevy_state/src/state/mod.rs +++ b/crates/bevy_state/src/state/mod.rs @@ -546,7 +543,7 @@ mod tests { *world.resource::<TransitionCounter>(), TransitionCounter { exit: 0, - transition: 0, + transition: 1, // Same state transitions are allowed enter: 0 } ); diff --git a/crates/bevy_state/src/state/mod.rs b/crates/bevy_state/src/state/mod.rs --- a/crates/bevy_state/src/state/mod.rs +++ b/crates/bevy_state/src/state/mod.rs @@ -619,4 +616,118 @@ mod tests { 1 ); } + + #[derive(Resource, Default, Debug)] + struct TransitionTracker(Vec<&'static str>); + + #[derive(PartialEq, Eq, Debug, Hash, Clone)] + enum TransitionTestingComputedState { + IsA, + IsBAndEven, + IsBAndOdd, + } + + impl ComputedStates for TransitionTestingComputedState { + type SourceStates = (Option<SimpleState>, Option<SubState>); + + fn compute(sources: (Option<SimpleState>, Option<SubState>)) -> Option<Self> { + match sources { + (Some(simple), sub) => { + if simple == SimpleState::A { + Some(Self::IsA) + } else if sub == Some(SubState::One) { + Some(Self::IsBAndOdd) + } else if sub == Some(SubState::Two) { + Some(Self::IsBAndEven) + } else { + None + } + } + _ => None, + } + } + } + + #[test] + fn check_transition_orders() { + let mut world = World::new(); + setup_state_transitions_in_world(&mut world, None); + EventRegistry::register_event::<StateTransitionEvent<SimpleState>>(&mut world); + EventRegistry::register_event::<StateTransitionEvent<SubState>>(&mut world); + EventRegistry::register_event::<StateTransitionEvent<TransitionTestingComputedState>>( + &mut world, + ); + world.insert_resource(State(SimpleState::B(true))); + world.init_resource::<State<SubState>>(); + world.insert_resource(State(TransitionTestingComputedState::IsA)); + let mut schedules = world.remove_resource::<Schedules>().unwrap(); + let apply_changes = schedules.get_mut(StateTransition).unwrap(); + SimpleState::register_state(apply_changes); + SubState::register_sub_state_systems(apply_changes); + TransitionTestingComputedState::register_computed_state_systems(apply_changes); + + world.init_resource::<TransitionTracker>(); + fn register_transition(string: &'static str) -> impl Fn(ResMut<TransitionTracker>) { + move |mut transitions: ResMut<TransitionTracker>| transitions.0.push(string) + } + + schedules.add_systems( + StateTransition, + register_transition("simple exit").in_set(ExitSchedules::<SimpleState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("simple transition") + .in_set(TransitionSchedules::<SimpleState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("simple enter").in_set(EnterSchedules::<SimpleState>::default()), + ); + + schedules.add_systems( + StateTransition, + register_transition("sub exit").in_set(ExitSchedules::<SubState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("sub transition") + .in_set(TransitionSchedules::<SubState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("sub enter").in_set(EnterSchedules::<SubState>::default()), + ); + + schedules.add_systems( + StateTransition, + register_transition("computed exit") + .in_set(ExitSchedules::<TransitionTestingComputedState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("computed transition") + .in_set(TransitionSchedules::<TransitionTestingComputedState>::default()), + ); + schedules.add_systems( + StateTransition, + register_transition("computed enter") + .in_set(EnterSchedules::<TransitionTestingComputedState>::default()), + ); + + world.insert_resource(schedules); + + world.run_schedule(StateTransition); + + let transitions = &world.resource::<TransitionTracker>().0; + + assert_eq!(transitions.len(), 9); + assert_eq!(transitions[0], "computed exit"); + assert_eq!(transitions[1], "sub exit"); + assert_eq!(transitions[2], "simple exit"); + // Transition order is arbitrary and doesn't need testing. + assert_eq!(transitions[6], "simple enter"); + assert_eq!(transitions[7], "sub enter"); + assert_eq!(transitions[8], "computed enter"); + } }
Ordered `OnExit` and `OnEnter` ## What problem does this solve or what need does it fill? Currently `OnExit` and `OnEnter` aren't ordered in relation to the state dependency graph. This is a problem when parent state transition prepares e.g. resources for substates, but the `OnEnter(Substate)` runs first. ## What solution would you like? - Order `OnExit` to run from graph leaf-states to root-states. - Keep `OnTransition` in arbitrary order. - Order `OnEnter` to run from graph root-states to leaf-states. This can either be done by adding `after` conditions during state installation or as part of `StateRegistry`, a separate feature. ## What alternative(s) have you considered? None that seem reasonable. ## Additional context This could be considered a bug to some degree. [Working example](https://github.com/MiniaczQ/states-ui-test), entering `Settings` will crash or not, depending on the system order that was decided during startup.
Note that the fix with `after` will backfire on custom schedule runners, which while still ordered AFTER their parent states, won't have the ordering to run BEFORE dependent states (since those too use `after` and will only register them after built-in runners) @MiniaczQ @alice-i-cecile - working on a potential solution
2024-06-09T00:47:29Z
1.78
2024-09-07T19:14:03Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "condition::tests::distributive_run_if_compiles", "state::tests::same_state_transition_should_propagate_to_sub_state", "state::tests::same_state_transition_should_emit_event_and_not_run_schedules", "state::tests::computed_state_with_a_single_source_is_correctly_derived", "state::tests::sub_state_exists_only_when_allowed_but_can_be_modified_freely", "state::tests::same_state_transition_should_propagate_to_computed_state", "state::tests::substate_of_computed_states_works_appropriately", "state::tests::complex_computed_state_gets_derived_correctly", "state::tests::computed_state_transitions_are_produced_correctly", "crates/bevy_state/src/state/computed_states.rs - state::computed_states::ComputedStates (line 54)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 36)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 12)", "crates/bevy_state/src/state/resources.rs - state::resources::State (line 23)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 100)", "crates/bevy_state/src/state/sub_states.rs - state::sub_states::SubStates (line 56)", "crates/bevy_state/src/state/resources.rs - state::resources::NextState (line 95)", "crates/bevy_state/src/state/computed_states.rs - state::computed_states::ComputedStates (line 15)", "crates/bevy_state/src/state_scoped.rs - state_scoped::StateScoped (line 20)", "crates/bevy_state/src/condition.rs - condition::state_exists (line 11)", "crates/bevy_state/src/state/states.rs - state::states::States (line 22)", "crates/bevy_state/src/condition.rs - condition::state_changed (line 127)", "crates/bevy_state/src/condition.rs - condition::in_state (line 57)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,762
bevyengine__bevy-13762
[ "13758" ]
93f3432400deab424901c43512e7c174814fa7b1
diff --git a/crates/bevy_app/src/sub_app.rs b/crates/bevy_app/src/sub_app.rs --- a/crates/bevy_app/src/sub_app.rs +++ b/crates/bevy_app/src/sub_app.rs @@ -125,7 +125,9 @@ impl SubApp { } /// Runs the default schedule. - pub fn update(&mut self) { + /// + /// Does not clear internal trackers used for change detection. + pub fn run_default_schedule(&mut self) { if self.is_building_plugins() { panic!("SubApp::update() was called while a plugin was building."); } diff --git a/crates/bevy_app/src/sub_app.rs b/crates/bevy_app/src/sub_app.rs --- a/crates/bevy_app/src/sub_app.rs +++ b/crates/bevy_app/src/sub_app.rs @@ -133,6 +135,11 @@ impl SubApp { if let Some(label) = self.update_schedule { self.world.run_schedule(label); } + } + + /// Runs the default schedule and updates internal component trackers. + pub fn update(&mut self) { + self.run_default_schedule(); self.world.clear_trackers(); } diff --git a/crates/bevy_app/src/sub_app.rs b/crates/bevy_app/src/sub_app.rs --- a/crates/bevy_app/src/sub_app.rs +++ b/crates/bevy_app/src/sub_app.rs @@ -421,7 +428,7 @@ impl SubApps { { #[cfg(feature = "trace")] let _bevy_frame_update_span = info_span!("main app").entered(); - self.main.update(); + self.main.run_default_schedule(); } for (_label, sub_app) in self.sub_apps.iter_mut() { #[cfg(feature = "trace")] diff --git a/crates/bevy_ecs/src/removal_detection.rs b/crates/bevy_ecs/src/removal_detection.rs --- a/crates/bevy_ecs/src/removal_detection.rs +++ b/crates/bevy_ecs/src/removal_detection.rs @@ -116,11 +116,11 @@ impl RemovedComponentEvents { /// /// If you are using `bevy_ecs` as a standalone crate, /// note that the `RemovedComponents` list will not be automatically cleared for you, -/// and will need to be manually flushed using [`World::clear_trackers`](World::clear_trackers) +/// and will need to be manually flushed using [`World::clear_trackers`](World::clear_trackers). /// -/// For users of `bevy` and `bevy_app`, this is automatically done in `bevy_app::App::update`. -/// For the main world, [`World::clear_trackers`](World::clear_trackers) is run after the main schedule is run and after -/// `SubApp`'s have run. +/// For users of `bevy` and `bevy_app`, [`World::clear_trackers`](World::clear_trackers) is +/// automatically called by `bevy_app::App::update` and `bevy_app::SubApp::update`. +/// For the main world, this is delayed until after all `SubApp`s have run. /// /// # Examples /// 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 @@ -1113,9 +1113,9 @@ impl World { /// By clearing this internal state, the world "forgets" about those changes, allowing a new round /// of detection to be recorded. /// - /// When using `bevy_ecs` as part of the full Bevy engine, this method is added as a system to the - /// main app, to run during `Last`, so you don't need to call it manually. When using `bevy_ecs` - /// as a separate standalone crate however, you need to call this manually. + /// When using `bevy_ecs` as part of the full Bevy engine, this method is called automatically + /// by `bevy_app::App::update` and `bevy_app::SubApp::update`, so you don't need to call it manually. + /// When using `bevy_ecs` as a separate standalone crate however, you do need to call this manually. /// /// ``` /// # use bevy_ecs::prelude::*;
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -919,14 +919,21 @@ impl Termination for AppExit { #[cfg(test)] mod tests { - use std::sync::Mutex; - use std::{marker::PhantomData, mem}; - - use bevy_ecs::prelude::{Resource, World}; - use bevy_ecs::world::FromWorld; - use bevy_ecs::{event::EventWriter, schedule::ScheduleLabel, system::Commands}; - - use crate::{App, AppExit, Plugin, Update}; + use std::{iter, marker::PhantomData, mem, sync::Mutex}; + + use bevy_ecs::{ + change_detection::{DetectChanges, ResMut}, + component::Component, + entity::Entity, + event::EventWriter, + query::With, + removal_detection::RemovedComponents, + schedule::{IntoSystemConfigs, ScheduleLabel}, + system::{Commands, Query, Resource}, + world::{FromWorld, World}, + }; + + use crate::{App, AppExit, Plugin, SubApp, Update}; struct PluginA; impl Plugin for PluginA { diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1129,6 +1136,62 @@ mod tests { ); } + #[test] + fn test_update_clears_trackers_once() { + #[derive(Component, Copy, Clone)] + struct Foo; + + let mut app = App::new(); + app.world_mut().spawn_batch(iter::repeat(Foo).take(5)); + + fn despawn_one_foo(mut commands: Commands, foos: Query<Entity, With<Foo>>) { + if let Some(e) = foos.iter().next() { + commands.entity(e).despawn(); + }; + } + fn check_despawns(mut removed_foos: RemovedComponents<Foo>) { + let mut despawn_count = 0; + for _ in removed_foos.read() { + despawn_count += 1; + } + + assert_eq!(despawn_count, 2); + } + + app.add_systems(Update, despawn_one_foo); + app.update(); // Frame 0 + app.update(); // Frame 1 + app.add_systems(Update, check_despawns.after(despawn_one_foo)); + app.update(); // Should see despawns from frames 1 & 2, but not frame 0 + } + + #[test] + fn test_extract_sees_changes() { + use super::AppLabel; + use crate::{self as bevy_app}; + + #[derive(AppLabel, Clone, Copy, Hash, PartialEq, Eq, Debug)] + struct MySubApp; + + #[derive(Resource)] + struct Foo(usize); + + let mut app = App::new(); + app.world_mut().insert_resource(Foo(0)); + app.add_systems(Update, |mut foo: ResMut<Foo>| { + foo.0 += 1; + }); + + let mut sub_app = SubApp::new(); + sub_app.set_extract(|main_world, _sub_world| { + assert!(main_world.get_resource_ref::<Foo>().unwrap().is_changed()); + }); + + app.insert_sub_app(MySubApp, sub_app); + + app.update(); + } + #[test] fn runner_returns_correct_exit_code() { fn raise_exits(mut exits: EventWriter<AppExit>) {
RemovedComponents can miss removals in 0.14.0-rc2 ## Bevy version 0.14.0-rc.2 ## Reproduction Example ``` use bevy::core::{FrameCount, FrameCountPlugin}; use bevy::prelude::*; #[derive(Component)] struct Foo; fn main() { let mut app = App::new(); app.add_plugins(FrameCountPlugin); app.add_systems(Startup, |mut commands: Commands| { for _ in 0..100 { commands.spawn(Foo); } }); app.add_systems(First, |counter: Res<FrameCount>| { println!("Frame {}:", counter.0) }); fn detector_system(mut removals: RemovedComponents<Foo>, foos: Query<Entity, With<Foo>>) { for e in removals.read() { println!(" Detected removed Foo component for {e:?}") } println!(" Total Foos: {}", foos.iter().count()) } fn deleter_system(foos: Query<Entity, With<Foo>>, mut commands: Commands) { foos.iter().next().map(|e| { commands.entity(e).remove::<Foo>(); }); } app.add_systems(Update, (detector_system, deleter_system).chain()); app.update(); app.update(); app.update(); app.update(); } ``` ## Output when using bevy `0.13.2` ``` Frame 0: Total Foos: 100 Frame 1: Detected removed Foo component for 0v1 Total Foos: 99 Frame 2: Detected removed Foo component for 99v1 Total Foos: 98 Frame 3: Detected removed Foo component for 98v1 Total Foos: 97 ``` ## Output when using bevy `0.14.0-rc.2 ``` Frame 0: Total Foos: 100 Frame 1: Total Foos: 99 Frame 2: Total Foos: 98 Frame 3: Total Foos: 97 ``` ## Additional information Swapping the order of `detector_system` and `deleter_system` results in the events showing up as expected. Replacing `remove::<Foo>` with `.despawn()` does not change the outcome.
I believe this is a genuine bug: we changed the backing of RemovedComponents to use double buffered events at some point. It's the weekend right now but bother me if you can't find the PR. Looks like that was back in 0.10 https://github.com/bevyengine/bevy/pull/5680 Great! Can you turn your example into a test and try to bisect the problem?
2024-06-08T23:53:24Z
1.78
2024-06-10T18:21:37Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "app::tests::test_extract_sees_changes", "app::tests::test_update_clears_trackers_once" ]
[ "app::tests::app_exit_size", "app::tests::test_derive_app_label", "plugin_group::tests::add_after", "plugin_group::tests::add_basic_subgroup", "plugin_group::tests::add_before", "app::tests::can_add_twice_the_same_plugin_with_different_type_param", "app::tests::can_add_twice_the_same_plugin_not_unique", "app::tests::can_add_two_plugins", "app::tests::initializing_resources_from_world", "plugin_group::tests::add_conflicting_subgroup", "app::tests::cant_add_twice_the_same_plugin - should panic", "plugin_group::tests::basic_ordering", "app::tests::cant_call_app_run_from_plugin_build - should panic", "plugin_group::tests::readd_after", "plugin_group::tests::readd", "plugin_group::tests::readd_before", "app::tests::test_is_plugin_added_works_during_finish - should panic", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist", "app::tests::runner_returns_correct_exit_code", "app::tests::regression_test_10385", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 18) - compile", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 30) - compile", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 42)", "crates/bevy_app/src/plugin_group.rs - plugin_group::NoopPluginGroup (line 229)", "crates/bevy_app/src/app.rs - app::App::insert_resource (line 352)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 29)", "crates/bevy_app/src/app.rs - app::App::add_event (line 327)", "crates/bevy_app/src/app.rs - app::App (line 56)", "crates/bevy_app/src/app.rs - app::App::add_systems (line 271)", "crates/bevy_app/src/app.rs - app::App::add_plugins (line 524)", "crates/bevy_app/src/app.rs - app::App::set_runner (line 183)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_component (line 722)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_resource (line 760)", "crates/bevy_app/src/app.rs - app::App::init_resource (line 378)", "crates/bevy_app/src/app.rs - app::App::get_added_plugins (line 486)", "crates/bevy_app/src/app.rs - app::App::insert_non_send_resource (line 411)", "crates/bevy_app/src/app.rs - app::App::register_type_data (line 582)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp (line 23)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,727
bevyengine__bevy-13727
[ "13703" ]
401234a5fb6865ea9ddd5740d47e13d022959fef
diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -52,6 +52,9 @@ pub trait MapEntities { /// /// More generally, this can be used to map [`Entity`] references between any two [`Worlds`](World). /// +/// Note that this trait is _not_ [object safe](https://doc.rust-lang.org/reference/items/traits.html#object-safety). +/// Please see [`DynEntityMapper`] for an object safe alternative. +/// /// ## Example /// /// ``` diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -68,11 +71,55 @@ pub trait MapEntities { /// fn map_entity(&mut self, entity: Entity) -> Entity { /// self.map.get(&entity).copied().unwrap_or(entity) /// } +/// +/// fn mappings(&self) -> impl Iterator<Item = (Entity, Entity)> { +/// self.map.iter().map(|(&source, &target)| (source, target)) +/// } /// } /// ``` pub trait EntityMapper { /// Map an entity to another entity fn map_entity(&mut self, entity: Entity) -> Entity; + + /// Iterate over all entity to entity mappings. + /// + /// # Examples + /// + /// ```rust + /// # use bevy_ecs::entity::{Entity, EntityMapper}; + /// # fn example(mapper: impl EntityMapper) { + /// for (source, target) in mapper.mappings() { + /// println!("Will map from {source} to {target}"); + /// } + /// # } + /// ``` + fn mappings(&self) -> impl Iterator<Item = (Entity, Entity)>; +} + +/// An [object safe](https://doc.rust-lang.org/reference/items/traits.html#object-safety) version +/// of [`EntityMapper`]. This trait is automatically implemented for type that implements `EntityMapper`. +pub trait DynEntityMapper { + /// Map an entity to another entity. + /// + /// This is an [object safe](https://doc.rust-lang.org/reference/items/traits.html#object-safety) + /// alternative to [`EntityMapper::map_entity`]. + fn dyn_map_entity(&mut self, entity: Entity) -> Entity; + + /// Iterate over all entity to entity mappings. + /// + /// This is an [object safe](https://doc.rust-lang.org/reference/items/traits.html#object-safety) + /// alternative to [`EntityMapper::mappings`]. + fn dyn_mappings(&self) -> Vec<(Entity, Entity)>; +} + +impl<T: EntityMapper> DynEntityMapper for T { + fn dyn_map_entity(&mut self, entity: Entity) -> Entity { + <T as EntityMapper>::map_entity(self, entity) + } + + fn dyn_mappings(&self) -> Vec<(Entity, Entity)> { + <T as EntityMapper>::mappings(self).collect() + } } impl EntityMapper for SceneEntityMapper<'_> { diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -95,6 +142,10 @@ impl EntityMapper for SceneEntityMapper<'_> { new } + + fn mappings(&self) -> impl Iterator<Item = (Entity, Entity)> { + self.map.iter().map(|(&source, &target)| (source, target)) + } } /// A wrapper for [`EntityHashMap<Entity>`], augmenting it with the ability to allocate new [`Entity`] references in a destination diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -23,6 +23,8 @@ pub mod syncunsafecell; mod cow_arc; mod default; +mod object_safe; +pub use object_safe::assert_object_safe; mod once; mod parallel_queue; diff --git /dev/null b/crates/bevy_utils/src/object_safe.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_utils/src/object_safe.rs @@ -0,0 +1,30 @@ +/// Assert that a given `T` is [object safe](https://doc.rust-lang.org/reference/items/traits.html#object-safety). +/// Will fail to compile if that is not the case. +/// +/// # Examples +/// +/// ```rust +/// # use bevy_utils::assert_object_safe; +/// // Concrete types are always object safe +/// struct MyStruct; +/// assert_object_safe::<MyStruct>(); +/// +/// // Trait objects are where that safety comes into question. +/// // This trait is object safe... +/// trait ObjectSafe { } +/// assert_object_safe::<dyn ObjectSafe>(); +/// ``` +/// +/// ```compile_fail +/// # use bevy_utils::assert_object_safe; +/// // ...but this trait is not. +/// trait NotObjectSafe { +/// const VALUE: usize; +/// } +/// assert_object_safe::<dyn NotObjectSafe>(); +/// // Error: the trait `NotObjectSafe` cannot be made into an object +/// ``` +pub fn assert_object_safe<T: ?Sized>() { + // This space is left intentionally blank. The type parameter T is sufficient to induce a compiler + // error without a function body. +}
diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -171,10 +222,12 @@ impl<'m> SceneEntityMapper<'m> { #[cfg(test)] mod tests { + use crate::entity::DynEntityMapper; use crate::{ entity::{Entity, EntityHashMap, EntityMapper, SceneEntityMapper}, world::World, }; + use bevy_utils::assert_object_safe; #[test] fn entity_mapper() { diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -220,4 +273,29 @@ mod tests { assert_eq!(entity.index(), dead_ref.index()); assert!(entity.generation() > dead_ref.generation()); } + + #[test] + fn entity_mapper_iteration() { + let mut old_world = World::new(); + let mut new_world = World::new(); + + let mut map = EntityHashMap::default(); + let mut mapper = SceneEntityMapper::new(&mut map, &mut new_world); + + assert_eq!(mapper.mappings().collect::<Vec<_>>(), vec![]); + + let old_entity = old_world.spawn_empty().id(); + + let new_entity = mapper.map_entity(old_entity); + + assert_eq!( + mapper.mappings().collect::<Vec<_>>(), + vec![(old_entity, new_entity)] + ); + } + + #[test] + fn dyn_entity_mapper_object_safe() { + assert_object_safe::<dyn DynEntityMapper>(); + } } diff --git a/crates/bevy_ecs/src/label.rs b/crates/bevy_ecs/src/label.rs --- a/crates/bevy_ecs/src/label.rs +++ b/crates/bevy_ecs/src/label.rs @@ -197,3 +197,19 @@ macro_rules! define_label { $crate::intern::Interner::new(); }; } + +#[cfg(test)] +mod tests { + use super::{DynEq, DynHash}; + use bevy_utils::assert_object_safe; + + #[test] + fn dyn_eq_object_safe() { + assert_object_safe::<dyn DynEq>(); + } + + #[test] + fn dyn_hash_object_safe() { + assert_object_safe::<dyn DynHash>(); + } +}
Provide `entities_iter()` on `EntityMapper` to get an iterator of foreign entities ## What problem does this solve or what need does it fill? I want to get a list of all the entities that an `EntityMapper` is tracking. If we have a concrete hash map this is easy, but in generic code we have to work with the trait. ## What solution would you like? Add a new function to `EntityMapper` (returning `Vec` rather than `impl Iterator` for trait object reasons) ```rust fn entities(&self) -> Vec<(Entity, Entity)>; ``` ## What alternative(s) have you considered? Add a separate trait with this function. This would reduce breakage by not requiring the ecosystem to immediately implement a new function.
2024-06-07T01:18:07Z
1.78
2024-06-08T13:07:34Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "change_detection::tests::as_deref_mut", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_recursive", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::change_tick_wraparound", "change_detection::tests::mut_new", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_expiration", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::test_event_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_construction", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::read_all_access_conflicts", "query::access::tests::filtered_combined_access", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_components", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_transmute", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_with_without_static", "query::fetch::tests::world_query_phantom_data", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_changed", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_generalize_with_option", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::iter::tests::query_sorts", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_added", "query::state::tests::join", "query::state::tests::join_with_get", "query::tests::has_query", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::multi_storage_query", "query::tests::any_query", "query::tests::query", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::tests::many_entities", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations_sparse", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_system_set", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::waiting_never_run", "schedule::tests::stepping::simple_executor", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::unknown_schedule", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "schedule::tests::system_ambiguity::nonsend", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_vec::tests::aligned_zst", "storage::sparse_set::tests::sparse_sets", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::resize_test", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "system::builder::tests::local_builder", "system::builder::tests::multi_param_builder", "storage::table::tests::table", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::builder::tests::query_builder", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::commands::tests::append", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::stepping::tests::verify_cursor", "system::commands::tests::remove_components", "schedule::tests::system_ordering::order_exclusive_systems", "system::commands::tests::commands", "schedule::tests::conditions::systems_nested_in_system_sets", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::conditions::multiple_conditions_on_system", "system::commands::tests::remove_resources", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::function_system::tests::into_system_type_id_consistency", "schedule::stepping::tests::step_run_if_false", "schedule::schedule::tests::add_systems_to_existing_schedule", "system::system::tests::command_processing", "system::commands::tests::remove_components_by_id", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::system::tests::non_send_resources", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_const_generics", "system::system::tests::run_two_systems", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::tests::conditions::systems_with_distributive_condition", "system::system::tests::run_system_once", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::condition::tests::run_condition_combinators", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::configure_set_on_new_schedule", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_field_limit", "event::tests::test_event_iter_nth", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::set::tests::test_schedule_label", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::non_sync_local", "system::system_param::tests::system_param_struct_variants", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_private_fields", "schedule::schedule::tests::inserts_a_sync_point", "system::system_param::tests::system_param_where_clause", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_param::tests::param_set_non_send_second", "system::system_param::tests::param_set_non_send_first", "schedule::condition::tests::run_condition", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "schedule::tests::system_ambiguity::read_only", "system::system_registry::tests::output_values", "system::system_registry::tests::nested_systems", "query::tests::par_iter_mut_change_detection", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_and_without", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::assert_systems", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "event::tests::test_events_par_iter", "system::tests::conflicting_query_immut_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::convert_mut_to_immut", "system::tests::conflicting_query_sets_system - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::tests::system_ordering::order_systems", "system::tests::commands_param_set", "system::tests::immutable_mut_test", "system::tests::option_has_no_filter_with - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::local_system", "system::tests::disjoint_query_mut_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::into_iter_impl", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::long_life_test", "system::tests::non_send_option_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::non_send_system", "system::tests::changed_resource_system", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::nonconflicting_system_resources", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::simple_system", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::query_set_system", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::or_with_without_and_compatible_with_without", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::system_state_change_detection", "system::tests::or_expanded_with_and_without_common", "system::tests::system_state_invalid_world - should panic", "system::tests::panic_inside_system - should panic", "tests::changed_query", "tests::added_queries", "tests::add_remove_components", "system::tests::update_archetype_component_access_works", "tests::added_tracking", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::write_system_state", "system::tests::or_has_filter_with", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::or_has_filter_with_when_both_have_it", "tests::bundle_derive", "system::tests::or_param_set_system", "system::tests::world_collections_system", "system::tests::test_combinator_clone", "tests::despawn_table_storage", "tests::empty_spawn", "tests::despawn_mixed_storage", "tests::changed_trackers", "tests::exact_size_query", "tests::clear_entities", "tests::filtered_query_access", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_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::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse", "tests::non_send_resource_panic - should panic", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_missing_component", "tests::par_for_each_dense", "tests::par_for_each_sparse", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_table", "tests::query_get", "tests::query_optional_component_sparse_no_match", "tests::query_single_component", "tests::query_single_component_for_each", "tests::query_sparse_component", "tests::random_access", "tests::remove_missing", "tests::ref_and_mut_query_panic - should panic", "tests::remove", "tests::reserve_and_spawn", "tests::resource_scope", "tests::remove_tracking", "tests::resource", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "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", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "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_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "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::retain_nothing", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::inspect_entity_components", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1062) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 935) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 943) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 130) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail", "crates/bevy_ecs/src/component.rs - component::StorageType (line 172)", "crates/bevy_ecs/src/component.rs - component::Component (line 105)", "crates/bevy_ecs/src/component.rs - component::Component (line 40)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 752)", "crates/bevy_ecs/src/component.rs - component::Component (line 86)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1078)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1208)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "crates/bevy_ecs/src/component.rs - component::Component (line 140)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 571)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 544)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "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/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1194)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 56)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 190)", "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/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/event.rs - event::Events (line 135)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 181)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 514)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 568)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 205)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 595)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 871)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 753)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1648)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 548)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 621)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 745)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/event.rs - event::ManualEventReader (line 638)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1625)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 422)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 293) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 765)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/event.rs - event::EventReader<'w,'s,E>::par_read (line 466)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 333)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 706)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 673)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 727)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 357)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 735)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 356)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 298)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 265)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 221)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 38)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemBuilder (line 12)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 607)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 708)", "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<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 777)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 476)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 653)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 291)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 372)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 113)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 211)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 329)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 455) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 410)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 453)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 568)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 537)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1507) - compile fail", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 1057)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 252)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1330)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 466)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 542)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1483)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 233)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 42)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 452)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 662)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 276)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 189)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 872)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1187)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 744)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 57)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1080)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 925)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1034)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 180)", "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/function_system.rs - system::function_system::SystemParamFunction (line 618)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 231)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 837)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 971)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "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>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 260)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 113) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1508)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 749)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1318)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 142)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 222)", "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>::get (line 822)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 726)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 46)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1551)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 343)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 222)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 181)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 869)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 314)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 198)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1647)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1590)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1120)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1670)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 255)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1504)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1563)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1475)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1623)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 378)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 190)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 76)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1530)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1702)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 269)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1371)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 426)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1445)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1727)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1419)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 322)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 296)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1078)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1025)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 356)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 523)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1046)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 786)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 404)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2315)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 395)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 558)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 817)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2337)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 680)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 728)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1723)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2414)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 593)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 438)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2092)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 875)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 908)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1835)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 999)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 449)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1217)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1186)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2672)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1150)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,706
bevyengine__bevy-13706
[ "13646" ]
b17292f9d11cf3d3fb4a2fb3e3324fb80afd8c88
diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -197,12 +197,26 @@ impl MapInfo { #[macro_export] macro_rules! hash_error { ( $key:expr ) => {{ - let type_name = match (*$key).get_represented_type_info() { - None => "Unknown", - Some(s) => s.type_path(), - }; - format!("the given key {} does not support hashing", type_name).as_str() - }}; + let type_path = (*$key).reflect_type_path(); + if !$key.is_dynamic() { + format!( + "the given key of type `{}` does not support hashing", + type_path + ) + } else { + match (*$key).get_represented_type_info() { + // Handle dynamic types that do not represent a type (i.e a plain `DynamicStruct`): + None => format!("the dynamic type `{}` does not support hashing", type_path), + // Handle dynamic types that do represent a type (i.e. a `DynamicStruct` proxying `Foo`): + Some(s) => format!( + "the dynamic type `{}` (representing `{}`) does not support hashing", + type_path, + s.type_path() + ), + } + } + .as_str() + }} } /// An ordered mapping between reflected values.
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -596,6 +596,7 @@ mod tests { any::TypeId, borrow::Cow, fmt::{Debug, Formatter}, + hash::Hash, marker::PhantomData, }; diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -756,7 +757,9 @@ mod tests { } #[test] - #[should_panic(expected = "the given key bevy_reflect::tests::Foo does not support hashing")] + #[should_panic( + expected = "the given key of type `bevy_reflect::tests::Foo` does not support hashing" + )] fn reflect_map_no_hash() { #[derive(Reflect)] struct Foo { diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -764,11 +767,50 @@ mod tests { } let foo = Foo { a: 1 }; + assert!(foo.reflect_hash().is_none()); let mut map = DynamicMap::default(); map.insert(foo, 10u32); } + #[test] + #[should_panic( + expected = "the dynamic type `bevy_reflect::DynamicStruct` (representing `bevy_reflect::tests::Foo`) does not support hashing" + )] + fn reflect_map_no_hash_dynamic_representing() { + #[derive(Reflect, Hash)] + #[reflect(Hash)] + struct Foo { + a: u32, + } + + let foo = Foo { a: 1 }; + assert!(foo.reflect_hash().is_some()); + let dynamic = foo.clone_dynamic(); + + let mut map = DynamicMap::default(); + map.insert(dynamic, 11u32); + } + + #[test] + #[should_panic( + expected = "the dynamic type `bevy_reflect::DynamicStruct` does not support hashing" + )] + fn reflect_map_no_hash_dynamic() { + #[derive(Reflect, Hash)] + #[reflect(Hash)] + struct Foo { + a: u32, + } + + let mut dynamic = DynamicStruct::default(); + dynamic.insert("a", 4u32); + assert!(dynamic.reflect_hash().is_none()); + + let mut map = DynamicMap::default(); + map.insert(dynamic, 11u32); + } + #[test] fn reflect_ignore() { #[derive(Reflect)]
Panic "the given key does not support hashing" should indicate the type. The reflection panic "the given key does not support hashing" raised by insert_boxed needs to indicate the type that it is trying to use as a key. Otherwise, it is difficult to track down the source of the panic.
Hi, Im new to rust and bevy, in this particular issue I managed to figure that we need the debug msg to be more descriptive. However I cant seem what exactly keeps track of the type. Any advice?
2024-06-06T07:36:57Z
1.78
2024-06-10T12:20:23Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "tests::reflect_map_no_hash - should panic", "tests::reflect_map_no_hash_dynamic - should panic", "tests::reflect_map_no_hash_dynamic_representing - should panic" ]
[ "array::tests::next_index_increment", "attributes::tests::should_allow_unit_struct_attribute_values", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_apply", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::enum_should_set", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "impls::smol_str::tests::should_partial_eq_smolstr", "enums::tests::should_skip_ignored_fields", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::path_should_from_reflect", "impls::std::tests::can_serialize_duration", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "list::tests::test_into_iter", "map::tests::next_index_increment", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::parsed_path_get_field", "path::tests::reflect_path", "serde::de::tests::should_deserialize_value", "tests::as_reflect", "tests::assert_impl_reflect_macro_on_all", "serde::ser::tests::enum_should_serialize", "serde::de::tests::should_deserialized_typed", "serde::ser::tests::should_serialize_dynamic_option", "struct_trait::tests::next_index_increment", "tests::custom_debug_function", "serde::de::tests::enum_should_deserialize", "tests::docstrings::should_not_contain_docs", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::should_serialize_self_describing_binary", "serde::ser::tests::should_serialize", "tests::docstrings::variants_should_contain_docs", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::docstrings::fields_should_contain_docs", "tests::from_reflect_should_use_default_field_attributes", "serde::ser::tests::should_serialize_option", "tests::from_reflect_should_use_default_container_attribute", "serde::de::tests::should_deserialize_non_self_describing_binary", "tests::docstrings::should_contain_docs", "tests::glam::vec3_apply_dynamic", "serde::tests::test_serialization_struct", "tests::from_reflect_should_allow_ignored_unnamed_fields", "serde::de::tests::should_deserialize_option", "serde::tests::should_roundtrip_proxied_dynamic", "tests::can_opt_out_type_path", "tests::glam::vec3_field_access", "tests::into_reflect", "tests::glam::vec3_path_access", "tests::dynamic_types_debug_format", "tests::multiple_reflect_lists", "tests::reflect_downcast", "serde::tests::test_serialization_tuple_struct", "tests::multiple_reflect_value_lists", "tests::recursive_typed_storage_does_not_hang", "tests::glam::quat_serialization", "serde::de::tests::should_deserialize_self_describing_binary", "tests::glam::vec3_deserialization", "tests::reflect_ignore", "serde::de::tests::should_deserialize", "tests::reflect_complex_patch", "tests::not_dynamic_names", "serde::de::tests::should_reserialize", "tests::reflect_map", "tests::recursive_registration_does_not_hang", "tests::glam::quat_deserialization", "tests::reflect_take", "tests::glam::vec3_serialization", "tests::reflect_struct", "tests::reflect_type_path", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::should_allow_custom_where_with_assoc_type", "tests::should_allow_dynamic_fields", "tests::reflect_type_info", "tests::should_allow_empty_custom_where", "tests::should_allow_multiple_custom_where", "tests::should_drain_fields", "tests::should_permit_higher_ranked_lifetimes", "tests::should_not_auto_register_existing_types", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_call_from_reflect_dynamically", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::try_apply_should_detect_kinds", "tests::std_type_paths", "tests::should_auto_register_fields", "tuple_struct::tests::next_index_increment", "tests::should_reflect_debug", "tests::reflect_serialize", "type_registry::test::test_reflect_from_ptr", "tuple::tests::next_index_increment", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 43)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 30)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 22)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 12)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 61)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 53)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/lib.rs - (line 296)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 171)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 131)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 26)", "crates/bevy_reflect/src/lib.rs - (line 39)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 189)", "crates/bevy_reflect/src/lib.rs - (line 142)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 95)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 339)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 315)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 546)", "crates/bevy_reflect/src/lib.rs - (line 177)", "crates/bevy_reflect/src/lib.rs - (line 85)", "crates/bevy_reflect/src/lib.rs - (line 156)", "crates/bevy_reflect/src/lib.rs - (line 106)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 27)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 159)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 484)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 61)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/lib.rs - (line 314)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 181)", "crates/bevy_reflect/src/list.rs - list::List (line 37)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 81)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 211)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/lib.rs - (line 191)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 145)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/lib.rs - (line 275)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 451)", "crates/bevy_reflect/src/array.rs - array::Array (line 30)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 510)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 651)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 24)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 327)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 238)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 461)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 67)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 122)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 462)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/lib.rs - (line 247)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 145)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "crates/bevy_reflect/src/lib.rs - (line 216)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 320)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 373)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 453)", "crates/bevy_reflect/src/lib.rs - (line 357)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,691
bevyengine__bevy-13691
[ "13646" ]
519abbca1141bf904695b1c0cf4184addc6883c5
diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -194,7 +194,16 @@ impl MapInfo { } } -const HASH_ERROR: &str = "the given key does not support hashing"; +#[macro_export] +macro_rules! hash_error { + ( $key:expr ) => {{ + let type_name = match (*$key).get_represented_type_info() { + None => "Unknown", + Some(s) => s.type_path(), + }; + format!("the given key {} does not support hashing", type_name).as_str() + }}; +} /// An ordered mapping between reflected values. #[derive(Default)] diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -233,13 +242,13 @@ impl DynamicMap { impl Map for DynamicMap { fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect> { self.indices - .get(&key.reflect_hash().expect(HASH_ERROR)) + .get(&key.reflect_hash().expect(hash_error!(key))) .map(|index| &*self.values.get(*index).unwrap().1) } fn get_mut(&mut self, key: &dyn Reflect) -> Option<&mut dyn Reflect> { self.indices - .get(&key.reflect_hash().expect(HASH_ERROR)) + .get(&key.reflect_hash().expect(hash_error!(key))) .cloned() .map(move |index| &mut *self.values.get_mut(index).unwrap().1) } diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -285,7 +294,10 @@ impl Map for DynamicMap { key: Box<dyn Reflect>, mut value: Box<dyn Reflect>, ) -> Option<Box<dyn Reflect>> { - match self.indices.entry(key.reflect_hash().expect(HASH_ERROR)) { + match self + .indices + .entry(key.reflect_hash().expect(hash_error!(key))) + { Entry::Occupied(entry) => { let (_old_key, old_value) = self.values.get_mut(*entry.get()).unwrap(); std::mem::swap(old_value, &mut value); diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -302,7 +314,7 @@ impl Map for DynamicMap { fn remove(&mut self, key: &dyn Reflect) -> Option<Box<dyn Reflect>> { let index = self .indices - .remove(&key.reflect_hash().expect(HASH_ERROR))?; + .remove(&key.reflect_hash().expect(hash_error!(key)))?; let (_key, value) = self.values.remove(index); Some(value) }
diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -756,7 +756,7 @@ mod tests { } #[test] - #[should_panic(expected = "the given key does not support hashing")] + #[should_panic(expected = "the given key bevy_reflect::tests::Foo does not support hashing")] fn reflect_map_no_hash() { #[derive(Reflect)] struct Foo {
Panic "the given key does not support hashing" should indicate the type. The reflection panic "the given key does not support hashing" raised by insert_boxed needs to indicate the type that it is trying to use as a key. Otherwise, it is difficult to track down the source of the panic.
Hi, Im new to rust and bevy, in this particular issue I managed to figure that we need the debug msg to be more descriptive. However I cant seem what exactly keeps track of the type. Any advice?
2024-06-05T19:05:50Z
1.78
2024-06-06T15:08:29Z
3a04d38832fc5ed31526c83b0a19a52faf2063bd
[ "tests::reflect_map_no_hash - should panic" ]
[ "array::tests::next_index_increment", "attributes::tests::should_allow_unit_struct_attribute_values", "attributes::tests::should_debug_custom_attributes", "attributes::tests::should_accept_last_attribute", "attributes::tests::should_derive_custom_attributes_on_enum_variant_fields", "attributes::tests::should_derive_custom_attributes_on_enum_container", "attributes::tests::should_derive_custom_attributes_on_enum_variants", "attributes::tests::should_derive_custom_attributes_on_struct_fields", "attributes::tests::should_derive_custom_attributes_on_struct_container", "attributes::tests::should_derive_custom_attributes_on_tuple_container", "attributes::tests::should_derive_custom_attributes_on_tuple_struct_fields", "attributes::tests::should_get_custom_attribute", "attributes::tests::should_get_custom_attribute_dynamically", "enums::enum_trait::tests::next_index_increment", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_apply", "enums::tests::enum_should_allow_generics", "enums::tests::enum_should_iterate_fields", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::enum_try_apply_should_detect_type_mismatch", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::next_index_increment", "list::tests::test_into_iter", "map::tests::next_index_increment", "map::tests::test_into_iter", "map::tests::test_map_get_at", "map::tests::test_map_get_at_mut", "path::parse::test::parse_invalid", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "struct_trait::tests::next_index_increment", "tests::assert_impl_reflect_macro_on_all", "tests::custom_debug_function", "tests::docstrings::should_contain_docs", "tests::docstrings::fields_should_contain_docs", "serde::de::tests::should_deserialize_value", "tests::as_reflect", "tests::docstrings::should_not_contain_docs", "serde::de::tests::should_deserialized_typed", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::from_reflect_should_use_default_container_attribute", "tests::docstrings::variants_should_contain_docs", "serde::ser::tests::enum_should_serialize", "serde::ser::tests::should_serialize_self_describing_binary", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::from_reflect_should_use_default_field_attributes", "serde::ser::tests::should_serialize_option", "serde::de::tests::enum_should_deserialize", "tests::can_opt_out_type_path", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::should_serialize_dynamic_option", "tests::glam::vec3_field_access", "serde::de::tests::should_deserialize_option", "serde::de::tests::should_deserialize_non_self_describing_binary", "tests::glam::vec3_path_access", "tests::glam::vec3_apply_dynamic", "tests::dynamic_types_debug_format", "tests::multiple_reflect_lists", "serde::ser::tests::should_serialize", "serde::tests::should_roundtrip_proxied_dynamic", "serde::tests::test_serialization_struct", "tests::into_reflect", "tests::multiple_reflect_value_lists", "tests::glam::quat_serialization", "serde::de::tests::should_deserialize", "serde::tests::test_serialization_tuple_struct", "tests::reflect_downcast", "tests::recursive_registration_does_not_hang", "tests::glam::quat_deserialization", "tests::glam::vec3_deserialization", "tests::not_dynamic_names", "tests::recursive_typed_storage_does_not_hang", "serde::de::tests::should_deserialize_self_describing_binary", "tests::reflect_complex_patch", "tests::reflect_ignore", "tests::glam::vec3_serialization", "tests::reflect_struct", "tests::reflect_map", "tests::reflect_take", "tests::reflect_unit_struct", "serde::de::tests::should_reserialize", "tests::reflect_type_path", "tests::reflect_type_info", "tests::should_allow_custom_where_with_assoc_type", "tests::should_allow_custom_where", "tests::should_allow_empty_custom_where", "tests::should_allow_dynamic_fields", "tests::should_allow_multiple_custom_where", "tests::should_drain_fields", "tests::should_permit_higher_ranked_lifetimes", "tests::should_not_auto_register_existing_types", "tests::reflect_serialize", "tests::should_call_from_reflect_dynamically", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_auto_register_fields", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "tests::try_apply_should_detect_kinds", "tests::should_reflect_debug", "tests::std_type_paths", "tuple::tests::next_index_increment", "tuple_struct::tests::next_index_increment", "type_registry::test::test_reflect_from_ptr", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 30)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 53)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 43)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 12)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 22)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 61)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 26)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 131)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/lib.rs - (line 296)", "crates/bevy_reflect/src/lib.rs - (line 39)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 171)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 24)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 23)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 95)", "crates/bevy_reflect/src/lib.rs - (line 191)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 61)", "crates/bevy_reflect/src/lib.rs - (line 142)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 461)", "crates/bevy_reflect/src/attributes.rs - attributes::CustomAttributes (line 15)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 189)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 327)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 451)", "crates/bevy_reflect/src/lib.rs - (line 106)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 159)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 81)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/lib.rs - (line 177)", "crates/bevy_reflect/src/array.rs - array::Array (line 30)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/lib.rs - (line 216)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 27)", "crates/bevy_reflect/src/lib.rs - (line 314)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 127)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 122)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "crates/bevy_reflect/src/list.rs - list::List (line 37)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 145)", "crates/bevy_reflect/src/lib.rs - (line 275)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 462)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/lib.rs - (line 156)", "crates/bevy_reflect/src/lib.rs - (line 247)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 238)", "crates/bevy_reflect/src/lib.rs - (line 85)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 315)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 348)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 510)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 546)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 145)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 373)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 181)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 250)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 339)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 67)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 484)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 211)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 320)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 651)", "crates/bevy_reflect/src/lib.rs - (line 357)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 453)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,650
bevyengine__bevy-13650
[ "10958" ]
cca4fc76de29762d313d6bc567ae709445b24c27
diff --git a/crates/bevy_ecs/src/reflect/map_entities.rs b/crates/bevy_ecs/src/reflect/map_entities.rs --- a/crates/bevy_ecs/src/reflect/map_entities.rs +++ b/crates/bevy_ecs/src/reflect/map_entities.rs @@ -73,3 +73,34 @@ impl<C: Component + MapEntities> FromType<C> for ReflectMapEntities { } } } + +/// For a specific type of resource, this maps any fields with values of type [`Entity`] to a new world. +/// Since a given `Entity` ID is only valid for the world it came from, when performing deserialization +/// any stored IDs need to be re-allocated in the destination world. +/// +/// See [`SceneEntityMapper`] and [`MapEntities`] for more information. +#[derive(Clone)] +pub struct ReflectMapEntitiesResource { + map_entities: fn(&mut World, &mut SceneEntityMapper), +} + +impl ReflectMapEntitiesResource { + /// A method for applying [`MapEntities`] behavior to elements in an [`EntityHashMap<Entity>`]. + pub fn map_entities(&self, world: &mut World, entity_map: &mut EntityHashMap<Entity>) { + SceneEntityMapper::world_scope(entity_map, world, |world, mapper| { + (self.map_entities)(world, mapper); + }); + } +} + +impl<R: crate::system::Resource + MapEntities> FromType<R> for ReflectMapEntitiesResource { + fn from_type() -> Self { + ReflectMapEntitiesResource { + map_entities: |world, entity_mapper| { + if let Some(mut resource) = world.get_resource_mut::<R>() { + resource.map_entities(entity_mapper); + } + }, + } + } +} diff --git a/crates/bevy_ecs/src/reflect/mod.rs b/crates/bevy_ecs/src/reflect/mod.rs --- a/crates/bevy_ecs/src/reflect/mod.rs +++ b/crates/bevy_ecs/src/reflect/mod.rs @@ -19,7 +19,7 @@ pub use bundle::{ReflectBundle, ReflectBundleFns}; pub use component::{ReflectComponent, ReflectComponentFns}; pub use entity_commands::ReflectCommandExt; pub use from_world::{ReflectFromWorld, ReflectFromWorldFns}; -pub use map_entities::ReflectMapEntities; +pub use map_entities::{ReflectMapEntities, ReflectMapEntitiesResource}; pub use resource::{ReflectResource, ReflectResourceFns}; /// A [`Resource`] storing [`TypeRegistry`] for 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 @@ -11,7 +11,7 @@ use bevy_utils::TypeIdMap; #[cfg(feature = "serialize")] use crate::serde::SceneSerializer; use bevy_asset::Asset; -use bevy_ecs::reflect::ReflectResource; +use bevy_ecs::reflect::{ReflectMapEntitiesResource, ReflectResource}; #[cfg(feature = "serialize")] use serde::Serialize; 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 @@ -71,28 +71,6 @@ impl DynamicScene { ) -> Result<(), SceneSpawnError> { let type_registry = type_registry.read(); - for resource in &self.resources { - let type_info = resource.get_represented_type_info().ok_or_else(|| { - SceneSpawnError::NoRepresentedType { - type_path: resource.reflect_type_path().to_string(), - } - })?; - let registration = type_registry.get(type_info.type_id()).ok_or_else(|| { - SceneSpawnError::UnregisteredButReflectedType { - type_path: type_info.type_path().to_string(), - } - })?; - let reflect_resource = registration.data::<ReflectResource>().ok_or_else(|| { - SceneSpawnError::UnregisteredResource { - type_path: type_info.type_path().to_string(), - } - })?; - - // If the world already contains an instance of the given resource - // just apply the (possibly) new value, otherwise insert the resource - reflect_resource.apply_or_insert(world, &**resource, &type_registry); - } - // For each component types that reference other entities, we keep track // of which entities in the scene use that component. // This is so we can update the scene-internal references to references 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 @@ -153,6 +131,35 @@ impl DynamicScene { } } + // Insert resources after all entities have been added to the world. + // This ensures the entities are available for the resources to reference during mapping. + for resource in &self.resources { + let type_info = resource.get_represented_type_info().ok_or_else(|| { + SceneSpawnError::NoRepresentedType { + type_path: resource.reflect_type_path().to_string(), + } + })?; + let registration = type_registry.get(type_info.type_id()).ok_or_else(|| { + SceneSpawnError::UnregisteredButReflectedType { + type_path: type_info.type_path().to_string(), + } + })?; + let reflect_resource = registration.data::<ReflectResource>().ok_or_else(|| { + SceneSpawnError::UnregisteredResource { + type_path: type_info.type_path().to_string(), + } + })?; + + // If the world already contains an instance of the given resource + // just apply the (possibly) new value, otherwise insert the resource + reflect_resource.apply_or_insert(world, &**resource, &type_registry); + + // Map entities in the resource if it implements [`MapEntities`]. + if let Some(map_entities_reflect) = registration.data::<ReflectMapEntitiesResource>() { + map_entities_reflect.map_entities(world, entity_map); + } + } + Ok(()) }
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 @@ -198,12 +205,68 @@ where #[cfg(test)] mod tests { - use bevy_ecs::entity::EntityHashMap; + use bevy_ecs::entity::{Entity, EntityHashMap, EntityMapper, MapEntities}; + 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_reflect::Reflect; use crate::dynamic_scene_builder::DynamicSceneBuilder; + #[derive(Resource, Reflect, Debug)] + #[reflect(Resource, MapEntitiesResource)] + struct TestResource { + entity_a: Entity, + entity_b: Entity, + } + + impl MapEntities for TestResource { + fn map_entities<M: EntityMapper>(&mut self, entity_mapper: &mut M) { + self.entity_a = entity_mapper.map_entity(self.entity_a); + self.entity_b = entity_mapper.map_entity(self.entity_b); + } + } + + #[test] + fn resource_entity_map_maps_entities() { + let type_registry = AppTypeRegistry::default(); + type_registry.write().register::<TestResource>(); + + let mut source_world = World::new(); + source_world.insert_resource(type_registry.clone()); + + let original_entity_a = source_world.spawn_empty().id(); + let original_entity_b = source_world.spawn_empty().id(); + + source_world.insert_resource(TestResource { + entity_a: original_entity_a, + entity_b: original_entity_b, + }); + + // Write the scene. + let scene = DynamicSceneBuilder::from_world(&source_world) + .extract_resources() + .extract_entity(original_entity_a) + .extract_entity(original_entity_b) + .build(); + + let mut entity_map = EntityHashMap::default(); + let mut destination_world = World::new(); + destination_world.insert_resource(type_registry); + + scene + .write_to_world(&mut destination_world, &mut entity_map) + .unwrap(); + + let &from_entity_a = entity_map.get(&original_entity_a).unwrap(); + let &from_entity_b = entity_map.get(&original_entity_b).unwrap(); + + let test_resource = destination_world.get_resource::<TestResource>().unwrap(); + assert_eq!(from_entity_a, test_resource.entity_a); + assert_eq!(from_entity_b, test_resource.entity_b); + } + #[test] fn components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map() { // Testing that scene reloading applies EntityMap correctly to MapEntities components.
`ReflectMapEntities` on Resources ## Bevy version `0.12.1` ## What you did ```rust #[derive(Resource, Reflect, Clone, Default)] #[reflect(Resource, MapEntities)] pub struct MyResource { entity: Entity } impl MapEntities for MyResource { fn map_entities(&mut self, entity_mapper: &mut EntityMapper) { *self.entity = entity_mapper.get_or_reserve(self.entity); } } ``` ## What went wrong ``` error[E0277]: the trait bound `app::MyResource: bevy::prelude::Component` is not satisfied --> src/main.rs:20:20 | 500 | #[derive(Resource, Reflect, Clone, Default)] | ^^^^^^^ the trait `bevy::prelude::Component` is not implemented for `app::MyResource` | = help: the following other types implement trait `bevy::prelude::Component`: AccessibilityNode bevy::prelude::Name GlobalTransform Transform Children SceneInstance Parent and 170 others = note: required for `ReflectMapEntities` to implement `FromType<app::MyResource>` = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ## Additional Information Looks like this is caused by `ReflectMapEntities` having a Component bound on `FromType`.
I believe a workaround would be to derive `Component` in addition to `Resource`, this should still work with `bevy_scene`'s implementation of `MapEntities`. I was just looking at this wrt. `DynamicScene`, which is missing the implementation to call `map_entities` for `Resource`s implementing the trait. Given the scene serializes with this information, and nothing prevents resources including entities, it'd be nice to add this. For now, I'm considering: 1. Extending `DynamicScene` with an extra method I can use to perform this extra step. 2. Converting my resource to a sparse-set component 🙈 For context, I'm trying to use `bevy_save` or `moonshine_save`, which leverage `DynamicScene` but also don't cover this gap. So I'll probably choose option 2 😅 This seems like a footgun. At the moment you can extract resources with entities and even force the compiler to accept reflect(MapEntities) on a resource by making it also a component, but there is no map_entities call for resources when inserted into a world.
2024-06-03T15:18:37Z
1.77
2024-06-03T20:51:57Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_one_resource_twice", "scene_filter::tests::should_remove_from_list", "scene_filter::tests::should_add_to_list", "dynamic_scene_builder::tests::should_extract_allowed_resources", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "scene_filter::tests::should_set_list_type_if_none", "dynamic_scene_builder::tests::remove_componentless_entity", "dynamic_scene_builder::tests::should_not_extract_denied_resources", "dynamic_scene_builder::tests::extract_query", "dynamic_scene_builder::tests::should_not_extract_denied_components", "dynamic_scene_builder::tests::should_extract_allowed_components", "scene_spawner::tests::clone_dynamic_entities", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::should_roundtrip_bincode", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_serialize", "serde::tests::should_deserialize", "serde::tests::should_roundtrip_with_later_generations_and_obsolete_references", "scene_spawner::tests::event", "scene_spawner::tests::despawn_scene", "bundle::tests::spawn_and_delete", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 297)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 40)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 220)", "crates/bevy_scene/src/serde.rs - serde::SceneSerializer (line 38)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,465
bevyengine__bevy-13465
[ "13445" ]
a785e3c20dce1dfe822084f00be02641382a1a35
diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -27,6 +27,7 @@ mod folder; mod handle; mod id; mod loader; +mod loader_builders; mod path; mod reflect; mod server; diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -40,6 +41,9 @@ pub use futures_lite::{AsyncReadExt, AsyncWriteExt}; pub use handle::*; pub use id::*; pub use loader::*; +pub use loader_builders::{ + DirectNestedLoader, NestedLoader, UntypedDirectNestedLoader, UntypedNestedLoader, +}; pub use path::*; pub use reflect::*; pub use server::*; diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -1,12 +1,10 @@ use crate::{ io::{AssetReaderError, MissingAssetSourceError, MissingProcessedAssetReaderError, Reader}, - meta::{ - loader_settings_meta_transform, meta_transform_settings, AssetHash, AssetMeta, - AssetMetaDyn, ProcessedInfoMinimal, Settings, - }, + loader_builders::NestedLoader, + meta::{AssetHash, AssetMeta, AssetMetaDyn, ProcessedInfoMinimal, Settings}, path::AssetPath, - Asset, AssetLoadError, AssetServer, AssetServerMode, Assets, Handle, LoadedUntypedAsset, - UntypedAssetId, UntypedHandle, + Asset, AssetLoadError, AssetServer, AssetServerMode, Assets, Handle, UntypedAssetId, + UntypedHandle, }; use bevy_ecs::world::World; use bevy_utils::{BoxedFuture, ConditionalSendFuture, CowArc, HashMap, HashSet}; diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -310,14 +308,14 @@ pub enum DeserializeMetaError { /// A context that provides access to assets in [`AssetLoader`]s, tracks dependencies, and collects asset load state. /// Any asset state accessed by [`LoadContext`] will be tracked and stored for use in dependency events and asset preprocessing. pub struct LoadContext<'a> { - asset_server: &'a AssetServer, - should_load_dependencies: bool, + pub(crate) asset_server: &'a AssetServer, + pub(crate) should_load_dependencies: bool, populate_hashes: bool, asset_path: AssetPath<'static>, - dependencies: HashSet<UntypedAssetId>, + pub(crate) dependencies: HashSet<UntypedAssetId>, /// Direct dependencies used by this loader. - loader_dependencies: HashMap<AssetPath<'static>, AssetHash>, - labeled_assets: HashMap<CowArc<'static, str>, LabeledAsset>, + pub(crate) loader_dependencies: HashMap<AssetPath<'static>, AssetHash>, + pub(crate) labeled_assets: HashMap<CowArc<'static, str>, LabeledAsset>, } impl<'a> LoadContext<'a> { diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -503,57 +501,6 @@ impl<'a> LoadContext<'a> { Ok(bytes) } - /// Retrieves a handle for the asset at the given path and adds that path as a dependency of the asset. - /// If the current context is a normal [`AssetServer::load`], an actual asset load will be kicked off immediately, which ensures the load happens - /// as soon as possible. - /// "Normal loads" kicked from within a normal Bevy App will generally configure the context to kick off loads immediately. - /// If the current context is configured to not load dependencies automatically (ex: [`AssetProcessor`](crate::processor::AssetProcessor)), - /// a load will not be kicked off automatically. It is then the calling context's responsibility to begin a load if necessary. - pub fn load<'b, A: Asset>(&mut self, path: impl Into<AssetPath<'b>>) -> Handle<A> { - let path = path.into().to_owned(); - let handle = if self.should_load_dependencies { - self.asset_server.load(path) - } else { - self.asset_server.get_or_create_path_handle(path, None) - }; - self.dependencies.insert(handle.id().untyped()); - handle - } - - /// Retrieves a handle for the asset at the given path and adds that path as a dependency of the asset without knowing its type. - pub fn load_untyped<'b>( - &mut self, - path: impl Into<AssetPath<'b>>, - ) -> Handle<LoadedUntypedAsset> { - let path = path.into().to_owned(); - let handle = if self.should_load_dependencies { - self.asset_server.load_untyped(path) - } else { - self.asset_server.get_or_create_path_handle(path, None) - }; - self.dependencies.insert(handle.id().untyped()); - handle - } - - /// Loads the [`Asset`] of type `A` at the given `path` with the given [`AssetLoader::Settings`] settings `S`. This is a "deferred" - /// load. If the settings type `S` does not match the settings expected by `A`'s asset loader, an error will be printed to the log - /// and the asset load will fail. - pub fn load_with_settings<'b, A: Asset, S: Settings + Default>( - &mut self, - path: impl Into<AssetPath<'b>>, - settings: impl Fn(&mut S) + Send + Sync + 'static, - ) -> Handle<A> { - let path = path.into(); - let handle = if self.should_load_dependencies { - self.asset_server.load_with_settings(path.clone(), settings) - } else { - self.asset_server - .get_or_create_path_handle(path, Some(loader_settings_meta_transform(settings))) - }; - self.dependencies.insert(handle.id().untyped()); - handle - } - /// Returns a handle to an asset of type `A` with the label `label`. This [`LoadContext`] must produce an asset of the /// given type and the given label or the dependencies of this asset will never be considered "fully loaded". However you /// can call this method before _or_ after adding the labeled asset. diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -567,7 +514,7 @@ impl<'a> LoadContext<'a> { handle } - async fn load_direct_untyped_internal( + pub(crate) async fn load_direct_internal( &mut self, path: AssetPath<'static>, meta: Box<dyn AssetMetaDyn>, diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -598,223 +545,22 @@ impl<'a> LoadContext<'a> { Ok(loaded_asset) } - async fn load_direct_internal<A: Asset>( - &mut self, - path: AssetPath<'static>, - meta: Box<dyn AssetMetaDyn>, - loader: &dyn ErasedAssetLoader, - reader: &mut Reader<'_>, - ) -> Result<LoadedAsset<A>, LoadDirectError> { - self.load_direct_untyped_internal(path.clone(), meta, loader, &mut *reader) - .await - .and_then(move |untyped_asset| { - untyped_asset.downcast::<A>().map_err(|_| LoadDirectError { - dependency: path.clone(), - error: AssetLoadError::RequestedHandleTypeMismatch { - path, - requested: TypeId::of::<A>(), - actual_asset_name: loader.asset_type_name(), - loader_name: loader.type_name(), - }, - }) - }) - } - - async fn load_direct_untyped_with_transform( - &mut self, - path: AssetPath<'static>, - meta_transform: impl FnOnce(&mut dyn AssetMetaDyn), - ) -> Result<ErasedLoadedAsset, LoadDirectError> { - let (mut meta, loader, mut reader) = self - .asset_server - .get_meta_loader_and_reader(&path, None) - .await - .map_err(|error| LoadDirectError { - dependency: path.clone(), - error, - })?; - meta_transform(&mut *meta); - self.load_direct_untyped_internal(path.clone(), meta, &*loader, &mut *reader) - .await - } - - async fn load_direct_with_transform<A: Asset>( - &mut self, - path: AssetPath<'static>, - meta_transform: impl FnOnce(&mut dyn AssetMetaDyn), - ) -> Result<LoadedAsset<A>, LoadDirectError> { - let (mut meta, loader, mut reader) = self - .asset_server - .get_meta_loader_and_reader(&path, Some(TypeId::of::<A>())) - .await - .map_err(|error| LoadDirectError { - dependency: path.clone(), - error, - })?; - meta_transform(&mut *meta); - self.load_direct_internal(path.clone(), meta, &*loader, &mut *reader) - .await - } - - /// Loads the asset at the given `path` directly. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset. For example, if you are - /// deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. - /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct<'b, A: Asset>( - &mut self, - path: impl Into<AssetPath<'b>>, - ) -> Result<LoadedAsset<A>, LoadDirectError> { - self.load_direct_with_transform(path.into().into_owned(), |_| {}) - .await + /// Create a builder for loading nested assets in this context. + #[must_use] + pub fn loader(&mut self) -> NestedLoader<'a, '_> { + NestedLoader::new(self) } - /// Loads the asset at the given `path` directly. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset. For example, if you are - /// deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. - /// - /// If the settings type `S` does not match the settings expected by `A`'s asset loader, an error will be printed to the log - /// and the asset load will fail. - /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct_with_settings<'b, A: Asset, S: Settings + Default>( - &mut self, - path: impl Into<AssetPath<'b>>, - settings: impl Fn(&mut S) + Send + Sync + 'static, - ) -> Result<LoadedAsset<A>, LoadDirectError> { - self.load_direct_with_transform(path.into().into_owned(), move |meta| { - meta_transform_settings(meta, &settings); - }) - .await - } - - /// Loads the asset at the given `path` directly. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset. For example, if you are - /// deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. - /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct_untyped<'b>( - &mut self, - path: impl Into<AssetPath<'b>>, - ) -> Result<ErasedLoadedAsset, LoadDirectError> { - self.load_direct_untyped_with_transform(path.into().into_owned(), |_| {}) - .await - } - - /// Loads the asset at the given `path` directly from the provided `reader`. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset, and that value comes from your [`Reader`]. - /// For example, if you are deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. - /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct_with_reader<'b, A: Asset>( - &mut self, - reader: &mut Reader<'_>, - path: impl Into<AssetPath<'b>>, - ) -> Result<LoadedAsset<A>, LoadDirectError> { - let path = path.into().into_owned(); - - let loader = self - .asset_server - .get_asset_loader_with_asset_type::<A>() - .await - .map_err(|error| LoadDirectError { - dependency: path.clone(), - error: error.into(), - })?; - - let meta = loader.default_meta(); - - self.load_direct_internal(path, meta, &*loader, reader) - .await - } - - /// Loads the asset at the given `path` directly from the provided `reader`. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset, and that value comes from your [`Reader`]. - /// For example, if you are deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. - /// - /// If the settings type `S` does not match the settings expected by `A`'s asset loader, an error will be printed to the log - /// and the asset load will fail. - /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct_with_reader_and_settings<'b, A: Asset, S: Settings + Default>( - &mut self, - reader: &mut Reader<'_>, - path: impl Into<AssetPath<'b>>, - settings: impl Fn(&mut S) + Send + Sync + 'static, - ) -> Result<LoadedAsset<A>, LoadDirectError> { - let path = path.into().into_owned(); - - let loader = self - .asset_server - .get_asset_loader_with_asset_type::<A>() - .await - .map_err(|error| LoadDirectError { - dependency: path.clone(), - error: error.into(), - })?; - - let mut meta = loader.default_meta(); - meta_transform_settings(&mut *meta, &settings); - - self.load_direct_internal(path, meta, &*loader, reader) - .await - } - - /// Loads the asset at the given `path` directly from the provided `reader`. This is an async function that will wait until the asset is fully loaded before - /// returning. Use this if you need the _value_ of another asset in order to load the current asset, and that value comes from your [`Reader`]. - /// For example, if you are deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a - /// "load dependency". - /// - /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, - /// changing a "load dependency" will result in re-processing of the asset. + /// Retrieves a handle for the asset at the given path and adds that path as a dependency of the asset. + /// If the current context is a normal [`AssetServer::load`], an actual asset load will be kicked off immediately, which ensures the load happens + /// as soon as possible. + /// "Normal loads" kicked from within a normal Bevy App will generally configure the context to kick off loads immediately. + /// If the current context is configured to not load dependencies automatically (ex: [`AssetProcessor`](crate::processor::AssetProcessor)), + /// a load will not be kicked off automatically. It is then the calling context's responsibility to begin a load if necessary. /// - /// [`Process`]: crate::processor::Process - /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave - pub async fn load_direct_untyped_with_reader<'b>( - &mut self, - reader: &mut Reader<'_>, - path: impl Into<AssetPath<'b>>, - ) -> Result<ErasedLoadedAsset, LoadDirectError> { - let path = path.into().into_owned(); - - let loader = self - .asset_server - .get_path_asset_loader(&path) - .await - .map_err(|error| LoadDirectError { - dependency: path.clone(), - error: error.into(), - })?; - - let meta = loader.default_meta(); - - self.load_direct_untyped_internal(path, meta, &*loader, reader) - .await + /// If you need to override asset settings, asset type, or load directly, please see [`LoadContext::loader`]. + pub fn load<'b, A: Asset>(&mut self, path: impl Into<AssetPath<'b>>) -> Handle<A> { + self.loader().load(path) } } diff --git /dev/null b/crates/bevy_asset/src/loader_builders.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_asset/src/loader_builders.rs @@ -0,0 +1,305 @@ +//! Implementations of the builder-pattern used for loading dependent assets via +//! [`LoadContext::loader`]. + +use crate::{ + io::Reader, + meta::{meta_transform_settings, AssetMetaDyn, MetaTransform, Settings}, + Asset, AssetLoadError, AssetPath, ErasedAssetLoader, ErasedLoadedAsset, Handle, LoadContext, + LoadDirectError, LoadedAsset, LoadedUntypedAsset, +}; +use std::any::TypeId; +use std::sync::Arc; + +// Utility type for handling the sources of reader references +enum ReaderRef<'a, 'b> { + Borrowed(&'a mut Reader<'b>), + Boxed(Box<Reader<'b>>), +} + +impl<'a, 'b> ReaderRef<'a, 'b> { + pub fn as_mut(&mut self) -> &mut Reader { + match self { + ReaderRef::Borrowed(r) => r, + ReaderRef::Boxed(b) => &mut *b, + } + } +} + +/// A builder for loading nested assets inside a `LoadContext`. +/// +/// # Lifetimes +/// - `ctx`: the lifetime of the associated [`AssetServer`] reference +/// - `builder`: the lifetime of the temporary builder structs +pub struct NestedLoader<'ctx, 'builder> { + load_context: &'builder mut LoadContext<'ctx>, + meta_transform: Option<MetaTransform>, + asset_type_id: Option<TypeId>, +} + +impl<'ctx, 'builder> NestedLoader<'ctx, 'builder> { + pub(crate) fn new( + load_context: &'builder mut LoadContext<'ctx>, + ) -> NestedLoader<'ctx, 'builder> { + NestedLoader { + load_context, + meta_transform: None, + asset_type_id: None, + } + } + + fn with_transform( + mut self, + transform: impl Fn(&mut dyn AssetMetaDyn) + Send + Sync + 'static, + ) -> Self { + if let Some(prev_transform) = self.meta_transform { + self.meta_transform = Some(Box::new(move |meta| { + prev_transform(meta); + transform(meta); + })); + } else { + self.meta_transform = Some(Box::new(transform)); + } + self + } + + /// Configure the settings used to load the asset. + /// + /// If the settings type `S` does not match the settings expected by `A`'s asset loader, an error will be printed to the log + /// and the asset load will fail. + #[must_use] + pub fn with_settings<S: Settings>( + self, + settings: impl Fn(&mut S) + Send + Sync + 'static, + ) -> Self { + self.with_transform(move |meta| meta_transform_settings(meta, &settings)) + } + + /// Specify the output asset type. + #[must_use] + pub fn with_asset_type<A: Asset>(mut self) -> Self { + self.asset_type_id = Some(TypeId::of::<A>()); + self + } + + /// Specify the output asset type. + #[must_use] + pub fn with_asset_type_id(mut self, asset_type_id: TypeId) -> Self { + self.asset_type_id = Some(asset_type_id); + self + } + + /// Load assets directly, rather than creating handles. + #[must_use] + pub fn direct<'c>(self) -> DirectNestedLoader<'ctx, 'builder, 'c> { + DirectNestedLoader { + base: self, + reader: None, + } + } + + /// Load assets without static type information. + /// + /// If you need to specify the type of asset, but cannot do it statically, + /// use `.with_asset_type_id()`. + #[must_use] + pub fn untyped(self) -> UntypedNestedLoader<'ctx, 'builder> { + UntypedNestedLoader { base: self } + } + + /// Retrieves a handle for the asset at the given path and adds that path as a dependency of the asset. + /// If the current context is a normal [`AssetServer::load`], an actual asset load will be kicked off immediately, which ensures the load happens + /// as soon as possible. + /// "Normal loads" kicked from within a normal Bevy App will generally configure the context to kick off loads immediately. + /// If the current context is configured to not load dependencies automatically (ex: [`AssetProcessor`](crate::processor::AssetProcessor)), + /// a load will not be kicked off automatically. It is then the calling context's responsibility to begin a load if necessary. + pub fn load<'c, A: Asset>(self, path: impl Into<AssetPath<'c>>) -> Handle<A> { + let path = path.into().to_owned(); + let handle = if self.load_context.should_load_dependencies { + self.load_context + .asset_server + .load_with_meta_transform(path, self.meta_transform) + } else { + self.load_context + .asset_server + .get_or_create_path_handle(path, None) + }; + self.load_context.dependencies.insert(handle.id().untyped()); + handle + } +} + +/// A builder for loading untyped nested assets inside a [`LoadContext`]. +/// +/// # Lifetimes +/// - `ctx`: the lifetime of the associated [`AssetServer`] reference +/// - `builder`: the lifetime of the temporary builder structs +pub struct UntypedNestedLoader<'ctx, 'builder> { + base: NestedLoader<'ctx, 'builder>, +} + +impl<'ctx, 'builder> UntypedNestedLoader<'ctx, 'builder> { + /// Retrieves a handle for the asset at the given path and adds that path as a dependency of the asset without knowing its type. + pub fn load<'p>(self, path: impl Into<AssetPath<'p>>) -> Handle<LoadedUntypedAsset> { + let path = path.into().to_owned(); + let handle = if self.base.load_context.should_load_dependencies { + self.base + .load_context + .asset_server + .load_untyped_with_meta_transform(path, self.base.meta_transform) + } else { + self.base + .load_context + .asset_server + .get_or_create_path_handle(path, self.base.meta_transform) + }; + self.base + .load_context + .dependencies + .insert(handle.id().untyped()); + handle + } +} + +/// A builder for directly loading nested assets inside a `LoadContext`. +/// +/// # Lifetimes +/// - `ctx`: the lifetime of the associated [`AssetServer`] reference +/// - `builder`: the lifetime of the temporary builder structs +/// - `reader`: the lifetime of the [`Reader`] reference used to read the asset data +pub struct DirectNestedLoader<'ctx, 'builder, 'reader> { + base: NestedLoader<'ctx, 'builder>, + reader: Option<&'builder mut Reader<'reader>>, +} + +impl<'ctx: 'reader, 'builder, 'reader> DirectNestedLoader<'ctx, 'builder, 'reader> { + /// Specify the reader to use to read the asset data. + #[must_use] + pub fn with_reader(mut self, reader: &'builder mut Reader<'reader>) -> Self { + self.reader = Some(reader); + self + } + + /// Load the asset without providing static type information. + /// + /// If you need to specify the type of asset, but cannot do it statically, + /// use `.with_asset_type_id()`. + #[must_use] + pub fn untyped(self) -> UntypedDirectNestedLoader<'ctx, 'builder, 'reader> { + UntypedDirectNestedLoader { base: self } + } + + async fn load_internal( + self, + path: &AssetPath<'static>, + ) -> Result<(Arc<dyn ErasedAssetLoader>, ErasedLoadedAsset), LoadDirectError> { + let (mut meta, loader, mut reader) = if let Some(reader) = self.reader { + let loader = if let Some(asset_type_id) = self.base.asset_type_id { + self.base + .load_context + .asset_server + .get_asset_loader_with_asset_type_id(asset_type_id) + .await + .map_err(|error| LoadDirectError { + dependency: path.clone(), + error: error.into(), + })? + } else { + self.base + .load_context + .asset_server + .get_path_asset_loader(path) + .await + .map_err(|error| LoadDirectError { + dependency: path.clone(), + error: error.into(), + })? + }; + let meta = loader.default_meta(); + (meta, loader, ReaderRef::Borrowed(reader)) + } else { + let (meta, loader, reader) = self + .base + .load_context + .asset_server + .get_meta_loader_and_reader(path, self.base.asset_type_id) + .await + .map_err(|error| LoadDirectError { + dependency: path.clone(), + error, + })?; + (meta, loader, ReaderRef::Boxed(reader)) + }; + + if let Some(meta_transform) = self.base.meta_transform { + meta_transform(&mut *meta); + } + + let asset = self + .base + .load_context + .load_direct_internal(path.clone(), meta, &*loader, reader.as_mut()) + .await?; + Ok((loader, asset)) + } + + /// Loads the asset at the given `path` directly. This is an async function that will wait until the asset is fully loaded before + /// returning. Use this if you need the _value_ of another asset in order to load the current asset. For example, if you are + /// deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a + /// "load dependency". + /// + /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, + /// changing a "load dependency" will result in re-processing of the asset. + /// + /// [`Process`]: crate::processor::Process + /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave + pub async fn load<'p, A: Asset>( + mut self, + path: impl Into<AssetPath<'p>>, + ) -> Result<LoadedAsset<A>, LoadDirectError> { + self.base.asset_type_id = Some(TypeId::of::<A>()); + let path = path.into().into_owned(); + self.load_internal(&path) + .await + .and_then(move |(loader, untyped_asset)| { + untyped_asset.downcast::<A>().map_err(|_| LoadDirectError { + dependency: path.clone(), + error: AssetLoadError::RequestedHandleTypeMismatch { + path, + requested: TypeId::of::<A>(), + actual_asset_name: loader.asset_type_name(), + loader_name: loader.type_name(), + }, + }) + }) + } +} + +/// A builder for directly loading untyped nested assets inside a `LoadContext`. +/// +/// # Lifetimes +/// - `ctx`: the lifetime of the associated [`AssetServer`] reference +/// - `builder`: the lifetime of the temporary builder structs +/// - `reader`: the lifetime of the [`Reader`] reference used to read the asset data +pub struct UntypedDirectNestedLoader<'ctx, 'builder, 'reader> { + base: DirectNestedLoader<'ctx, 'builder, 'reader>, +} + +impl<'ctx: 'reader, 'builder, 'reader> UntypedDirectNestedLoader<'ctx, 'builder, 'reader> { + /// Loads the asset at the given `path` directly. This is an async function that will wait until the asset is fully loaded before + /// returning. Use this if you need the _value_ of another asset in order to load the current asset. For example, if you are + /// deriving a new asset from the referenced asset, or you are building a collection of assets. This will add the `path` as a + /// "load dependency". + /// + /// If the current loader is used in a [`Process`] "asset preprocessor", such as a [`LoadTransformAndSave`] preprocessor, + /// changing a "load dependency" will result in re-processing of the asset. + /// + /// [`Process`]: crate::processor::Process + /// [`LoadTransformAndSave`]: crate::processor::LoadTransformAndSave + pub async fn load<'p>( + self, + path: impl Into<AssetPath<'p>>, + ) -> Result<ErasedLoadedAsset, LoadDirectError> { + let path = path.into().into_owned(); + self.base.load_internal(&path).await.map(|(_, asset)| asset) + } +} diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -285,7 +285,7 @@ impl AssetServer { self.load_with_meta_transform(path, Some(loader_settings_meta_transform(settings))) } - fn load_with_meta_transform<'a, A: Asset>( + pub(crate) fn load_with_meta_transform<'a, A: Asset>( &self, path: impl Into<AssetPath<'a>>, meta_transform: Option<MetaTransform>, diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -324,30 +324,11 @@ impl AssetServer { self.load_internal(None, path, false, None).await } - /// Load an asset without knowing its type. The method returns a handle to a [`LoadedUntypedAsset`]. - /// - /// Once the [`LoadedUntypedAsset`] is loaded, an untyped handle for the requested path can be - /// retrieved from it. - /// - /// ``` - /// use bevy_asset::{Assets, Handle, LoadedUntypedAsset}; - /// use bevy_ecs::system::{Res, Resource}; - /// - /// #[derive(Resource)] - /// struct LoadingUntypedHandle(Handle<LoadedUntypedAsset>); - /// - /// fn resolve_loaded_untyped_handle(loading_handle: Res<LoadingUntypedHandle>, loaded_untyped_assets: Res<Assets<LoadedUntypedAsset>>) { - /// if let Some(loaded_untyped_asset) = loaded_untyped_assets.get(&loading_handle.0) { - /// let handle = loaded_untyped_asset.handle.clone(); - /// // continue working with `handle` which points to the asset at the originally requested path - /// } - /// } - /// ``` - /// - /// This indirection enables a non blocking load of an untyped asset, since I/O is - /// required to figure out the asset type before a handle can be created. - #[must_use = "not using the returned strong handle may result in the unexpected release of the assets"] - pub fn load_untyped<'a>(&self, path: impl Into<AssetPath<'a>>) -> Handle<LoadedUntypedAsset> { + pub(crate) fn load_untyped_with_meta_transform<'a>( + &self, + path: impl Into<AssetPath<'a>>, + meta_transform: Option<MetaTransform>, + ) -> Handle<LoadedUntypedAsset> { let path = path.into().into_owned(); let untyped_source = AssetSourceId::Name(match path.source() { AssetSourceId::Default => CowArc::Borrowed(UNTYPED_SOURCE_SUFFIX), diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -362,7 +343,7 @@ impl AssetServer { .get_or_create_path_handle::<LoadedUntypedAsset>( path.clone().with_source(untyped_source), HandleLoadingMode::Request, - None, + meta_transform, ); if !should_load { return handle; diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -393,10 +374,36 @@ impl AssetServer { } }) .detach(); - handle } + /// Load an asset without knowing its type. The method returns a handle to a [`LoadedUntypedAsset`]. + /// + /// Once the [`LoadedUntypedAsset`] is loaded, an untyped handle for the requested path can be + /// retrieved from it. + /// + /// ``` + /// use bevy_asset::{Assets, Handle, LoadedUntypedAsset}; + /// use bevy_ecs::system::{Res, Resource}; + /// + /// #[derive(Resource)] + /// struct LoadingUntypedHandle(Handle<LoadedUntypedAsset>); + /// + /// fn resolve_loaded_untyped_handle(loading_handle: Res<LoadingUntypedHandle>, loaded_untyped_assets: Res<Assets<LoadedUntypedAsset>>) { + /// if let Some(loaded_untyped_asset) = loaded_untyped_assets.get(&loading_handle.0) { + /// let handle = loaded_untyped_asset.handle.clone(); + /// // continue working with `handle` which points to the asset at the originally requested path + /// } + /// } + /// ``` + /// + /// This indirection enables a non blocking load of an untyped asset, since I/O is + /// required to figure out the asset type before a handle can be created. + #[must_use = "not using the returned strong handle may result in the unexpected release of the assets"] + pub fn load_untyped<'a>(&self, path: impl Into<AssetPath<'a>>) -> Handle<LoadedUntypedAsset> { + self.load_untyped_with_meta_transform(path, None) + } + /// Performs an async asset load. /// /// `input_handle` must only be [`Some`] if `should_load` was true when retrieving `input_handle`. This is an optimization to diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -342,12 +342,13 @@ async fn load_gltf<'a, 'b, 'c>( path, is_srgb, sampler_descriptor, - } => { - load_context.load_with_settings(path, move |settings: &mut ImageLoaderSettings| { + } => load_context + .loader() + .with_settings(move |settings: &mut ImageLoaderSettings| { settings.is_srgb = is_srgb; settings.sampler = ImageSampler::Descriptor(sampler_descriptor.clone()); }) - } + .load(path), }; handles.push(handle); } diff --git a/examples/asset/asset_decompression.rs b/examples/asset/asset_decompression.rs --- a/examples/asset/asset_decompression.rs +++ b/examples/asset/asset_decompression.rs @@ -72,7 +72,11 @@ impl AssetLoader for GzAssetLoader { let mut reader = VecReader::new(bytes_uncompressed); let uncompressed = load_context - .load_direct_untyped_with_reader(&mut reader, contained_path) + .loader() + .direct() + .with_reader(&mut reader) + .untyped() + .load(contained_path) .await?; Ok(GzAsset { uncompressed }) diff --git a/examples/asset/processing/asset_processing.rs b/examples/asset/processing/asset_processing.rs --- a/examples/asset/processing/asset_processing.rs +++ b/examples/asset/processing/asset_processing.rs @@ -146,14 +146,21 @@ impl AssetLoader for CoolTextLoader { let ron: CoolTextRon = ron::de::from_bytes(&bytes)?; let mut base_text = ron.text; for embedded in ron.embedded_dependencies { - let loaded = load_context.load_direct::<Text>(&embedded).await?; + let loaded = load_context + .loader() + .direct() + .load::<Text>(&embedded) + .await?; base_text.push_str(&loaded.get().0); } for (path, settings_override) in ron.dependencies_with_settings { let loaded = load_context - .load_direct_with_settings::<Text, _>(&path, move |settings| { + .loader() + .with_settings(move |settings| { *settings = settings_override.clone(); }) + .direct() + .load::<Text>(&path) .await?; base_text.push_str(&loaded.get().0); }
diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -511,7 +515,9 @@ mod tests { let mut embedded = String::new(); for dep in ron.embedded_dependencies { let loaded = load_context - .load_direct::<CoolText>(&dep) + .loader() + .direct() + .load::<CoolText>(&dep) .await .map_err(|_| Self::Error::CannotLoadDependency { dependency: dep.into(),
Add a builder API to `LoadContext` Future Work: The `LoadContext` _really_ needs a builder API: - `load` - `load_untyped` - `load_with_settings` - `load_direct` - `load_direct_untyped` - `load_direct_with_reader` - `load_direct_with_settings` - `load_direct_untyped_with_reader` - `load_direct_with_reader_and_settings` I feel like calling `context.loader().direct().typed::<A>().with_settings(...).load(...)` is much friendlier to code completion, and would allow for documentation on each of the individual options in the API. _Originally posted by @bushrat011899 in https://github.com/bevyengine/bevy/pull/13415#discussion_r1606121632_
2024-05-21T22:31:56Z
1.77
2024-05-22T23:51:17Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "assets::test::asset_index_round_trip", "handle::tests::conversion", "handle::tests::equality", "handle::tests::hashing", "handle::tests::ordering", "id::tests::conversion", "id::tests::equality", "id::tests::hashing", "id::tests::ordering", "io::embedded::tests::embedded_asset_path_from_external_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_is_ambiguous", "io::embedded::tests::embedded_asset_path_from_external_crate_root_src_path", "io::embedded::tests::embedded_asset_path_from_local_crate", "io::embedded::tests::embedded_asset_path_from_local_crate_blank_src_path_questionable", "io::embedded::tests::embedded_asset_path_from_external_crate_extraneous_beginning_slashes - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_bad_src - should panic", "io::embedded::tests::embedded_asset_path_from_local_example_crate", "path::tests::parse_asset_path", "path::tests::test_resolve_asset_source", "path::tests::test_get_extension", "path::tests::test_resolve_absolute", "path::tests::test_resolve_canonicalize", "path::tests::test_parent", "path::tests::test_resolve_canonicalize_with_source", "path::tests::test_resolve_canonicalize_base", "io::memory::test::memory_dir", "path::tests::test_resolve_explicit_relative", "path::tests::test_resolve_full", "path::tests::test_resolve_implicit_relative", "path::tests::test_resolve_insufficient_elements", "path::tests::test_resolve_label", "path::tests::test_resolve_trailing_slash", "path::tests::test_with_source", "path::tests::test_without_label", "server::loaders::tests::basic", "server::loaders::tests::ambiguity_resolution", "server::loaders::tests::extension_resolution", "server::loaders::tests::path_resolution", "server::loaders::tests::type_resolution_shadow", "server::loaders::tests::total_resolution", "server::loaders::tests::type_resolution", "tests::failure_load_states", "tests::load_folder", "tests::keep_gotten_strong_handles", "tests::manual_asset_management", "tests::load_dependencies", "crates/bevy_asset/src/reflect.rs - reflect::ReflectAsset::get_unchecked_mut (line 65) - compile", "crates/bevy_asset/src/reflect.rs - reflect::ReflectHandle (line 182) - compile", "crates/bevy_asset/src/io/embedded/mod.rs - io::embedded::embedded_asset (line 182) - compile", "crates/bevy_asset/src/path.rs - path::AssetPath (line 24) - compile", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve_embed (line 390)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve (line 340)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,451
bevyengine__bevy-13451
[ "13407" ]
5a1c62faae54bae1291c6f80898f29153faa0979
diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -143,6 +143,35 @@ impl Dir2 { pub const fn as_vec2(&self) -> Vec2 { self.0 } + + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// + /// # Example + /// + /// ``` + /// # use bevy_math::Dir2; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// let dir1 = Dir2::X; + /// let dir2 = Dir2::Y; + /// + /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// assert_relative_eq!(result1, Dir2::from_xy(0.75_f32.sqrt(), 0.5).unwrap()); + /// + /// let result2 = dir1.slerp(dir2, 0.5); + /// assert_relative_eq!(result2, Dir2::from_xy(0.5_f32.sqrt(), 0.5_f32.sqrt()).unwrap()); + /// ``` + #[inline] + pub fn slerp(self, rhs: Self, s: f32) -> Self { + let angle = self.angle_between(rhs.0); + Rotation2d::radians(angle * s) * self + } } impl TryFrom<Vec2> for Dir2 { diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -307,6 +336,39 @@ impl Dir3 { pub const fn as_vec3(&self) -> Vec3 { self.0 } + + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// + /// # Example + /// + /// ``` + /// # use bevy_math::Dir3; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// let dir1 = Dir3::X; + /// let dir2 = Dir3::Y; + /// + /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// assert_relative_eq!( + /// result1, + /// Dir3::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), + /// epsilon = 0.000001 + /// ); + /// + /// let result2 = dir1.slerp(dir2, 0.5); + /// assert_relative_eq!(result2, Dir3::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); + /// ``` + #[inline] + pub fn slerp(self, rhs: Self, s: f32) -> Self { + let quat = Quat::IDENTITY.slerp(Quat::from_rotation_arc(self.0, rhs.0), s); + Dir3(quat.mul_vec3(self.0)) + } } impl TryFrom<Vec3> for Dir3 { diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -474,6 +536,42 @@ impl Dir3A { pub const fn as_vec3a(&self) -> Vec3A { self.0 } + + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// + /// # Example + /// + /// ``` + /// # use bevy_math::Dir3A; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// let dir1 = Dir3A::X; + /// let dir2 = Dir3A::Y; + /// + /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// assert_relative_eq!( + /// result1, + /// Dir3A::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), + /// epsilon = 0.000001 + /// ); + /// + /// let result2 = dir1.slerp(dir2, 0.5); + /// assert_relative_eq!(result2, Dir3A::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); + /// ``` + #[inline] + pub fn slerp(self, rhs: Self, s: f32) -> Self { + let quat = Quat::IDENTITY.slerp( + Quat::from_rotation_arc(Vec3::from(self.0), Vec3::from(rhs.0)), + s, + ); + Dir3A(quat.mul_vec3a(self.0)) + } } impl From<Dir3> for Dir3A {
diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -582,6 +680,7 @@ impl approx::UlpsEq for Dir3A { #[cfg(test)] mod tests { use super::*; + use approx::assert_relative_eq; #[test] fn dir2_creation() { diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -605,6 +704,24 @@ mod tests { assert_eq!(Dir2::new_and_length(Vec2::X * 6.5), Ok((Dir2::X, 6.5))); } + #[test] + fn dir2_slerp() { + assert_relative_eq!( + Dir2::X.slerp(Dir2::Y, 0.5), + Dir2::from_xy(0.5_f32.sqrt(), 0.5_f32.sqrt()).unwrap() + ); + assert_eq!(Dir2::Y.slerp(Dir2::X, 0.0), Dir2::Y); + assert_relative_eq!(Dir2::X.slerp(Dir2::Y, 1.0), Dir2::Y); + assert_relative_eq!( + Dir2::Y.slerp(Dir2::X, 1.0 / 3.0), + Dir2::from_xy(0.5, 0.75_f32.sqrt()).unwrap() + ); + assert_relative_eq!( + Dir2::X.slerp(Dir2::Y, 2.0 / 3.0), + Dir2::from_xy(0.5, 0.75_f32.sqrt()).unwrap() + ); + } + #[test] fn dir3_creation() { assert_eq!(Dir3::new(Vec3::X * 12.5), Ok(Dir3::X)); diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -633,6 +750,25 @@ mod tests { ); } + #[test] + fn dir3_slerp() { + assert_relative_eq!( + Dir3::X.slerp(Dir3::Y, 0.5), + Dir3::from_xyz(0.5f32.sqrt(), 0.5f32.sqrt(), 0.0).unwrap() + ); + assert_relative_eq!(Dir3::Y.slerp(Dir3::Z, 0.0), Dir3::Y); + assert_relative_eq!(Dir3::Z.slerp(Dir3::X, 1.0), Dir3::X, epsilon = 0.000001); + assert_relative_eq!( + Dir3::X.slerp(Dir3::Z, 1.0 / 3.0), + Dir3::from_xyz(0.75f32.sqrt(), 0.0, 0.5).unwrap(), + epsilon = 0.000001 + ); + assert_relative_eq!( + Dir3::Z.slerp(Dir3::Y, 2.0 / 3.0), + Dir3::from_xyz(0.0, 0.75f32.sqrt(), 0.5).unwrap() + ); + } + #[test] fn dir3a_creation() { assert_eq!(Dir3A::new(Vec3A::X * 12.5), Ok(Dir3A::X)); diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -660,4 +796,23 @@ mod tests { .abs_diff_eq(Vec3A::Y, 10e-6) ); } + + #[test] + fn dir3a_slerp() { + assert_relative_eq!( + Dir3A::X.slerp(Dir3A::Y, 0.5), + Dir3A::from_xyz(0.5f32.sqrt(), 0.5f32.sqrt(), 0.0).unwrap() + ); + assert_relative_eq!(Dir3A::Y.slerp(Dir3A::Z, 0.0), Dir3A::Y); + assert_relative_eq!(Dir3A::Z.slerp(Dir3A::X, 1.0), Dir3A::X, epsilon = 0.000001); + assert_relative_eq!( + Dir3A::X.slerp(Dir3A::Z, 1.0 / 3.0), + Dir3A::from_xyz(0.75f32.sqrt(), 0.0, 0.5).unwrap(), + epsilon = 0.000001 + ); + assert_relative_eq!( + Dir3A::Z.slerp(Dir3A::Y, 2.0 / 3.0), + Dir3A::from_xyz(0.0, 0.75f32.sqrt(), 0.5).unwrap() + ); + } }
slerp functions for directions (Vec2 and Vec3) ## What problem does this solve or what need does it fill? Linear interpolation is unsuited for transitioning of directions. ## What solution would you like? I would like a spherical interpolation function (slerp) for Vec2 and Vec3 directions. ## Additional context This is a common feature in existing game engines: https://docs.godotengine.org/en/stable/classes/class_vector3.html#class-vector3-method-slerp https://docs.unity3d.com/ScriptReference/Vector3.Slerp.html
[Vec2 and Vec3 is part of glam crate](https://github.com/bevyengine/bevy/blob/11f0a2dcdeb86651fdb6cdaf2c83ffd01df93149/crates/bevy_math/src/common_traits.rs#L1), this problem should be solved there, futhermore there is already [long living issue](https://github.com/bitshifter/glam-rs/issues/377) @bugsweeper You're right that the vector types are owned by glam, but on the other hand, we could easily implement `slerp` functions for the `Dir2`/`Dir3` types that we *do* own, and I think those would be quite useful.
2024-05-21T10:39:48Z
1.77
2024-05-21T21:28:31Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "bounding::bounded2d::aabb2d_tests::center", "bounding::bounded2d::aabb2d_tests::area", "bounding::bounded2d::aabb2d_tests::contains", "bounding::bounded2d::aabb2d_tests::closest_point", "bounding::bounded2d::aabb2d_tests::grow", "bounding::bounded2d::aabb2d_tests::half_size", "bounding::bounded2d::aabb2d_tests::intersect_aabb", "bounding::bounded2d::aabb2d_tests::intersect_bounding_circle", "bounding::bounded2d::aabb2d_tests::merge", "bounding::bounded2d::aabb2d_tests::shrink", "bounding::bounded2d::aabb2d_tests::scale_around_center", "bounding::bounded2d::aabb2d_tests::transform", "bounding::bounded2d::bounding_circle_tests::area", "bounding::bounded2d::bounding_circle_tests::closest_point", "bounding::bounded2d::bounding_circle_tests::contains", "bounding::bounded2d::bounding_circle_tests::contains_identical", "bounding::bounded2d::bounding_circle_tests::grow", "bounding::bounded2d::bounding_circle_tests::intersect_bounding_circle", "bounding::bounded2d::bounding_circle_tests::merge", "bounding::bounded2d::bounding_circle_tests::merge_identical", "bounding::bounded2d::bounding_circle_tests::scale_around_center", "bounding::bounded2d::bounding_circle_tests::shrink", "bounding::bounded2d::bounding_circle_tests::transform", "bounding::bounded2d::primitive_impls::tests::acute_triangle", "bounding::bounded2d::primitive_impls::tests::capsule", "bounding::bounded2d::primitive_impls::tests::circle", "bounding::bounded2d::primitive_impls::tests::ellipse", "bounding::bounded2d::primitive_impls::tests::line", "bounding::bounded2d::primitive_impls::tests::obtuse_triangle", "bounding::bounded2d::primitive_impls::tests::plane", "bounding::bounded2d::primitive_impls::tests::polygon", "bounding::bounded2d::primitive_impls::tests::polyline", "bounding::bounded2d::primitive_impls::tests::rectangle", "bounding::bounded2d::primitive_impls::tests::regular_polygon", "bounding::bounded2d::primitive_impls::tests::segment", "bounding::bounded3d::aabb3d_tests::area", "bounding::bounded3d::aabb3d_tests::center", "bounding::bounded3d::aabb3d_tests::closest_point", "bounding::bounded3d::aabb3d_tests::contains", "bounding::bounded3d::aabb3d_tests::grow", "bounding::bounded3d::aabb3d_tests::half_size", "bounding::bounded3d::aabb3d_tests::intersect_aabb", "bounding::bounded3d::aabb3d_tests::intersect_bounding_sphere", "bounding::bounded3d::aabb3d_tests::merge", "bounding::bounded3d::aabb3d_tests::scale_around_center", "bounding::bounded3d::aabb3d_tests::shrink", "bounding::bounded3d::aabb3d_tests::transform", "bounding::bounded3d::bounding_sphere_tests::area", "bounding::bounded3d::bounding_sphere_tests::closest_point", "bounding::bounded3d::bounding_sphere_tests::contains", "bounding::bounded3d::bounding_sphere_tests::contains_identical", "bounding::bounded3d::bounding_sphere_tests::grow", "bounding::bounded3d::bounding_sphere_tests::intersect_bounding_sphere", "bounding::bounded3d::bounding_sphere_tests::merge", "bounding::bounded3d::bounding_sphere_tests::merge_identical", "bounding::bounded3d::bounding_sphere_tests::scale_around_center", "bounding::bounded3d::bounding_sphere_tests::shrink", "bounding::bounded3d::bounding_sphere_tests::transform", "bounding::bounded3d::primitive_impls::tests::capsule", "bounding::bounded3d::primitive_impls::tests::cone", "bounding::bounded3d::primitive_impls::tests::conical_frustum", "bounding::bounded3d::primitive_impls::tests::cuboid", "bounding::bounded3d::primitive_impls::tests::cylinder", "bounding::bounded3d::primitive_impls::tests::line", "bounding::bounded3d::primitive_impls::tests::plane", "bounding::bounded3d::primitive_impls::tests::polyline", "bounding::bounded3d::primitive_impls::tests::segment", "bounding::bounded3d::primitive_impls::tests::sphere", "bounding::bounded3d::primitive_impls::tests::torus", "bounding::bounded3d::primitive_impls::tests::wide_conical_frustum", "bounding::raycast2d::tests::test_aabb_cast_hits", "bounding::raycast2d::tests::test_circle_cast_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_misses", "bounding::raycast2d::tests::test_ray_intersection_circle_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_misses", "bounding::raycast3d::tests::test_aabb_cast_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_misses", "bounding::raycast3d::tests::test_ray_intersection_aabb_inside", "bounding::raycast3d::tests::test_ray_intersection_sphere_hits", "bounding::raycast3d::tests::test_ray_intersection_sphere_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_inside", "cubic_splines::tests::cardinal_control_pts", "bounding::raycast3d::tests::test_sphere_cast_hits", "cubic_splines::tests::easing_overshoot", "cubic_splines::tests::cubic_to_rational", "cubic_splines::tests::easing_simple", "cubic_splines::tests::nurbs_circular_arc", "direction::tests::dir2_creation", "cubic_splines::tests::cubic", "direction::tests::dir3_creation", "direction::tests::dir3a_creation", "cubic_splines::tests::easing_undershoot", "float_ord::tests::float_ord_cmp", "float_ord::tests::float_ord_cmp_operators", "float_ord::tests::float_ord_eq", "float_ord::tests::float_ord_hash", "primitives::dim2::tests::annulus_closest_point", "primitives::dim2::tests::annulus_math", "primitives::dim2::tests::circle_closest_point", "primitives::dim2::tests::circle_math", "primitives::dim2::tests::ellipse_math", "primitives::dim2::tests::ellipse_perimeter", "primitives::dim2::tests::rectangle_closest_point", "primitives::dim2::tests::rectangle_math", "primitives::dim2::tests::regular_polygon_math", "primitives::dim2::tests::regular_polygon_vertices", "primitives::dim2::tests::triangle_circumcenter", "primitives::dim2::tests::triangle_math", "primitives::dim2::tests::triangle_winding_order", "primitives::dim3::tests::capsule_math", "primitives::dim3::tests::cone_math", "primitives::dim3::tests::cuboid_closest_point", "primitives::dim3::tests::cuboid_math", "primitives::dim3::tests::cylinder_math", "primitives::dim3::tests::extrusion_math", "primitives::dim3::tests::direction_creation", "primitives::dim3::tests::infinite_plane_from_points", "primitives::dim3::tests::plane_from_points", "primitives::dim3::tests::sphere_closest_point", "primitives::dim3::tests::sphere_math", "primitives::dim3::tests::tetrahedron_math", "primitives::dim3::tests::torus_math", "primitives::dim3::tests::triangle_math", "ray::tests::intersect_plane_2d", "ray::tests::intersect_plane_3d", "rects::irect::tests::rect_inset", "rects::irect::tests::rect_intersect", "rects::irect::tests::rect_union", "rects::irect::tests::rect_union_pt", "rects::irect::tests::well_formed", "rects::rect::tests::rect_inset", "rects::rect::tests::rect_intersect", "rects::rect::tests::rect_union", "rects::rect::tests::rect_union_pt", "rects::rect::tests::well_formed", "rects::urect::tests::rect_inset", "rects::urect::tests::rect_intersect", "rects::urect::tests::rect_union", "rects::urect::tests::rect_union_pt", "rects::urect::tests::well_formed", "rotation2d::tests::add", "rotation2d::tests::creation", "rotation2d::tests::is_near_identity", "rotation2d::tests::length", "rotation2d::tests::nlerp", "rotation2d::tests::normalize", "rotation2d::tests::rotate", "rotation2d::tests::slerp", "rotation2d::tests::subtract", "rotation2d::tests::try_normalize", "sampling::shape_sampling::tests::circle_boundary_sampling", "sampling::shape_sampling::tests::circle_interior_sampling", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union_point (line 237)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::height (line 140)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::contains (line 208)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::is_empty (line 116)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::intersect (line 260)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_corners (line 46)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union (line 226)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::half_size (line 168)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::center (line 194)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::width (line 130)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::is_empty (line 112)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::half_size (line 176)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_half_size (line 90)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::size (line 154)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union (line 223)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d (line 11)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicCardinalSpline (line 173)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::is_empty (line 113)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard::FromRng (line 37)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBSpline (line 263)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBezier (line 32)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::size (line 158)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::contains (line 205)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_size (line 73)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_size (line 69)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::height (line 144)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::width (line 126)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_corners (line 46)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_size (line 73)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::size (line 155)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::normalize (line 317)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::half_size (line 173)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::intersect (line 272)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicHermite (line 99)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::inset (line 288)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::center (line 191)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::intersect (line 269)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::inset (line 300)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicSegment<Vec2>::ease (line 717)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::contains (line 196)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union_point (line 249)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::nlerp (line 290)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::height (line 141)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union (line 214)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicNurbs (line 378)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::slerp (line 328)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_interior (line 19)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::inset (line 297)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::width (line 127)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::center (line 182)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_boundary (line 33)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union_point (line 246)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard (line 7)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,271
bevyengine__bevy-13271
[ "13230" ]
64e1a7835a7461924a94bda3e920596b7ce439d9
diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -374,7 +374,7 @@ impl<'a> Iterator for ArrayIter<'a> { #[inline] fn next(&mut self) -> Option<Self::Item> { let value = self.array.get(self.index); - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -280,7 +280,7 @@ impl<'a> Iterator for VariantFieldIter<'a> { Some(VariantField::Struct(name, self.container.field(name)?)) } }; - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -401,7 +401,7 @@ impl<'a> Iterator for ListIter<'a> { #[inline] fn next(&mut self) -> Option<Self::Item> { let value = self.list.get(self.index); - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -413,7 +413,7 @@ impl<'a> Iterator for MapIter<'a> { fn next(&mut self) -> Option<Self::Item> { let value = self.map.get_at(self.index); - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -204,7 +204,7 @@ impl<'a> Iterator for FieldIter<'a> { fn next(&mut self) -> Option<Self::Item> { let value = self.struct_val.field_at(self.index); - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -75,7 +75,7 @@ impl<'a> Iterator for TupleFieldIter<'a> { fn next(&mut self) -> Option<Self::Item> { let value = self.tuple.field(self.index); - self.index += 1; + self.index += value.is_some() as usize; value } diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -155,7 +155,7 @@ impl<'a> Iterator for TupleStructFieldIter<'a> { fn next(&mut self) -> Option<Self::Item> { let value = self.tuple_struct.field(self.index); - self.index += 1; + self.index += value.is_some() as usize; value }
diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -467,3 +467,32 @@ pub fn array_debug(dyn_array: &dyn Array, f: &mut std::fmt::Formatter<'_>) -> st } debug.finish() } +#[cfg(test)] +mod tests { + use crate::{Reflect, ReflectRef}; + #[test] + fn next_index_increment() { + const SIZE: usize = if cfg!(debug_assertions) { + 4 + } else { + // If compiled in release mode, verify we dont overflow + usize::MAX + }; + + let b = Box::new([(); SIZE]).into_reflect(); + + let ReflectRef::Array(array) = b.reflect_ref() else { + panic!("Not an array..."); + }; + + let mut iter = array.iter(); + iter.index = SIZE - 1; + assert!(iter.next().is_some()); + + // When None we should no longer increase index + assert!(iter.next().is_none()); + assert!(iter.index == SIZE); + assert!(iter.next().is_none()); + assert!(iter.index == SIZE); + } +} diff --git a/crates/bevy_reflect/src/enums/enum_trait.rs b/crates/bevy_reflect/src/enums/enum_trait.rs --- a/crates/bevy_reflect/src/enums/enum_trait.rs +++ b/crates/bevy_reflect/src/enums/enum_trait.rs @@ -312,3 +312,58 @@ impl<'a> VariantField<'a> { } } } + +// Tests that need access to internal fields have to go here rather than in mod.rs +#[cfg(test)] +mod tests { + use crate as bevy_reflect; + use crate::*; + + #[derive(Reflect, Debug, PartialEq)] + enum MyEnum { + A, + B(usize, i32), + C { foo: f32, bar: bool }, + } + #[test] + fn next_index_increment() { + // unit enums always return none, so index should stay at 0 + let unit_enum = MyEnum::A; + let mut iter = unit_enum.iter_fields(); + let size = iter.len(); + for _ in 0..2 { + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } + // tuple enums we iter over each value (unnamed fields), stop after that + let tuple_enum = MyEnum::B(0, 1); + let mut iter = tuple_enum.iter_fields(); + let size = iter.len(); + for _ in 0..2 { + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + } + for _ in 0..2 { + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } + + // struct enums, we iterate over each field in the struct + let struct_enum = MyEnum::C { + foo: 0., + bar: false, + }; + let mut iter = struct_enum.iter_fields(); + let size = iter.len(); + for _ in 0..2 { + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + } + for _ in 0..2 { + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } + } +} diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -508,6 +508,7 @@ pub fn list_debug(dyn_list: &dyn List, f: &mut Formatter<'_>) -> std::fmt::Resul #[cfg(test)] mod tests { use super::DynamicList; + use crate::{Reflect, ReflectRef}; use std::assert_eq; #[test] diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -522,4 +523,29 @@ mod tests { assert_eq!(index, value); } } + + #[test] + fn next_index_increment() { + const SIZE: usize = if cfg!(debug_assertions) { + 4 + } else { + // If compiled in release mode, verify we dont overflow + usize::MAX + }; + let b = Box::new(vec![(); SIZE]).into_reflect(); + + let ReflectRef::List(list) = b.reflect_ref() else { + panic!("Not a list..."); + }; + + let mut iter = list.iter(); + iter.index = SIZE - 1; + assert!(iter.next().is_some()); + + // When None we should no longer increase index + assert!(iter.next().is_none()); + assert!(iter.index == SIZE); + assert!(iter.next().is_none()); + assert!(iter.index == SIZE); + } } diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -594,4 +594,27 @@ mod tests { assert!(map.get_at(2).is_none()); } + + #[test] + fn next_index_increment() { + let values = ["first", "last"]; + let mut map = DynamicMap::default(); + map.insert(0usize, values[0]); + map.insert(1usize, values[1]); + + let mut iter = map.iter(); + let size = iter.len(); + + for _ in 0..2 { + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + } + + // When None we should no longer increase index + for _ in 0..2 { + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } + } } diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -557,3 +557,31 @@ pub fn struct_debug(dyn_struct: &dyn Struct, f: &mut Formatter<'_>) -> std::fmt: } debug.finish() } + +#[cfg(test)] +mod tests { + use crate as bevy_reflect; + use crate::*; + #[derive(Reflect, Default)] + struct MyStruct { + a: (), + b: (), + c: (), + } + #[test] + fn next_index_increment() { + let my_struct = MyStruct::default(); + let mut iter = my_struct.iter_fields(); + iter.index = iter.len() - 1; + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + + // When None we should no longer increase index + let prev_index = iter.index; + assert!(iter.next().is_none()); + assert_eq!(prev_index, iter.index); + assert!(iter.next().is_none()); + assert_eq!(prev_index, iter.index); + } +} diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -683,3 +683,24 @@ macro_rules! impl_type_path_tuple { } all_tuples!(impl_type_path_tuple, 0, 12, P); + +#[cfg(test)] +mod tests { + use super::Tuple; + + #[test] + fn next_index_increment() { + let mut iter = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).iter_fields(); + let size = iter.len(); + iter.index = size - 1; + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + + // When None we should no longer increase index + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } +} diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -469,3 +469,26 @@ pub fn tuple_struct_debug( } debug.finish() } + +#[cfg(test)] +mod tests { + use crate as bevy_reflect; + use crate::*; + #[derive(Reflect)] + struct Ts(u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8); + #[test] + fn next_index_increment() { + let mut iter = Ts(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).iter_fields(); + let size = iter.len(); + iter.index = size - 1; + let prev_index = iter.index; + assert!(iter.next().is_some()); + assert_eq!(prev_index, iter.index - 1); + + // When None we should no longer increase index + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + assert!(iter.next().is_none()); + assert_eq!(size, iter.index); + } +}
bevy_reflect::List::iter wraps silently on release ## Bevy version 0.13 ## What you did Iterate over a `ListIter` until overflow of its usize. ## What went wrong You are back at the beginning. ## Proposed Fix `ListIter` should only increment its counter when the current index is `Some`. This would fix this behaviour. It does add a branch in a potential hot spot, but I don't think its much worse when you are already reflect-ing all over the place. ## Repro https://learnbevy.com/playground?share=679a8e4ac4eb4c72a2e1e16114eb8717da4257eb6068becaecd7ce45c51ce2be ```rust let b = Box::new(vec![1u32]).into_reflect(); let ReflectRef::List(list) = b.reflect_ref() else { panic!("Not a list..."); }; let mut iter = list.iter(); let one = iter.next().unwrap(); assert_eq!(one.downcast_ref::<u32>().unwrap(), &1); for _ in 0..(usize::MAX) { assert!(iter.next().is_none()); } // We wrap around since thats what it does in release let one = iter.next().unwrap(); assert_eq!(one.downcast_ref::<u32>().unwrap(), &1); // Oops! info!("We got {one:?}") ```
2024-05-07T10:20:39Z
1.77
2024-05-12T15:21:19Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "array::tests::next_index_increment", "enums::enum_trait::tests::next_index_increment", "list::tests::next_index_increment", "map::tests::next_index_increment", "struct_trait::tests::next_index_increment", "tuple::tests::next_index_increment", "tuple_struct::tests::next_index_increment" ]
[ "enums::tests::applying_non_enum_should_panic - should panic", "enums::tests::enum_should_apply", "enums::tests::enum_should_allow_nesting_enums", "enums::tests::enum_should_allow_struct_fields", "enums::tests::enum_should_iterate_fields", "enums::tests::dynamic_enum_should_apply_dynamic_enum", "enums::tests::enum_should_allow_generics", "enums::tests::dynamic_enum_should_set_variant_fields", "enums::tests::dynamic_enum_should_change_variant", "enums::tests::enum_should_return_correct_variant_path", "enums::tests::enum_should_partial_eq", "enums::tests::enum_should_return_correct_variant_type", "enums::tests::enum_should_set", "enums::tests::partial_dynamic_enum_should_set_variant_fields", "enums::tests::should_get_enum_type_info", "enums::tests::should_skip_ignored_fields", "impls::smol_str::tests::smolstr_should_from_reflect", "impls::smol_str::tests::should_partial_eq_smolstr", "impls::std::tests::instant_should_from_reflect", "impls::std::tests::nonzero_usize_impl_reflect_from_reflect", "impls::std::tests::option_should_apply", "impls::std::tests::option_should_from_reflect", "impls::std::tests::option_should_impl_enum", "impls::std::tests::path_should_from_reflect", "impls::std::tests::option_should_impl_typed", "impls::std::tests::should_partial_eq_btree_map", "impls::std::tests::can_serialize_duration", "impls::std::tests::should_partial_eq_char", "impls::std::tests::should_partial_eq_f32", "impls::std::tests::should_partial_eq_hash_map", "impls::std::tests::should_partial_eq_i32", "impls::std::tests::should_partial_eq_option", "impls::std::tests::should_partial_eq_string", "impls::std::tests::should_partial_eq_vec", "impls::std::tests::static_str_should_from_reflect", "impls::std::tests::type_id_should_from_reflect", "list::tests::test_into_iter", "map::tests::test_into_iter", "map::tests::test_map_get_at", "path::parse::test::parse_invalid", "map::tests::test_map_get_at_mut", "path::tests::accept_leading_tokens", "path::tests::parsed_path_parse", "path::tests::reflect_array_behaves_like_list", "path::tests::reflect_array_behaves_like_list_mut", "path::tests::reflect_path", "path::tests::parsed_path_get_field", "serde::de::tests::should_deserialized_typed", "serde::de::tests::enum_should_deserialize", "serde::de::tests::should_deserialize_value", "serde::de::tests::should_deserialize_non_self_describing_binary", "serde::de::tests::should_deserialize_self_describing_binary", "serde::de::tests::should_deserialize_option", "tests::as_reflect", "tests::assert_impl_reflect_macro_on_all", "serde::ser::tests::should_serialize_dynamic_option", "serde::tests::test_serialization_tuple_struct", "tests::custom_debug_function", "serde::tests::should_not_serialize_unproxied_dynamic - should panic", "serde::ser::tests::enum_should_serialize", "serde::ser::tests::should_serialize_option", "serde::ser::tests::should_serialize_self_describing_binary", "tests::docstrings::fields_should_contain_docs", "serde::tests::test_serialization_struct", "serde::ser::tests::should_serialize_non_self_describing_binary", "serde::ser::tests::should_serialize", "tests::docstrings::should_contain_docs", "serde::tests::should_roundtrip_proxied_dynamic", "tests::can_opt_out_type_path", "serde::de::tests::should_deserialize", "tests::docstrings::should_not_contain_docs", "tests::from_reflect_should_allow_ignored_unnamed_fields", "tests::docstrings::variants_should_contain_docs", "tests::from_reflect_should_use_default_container_attribute", "tests::from_reflect_should_use_default_field_attributes", "tests::from_reflect_should_use_default_variant_field_attributes", "tests::glam::vec3_apply_dynamic", "tests::dynamic_types_debug_format", "tests::glam::vec3_field_access", "tests::glam::vec3_path_access", "tests::into_reflect", "tests::multiple_reflect_lists", "tests::multiple_reflect_value_lists", "serde::de::tests::should_reserialize", "tests::glam::quat_deserialization", "tests::glam::quat_serialization", "tests::recursive_typed_storage_does_not_hang", "tests::glam::vec3_serialization", "tests::reflect_ignore", "tests::not_dynamic_names", "tests::reflect_downcast", "tests::recursive_registration_does_not_hang", "tests::reflect_map", "tests::reflect_complex_patch", "tests::reflect_struct", "tests::reflect_take", "tests::reflect_unit_struct", "tests::should_allow_custom_where", "tests::should_allow_custom_where_with_assoc_type", "tests::reflect_type_path", "tests::glam::vec3_deserialization", "tests::should_allow_empty_custom_where", "tests::reflect_map_no_hash - should panic", "tests::should_allow_multiple_custom_where", "tests::should_allow_dynamic_fields", "tests::should_permit_higher_ranked_lifetimes", "tests::should_drain_fields", "tests::reflect_type_info", "tests::should_not_auto_register_existing_types", "tests::should_permit_valid_represented_type_for_dynamic", "tests::should_call_from_reflect_dynamically", "tests::std_type_paths", "tests::should_reflect_debug", "tests::should_prohibit_invalid_represented_type_for_dynamic - should panic", "type_registry::test::test_reflect_from_ptr", "tests::should_auto_register_fields", "tests::reflect_serialize", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Struct (line 10)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Tuple (line 20)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Tuple (line 51)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantType::Unit (line 28)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Struct (line 41)", "crates/bevy_reflect/src/enums/variants.rs - enums::variants::VariantInfo::Unit (line 59)", "crates/bevy_reflect/src/utility.rs - utility::NonGenericTypeCell (line 50)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 171)", "crates/bevy_reflect/src/type_info.rs - type_info::Typed (line 26)", "crates/bevy_reflect/src/lib.rs - (line 296)", "crates/bevy_reflect/src/utility.rs - utility::GenericTypeCell (line 131)", "crates/bevy_reflect/src/lib.rs - (line 39)", "crates/bevy_reflect/src/type_path.rs - type_path::TypePath (line 39)", "crates/bevy_reflect/src/array.rs - array::array_debug (line 448)", "crates/bevy_reflect/src/lib.rs - (line 156)", "crates/bevy_reflect/src/lib.rs - (line 177)", "crates/bevy_reflect/src/lib.rs - (line 142)", "crates/bevy_reflect/src/list.rs - list::list_debug (line 485)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 159)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::tuple_struct_debug (line 442)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 335)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 122)", "crates/bevy_reflect/src/tuple.rs - tuple::GetTupleField (line 95)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::GetField (line 224)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 77)", "crates/bevy_reflect/src/lib.rs - (line 314)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::GetTupleStructField (line 175)", "crates/bevy_reflect/src/map.rs - map::map_debug (line 473)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::is_field_skipped (line 29)", "crates/bevy_reflect/src/tuple_struct.rs - tuple_struct::TupleStruct (line 21)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::is_ambiguous (line 344)", "crates/bevy_reflect/src/enums/dynamic_enum.rs - enums::dynamic_enum::DynamicEnum (line 54)", "crates/bevy_reflect/src/serde/type_data.rs - serde::type_data::SerializationData::generate_default (line 69)", "crates/bevy_reflect/src/array.rs - array::Array (line 30)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistration (line 447)", "crates/bevy_reflect/src/lib.rs - (line 275)", "crates/bevy_reflect/src/enums/helpers.rs - enums::helpers::enum_debug (line 82)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 311)", "crates/bevy_reflect/src/lib.rs - (line 247)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath (line 323)", "crates/bevy_reflect/src/lib.rs - (line 216)", "crates/bevy_reflect/src/tuple.rs - tuple::Tuple (line 24)", "crates/bevy_reflect/src/lib.rs - (line 106)", "crates/bevy_reflect/src/lib.rs - (line 191)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::struct_debug (line 527)", "crates/bevy_reflect/src/list.rs - list::List (line 37)", "crates/bevy_reflect/src/from_reflect.rs - from_reflect::ReflectFromReflect (line 57)", "crates/bevy_reflect/src/tuple.rs - tuple::tuple_debug (line 439)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register (line 123)", "crates/bevy_reflect/src/lib.rs - (line 85)", "crates/bevy_reflect/src/map.rs - map::Map (line 28)", "crates/bevy_reflect/src/struct_trait.rs - struct_trait::Struct (line 25)", "crates/bevy_reflect/src/type_registry.rs - type_registry::ReflectFromPtr (line 647)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::ReflectSerializer (line 67)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 145)", "crates/bevy_reflect/src/type_registry.rs - type_registry::TypeRegistry::register_type_data (line 246)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 181)", "crates/bevy_reflect/src/path/mod.rs - path::GetPath (line 211)", "crates/bevy_reflect/src/path/mod.rs - path::ParsedPath::parse (line 369)", "crates/bevy_reflect/src/lib.rs - (line 357)", "crates/bevy_reflect/src/serde/ser.rs - serde::ser::TypedReflectSerializer (line 145)", "crates/bevy_reflect/src/serde/de.rs - serde::de::TypedReflectDeserializer (line 453)", "crates/bevy_reflect/src/serde/de.rs - serde::de::ReflectDeserializer (line 320)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,237
bevyengine__bevy-13237
[ "13206" ]
383314ef627da6654588a704959fc92c67770a52
diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -42,6 +42,19 @@ pub trait Mix: Sized { } } +/// Trait for returning a grayscale color of a provided lightness. +pub trait Gray: Mix + Sized { + /// A pure black color. + const BLACK: Self; + /// A pure white color. + const WHITE: Self; + + /// Returns a grey color with the provided lightness from (0.0 - 1.0). 0 is black, 1 is white. + fn gray(lightness: f32) -> Self { + Self::BLACK.mix(&Self::WHITE, lightness) + } +} + /// Methods for manipulating alpha values. pub trait Alpha: Sized { /// Return a new version of this color with the given alpha value. diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -1,5 +1,5 @@ use crate::{ - Alpha, ColorToComponents, Hsva, Hue, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, + Alpha, ColorToComponents, Gray, Hsva, Hue, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -119,6 +119,11 @@ impl Mix for Hsla { } } +impl Gray for Hsla { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(0., 0., 1., 1.); +} + impl Alpha for Hsla { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -1,5 +1,5 @@ use crate::{ - Alpha, ColorToComponents, Hue, Hwba, Lcha, LinearRgba, Mix, Srgba, StandardColor, Xyza, + Alpha, ColorToComponents, Gray, Hue, Hwba, Lcha, LinearRgba, Mix, Srgba, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -89,6 +89,11 @@ impl Mix for Hsva { } } +impl Gray for Hsva { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(0., 0., 1., 1.); +} + impl Alpha for Hsva { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -2,7 +2,9 @@ //! in [_HWB - A More Intuitive Hue-Based Color Model_] by _Smith et al_. //! //! [_HWB - A More Intuitive Hue-Based Color Model_]: https://web.archive.org/web/20240226005220/http://alvyray.com/Papers/CG/HWB_JGTv208.pdf -use crate::{Alpha, ColorToComponents, Hue, Lcha, LinearRgba, Mix, Srgba, StandardColor, Xyza}; +use crate::{ + Alpha, ColorToComponents, Gray, Hue, Lcha, LinearRgba, Mix, Srgba, StandardColor, Xyza, +}; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -91,6 +93,11 @@ impl Mix for Hwba { } } +impl Gray for Hwba { + const BLACK: Self = Self::new(0., 0., 1., 1.); + const WHITE: Self = Self::new(0., 1., 0., 1.); +} + impl Alpha for Hwba { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/laba.rs b/crates/bevy_color/src/laba.rs --- a/crates/bevy_color/src/laba.rs +++ b/crates/bevy_color/src/laba.rs @@ -1,5 +1,5 @@ use crate::{ - impl_componentwise_vector_space, Alpha, ColorToComponents, Hsla, Hsva, Hwba, LinearRgba, + impl_componentwise_vector_space, Alpha, ColorToComponents, Gray, Hsla, Hsva, Hwba, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; diff --git a/crates/bevy_color/src/laba.rs b/crates/bevy_color/src/laba.rs --- a/crates/bevy_color/src/laba.rs +++ b/crates/bevy_color/src/laba.rs @@ -101,6 +101,11 @@ impl Mix for Laba { } } +impl Gray for Laba { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(1., 0., 0., 1.); +} + impl Alpha for Laba { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -1,5 +1,6 @@ use crate::{ - Alpha, ColorToComponents, Hue, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, + Alpha, ColorToComponents, Gray, Hue, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, + Xyza, }; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -122,6 +123,11 @@ impl Mix for Lcha { } } +impl Gray for Lcha { + const BLACK: Self = Self::new(0.0, 0.0, 0.0000136603785, 1.0); + const WHITE: Self = Self::new(1.0, 0.0, 0.0000136603785, 1.0); +} + impl Alpha for Lcha { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -1,6 +1,6 @@ use crate::{ color_difference::EuclideanDistance, impl_componentwise_vector_space, Alpha, ColorToComponents, - Luminance, Mix, StandardColor, + Gray, Luminance, Mix, StandardColor, }; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -121,18 +121,6 @@ impl LinearRgba { } } - /// Construct a new [`LinearRgba`] color with the same value for all channels and an alpha of 1.0. - /// - /// A value of 0.0 is black, and a value of 1.0 is white. - pub const fn gray(value: f32) -> Self { - Self { - red: value, - green: value, - blue: value, - alpha: 1.0, - } - } - /// Return a copy of this color with the red channel set to the given value. pub const fn with_red(self, red: f32) -> Self { Self { red, ..self } diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -236,6 +224,11 @@ impl Mix for LinearRgba { } } +impl Gray for LinearRgba { + const BLACK: Self = Self::BLACK; + const WHITE: Self = Self::WHITE; +} + impl Alpha for LinearRgba { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -1,6 +1,6 @@ use crate::{ color_difference::EuclideanDistance, impl_componentwise_vector_space, Alpha, ColorToComponents, - Hsla, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, + Gray, Hsla, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -101,6 +101,11 @@ impl Mix for Oklaba { } } +impl Gray for Oklaba { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(1.0, 0.0, 0.000000059604645, 1.0); +} + impl Alpha for Oklaba { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -1,6 +1,6 @@ use crate::{ - color_difference::EuclideanDistance, Alpha, ColorToComponents, Hsla, Hsva, Hue, Hwba, Laba, - Lcha, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, + color_difference::EuclideanDistance, Alpha, ColorToComponents, Gray, Hsla, Hsva, Hue, Hwba, + Laba, Lcha, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -119,6 +119,11 @@ impl Mix for Oklcha { } } +impl Gray for Oklcha { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(1.0, 0.000000059604645, 90.0, 1.0); +} + impl Alpha for Oklcha { #[inline] fn with_alpha(&self, alpha: f32) -> Self { diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -1,6 +1,6 @@ use crate::color_difference::EuclideanDistance; use crate::{ - impl_componentwise_vector_space, Alpha, ColorToComponents, LinearRgba, Luminance, Mix, + impl_componentwise_vector_space, Alpha, ColorToComponents, Gray, LinearRgba, Luminance, Mix, StandardColor, Xyza, }; use bevy_math::{Vec3, Vec4}; diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -314,6 +314,11 @@ impl EuclideanDistance for Srgba { } } +impl Gray for Srgba { + const BLACK: Self = Self::BLACK; + const WHITE: Self = Self::WHITE; +} + impl ColorToComponents for Srgba { fn to_f32_array(self) -> [f32; 4] { [self.red, self.green, self.blue, self.alpha] diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -1,5 +1,5 @@ use crate::{ - impl_componentwise_vector_space, Alpha, ColorToComponents, LinearRgba, Luminance, Mix, + impl_componentwise_vector_space, Alpha, ColorToComponents, Gray, LinearRgba, Luminance, Mix, StandardColor, }; use bevy_math::{Vec3, Vec4}; diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -144,6 +144,11 @@ impl Mix for Xyza { } } +impl Gray for Xyza { + const BLACK: Self = Self::new(0., 0., 0., 1.); + const WHITE: Self = Self::new(0.95047, 1.0, 1.08883, 1.0); +} + impl ColorToComponents for Xyza { fn to_f32_array(self) -> [f32; 4] { [self.x, self.y, self.z, self.alpha] diff --git a/crates/bevy_core_pipeline/src/bloom/mod.rs b/crates/bevy_core_pipeline/src/bloom/mod.rs --- a/crates/bevy_core_pipeline/src/bloom/mod.rs +++ b/crates/bevy_core_pipeline/src/bloom/mod.rs @@ -2,7 +2,7 @@ mod downsampling_pipeline; mod settings; mod upsampling_pipeline; -use bevy_color::LinearRgba; +use bevy_color::{Gray, LinearRgba}; pub use settings::{BloomCompositeMode, BloomPrefilterSettings, BloomSettings}; use crate::{
diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -112,6 +125,8 @@ pub(crate) fn lerp_hue(a: f32, b: f32, t: f32) -> f32 { #[cfg(test)] mod tests { + use std::fmt::Debug; + use super::*; use crate::{testing::assert_approx_eq, Hsla}; diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -145,4 +160,25 @@ mod tests { assert_approx_eq!(lerp_hue(350., 10., 0.5), 0., 0.001); assert_approx_eq!(lerp_hue(350., 10., 0.75), 5., 0.001); } + + fn verify_gray<Col>() + where + Col: Gray + Debug + PartialEq, + { + assert_eq!(Col::gray(0.), Col::BLACK); + assert_eq!(Col::gray(1.), Col::WHITE); + } + + #[test] + fn test_gray() { + verify_gray::<crate::Hsla>(); + verify_gray::<crate::Hsva>(); + verify_gray::<crate::Hwba>(); + verify_gray::<crate::Laba>(); + verify_gray::<crate::Lcha>(); + verify_gray::<crate::LinearRgba>(); + verify_gray::<crate::Oklaba>(); + verify_gray::<crate::Oklcha>(); + verify_gray::<crate::Xyza>(); + } }
Add a `Gray` color trait ## What problem does this solve or what need does it fill? Creating uniformly gray colors is a common task for prototyping and even some finished UIs. Doing so is currently tedious and doesn't show intent well. Rather than `Srgba::gray(0.9)`, users must type `Srgba::rgb(0.9, 0.9, 0.9)`. ## What solution would you like? Add an extension trait for the color spaces that support the creation of grey colors, and use that. ## What alternative(s) have you considered? Using the clearly superior but not style-guide approved Canadian spelling of `Grey`. ## Additional context Our examples use grays a *ton*: these could be cleaned up as part of the same PR.
I'll take a whack at this.
2024-05-04T20:23:54Z
1.77
2024-05-26T13:08:12Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "color_ops::tests::test_hue_wrap", "color_ops::tests::test_rotate_hue", "hsla::tests::test_from_index", "color_range::tests::test_color_range", "hsla::tests::test_to_from_linear", "hsla::tests::test_mix_wrap", "hsva::tests::test_to_from_srgba", "hsla::tests::test_to_from_srgba", "hsva::tests::test_to_from_srgba_2", "hsla::tests::test_to_from_srgba_2", "hwba::tests::test_to_from_srgba", "hwba::tests::test_to_from_srgba_2", "laba::tests::test_to_from_linear", "laba::tests::test_to_from_srgba", "lcha::tests::test_to_from_srgba", "linear_rgba::tests::darker_lighter", "linear_rgba::tests::euclidean_distance", "oklaba::tests::test_to_from_linear", "oklaba::tests::test_to_from_srgba_2", "oklcha::tests::test_to_from_linear", "oklcha::tests::test_to_from_srgba", "oklcha::tests::test_to_from_srgba_2", "srgba::tests::euclidean_distance", "srgba::tests::hex_color", "srgba::tests::test_to_from_linear", "xyza::tests::test_to_from_srgba", "xyza::tests::test_to_from_srgba_2", "oklaba::tests::test_to_from_srgba", "lcha::tests::test_to_from_linear", "srgba::tests::darker_lighter", "crates/bevy_color/src/color.rs - color::Color (line 40)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha (line 13)", "crates/bevy_color/src/lib.rs - (line 65)", "crates/bevy_color/src/lib.rs - (line 98)", "crates/bevy_color/src/laba.rs - laba::Laba (line 13)", "crates/bevy_color/src/hsla.rs - hsla::Hsla (line 14)", "crates/bevy_color/src/srgba.rs - srgba::Srgba::hex (line 125)", "crates/bevy_color/src/color.rs - color::Color (line 15)", "crates/bevy_color/src/hsva.rs - hsva::Hsva (line 13)", "crates/bevy_color/src/xyza.rs - xyza::Xyza (line 13)", "crates/bevy_color/src/hsla.rs - hsla::Hsla::sequential_dispersed (line 80)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha::sequential_dispersed (line 80)", "crates/bevy_color/src/srgba.rs - srgba::Srgba (line 15)", "crates/bevy_color/src/oklaba.rs - oklaba::Oklaba (line 13)", "crates/bevy_color/src/linear_rgba.rs - linear_rgba::LinearRgba (line 14)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,149
bevyengine__bevy-13149
[ "13148" ]
96b9d0a7e203bc55aff4f8b14ac8a51a6945fea5
diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -11,6 +11,8 @@ use crate::{ }; pub use bevy_ecs_macros::Event; use bevy_ecs_macros::SystemSet; +#[cfg(feature = "bevy_reflect")] +use bevy_reflect::Reflect; use bevy_utils::detailed_trace; use std::ops::{Deref, DerefMut}; use std::{ diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -34,10 +36,12 @@ pub trait Event: Send + Sync + 'static {} /// sent to the point it was processed. `EventId`s increase montonically by send order. /// /// [`World`]: crate::world::World +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] pub struct EventId<E: Event> { /// Uniquely identifies the event associated with this ID. // This value corresponds to the order in which each event was added to the world. pub id: usize, + #[cfg_attr(feature = "bevy_reflect", reflect(ignore))] _marker: PhantomData<E>, } diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -93,6 +97,7 @@ impl<E: Event> Hash for EventId<E> { } #[derive(Debug)] +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] struct EventInstance<E: Event> { pub event_id: EventId<E>, pub event: E, diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -393,6 +399,7 @@ impl<E: Event> Extend<E> for Events<E> { } #[derive(Debug)] +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] struct EventSequence<E: Event> { events: Vec<EventInstance<E>>, start_event_count: usize,
diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -171,6 +176,7 @@ struct EventInstance<E: Event> { /// [Example usage standalone.](https://github.com/bevyengine/bevy/blob/latest/crates/bevy_ecs/examples/events.rs) /// #[derive(Debug, Resource)] +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] pub struct Events<E: Event> { /// Holds the oldest still active events. /// Note that `a.start_event_count + a.len()` should always be equal to `events_b.start_event_count`.
Implement `Reflect` for `Events` type ## What problem does this solve or what need does it fill? I'm trying to **integrate events** with scripts using **reflect**, but the **resource** does not implement reflect by default. ## Additional context This discussion started on [discord](https://discord.com/channels/691052431525675048/1234673456491003914). Similar issue https://github.com/bevyengine/bevy/issues/13111.
Right, so we just need to slap a `Reflect` derive on the `Events` type, correct?
2024-04-30T17:41:55Z
1.77
2024-05-02T10:14:48Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "change_detection::tests::as_deref_mut", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_from_non_send_mut", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_new", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_recursive", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::fieldless_enum", "intern::tests::different_interned_content", "intern::tests::same_interned_instance", "intern::tests::same_interned_content", "intern::tests::zero_sized_type", "intern::tests::static_sub_strings", "query::access::tests::filtered_access_extend", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_or", "query::builder::tests::builder_static_components", "query::builder::tests::builder_transmute", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_with_without_static", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_transmute_added", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::has_query", "query::state::tests::join", "query::state::tests::join_with_get", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::any_query", "query::tests::query_iter_combinations_sparse", "query::tests::query_iter_combinations", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "schedule::set::tests::test_derive_system_set", "query::tests::derived_worldqueries", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "schedule::set::tests::test_derive_schedule_label", "query::state::tests::cannot_join_wrong_fetch - should panic", "schedule::executor::simple::skip_automatic_sync_points", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::tests::self_conflicting_worldquery - should panic", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_never_run", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::blob_vec", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::resize_test", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::sparse_set::tests::sparse_set", "schedule::tests::system_ambiguity::one_of_everything", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::table::tests::table", "system::commands::tests::append", "system::commands::tests::commands", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_components", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::function_system::tests::into_system_type_id_consistency", "system::system::tests::command_processing", "system::commands::tests::remove_components_by_id", "system::system::tests::run_system_once", "schedule::stepping::tests::verify_cursor", "system::system::tests::non_send_resources", "system::system::tests::run_two_systems", "system::system_name::tests::test_system_name_regular_param", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_const_generics", "schedule::tests::system_ambiguity::read_only", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::nested_systems", "system::system_registry::tests::output_values", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::assert_systems", "system::tests::conflicting_query_immut_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::long_life_test", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::immutable_mut_test", "system::tests::option_has_no_filter_with - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "system::tests::pipe_change_detection", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::non_send_option_system", "system::tests::or_has_no_filter_with - should panic", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::tests::simple_system", "system::tests::system_state_invalid_world - should panic", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system_param::tests::param_set_non_send_first", "schedule::tests::system_ordering::order_exclusive_systems", "system::system_param::tests::param_set_non_send_second", "system::tests::nonconflicting_system_resources", "system::tests::system_state_change_detection", "system::tests::disjoint_query_mut_system", "schedule::stepping::tests::step_run_if_false", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::tests::read_system_state", "schedule::tests::conditions::systems_nested_in_system_sets", "system::tests::system_state_archetype_update", "system::tests::write_system_state", "tests::changed_query", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::bundle_derive", "tests::clear_entities", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_nested_with_and_common_nested_without", "schedule::tests::system_execution::run_system", "system::tests::or_param_set_system", "system::tests::any_of_and_without", "tests::add_remove_components", "system::tests::option_doesnt_remove_unrelated_filter_with", "tests::added_queries", "tests::empty_spawn", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "tests::despawn_table_storage", "tests::despawn_mixed_storage", "system::tests::update_archetype_component_access_works", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::tests::disjoint_query_mut_read_component_system", "schedule::tests::conditions::systems_with_distributive_condition", "tests::filtered_query_access", "tests::added_tracking", "tests::duplicate_components_panic - should panic", "schedule::tests::conditions::system_with_condition", "system::tests::query_set_system", "tests::exact_size_query", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch", "schedule::tests::conditions::system_conditions_and_change_detection", "tests::insert_overwrite_drop", "system::tests::or_with_without_and_compatible_with_without", "system::tests::panic_inside_system - should panic", "tests::insert_or_spawn_batch_invalid", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::tests::or_expanded_with_and_without_common", "tests::changed_trackers", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with", "schedule::condition::tests::multiple_run_conditions", "tests::multiple_worlds_same_query_iter - should panic", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_param::tests::non_sync_local", "system::tests::into_iter_impl", "tests::multiple_worlds_same_query_for_each - should panic", "event::tests::test_event_iter_nth", "system::tests::local_system", "system::tests::world_collections_system", "tests::entity_ref_and_mut_query_panic - should panic", "tests::multiple_worlds_same_query_get - should panic", "schedule::set::tests::test_schedule_label", "tests::insert_overwrite_drop_sparse", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::disable_auto_sync_points", "schedule::condition::tests::run_condition_combinators", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::tests::commands_param_set", "system::tests::removal_tracking", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::tests::test_combinator_clone", "tests::non_send_resource_drop_from_same_thread", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::tests::changed_resource_system", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::query_all", "tests::non_send_resource", "tests::query_all_for_each", "schedule::condition::tests::run_condition", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::non_send_resource_points_to_distinct_data", "tests::mut_and_entity_ref_query_panic - should panic", "tests::query_filter_with_sparse", "tests::query_filter_without", "schedule::tests::system_ordering::add_systems_correct_order_nested", "tests::query_filter_with_sparse_for_each", "schedule::schedule::tests::no_sync_chain::chain_first", "tests::query_filters_dont_collide_with_fetches", "tests::non_send_resource_panic - should panic", "tests::par_for_each_sparse", "tests::query_get", "tests::query_missing_component", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "tests::query_optional_component_sparse_no_match", "query::tests::par_iter_mut_change_detection", "tests::query_single_component", "tests::query_get_works_across_sparse_removal", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::merges_sync_points_into_one", "tests::query_single_component_for_each", "tests::query_sparse_component", "tests::query_optional_component_table", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::tests::system_ordering::order_systems", "tests::par_for_each_dense", "tests::query_optional_component_sparse", "tests::random_access", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::remove_missing", "tests::remove", "tests::ref_and_mut_query_panic - should panic", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::reserve_entities_across_worlds", "event::tests::test_events_par_iter", "tests::sparse_set_add_remove_many", "tests::remove_tracking", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner", "tests::take", "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_panic_safe", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_get_by_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "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::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_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::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_id_system_param", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::inspect_entity_components", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 876) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 884) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 910) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 58)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 166)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 399)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "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/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 926)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 744)", "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 31)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 413)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 538)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 56)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::NextState (line 146)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::States (line 33)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::State (line 78)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 101)", "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/component.rs - component::Components::resource_id (line 690)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 769)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 109)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 259)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 38)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 743)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 652)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 812)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 217)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 287) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 593)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 779)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1543)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 452)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 329)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 198)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1520)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 310)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1328)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 479)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 255)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 332)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 479)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 710)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 133)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1001) - compile", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 271)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 352)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 176)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 382)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 425)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 937)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 349)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 671)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 294)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 412) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 214)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 923)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 257)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 876)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1445) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 538)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 722)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 562)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 665)", "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::resource_changed_or_removed (line 540)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 426)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 610)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 190)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 423)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 41)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 832)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1421)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 629)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 375)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 914)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 810)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 960)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 55)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 757)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 856)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 583)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 254)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1228)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 225)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "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_single_mut (line 1187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 678)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 140)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 174)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 112) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 181)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1263)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 943)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1559)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 300)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1516)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 219)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 198)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1403)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 269)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1429)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 335)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1654)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1110)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 252)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1082)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 273)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1306)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1574)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1514)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1607)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 271)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 701)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1547)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1355)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1488)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 222)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 863)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1302)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1459)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1399)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1631)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 232)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 383)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 299)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 535)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1561)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1686)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 884)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 500)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 958)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 807)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1711)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 333)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 623)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 916)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 654)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 372)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 1925)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2148)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 381)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 415)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 837)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2170)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 988)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1673)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 426)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2247)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1055)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 713)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1024)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2505)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
13,022
bevyengine__bevy-13022
[ "13017" ]
b3d3daad5aac70ed65ea8399eb1754a22917a797
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -4,7 +4,7 @@ use crate::{ }; pub use bevy_derive::AppLabel; use bevy_ecs::{ - event::event_update_system, + event::{event_update_system, ManualEventReader}, intern::Interned, prelude::*, schedule::{ScheduleBuildSettings, ScheduleLabel}, diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -13,8 +13,14 @@ use bevy_ecs::{ #[cfg(feature = "trace")] use bevy_utils::tracing::info_span; use bevy_utils::{tracing::debug, HashMap}; -use std::fmt::Debug; -use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe}; +use std::{ + fmt::Debug, + process::{ExitCode, Termination}, +}; +use std::{ + num::NonZeroU8, + panic::{catch_unwind, resume_unwind, AssertUnwindSafe}, +}; use thiserror::Error; bevy_ecs::define_label!( diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -151,7 +157,7 @@ impl App { /// # Panics /// /// Panics if not all plugins have been built. - pub fn run(&mut self) { + pub fn run(&mut self) -> AppExit { #[cfg(feature = "trace")] let _bevy_app_run_span = info_span!("bevy_app").entered(); if self.is_building_plugins() { diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -160,7 +166,7 @@ impl App { let runner = std::mem::replace(&mut self.runner, Box::new(run_once)); let app = std::mem::replace(self, App::empty()); - (runner)(app); + (runner)(app) } /// Sets the function that will be called when the app is run. diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -177,17 +183,20 @@ impl App { /// ``` /// # use bevy_app::prelude::*; /// # - /// fn my_runner(mut app: App) { + /// fn my_runner(mut app: App) -> AppExit { /// loop { /// println!("In main loop"); /// app.update(); + /// if let Some(exit) = app.should_exit() { + /// return exit; + /// } /// } /// } /// /// App::new() /// .set_runner(my_runner); /// ``` - pub fn set_runner(&mut self, f: impl FnOnce(App) + 'static) -> &mut Self { + pub fn set_runner(&mut self, f: impl FnOnce(App) -> AppExit + 'static) -> &mut Self { self.runner = Box::new(f); self } diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -849,11 +858,44 @@ impl App { self.main_mut().ignore_ambiguity(schedule, a, b); self } + + /// Attempts to determine if an [`AppExit`] was raised since the last update. + /// + /// Will attempt to return the first [`Error`](AppExit::Error) it encounters. + /// This should be called after every [`update()`](App::update) otherwise you risk + /// dropping possible [`AppExit`] events. + pub fn should_exit(&self) -> Option<AppExit> { + let mut reader = ManualEventReader::default(); + + self.should_exit_manual(&mut reader) + } + + /// Several app runners in this crate keep their own [`ManualEventReader<AppExit>`]. + /// This exists to accommodate them. + pub(crate) fn should_exit_manual( + &self, + reader: &mut ManualEventReader<AppExit>, + ) -> Option<AppExit> { + let events = self.world().get_resource::<Events<AppExit>>()?; + + let mut events = reader.read(events); + + if events.len() != 0 { + return Some( + events + .find(|exit| exit.is_error()) + .cloned() + .unwrap_or(AppExit::Success), + ); + } + + None + } } -type RunnerFn = Box<dyn FnOnce(App)>; +type RunnerFn = Box<dyn FnOnce(App) -> AppExit>; -fn run_once(mut app: App) { +fn run_once(mut app: App) -> AppExit { while app.plugins_state() == PluginsState::Adding { #[cfg(not(target_arch = "wasm32"))] bevy_tasks::tick_global_task_pools_on_main_thread(); diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -28,7 +28,7 @@ pub use sub_app::*; pub mod prelude { #[doc(hidden)] pub use crate::{ - app::App, + app::{App, AppExit}, main_schedule::{ First, FixedFirst, FixedLast, FixedPostUpdate, FixedPreUpdate, FixedUpdate, Last, Main, PostStartup, PostUpdate, PreStartup, PreUpdate, SpawnScene, Startup, StateTransition, diff --git a/crates/bevy_app/src/schedule_runner.rs b/crates/bevy_app/src/schedule_runner.rs --- a/crates/bevy_app/src/schedule_runner.rs +++ b/crates/bevy_app/src/schedule_runner.rs @@ -3,7 +3,7 @@ use crate::{ plugin::Plugin, PluginsState, }; -use bevy_ecs::event::{Events, ManualEventReader}; +use bevy_ecs::event::ManualEventReader; use bevy_utils::{Duration, Instant}; #[cfg(target_arch = "wasm32")] diff --git a/crates/bevy_app/src/schedule_runner.rs b/crates/bevy_app/src/schedule_runner.rs --- a/crates/bevy_app/src/schedule_runner.rs +++ b/crates/bevy_app/src/schedule_runner.rs @@ -84,7 +84,15 @@ impl Plugin for ScheduleRunnerPlugin { let mut app_exit_event_reader = ManualEventReader::<AppExit>::default(); match run_mode { - RunMode::Once => app.update(), + RunMode::Once => { + app.update(); + + if let Some(exit) = app.should_exit_manual(&mut app_exit_event_reader) { + return exit; + } + + AppExit::Success + } RunMode::Loop { wait } => { let mut tick = move |app: &mut App, wait: Option<Duration>| diff --git a/crates/bevy_app/src/schedule_runner.rs b/crates/bevy_app/src/schedule_runner.rs --- a/crates/bevy_app/src/schedule_runner.rs +++ b/crates/bevy_app/src/schedule_runner.rs @@ -93,14 +101,9 @@ impl Plugin for ScheduleRunnerPlugin { app.update(); - if let Some(app_exit_events) = - app.world_mut().get_resource_mut::<Events<AppExit>>() - { - if let Some(exit) = app_exit_event_reader.read(&app_exit_events).last() - { - return Err(exit.clone()); - } - } + if let Some(exit) = app.should_exit_manual(&mut app_exit_event_reader) { + return Err(exit); + }; let end_time = Instant::now(); diff --git a/crates/bevy_app/src/schedule_runner.rs b/crates/bevy_app/src/schedule_runner.rs --- a/crates/bevy_app/src/schedule_runner.rs +++ b/crates/bevy_app/src/schedule_runner.rs @@ -116,40 +119,54 @@ impl Plugin for ScheduleRunnerPlugin { #[cfg(not(target_arch = "wasm32"))] { - while let Ok(delay) = tick(&mut app, wait) { - if let Some(delay) = delay { - std::thread::sleep(delay); + loop { + match tick(&mut app, wait) { + Ok(Some(delay)) => std::thread::sleep(delay), + Ok(None) => continue, + Err(exit) => return exit, } } } #[cfg(target_arch = "wasm32")] { - fn set_timeout(f: &Closure<dyn FnMut()>, dur: Duration) { + fn set_timeout(callback: &Closure<dyn FnMut()>, dur: Duration) { web_sys::window() .unwrap() .set_timeout_with_callback_and_timeout_and_arguments_0( - f.as_ref().unchecked_ref(), + callback.as_ref().unchecked_ref(), dur.as_millis() as i32, ) .expect("Should register `setTimeout`."); } let asap = Duration::from_millis(1); - let mut rc = Rc::new(app); - let f = Rc::new(RefCell::new(None)); - let g = f.clone(); + let exit = Rc::new(RefCell::new(AppExit::Success)); + let closure_exit = exit.clone(); + + let mut app = Rc::new(app); + let moved_tick_closure = Rc::new(RefCell::new(None)); + let base_tick_closure = moved_tick_closure.clone(); - let c = move || { - let app = Rc::get_mut(&mut rc).unwrap(); + let tick_app = move || { + let app = Rc::get_mut(&mut app).unwrap(); let delay = tick(app, wait); - if let Ok(delay) = delay { - set_timeout(f.borrow().as_ref().unwrap(), delay.unwrap_or(asap)); + match delay { + Ok(delay) => set_timeout( + moved_tick_closure.borrow().as_ref().unwrap(), + delay.unwrap_or(asap), + ), + Err(code) => { + closure_exit.replace(code); + } } }; - *g.borrow_mut() = Some(Closure::wrap(Box::new(c) as Box<dyn FnMut()>)); - set_timeout(g.borrow().as_ref().unwrap(), asap); - }; + *base_tick_closure.borrow_mut() = + Some(Closure::wrap(Box::new(tick_app) as Box<dyn FnMut()>)); + set_timeout(base_tick_closure.borrow().as_ref().unwrap(), asap); + + exit.take() + } } } }); diff --git a/crates/bevy_render/src/pipelined_rendering.rs b/crates/bevy_render/src/pipelined_rendering.rs --- a/crates/bevy_render/src/pipelined_rendering.rs +++ b/crates/bevy_render/src/pipelined_rendering.rs @@ -193,7 +193,7 @@ fn renderer_extract(app_world: &mut World, _world: &mut World) { render_channels.send_blocking(render_app); } else { // Renderer thread panicked - world.send_event(AppExit); + world.send_event(AppExit::error()); } }); }); diff --git a/crates/bevy_window/src/system.rs b/crates/bevy_window/src/system.rs --- a/crates/bevy_window/src/system.rs +++ b/crates/bevy_window/src/system.rs @@ -13,7 +13,7 @@ use bevy_ecs::prelude::*; pub fn exit_on_all_closed(mut app_exit_events: EventWriter<AppExit>, windows: Query<&Window>) { if windows.is_empty() { bevy_utils::tracing::info!("No windows are open, exiting"); - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); } } diff --git a/crates/bevy_window/src/system.rs b/crates/bevy_window/src/system.rs --- a/crates/bevy_window/src/system.rs +++ b/crates/bevy_window/src/system.rs @@ -28,7 +28,7 @@ pub fn exit_on_primary_closed( ) { if windows.is_empty() { bevy_utils::tracing::info!("Primary window was closed, exiting"); - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); } } diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -19,6 +19,8 @@ mod winit_config; pub mod winit_event; mod winit_windows; +use std::sync::{Arc, Mutex}; + use approx::relative_eq; use bevy_a11y::AccessibilityRequested; use bevy_utils::Instant; diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -263,7 +265,7 @@ type UserEvent = RequestRedraw; /// /// Overriding the app's [runner](bevy_app::App::runner) while using `WinitPlugin` will bypass the /// `EventLoop`. -pub fn winit_runner(mut app: App) { +pub fn winit_runner(mut app: App) -> AppExit { if app.plugins_state() == PluginsState::Ready { app.finish(); app.cleanup(); diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -279,6 +281,10 @@ pub fn winit_runner(mut app: App) { let mut runner_state = WinitAppRunnerState::default(); + // TODO: AppExit is effectively a u8 we could use a AtomicU8 here instead of a mutex. + let mut exit_status = Arc::new(Mutex::new(AppExit::Success)); + let handle_exit_status = exit_status.clone(); + // prepare structures to access data in the world let mut app_exit_event_reader = ManualEventReader::<AppExit>::default(); let mut redraw_event_reader = ManualEventReader::<RequestRedraw>::default(); diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -298,6 +304,8 @@ pub fn winit_runner(mut app: App) { let mut winit_events = Vec::default(); // set up the event loop let event_handler = move |event, event_loop: &EventLoopWindowTarget<UserEvent>| { + let mut exit_status = handle_exit_status.lock().unwrap(); + handle_winit_event( &mut app, &mut app_exit_event_reader, diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -307,6 +315,7 @@ pub fn winit_runner(mut app: App) { &mut focused_windows_state, &mut redraw_event_reader, &mut winit_events, + &mut exit_status, event, event_loop, ); diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -317,6 +326,12 @@ pub fn winit_runner(mut app: App) { if let Err(err) = event_loop.run(event_handler) { error!("winit event loop returned an error: {err}"); } + + // We should be the only ones holding this `Arc` since the event loop exiting cleanly + // should drop the event handler. if this is not the case something funky is happening. + Arc::get_mut(&mut exit_status) + .map(|mutex| mutex.get_mut().unwrap().clone()) + .unwrap_or(AppExit::error()) } #[allow(clippy::too_many_arguments /* TODO: probs can reduce # of args */)] diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -334,6 +349,7 @@ fn handle_winit_event( focused_windows_state: &mut SystemState<(Res<WinitSettings>, Query<&Window>)>, redraw_event_reader: &mut ManualEventReader<RequestRedraw>, winit_events: &mut Vec<WinitEvent>, + exit_status: &mut AppExit, event: Event<UserEvent>, event_loop: &EventLoopWindowTarget<UserEvent>, ) { diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -350,8 +366,14 @@ fn handle_winit_event( } runner_state.redraw_requested = true; + // TODO: Replace with `App::should_exit()` if let Some(app_exit_events) = app.world().get_resource::<Events<AppExit>>() { - if app_exit_event_reader.read(app_exit_events).last().is_some() { + let mut exit_events = app_exit_event_reader.read(app_exit_events); + if exit_events.len() != 0 { + *exit_status = exit_events + .find(|exit| exit.is_error()) + .cloned() + .unwrap_or(AppExit::Success); event_loop.exit(); return; } diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -411,6 +433,7 @@ fn handle_winit_event( app_exit_event_reader, redraw_event_reader, winit_events, + exit_status, ); if runner_state.active != ActiveState::Suspended { event_loop.set_control_flow(ControlFlow::Poll); diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -638,6 +661,7 @@ fn handle_winit_event( app_exit_event_reader, redraw_event_reader, winit_events, + exit_status, ); } _ => {} diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -738,6 +762,7 @@ fn run_app_update_if_should( app_exit_event_reader: &mut ManualEventReader<AppExit>, redraw_event_reader: &mut ManualEventReader<RequestRedraw>, winit_events: &mut Vec<WinitEvent>, + exit_status: &mut AppExit, ) { runner_state.reset_on_update(); diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -797,9 +822,16 @@ fn run_app_update_if_should( } } + // TODO: Replace with `App::should_exit()` if let Some(app_exit_events) = app.world().get_resource::<Events<AppExit>>() { - if app_exit_event_reader.read(app_exit_events).last().is_some() { + let mut exit_events = app_exit_event_reader.read(app_exit_events); + if exit_events.len() != 0 { + *exit_status = exit_events + .find(|exit| exit.is_error()) + .cloned() + .unwrap_or(AppExit::Success); event_loop.exit(); + return; } } } diff --git a/examples/app/custom_loop.rs b/examples/app/custom_loop.rs --- a/examples/app/custom_loop.rs +++ b/examples/app/custom_loop.rs @@ -1,13 +1,13 @@ //! This example demonstrates you can create a custom runner (to update an app manually). It reads //! lines from stdin and prints them from within the ecs. -use bevy::prelude::*; +use bevy::{app::AppExit, prelude::*}; use std::io; #[derive(Resource)] struct Input(String); -fn my_runner(mut app: App) { +fn my_runner(mut app: App) -> AppExit { println!("Type stuff into the console"); for line in io::stdin().lines() { { diff --git a/examples/app/custom_loop.rs b/examples/app/custom_loop.rs --- a/examples/app/custom_loop.rs +++ b/examples/app/custom_loop.rs @@ -15,17 +15,30 @@ fn my_runner(mut app: App) { input.0 = line.unwrap(); } app.update(); + + if let Some(exit) = app.should_exit() { + return exit; + } } + + AppExit::Success } fn print_system(input: Res<Input>) { println!("You typed: {}", input.0); } -fn main() { +fn exit_system(input: Res<Input>, mut exit_event: EventWriter<AppExit>) { + if input.0 == "exit" { + exit_event.send(AppExit::Success); + } +} + +// AppExit implements `Termination` so we can return it from main. +fn main() -> AppExit { App::new() .insert_resource(Input(String::new())) .set_runner(my_runner) - .add_systems(Update, print_system) - .run(); + .add_systems(Update, (print_system, exit_system)) + .run() } diff --git a/examples/ecs/ecs_guide.rs b/examples/ecs/ecs_guide.rs --- a/examples/ecs/ecs_guide.rs +++ b/examples/ecs/ecs_guide.rs @@ -130,10 +130,10 @@ fn game_over_system( ) { if let Some(ref player) = game_state.winning_player { println!("{player} won the game!"); - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); } else if game_state.current_round == game_rules.max_rounds { println!("Ran out of rounds. Nobody wins!"); - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); } } diff --git a/examples/games/desk_toy.rs b/examples/games/desk_toy.rs --- a/examples/games/desk_toy.rs +++ b/examples/games/desk_toy.rs @@ -334,7 +334,7 @@ fn quit( .distance(cursor_world_pos) < BEVY_LOGO_RADIUS { - app_exit.send(AppExit); + app_exit.send(AppExit::Success); } } diff --git a/examples/games/game_menu.rs b/examples/games/game_menu.rs --- a/examples/games/game_menu.rs +++ b/examples/games/game_menu.rs @@ -789,7 +789,7 @@ mod menu { if *interaction == Interaction::Pressed { match menu_button_action { MenuButtonAction::Quit => { - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); } MenuButtonAction::Play => { game_state.set(GameState::Game); diff --git a/examples/time/time.rs b/examples/time/time.rs --- a/examples/time/time.rs +++ b/examples/time/time.rs @@ -1,5 +1,6 @@ //! An example that illustrates how Time is handled in ECS. +use bevy::app::AppExit; use bevy::prelude::*; use std::io::{self, BufRead}; diff --git a/examples/time/time.rs b/examples/time/time.rs --- a/examples/time/time.rs +++ b/examples/time/time.rs @@ -30,7 +31,7 @@ fn help() { println!(" u: Unpause"); } -fn runner(mut app: App) { +fn runner(mut app: App) -> AppExit { banner(); help(); let stdin = io::stdin(); diff --git a/examples/time/time.rs b/examples/time/time.rs --- a/examples/time/time.rs +++ b/examples/time/time.rs @@ -78,6 +79,8 @@ fn runner(mut app: App) { } } } + + AppExit::Success } fn print_real_time(time: Res<Time<Real>>) {
diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -862,27 +904,99 @@ fn run_once(mut app: App) { app.cleanup(); app.update(); + + let mut exit_code_reader = ManualEventReader::default(); + if let Some(app_exit_events) = app.world().get_resource::<Events<AppExit>>() { + if exit_code_reader + .read(app_exit_events) + .any(AppExit::is_error) + { + return AppExit::error(); + } + } + + AppExit::Success } -/// An event that indicates the [`App`] should exit. If one or more of these are present at the -/// end of an update, the [runner](App::set_runner) will end and ([maybe](App::run)) return -/// control to the caller. +/// An event that indicates the [`App`] should exit. If one or more of these are present at the end of an update, +/// the [runner](App::set_runner) will end and ([maybe](App::run)) return control to the caller. /// /// This event can be used to detect when an exit is requested. Make sure that systems listening /// for this event run before the current update ends. -#[derive(Event, Debug, Clone, Default)] -pub struct AppExit; +/// +/// # Portability +/// This type is roughly meant to map to a standard definition of a process exit code (0 means success, not 0 means error). Due to portability concerns +/// (see [`ExitCode`](https://doc.rust-lang.org/std/process/struct.ExitCode.html) and [`process::exit`](https://doc.rust-lang.org/std/process/fn.exit.html#)) +/// we only allow error codes between 1 and [255](u8::MAX). +#[derive(Event, Debug, Clone, Default, PartialEq, Eq)] +pub enum AppExit { + /// [`App`] exited without any problems. + #[default] + Success, + /// The [`App`] experienced an unhandleable error. + /// Holds the exit code we expect our app to return. + Error(NonZeroU8), +} + +impl AppExit { + /// Creates a [`AppExit::Error`] with a error code of 1. + #[must_use] + pub const fn error() -> Self { + Self::Error(NonZeroU8::MIN) + } + + /// Returns `true` if `self` is a [`AppExit::Success`]. + #[must_use] + pub const fn is_success(&self) -> bool { + matches!(self, AppExit::Success) + } + + /// Returns `true` if `self` is a [`AppExit::Error`]. + #[must_use] + pub const fn is_error(&self) -> bool { + matches!(self, AppExit::Error(_)) + } + + /// Creates a [`AppExit`] from a code. + /// + /// When `code` is 0 a [`AppExit::Success`] is constructed otherwise a + /// [`AppExit::Error`] is constructed. + #[must_use] + pub const fn from_code(code: u8) -> Self { + match NonZeroU8::new(code) { + Some(code) => Self::Error(code), + None => Self::Success, + } + } +} + +impl From<u8> for AppExit { + #[must_use] + fn from(value: u8) -> Self { + Self::from_code(value) + } +} + +impl Termination for AppExit { + fn report(self) -> std::process::ExitCode { + match self { + AppExit::Success => ExitCode::SUCCESS, + // We leave logging an error to our users + AppExit::Error(value) => ExitCode::from(value.get()), + } + } +} #[cfg(test)] mod tests { - use std::marker::PhantomData; + use std::{marker::PhantomData, mem}; use bevy_ecs::{ schedule::{OnEnter, States}, system::Commands, }; - use crate::{App, Plugin}; + use crate::{App, AppExit, Plugin}; struct PluginA; impl Plugin for PluginA { diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1089,13 +1203,15 @@ mod tests { #[derive(Resource)] struct MyState {} - fn my_runner(mut app: App) { + fn my_runner(mut app: App) -> AppExit { let my_state = MyState {}; app.world_mut().insert_resource(my_state); for _ in 0..5 { app.update(); } + + AppExit::Success } fn my_system(_: Res<MyState>) { diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1108,4 +1224,11 @@ mod tests { .add_systems(PreUpdate, my_system) .run(); } + + #[test] + fn app_exit_size() { + // There wont be many of them so the size isn't a issue but + // it's nice they're so small let's keep it that way. + assert_eq!(mem::size_of::<AppExit>(), mem::size_of::<u8>()); + } } diff --git a/crates/bevy_dev_tools/src/ci_testing.rs b/crates/bevy_dev_tools/src/ci_testing.rs --- a/crates/bevy_dev_tools/src/ci_testing.rs +++ b/crates/bevy_dev_tools/src/ci_testing.rs @@ -37,7 +37,7 @@ fn ci_testing_exit_after( ) { if let Some(exit_after) = ci_testing_config.exit_after { if *current_frame > exit_after { - app_exit_events.send(AppExit); + app_exit_events.send(AppExit::Success); info!("Exiting after {} frames. Test successful!", exit_after); } }
Add `ExitCode` to `AppExit` > > Is there a way around that? Otherwise I'm not sure if that change is worth it. > > Perhaps `AppExit` can be modified to be `AppExit(ExitCode)`, but that's probably worth it's own issue and PR. _Originally posted by @BD103 in https://github.com/bevyengine/bevy/issues/12305#issuecomment-1987035205_ [On Discord](https://discord.com/channels/691052431525675048/692572690833473578/1230442854304710657), a crash in the render world exits with an exit code of 0, while it should return a number greater than 0. One solution to this is to add the [`ExitCode`](https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html) struct to `AppExit`, so exiting can specify whether it was a `ExitCode::SUCCESS` (the default) or a `ExitCode::FAILURE`.
2024-04-18T18:56:36Z
1.77
2024-06-03T20:36:06Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "plugin_group::tests::add_conflicting_subgroup", "app::tests::cant_add_twice_the_same_plugin - should panic", "app::tests::cant_call_app_run_from_plugin_build - should panic", "plugin_group::tests::add_before", "plugin_group::tests::readd_after", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist2", "app::tests::regression_test_10385", "app::tests::can_add_two_plugins", "plugin_group::tests::readd", "plugin_group::tests::basic_ordering", "plugin_group::tests::add_basic_subgroup", "plugin_group::tests::readd_before", "app::tests::test_derive_app_label", "app::tests::can_add_twice_the_same_plugin_not_unique", "plugin_group::tests::add_after", "app::tests::can_add_twice_the_same_plugin_with_different_type_param", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 30) - compile", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 18) - compile", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 42)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 29)", "crates/bevy_app/src/plugin_group.rs - plugin_group::NoopPluginGroup (line 229)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp (line 31)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,997
bevyengine__bevy-12997
[ "12966" ]
ade70b3925b27f76b669ac5fd9e2c31f824d7667
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ default = [ "bevy_sprite", "bevy_text", "bevy_ui", - "multi-threaded", + "multi_threaded", "png", "hdr", "vorbis", diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -252,7 +252,7 @@ symphonia-wav = ["bevy_internal/symphonia-wav"] serialize = ["bevy_internal/serialize"] # Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread. -multi-threaded = ["bevy_internal/multi-threaded"] +multi_threaded = ["bevy_internal/multi_threaded"] # Use async-io's implementation of block_on instead of futures-lite's implementation. This is preferred if your application uses async-io. async-io = ["bevy_internal/async-io"] diff --git a/benches/Cargo.toml b/benches/Cargo.toml --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -12,7 +12,7 @@ rand = "0.8" rand_chacha = "0.3" criterion = { version = "0.3", features = ["html_reports"] } bevy_app = { path = "../crates/bevy_app" } -bevy_ecs = { path = "../crates/bevy_ecs", features = ["multi-threaded"] } +bevy_ecs = { path = "../crates/bevy_ecs", features = ["multi_threaded"] } bevy_reflect = { path = "../crates/bevy_reflect" } bevy_tasks = { path = "../crates/bevy_tasks" } bevy_utils = { path = "../crates/bevy_utils" } diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -13,7 +13,7 @@ keywords = ["bevy"] [features] file_watcher = ["notify-debouncer-full", "watch"] embedded_watcher = ["file_watcher"] -multi-threaded = ["bevy_tasks/multi-threaded"] +multi_threaded = ["bevy_tasks/multi_threaded"] asset_processor = [] watch = [] trace = [] diff --git a/crates/bevy_asset/src/io/file/mod.rs b/crates/bevy_asset/src/io/file/mod.rs --- a/crates/bevy_asset/src/io/file/mod.rs +++ b/crates/bevy_asset/src/io/file/mod.rs @@ -1,9 +1,9 @@ #[cfg(feature = "file_watcher")] mod file_watcher; -#[cfg(feature = "multi-threaded")] +#[cfg(feature = "multi_threaded")] mod file_asset; -#[cfg(not(feature = "multi-threaded"))] +#[cfg(not(feature = "multi_threaded"))] mod sync_file_asset; use bevy_utils::tracing::error; diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -62,11 +62,11 @@ use bevy_reflect::{FromReflect, GetTypeRegistration, Reflect, TypePath}; use bevy_utils::{tracing::error, HashSet}; use std::{any::TypeId, sync::Arc}; -#[cfg(all(feature = "file_watcher", not(feature = "multi-threaded")))] +#[cfg(all(feature = "file_watcher", not(feature = "multi_threaded")))] compile_error!( "The \"file_watcher\" feature for hot reloading requires the \ - \"multi-threaded\" feature to be functional.\n\ - Consider either disabling the \"file_watcher\" feature or enabling \"multi-threaded\"" + \"multi_threaded\" feature to be functional.\n\ + Consider either disabling the \"file_watcher\" feature or enabling \"multi_threaded\"" ); /// Provides "asset" loading and processing functionality. An [`Asset`] is a "runtime value" that is loaded from an [`AssetSource`], diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -152,9 +152,9 @@ impl AssetProcessor { /// Starts the processor in a background thread. pub fn start(_processor: Res<Self>) { - #[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] + #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] error!("Cannot run AssetProcessor in single threaded mode (or WASM) yet."); - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] { let processor = _processor.clone(); std::thread::spawn(move || { diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -322,9 +322,9 @@ impl AssetProcessor { "Folder {} was added. Attempting to re-process", AssetPath::from_path(&path).with_source(source.id()) ); - #[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] + #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] error!("AddFolder event cannot be handled in single threaded mode (or WASM) yet."); - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] IoTaskPool::get().scope(|scope| { scope.spawn(async move { self.process_assets_internal(scope, source, path) diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -439,7 +439,7 @@ impl AssetProcessor { } #[allow(unused)] - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] async fn process_assets_internal<'scope>( &'scope self, scope: &'scope bevy_tasks::Scope<'scope, '_, ()>, diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -11,7 +11,7 @@ categories = ["game-engines", "data-structures"] [features] trace = [] -multi-threaded = ["bevy_tasks/multi-threaded", "arrayvec"] +multi_threaded = ["bevy_tasks/multi_threaded", "arrayvec"] bevy_debug_stepping = [] default = ["bevy_reflect"] diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -921,12 +921,12 @@ impl<'a, E: Event> EventParIter<'a, E> { /// /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool pub fn for_each_with_id<FN: Fn(&'a E, EventId<E>) + Send + Sync + Clone>(self, func: FN) { - #[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] + #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] { self.into_iter().for_each(|(e, i)| func(e, i)); } - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] { let pool = bevy_tasks::ComputeTaskPool::get(); let thread_count = pool.thread_num(); diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -78,7 +78,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { func(&mut init, item); init }; - #[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] + #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] { let init = init(); // SAFETY: diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -93,7 +93,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { .fold(init, func); } } - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] { let thread_count = bevy_tasks::ComputeTaskPool::get().thread_num(); if thread_count <= 1 { diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -122,7 +122,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { } } - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] fn get_batch_size(&self, thread_count: usize) -> usize { let max_items = || { let id_iter = self.state.matched_storage_ids.iter(); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1393,7 +1393,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> { /// with a mismatched [`WorldId`] is unsound. /// /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] pub(crate) unsafe fn par_fold_init_unchecked_manual<'w, T, FN, INIT>( &self, init_accum: INIT, diff --git a/crates/bevy_ecs/src/schedule/executor/mod.rs b/crates/bevy_ecs/src/schedule/executor/mod.rs --- a/crates/bevy_ecs/src/schedule/executor/mod.rs +++ b/crates/bevy_ecs/src/schedule/executor/mod.rs @@ -38,18 +38,18 @@ pub enum ExecutorKind { /// /// Useful if you're dealing with a single-threaded environment, saving your threads for /// other things, or just trying minimize overhead. - #[cfg_attr(any(target_arch = "wasm32", not(feature = "multi-threaded")), default)] + #[cfg_attr(any(target_arch = "wasm32", not(feature = "multi_threaded")), default)] SingleThreaded, /// Like [`SingleThreaded`](ExecutorKind::SingleThreaded) but calls [`apply_deferred`](crate::system::System::apply_deferred) /// immediately after running each system. Simple, /// Runs the schedule using a thread pool. Non-conflicting systems can run in parallel. - #[cfg_attr(all(not(target_arch = "wasm32"), feature = "multi-threaded"), default)] + #[cfg_attr(all(not(target_arch = "wasm32"), feature = "multi_threaded"), default)] MultiThreaded, } /// Holds systems and conditions of a [`Schedule`](super::Schedule) sorted in topological order -/// (along with dependency information for multi-threaded execution). +/// (along with dependency information for `multi_threaded` execution). /// /// Since the arrays are sorted in the same order, elements are referenced by their index. /// [`FixedBitSet`] is used as a smaller, more efficient substitute of `HashSet<usize>`. diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -317,7 +317,7 @@ impl<'scope, 'env: 'scope, 'sys> Context<'scope, 'env, 'sys> { } impl MultiThreadedExecutor { - /// Creates a new multi-threaded executor for use with a [`Schedule`]. + /// Creates a new `multi_threaded` executor for use with a [`Schedule`]. /// /// [`Schedule`]: crate::schedule::Schedule pub fn new() -> Self { diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -1337,7 +1337,7 @@ impl ScheduleGraph { let hg_node_count = self.hierarchy.graph.node_count(); // get the number of dependencies and the immediate dependents of each system - // (needed by multi-threaded executor to run systems in the correct order) + // (needed by multi_threaded executor to run systems in the correct order) let mut system_dependencies = Vec::with_capacity(sys_count); let mut system_dependents = Vec::with_capacity(sys_count); for &sys_id in &dg_system_ids { diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -77,11 +77,11 @@ serialize = [ "bevy_ui?/serialize", "bevy_color?/serialize", ] -multi-threaded = [ - "bevy_asset?/multi-threaded", - "bevy_ecs/multi-threaded", - "bevy_render?/multi-threaded", - "bevy_tasks/multi-threaded", +multi_threaded = [ + "bevy_asset?/multi_threaded", + "bevy_ecs/multi_threaded", + "bevy_render?/multi_threaded", + "bevy_tasks/multi_threaded", ] async-io = ["bevy_tasks/async-io"] diff --git a/crates/bevy_internal/src/default_plugins.rs b/crates/bevy_internal/src/default_plugins.rs --- a/crates/bevy_internal/src/default_plugins.rs +++ b/crates/bevy_internal/src/default_plugins.rs @@ -79,7 +79,7 @@ impl PluginGroup for DefaultPlugins { // compressed texture formats .add(bevy_render::texture::ImagePlugin::default()); - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] { group = group.add(bevy_render::pipelined_rendering::PipelinedRenderingPlugin); } diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -18,7 +18,7 @@ bmp = ["image/bmp"] webp = ["image/webp"] dds = ["ddsfile"] pnm = ["image/pnm"] -multi-threaded = ["bevy_tasks/multi-threaded"] +multi_threaded = ["bevy_tasks/multi_threaded"] shader_format_glsl = ["naga/glsl-in", "naga/wgsl-out", "naga_oil/glsl"] shader_format_spirv = ["wgpu/spirv", "naga/spv-in", "naga/spv-out"] diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -93,7 +93,7 @@ use std::{ pub struct RenderPlugin { pub render_creation: RenderCreation, /// If `true`, disables asynchronous pipeline compilation. - /// This has no effect on macOS, Wasm, iOS, or without the `multi-threaded` feature. + /// This has no effect on macOS, Wasm, iOS, or without the `multi_threaded` feature. pub synchronous_pipeline_compilation: bool, } diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -982,7 +982,7 @@ impl PipelineCache { #[cfg(all( not(target_arch = "wasm32"), not(target_os = "macos"), - feature = "multi-threaded" + feature = "multi_threaded" ))] fn create_pipeline_task( task: impl Future<Output = Result<Pipeline, PipelineCacheError>> + Send + 'static, diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -1001,7 +1001,7 @@ fn create_pipeline_task( #[cfg(any( target_arch = "wasm32", target_os = "macos", - not(feature = "multi-threaded") + not(feature = "multi_threaded") ))] fn create_pipeline_task( task: impl Future<Output = Result<Pipeline, PipelineCacheError>> + Send + 'static, diff --git a/crates/bevy_tasks/Cargo.toml b/crates/bevy_tasks/Cargo.toml --- a/crates/bevy_tasks/Cargo.toml +++ b/crates/bevy_tasks/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" keywords = ["bevy"] [features] -multi-threaded = ["dep:async-channel", "dep:concurrent-queue"] +multi_threaded = ["dep:async-channel", "dep:concurrent-queue"] [dependencies] futures-lite = "2.0.1" diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -11,14 +11,14 @@ pub use slice::{ParallelSlice, ParallelSliceMut}; mod task; pub use task::Task; -#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] +#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] mod task_pool; -#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] +#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] pub use task_pool::{Scope, TaskPool, TaskPoolBuilder}; -#[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] +#[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] mod single_threaded_task_pool; -#[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] +#[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] pub use single_threaded_task_pool::{FakeTask, Scope, TaskPool, TaskPoolBuilder, ThreadExecutor}; mod usages; diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -26,9 +26,9 @@ mod usages; pub use usages::tick_global_task_pools_on_main_thread; pub use usages::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool}; -#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] +#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] mod thread_executor; -#[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] +#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] pub use thread_executor::{ThreadExecutor, ThreadExecutorTicker}; #[cfg(feature = "async-io")] diff --git a/docs/cargo_features.md b/docs/cargo_features.md --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -31,7 +31,7 @@ The default feature set enables most of the expected features of a game engine, |default_font|Include a default font, containing only ASCII characters, at the cost of a 20kB binary size increase| |hdr|HDR image format support| |ktx2|KTX2 compressed texture support| -|multi-threaded|Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.| +|multi_threaded|Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.| |png|PNG image format support| |sysinfo_plugin|Enables system information diagnostic plugin| |tonemapping_luts|Include tonemapping Look Up Tables KTX2 files. If everything is pink, you need to enable this feature or change the `Tonemapping` method on your `Camera2dBundle` or `Camera3dBundle`.|
diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -659,8 +659,8 @@ mod tests { #[test] fn load_dependencies() { // The particular usage of GatedReader in this test will cause deadlocking if running single-threaded - #[cfg(not(feature = "multi-threaded"))] - panic!("This test requires the \"multi-threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi-threaded"); + #[cfg(not(feature = "multi_threaded"))] + panic!("This test requires the \"multi_threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi_threaded"); let dir = Dir::default(); diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -980,8 +980,8 @@ mod tests { #[test] fn failure_load_states() { // The particular usage of GatedReader in this test will cause deadlocking if running single-threaded - #[cfg(not(feature = "multi-threaded"))] - panic!("This test requires the \"multi-threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi-threaded"); + #[cfg(not(feature = "multi_threaded"))] + panic!("This test requires the \"multi_threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi_threaded"); let dir = Dir::default(); diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1145,8 +1145,8 @@ mod tests { #[test] fn manual_asset_management() { // The particular usage of GatedReader in this test will cause deadlocking if running single-threaded - #[cfg(not(feature = "multi-threaded"))] - panic!("This test requires the \"multi-threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi-threaded"); + #[cfg(not(feature = "multi_threaded"))] + panic!("This test requires the \"multi_threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi_threaded"); let dir = Dir::default(); let dep_path = "dep.cool.ron"; diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1246,8 +1246,8 @@ mod tests { #[test] fn load_folder() { // The particular usage of GatedReader in this test will cause deadlocking if running single-threaded - #[cfg(not(feature = "multi-threaded"))] - panic!("This test requires the \"multi-threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi-threaded"); + #[cfg(not(feature = "multi_threaded"))] + panic!("This test requires the \"multi_threaded\" feature, otherwise it will deadlock.\ncargo test --package bevy_asset --features multi_threaded"); let dir = Dir::default(); diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -171,7 +171,7 @@ impl AssetProcessor { /// * Scan the unprocessed [`AssetReader`] and remove any final processed assets that are invalid or no longer exist. /// * For each asset in the unprocessed [`AssetReader`], kick off a new "process job", which will process the asset /// (if the latest version of the asset has not been processed). - #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] pub fn process_assets(&self) { let start_time = std::time::Instant::now(); debug!("Processing Assets");
multi-threaded feature name is kebab case but all others are snake case ## Bevy version 0.14 ## What went wrong See https://github.com/bevyengine/bevy/blob/62f2a73cac70237c83054345a26b19c9e0a0ee2f/Cargo.toml#L70
There are actually quite a few features that use kebab case, such as all the `symphonia-*` ones. Should those also be changed, or just `multi-threaded`? Oh so there is. We should change all of the ones that aren't deliberately matching a dependencies' feature IMO.
2024-04-16T16:04:30Z
1.77
2024-11-17T23:16:31Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "assets::test::asset_index_round_trip", "handle::tests::hashing", "handle::tests::equality", "handle::tests::conversion", "handle::tests::ordering", "id::tests::equality", "id::tests::hashing", "id::tests::ordering", "id::tests::conversion", "io::embedded::tests::embedded_asset_path_from_external_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_is_ambiguous", "io::embedded::tests::embedded_asset_path_from_external_crate_root_src_path", "io::embedded::tests::embedded_asset_path_from_local_crate", "io::embedded::tests::embedded_asset_path_from_local_crate_bad_src - should panic", "io::embedded::tests::embedded_asset_path_from_external_crate_extraneous_beginning_slashes - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_blank_src_path_questionable", "io::embedded::tests::embedded_asset_path_from_local_example_crate", "path::tests::parse_asset_path", "path::tests::test_parent", "path::tests::test_get_extension", "path::tests::test_resolve_absolute", "path::tests::test_resolve_asset_source", "io::memory::test::memory_dir", "path::tests::test_resolve_canonicalize", "path::tests::test_resolve_canonicalize_base", "path::tests::test_resolve_canonicalize_with_source", "path::tests::test_resolve_explicit_relative", "path::tests::test_resolve_full", "path::tests::test_resolve_implicit_relative", "path::tests::test_resolve_insufficient_elements", "path::tests::test_resolve_trailing_slash", "path::tests::test_with_source", "path::tests::test_resolve_label", "path::tests::test_without_label", "server::loaders::tests::path_resolution", "server::loaders::tests::basic", "server::loaders::tests::ambiguity_resolution", "server::loaders::tests::extension_resolution", "server::loaders::tests::total_resolution", "server::loaders::tests::type_resolution_shadow", "server::loaders::tests::type_resolution", "tests::failure_load_states", "tests::load_folder", "tests::keep_gotten_strong_handles", "tests::manual_asset_management", "tests::load_dependencies", "crates/bevy_asset/src/reflect.rs - reflect::ReflectAsset::get_unchecked_mut (line 65) - compile", "crates/bevy_asset/src/io/embedded/mod.rs - io::embedded::embedded_asset (line 182) - compile", "crates/bevy_asset/src/reflect.rs - reflect::ReflectHandle (line 182) - compile", "crates/bevy_asset/src/path.rs - path::AssetPath (line 24) - compile", "crates/bevy_asset/src/loader.rs - loader::LoadContext<'a>::begin_labeled_asset (line 310) - compile", "crates/bevy_asset/src/server/mod.rs - server::AssetServer::load_untyped (line 332)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve_embed (line 390)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve (line 340)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,945
bevyengine__bevy-12945
[ "12935" ]
5caf085dacf74bf553a0428a5eb7f4574a9bb99c
diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -56,7 +56,7 @@ use self::{ visibility_buffer_raster_node::MeshletVisibilityBufferRasterPassNode, }; use crate::{graph::NodePbr, Material}; -use bevy_app::{App, Plugin}; +use bevy_app::{App, Plugin, PostUpdate}; use bevy_asset::{load_internal_asset, AssetApp, Handle}; use bevy_core_pipeline::{ core_3d::{ diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -68,6 +68,7 @@ use bevy_core_pipeline::{ use bevy_ecs::{ bundle::Bundle, entity::Entity, + prelude::With, query::Has, schedule::IntoSystemConfigs, system::{Commands, Query}, diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -75,10 +76,14 @@ use bevy_ecs::{ use bevy_render::{ render_graph::{RenderGraphApp, ViewNodeRunner}, render_resource::{Shader, TextureUsages}, - view::{prepare_view_targets, InheritedVisibility, Msaa, ViewVisibility, Visibility}, + view::{ + check_visibility, prepare_view_targets, InheritedVisibility, Msaa, ViewVisibility, + Visibility, VisibilitySystems, + }, ExtractSchedule, Render, RenderApp, RenderSet, }; use bevy_transform::components::{GlobalTransform, Transform}; +use bevy_transform::TransformSystem; const MESHLET_BINDINGS_SHADER_HANDLE: Handle<Shader> = Handle::weak_from_u128(1325134235233421); const MESHLET_MESH_MATERIAL_SHADER_HANDLE: Handle<Shader> = diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -160,7 +165,18 @@ impl Plugin for MeshletPlugin { app.init_asset::<MeshletMesh>() .register_asset_loader(MeshletMeshSaverLoad) - .insert_resource(Msaa::Off); + .insert_resource(Msaa::Off) + .add_systems( + PostUpdate, + check_visibility::<WithMeshletMesh> + .in_set(VisibilitySystems::CheckVisibility) + .after(VisibilitySystems::CalculateBounds) + .after(VisibilitySystems::UpdateOrthographicFrusta) + .after(VisibilitySystems::UpdatePerspectiveFrusta) + .after(VisibilitySystems::UpdateProjectionFrusta) + .after(VisibilitySystems::VisibilityPropagate) + .after(TransformSystem::TransformPropagate), + ); } fn finish(&self, app: &mut App) { diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -248,6 +264,10 @@ impl<M: Material> Default for MaterialMeshletMeshBundle<M> { } } +/// A convenient alias for `With<Handle<MeshletMesh>>`, for use with +/// [`bevy_render::view::VisibleEntities`]. +pub type WithMeshletMesh = With<Handle<MeshletMesh>>; + fn configure_meshlet_views( mut views_3d: Query<( Entity, diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -32,6 +32,7 @@ pub mod prelude { }; } +use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use bevy_transform::TransformSystem; pub use bundle::*; pub use dynamic_texture_atlas_builder::*; diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -45,8 +46,9 @@ pub use texture_slice::*; use bevy_app::prelude::*; use bevy_asset::{load_internal_asset, AssetApp, Assets, Handle}; use bevy_core_pipeline::core_2d::Transparent2d; -use bevy_ecs::prelude::*; +use bevy_ecs::{prelude::*, query::QueryItem}; use bevy_render::{ + extract_component::{ExtractComponent, ExtractComponentPlugin}, mesh::Mesh, primitives::Aabb, render_phase::AddRenderCommand, diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -69,6 +71,22 @@ pub enum SpriteSystem { ComputeSlices, } +/// A component that marks entities that aren't themselves sprites but become +/// sprites during rendering. +/// +/// Right now, this is used for `Text`. +#[derive(Component, Reflect, Clone, Copy, Debug, Default)] +#[reflect(Component, Default)] +pub struct SpriteSource; + +/// A convenient alias for `With<Mesh2dHandle>>`, for use with +/// [`bevy_render::view::VisibleEntities`]. +pub type WithMesh2d = With<Mesh2dHandle>; + +/// A convenient alias for `Or<With<Sprite>, With<SpriteSource>>`, for use with +/// [`bevy_render::view::VisibleEntities`]. +pub type WithSprite = Or<(With<Sprite>, With<SpriteSource>)>; + impl Plugin for SpritePlugin { fn build(&self, app: &mut App) { load_internal_asset!( diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -85,7 +103,12 @@ impl Plugin for SpritePlugin { .register_type::<Anchor>() .register_type::<TextureAtlas>() .register_type::<Mesh2dHandle>() - .add_plugins((Mesh2dRenderPlugin, ColorMaterialPlugin)) + .register_type::<SpriteSource>() + .add_plugins(( + Mesh2dRenderPlugin, + ColorMaterialPlugin, + ExtractComponentPlugin::<SpriteSource>::default(), + )) .add_systems( PostUpdate, ( diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -95,7 +118,10 @@ impl Plugin for SpritePlugin { compute_slices_on_sprite_change, ) .in_set(SpriteSystem::ComputeSlices), - check_visibility::<WithMesh2d> + ( + check_visibility::<WithMesh2d>, + check_visibility::<WithSprite>, + ) .in_set(VisibilitySystems::CheckVisibility) .after(VisibilitySystems::CalculateBounds) .after(VisibilitySystems::UpdateOrthographicFrusta) diff --git a/crates/bevy_sprite/src/mesh2d/mesh.rs b/crates/bevy_sprite/src/mesh2d/mesh.rs --- a/crates/bevy_sprite/src/mesh2d/mesh.rs +++ b/crates/bevy_sprite/src/mesh2d/mesh.rs @@ -48,10 +48,6 @@ impl From<Handle<Mesh>> for Mesh2dHandle { } } -/// A convenient alias for `With<Mesh2dHandle>`, for use with -/// [`bevy_render::view::VisibleEntities`]. -pub type WithMesh2d = With<Mesh2dHandle>; - #[derive(Default)] pub struct Mesh2dRenderPlugin; diff --git a/crates/bevy_sprite/src/render/mod.rs b/crates/bevy_sprite/src/render/mod.rs --- a/crates/bevy_sprite/src/render/mod.rs +++ b/crates/bevy_sprite/src/render/mod.rs @@ -2,7 +2,7 @@ use std::ops::Range; use crate::{ texture_atlas::{TextureAtlas, TextureAtlasLayout}, - ComputedTextureSlices, Sprite, WithMesh2d, SPRITE_SHADER_HANDLE, + ComputedTextureSlices, Sprite, WithSprite, SPRITE_SHADER_HANDLE, }; use bevy_asset::{AssetEvent, AssetId, Assets, Handle}; use bevy_color::LinearRgba; diff --git a/crates/bevy_sprite/src/render/mod.rs b/crates/bevy_sprite/src/render/mod.rs --- a/crates/bevy_sprite/src/render/mod.rs +++ b/crates/bevy_sprite/src/render/mod.rs @@ -490,7 +490,7 @@ pub fn queue_sprites( view_entities.clear(); view_entities.extend( visible_entities - .iter::<WithMesh2d>() + .iter::<WithSprite>() .map(|e| e.index() as usize), ); diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -78,6 +78,10 @@ pub enum YAxisOrientation { BottomToTop, } +/// A convenient alias for `With<Text>`, for use with +/// [`bevy_render::view::VisibleEntities`]. +pub type WithText = With<Text>; + impl Plugin for TextPlugin { fn build(&self, app: &mut App) { app.init_asset::<Font>() diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -23,7 +23,7 @@ use bevy_render::{ view::{InheritedVisibility, NoFrustumCulling, ViewVisibility, Visibility}, Extract, }; -use bevy_sprite::{Anchor, ExtractedSprite, ExtractedSprites, TextureAtlasLayout}; +use bevy_sprite::{Anchor, ExtractedSprite, ExtractedSprites, SpriteSource, TextureAtlasLayout}; use bevy_transform::prelude::{GlobalTransform, Transform}; use bevy_utils::HashSet; use bevy_window::{PrimaryWindow, Window, WindowScaleFactorChanged}; diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -78,6 +78,10 @@ pub struct Text2dBundle { pub view_visibility: ViewVisibility, /// Contains the size of the text and its glyph's position and scale data. Generated via [`TextPipeline::queue_text`] pub text_layout_info: TextLayoutInfo, + /// Marks that this is a [`SpriteSource`]. + /// + /// This is needed for visibility computation to work properly. + pub sprite_source: SpriteSource, } /// This system extracts the sprites from the 2D text components and adds them to the
diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -185,6 +211,18 @@ pub fn calculate_bounds_2d( } } +impl ExtractComponent for SpriteSource { + type QueryData = (); + + type QueryFilter = (); + + type Out = SpriteSource; + + fn extract_component(_: QueryItem<'_, Self::QueryData>) -> Option<Self::Out> { + Some(SpriteSource) + } +} + #[cfg(test)] mod test {
Sprite example broken after #12582: Divide the single `VisibleEntities` list ## Bevy version The release number or commit hash of the version you're using. 5caf085da (from #12582) ## Relevant system information ``` INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.2.1 ", kernel: "23.2.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" } INFO bevy_render::renderer: AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal } INFO bevy_winit::system: Creating new window "App" (Entity { index: 0, generation: 1 }) ``` ## What you did ``` $ RUST_BACKTRACE=full MTL_HUD_ENABLED= cargo run --example sprite ``` ## What went wrong Looks like this: <img width="1279" alt="image" src="https://github.com/bevyengine/bevy/assets/135186256/c8418ad5-581f-463a-9e0d-652322581adc"> ## Additional information Works before this commit on 5c3ae32ab: ``` $ git checkout 5c3ae32ab $ RUST_BACKTRACE=full MTL_HUD_ENABLED= cargo run --example sprite ``` <img width="1284" alt="image" src="https://github.com/bevyengine/bevy/assets/135186256/3d68cf15-72c2-4de3-a70a-144cb272c8c0">
2024-04-12T20:03:20Z
1.77
2024-04-13T14:29:02Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "test::calculate_bounds_2d_update_aabb_when_sprite_custom_size_changes_to_some", "test::calculate_bounds_2d_create_aabb_for_image_sprite_entity", "crates/bevy_sprite/src/mesh2d/material.rs - mesh2d::material::Material2d (line 54)", "crates/bevy_sprite/src/texture_atlas_builder.rs - texture_atlas_builder::TextureAtlasBuilder<'a>::finish (line 160)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,811
bevyengine__bevy-15811
[ "14774" ]
bd0c74644fda1c6cbdd2524c2920e81fce063648
diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -41,7 +41,7 @@ derive_more = { version = "1", default-features = false, features = [ ] } nonmax = "0.5" arrayvec = { version = "0.7.4", optional = true } -smallvec = "1" +smallvec = { version = "1", features = ["union"] } [dev-dependencies] rand = "0.8" diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -135,15 +135,15 @@ pub(crate) struct AddBundle { } impl AddBundle { - pub(crate) fn iter_inserted(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub(crate) fn iter_inserted(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.added.iter().chain(self.existing.iter()).copied() } - pub(crate) fn iter_added(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub(crate) fn iter_added(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.added.iter().copied() } - pub(crate) fn iter_existing(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub(crate) fn iter_existing(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.existing.iter().copied() } } diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -489,7 +489,7 @@ impl Archetype { /// /// All of the IDs are unique. #[inline] - pub fn components(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub fn components(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.components.indices() } diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -464,7 +464,7 @@ impl BundleInfo { /// To iterate all components contributed by this bundle (including Required Components), see [`BundleInfo::iter_contributed_components`] #[inline] - pub fn iter_explicit_components(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub fn iter_explicit_components(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.explicit_components().iter().copied() } diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -472,7 +472,7 @@ impl BundleInfo { /// /// To iterate only components explicitly defined in this bundle, see [`BundleInfo::iter_explicit_components`] #[inline] - pub fn iter_contributed_components(&self) -> impl Iterator<Item = ComponentId> + '_ { + pub fn iter_contributed_components(&self) -> impl Iterator<Item = ComponentId> + Clone + '_ { self.component_ids.iter().copied() } 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 @@ -23,6 +23,7 @@ use core::{ marker::PhantomData, ops::{Deref, DerefMut}, }; +use smallvec::SmallVec; /// Type containing triggered [`Event`] information for a given run of an [`Observer`]. This contains the /// [`Event`] data itself. If it was triggered for a specific [`Entity`], it includes that as well. It also 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 @@ -70,6 +71,13 @@ impl<'w, E, B: Bundle> Trigger<'w, E, B> { self.trigger.entity } + /// Returns the components that triggered the observer, out of the + /// components defined in `B`. Does not necessarily include all of them as + /// `B` acts like an `OR` filter rather than an `AND` filter. + pub fn components(&self) -> &[ComponentId] { + &self.trigger.components + } + /// Returns the [`Entity`] that observed the triggered event. /// This allows you to despawn the observer, ceasing observation. /// 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 @@ -193,14 +201,21 @@ impl ObserverDescriptor { pub struct ObserverTrigger { /// The [`Entity`] of the observer handling the trigger. pub observer: Entity, - - /// The [`ComponentId`] the trigger targeted. + /// The [`Event`] the trigger targeted. pub event_type: ComponentId, - + /// The [`ComponentId`]s the trigger targeted. + components: SmallVec<[ComponentId; 2]>, /// The entity the trigger targeted. pub entity: Entity, } +impl ObserverTrigger { + /// Returns the components that the trigger targeted. + pub fn components(&self) -> &[ComponentId] { + &self.components + } +} + // Map between an observer entity and its runner type ObserverMap = EntityHashMap<ObserverRunner>; 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 @@ -262,7 +277,7 @@ impl Observers { mut world: DeferredWorld, event_type: ComponentId, entity: Entity, - components: impl Iterator<Item = ComponentId>, + components: impl Iterator<Item = ComponentId> + Clone, data: &mut T, propagate: &mut bool, ) { 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 @@ -279,12 +294,15 @@ impl Observers { (world.into_deferred(), observers) }; + let trigger_for_components = components.clone(); + let mut trigger_observer = |(&observer, runner): (&Entity, &ObserverRunner)| { (runner)( world.reborrow(), ObserverTrigger { observer, event_type, + components: components.clone().collect(), entity, }, data.into(), 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 @@ -302,7 +320,7 @@ impl Observers { } // Trigger observers listening to this trigger targeting a specific component - components.for_each(|id| { + trigger_for_components.for_each(|id| { if let Some(component_observers) = observers.component_observers.get(&id) { component_observers .map diff --git a/crates/bevy_ecs/src/storage/sparse_set.rs b/crates/bevy_ecs/src/storage/sparse_set.rs --- a/crates/bevy_ecs/src/storage/sparse_set.rs +++ b/crates/bevy_ecs/src/storage/sparse_set.rs @@ -423,7 +423,7 @@ macro_rules! impl_sparse_set { } /// Returns an iterator visiting all keys (indices) in arbitrary order. - pub fn indices(&self) -> impl Iterator<Item = I> + '_ { + pub fn indices(&self) -> impl Iterator<Item = I> + Clone + '_ { self.indices.iter().cloned() } diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -501,7 +501,7 @@ impl<'w> DeferredWorld<'w> { &mut self, event: ComponentId, entity: Entity, - components: impl Iterator<Item = ComponentId>, + components: impl Iterator<Item = ComponentId> + Clone, ) { Observers::invoke::<_>( self.reborrow(),
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 @@ -552,8 +570,10 @@ mod tests { use alloc::vec; use bevy_ptr::OwningPtr; + use bevy_utils::HashMap; use crate as bevy_ecs; + use crate::component::ComponentId; use crate::{ observer::{EmitDynamicTrigger, Observer, ObserverDescriptor, ObserverState, OnReplace}, prelude::*, 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 @@ -1268,9 +1288,6 @@ mod tests { #[test] fn observer_invalid_params() { - #[derive(Event)] - struct EventA; - #[derive(Resource)] struct ResA; 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 @@ -1289,9 +1306,6 @@ mod tests { #[test] fn observer_apply_deferred_from_param_set() { - #[derive(Event)] - struct EventA; - #[derive(Resource)] struct ResA; 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 @@ -1309,4 +1323,35 @@ mod tests { assert!(world.get_resource::<ResA>().is_some()); } + + #[test] + fn observer_triggered_components() { + #[derive(Resource, Default)] + struct Counter(HashMap<ComponentId, usize>); + + let mut world = World::new(); + world.init_resource::<Counter>(); + let a_id = world.register_component::<A>(); + let b_id = world.register_component::<B>(); + + world.add_observer( + |trigger: Trigger<EventA, (A, B)>, mut counter: ResMut<Counter>| { + for &component in trigger.components() { + *counter.0.entry(component).or_default() += 1; + } + }, + ); + world.flush(); + + world.trigger_targets(EventA, [a_id, b_id]); + world.trigger_targets(EventA, a_id); + world.trigger_targets(EventA, b_id); + world.trigger_targets(EventA, [a_id, b_id]); + world.trigger_targets(EventA, a_id); + world.flush(); + + let counter = world.resource::<Counter>(); + assert_eq!(4, *counter.0.get(&a_id).unwrap()); + assert_eq!(3, *counter.0.get(&b_id).unwrap()); + } }
Add a method to Trigger to get a list of the triggered component IDs ## What problem does this solve or what need does it fill? `Observer`s are triggered with `Event`s, but can also narrow those events with specific `Component`s. However, there's currently no way to get to the list of components the observer was triggered with, from inside the observer function. ## What solution would you like? ```rust impl Trigger { pub fn components(&self) -> impl Iterator<Item = ComponentId>; } ``` ## What alternative(s) have you considered? For now I'm passing the `ComponentId` in the event itself. ## Additional context Originally brought up [on discord](https://discord.com/channels/691052431525675048/749335865876021248/1273836049696817163).
2024-10-10T04:49:49Z
1.81
2024-11-27T00:15:04Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::as_deref_mut", "change_detection::tests::mut_from_non_send_mut", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_replace", "change_detection::tests::mut_from_res_mut", "bundle::tests::insert_if_new", "change_detection::tests::mut_new", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "bundle::tests::component_hook_order_recursive", "change_detection::tests::change_expiration", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_no_panic", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_niche_optimization", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "entity::visit_entities::tests::visit_entities", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "identifier::tests::id_construction", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "query::access::tests::filtered_access_extend", "query::access::tests::read_all_access_conflicts", "query::access::tests::filtered_access_extend_or", "observer::tests::observer_despawn", "query::access::tests::test_access_clone", "observer::tests::observer_dynamic_trigger", "query::access::tests::access_get_conflicts", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_access_filters_clone", "query::access::tests::filtered_combined_access", "observer::tests::observer_invalid_params", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_listeners", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_apply_deferred_from_param_set", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::fetch::tests::read_only_field_visibility", "observer::tests::observer_multiple_matches", "observer::tests::observer_multiple_components", "observer::tests::observer_multiple_events", "observer::tests::observer_no_target", "observer::tests::observer_propagating_world", "observer::tests::observer_order_spawn_despawn", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_entity_routing", "query::builder::tests::builder_transmute", "query::access::tests::test_access_clone_from", "observer::tests::observer_propagating_join", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_propagating_no_next", "observer::tests::observer_order_insert_remove", "query::error::test::query_does_not_match", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_order_insert_remove_sparse", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_dynamic", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_order_replace", "observer::tests::observer_propagating_halt", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_propagating", "query::builder::tests::builder_with_without_static", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::fetch::tests::world_query_struct_variants", "observer::tests::observer_trigger_ref", "observer::tests::observer_order_recursive", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_propagating_parallel_propagation", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_entity_mut", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::builder::tests::builder_or", "query::iter::tests::query_sorts", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "observer::tests::observer_propagating_world_skipping", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_added", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::join_with_get", "query::state::tests::transmute_from_dense_to_sparse", "query::state::tests::join", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::any_query", "query::tests::has_query", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::query_iter_combinations_sparse", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflected", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::state::tests::right_world_get_many_mut - should panic", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::query_filtered_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::state::tests::right_world_get_many - should panic", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::executor::simple::skip_automatic_sync_points", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::schedules", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::continue_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::continue_breakpoint", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::stepping::simple_executor", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::verify_cursor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::resize_test", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::sparse_set::tests::sparse_sets", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "storage::sparse_set::tests::sparse_set", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "storage::table::tests::table", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::tests::system_execution::run_exclusive_system", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::configure_set_on_new_schedule", "system::builder::tests::dyn_builder", "schedule::tests::system_ordering::order_exclusive_systems", "system::builder::tests::filtered_resource_conflicts_read_with_res", "system::builder::tests::custom_param_builder", "system::builder::tests::filtered_resource_mut_conflicts_read_with_res", "schedule::tests::conditions::multiple_conditions_on_system", "system::builder::tests::filtered_resource_conflicts_read_with_resmut - should panic", "system::builder::tests::filtered_resource_mut_conflicts_read_with_resmut - should panic", "schedule::tests::conditions::system_with_condition", "system::builder::tests::filtered_resource_conflicts_read_all_with_resmut - should panic", "event::tests::test_event_mutator_iter_nth", "schedule::tests::system_execution::run_system", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ambiguity::read_only", "system::builder::tests::multi_param_builder", "system::builder::tests::filtered_resource_mut_conflicts_write_with_resmut - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_with_res - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_all_with_res - should panic", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::local_builder", "event::tests::test_event_reader_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::builder::tests::query_builder_state", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::builder::tests::param_set_builder", "system::commands::tests::append", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::builder::tests::query_builder", "schedule::executor::tests::invalid_system_param_skips", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::system_conditions_and_change_detection", "system::builder::tests::param_set_vec_builder", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::builder::tests::vec_builder", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::entity_commands_entry", "schedule::condition::tests::multiple_run_conditions", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::commands::tests::commands", "system::commands::tests::remove_components", "schedule::set::tests::test_schedule_label", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_no_input", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::commands::tests::remove_components_by_id", "schedule::tests::conditions::systems_nested_in_system_sets", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::system_ordering::add_systems_correct_order", "system::commands::tests::remove_resources", "system::system::tests::run_system_once", "system::system::tests::non_send_resources", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::commands::tests::insert_components", "system::commands::tests::remove_component_with_required_components", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::run_two_systems", "schedule::condition::tests::run_condition_combinators", "schedule::condition::tests::run_condition", "system::system::tests::run_system_once_invalid_params", "event::tests::test_event_cursor_par_read_mut", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::tests::system_ordering::add_systems_correct_order_nested", "event::tests::test_event_cursor_par_read", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "query::tests::par_iter_mut_change_detection", "system::system_param::tests::system_param_flexibility", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::non_sync_local", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::system_param::tests::system_param_struct_variants", "schedule::schedule::tests::no_sync_chain::chain_second", "system::system_param::tests::param_set_non_send_first", "schedule::schedule::tests::no_sync_chain::chain_all", "system::system_param::tests::system_param_where_clause", "schedule::schedule::tests::merges_sync_points_into_one", "schedule::tests::system_ordering::order_systems", "system::system_registry::tests::exclusive_system", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::cached_system", "system::system_registry::tests::change_detection", "system::system_registry::tests::cached_system_commands", "system::system_registry::tests::cached_system_adapters", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "system::system_registry::tests::output_values", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::nested_systems", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::run_system_invalid_params", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_and_without", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_with_and_without_common", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_working", "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::assert_entity_mut_system_does_conflict - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_systems", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::long_life_test", "system::tests::disjoint_query_mut_read_component_system", "system::tests::commands_param_set", "system::tests::immutable_mut_test", "system::tests::disjoint_query_mut_system", "system::tests::local_system", "system::tests::into_iter_impl", "system::tests::convert_mut_to_immut", "system::tests::non_send_option_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::nonconflicting_system_resources", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::non_send_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::changed_resource_system", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with", "system::tests::or_with_without_and_compatible_with_without", "system::tests::query_is_empty", "system::tests::simple_system", "system::tests::or_param_set_system", "system::tests::panic_inside_system - should panic", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "system::tests::write_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::query_set_system", "tests::changed_query", "tests::added_queries", "tests::added_tracking", "system::tests::update_archetype_component_access_works", "tests::despawn_table_storage", "tests::despawn_mixed_storage", "tests::duplicate_components_panic - should panic", "tests::bundle_derive", "system::tests::world_collections_system", "tests::add_remove_components", "tests::dynamic_required_components", "tests::empty_spawn", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::clear_entities", "system::tests::test_combinator_clone", "tests::entity_mut_and_entity_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::entity_ref_and_mut_query_panic - should panic", "tests::generic_required_components", "tests::filtered_query_access", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch_invalid", "tests::exact_size_query", "tests::changed_trackers", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_single_component_for_each", "tests::query_optional_component_table", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove", "tests::remove_bundle_and_his_required_components", "tests::remove_missing", "tests::remove_component_and_his_required_components", "tests::remove_tracking", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::remove_component_and_his_runtime_required_components", "tests::required_components_inheritance_depth", "tests::required_components_retain_keeps_required", "tests::required_components_spawn_nonexistent_hooks", "tests::resource_scope", "tests::required_components_spawn_then_insert_no_overwrite", "tests::resource", "tests::reserve_and_spawn", "tests::required_components_take_leaves_required", "tests::runtime_required_components", "tests::runtime_required_components_fail_with_duplicate", "tests::runtime_required_components_existing_archetype", "tests::runtime_required_components_override_1", "tests::runtime_required_components_override_2", "world::command_queue::test::test_command_is_send", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "tests::spawn_batch", "tests::stateful_query_handles_new_archetype", "tests::take", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::get_by_id_array", "world::entity_ref::tests::get_by_id_vec", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::get_components", "world::entity_ref::tests::get_mut_by_id_array", "world::entity_ref::tests::get_mut_by_id_vec", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::dynamic_resource", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_system_param", "world::tests::get_entity", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::get_entity_mut", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::reflect::tests::get_component_as_reflect", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1560) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 242) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 348) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 252) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 358)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 72)", "crates/bevy_ecs/src/component.rs - component::Component (line 323)", "crates/bevy_ecs/src/component.rs - component::Component (line 289)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 30)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 400)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/component.rs - component::Component (line 91)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 95)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/component.rs - component::Component (line 45)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1576)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 810)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "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/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 413) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1888)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 835)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/component.rs - component::Component (line 207)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 959)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 105)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 1267)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 703)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/component.rs - component::Component (line 109)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/component.rs - component::Component (line 181)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 125)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/component.rs - component::Component (line 129)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/component.rs - component::Component (line 151)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 125)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 65)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 437)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1305)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 20)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1865)", "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 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 236)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 276) - compile fail", "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::not (line 1041)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 531)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 47)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 569)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/system/builder.rs - system::builder::LocalBuilder (line 507)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 503)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1035) - compile", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 278)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 924) - compile", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/builder.rs - system::builder::QueryParamBuilder (line 225)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 325)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if (line 1245)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove (line 1341)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::retain (line 1484)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if_new_and (line 1292)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 243)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 429)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 709) - compile fail", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 265)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 232)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert (line 1197)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 835)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2029) - compile fail", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert_if (line 1070)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 17)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 209)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 180)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove_with_requires (line 1383)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 348)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 408)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 720)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::queue (line 1461)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 461)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamSetBuilder (line 338)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamBuilder (line 128)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 54)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1297)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 157)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2005)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 654)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 156)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::entry (line 977)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 682)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 49)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert (line 1015)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 234)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 308)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 131)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 193)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 115)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 743)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 856)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1540)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 545)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 656)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 498)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1262)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::despawn (line 1429)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 627)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 95)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::id (line 947)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 74)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 602)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1144)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1039)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1062)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 460)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 224)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 632)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 868)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 568)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 597)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 631)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 819)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 231)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 680)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 977)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1428)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 373)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 302)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 134)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 190)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2148)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 255)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 651)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 28)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 165)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 267)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1583)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 300)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 2052)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1934)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1993)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 2019)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 2079)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityRef (line 2246)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 676)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1191)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 129) - compile", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 2136)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 167)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 83)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1170)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1340)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 96)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 280)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 63)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 185)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 209)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 345)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1964)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 231)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 2216)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1908)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityMut (line 2517)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 2112)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 681)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 1160)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 810)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 560)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 24)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 998)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 700)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1116)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 214)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 1233)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 660)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 305)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 639)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 764)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1767)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 2191)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1490)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_init (line 2159)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1820)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 743)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 787)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 888)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1554)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 1029)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1437)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 256)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 3105)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 622)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 854)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1651)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1620)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 1272)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_insert_with (line 2107)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 863)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1458)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 2159)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components (line 422)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 899)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 1196)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 215)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components (line 319)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 2311)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2783)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 2476)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 3006)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1405)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 1306)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 3028)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components_with (line 475)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1584)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components_with (line 367)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 3368)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,754
bevyengine__bevy-15754
[ "15752" ]
bc352561c9814112dbcf5925a4476f135d758c65
diff --git a/benches/benches/bevy_ecs/observers/propagation.rs b/benches/benches/bevy_ecs/observers/propagation.rs --- a/benches/benches/bevy_ecs/observers/propagation.rs +++ b/benches/benches/bevy_ecs/observers/propagation.rs @@ -106,15 +106,15 @@ fn add_listeners_to_hierarchy<const DENSITY: usize, const N: usize>( world: &mut World, ) { for e in roots.iter() { - world.entity_mut(*e).observe_entity(empty_listener::<N>); + world.entity_mut(*e).observe(empty_listener::<N>); } for e in leaves.iter() { - world.entity_mut(*e).observe_entity(empty_listener::<N>); + world.entity_mut(*e).observe(empty_listener::<N>); } let mut rng = deterministic_rand(); for e in nodes.iter() { if rng.gen_bool(DENSITY as f64 / 100.0) { - world.entity_mut(*e).observe_entity(empty_listener::<N>); + world.entity_mut(*e).observe(empty_listener::<N>); } } } diff --git a/benches/benches/bevy_ecs/observers/simple.rs b/benches/benches/bevy_ecs/observers/simple.rs --- a/benches/benches/bevy_ecs/observers/simple.rs +++ b/benches/benches/bevy_ecs/observers/simple.rs @@ -17,7 +17,7 @@ pub fn observe_simple(criterion: &mut Criterion) { group.bench_function("trigger_simple", |bencher| { let mut world = World::new(); - world.observe(empty_listener_base); + world.add_observer(empty_listener_base); bencher.iter(|| { for _ in 0..10000 { world.trigger(EventBase) diff --git a/benches/benches/bevy_ecs/observers/simple.rs b/benches/benches/bevy_ecs/observers/simple.rs --- a/benches/benches/bevy_ecs/observers/simple.rs +++ b/benches/benches/bevy_ecs/observers/simple.rs @@ -29,7 +29,7 @@ pub fn observe_simple(criterion: &mut Criterion) { let mut world = World::new(); let mut entities = vec![]; for _ in 0..10000 { - entities.push(world.spawn_empty().observe_entity(empty_listener_base).id()); + entities.push(world.spawn_empty().observe(empty_listener_base).id()); } entities.shuffle(&mut deterministic_rand()); bencher.iter(|| { diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1267,7 +1267,7 @@ impl App { /// # struct Friend; /// # /// // An observer system can be any system where the first parameter is a trigger - /// app.observe(|trigger: Trigger<Party>, friends: Query<Entity, With<Friend>>, mut commands: Commands| { + /// app.add_observer(|trigger: Trigger<Party>, friends: Query<Entity, With<Friend>>, mut commands: Commands| { /// if trigger.event().friends_allowed { /// for friend in friends.iter() { /// commands.trigger_targets(Invite, friend); diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1275,11 +1275,11 @@ impl App { /// } /// }); /// ``` - pub fn observe<E: Event, B: Bundle, M>( + pub fn add_observer<E: Event, B: Bundle, M>( &mut self, observer: impl IntoObserverSystem<E, B, M>, ) -> &mut Self { - self.world_mut().observe(observer); + self.world_mut().add_observer(observer); self } } diff --git a/crates/bevy_ecs/README.md b/crates/bevy_ecs/README.md --- a/crates/bevy_ecs/README.md +++ b/crates/bevy_ecs/README.md @@ -315,7 +315,7 @@ struct MyEvent { let mut world = World::new(); -world.observe(|trigger: Trigger<MyEvent>| { +world.add_observer(|trigger: Trigger<MyEvent>| { println!("{}", trigger.event().message); }); diff --git a/crates/bevy_ecs/README.md b/crates/bevy_ecs/README.md --- a/crates/bevy_ecs/README.md +++ b/crates/bevy_ecs/README.md @@ -339,7 +339,7 @@ struct Explode; let mut world = World::new(); let entity = world.spawn_empty().id(); -world.observe(|trigger: Trigger<Explode>, mut commands: Commands| { +world.add_observer(|trigger: Trigger<Explode>, mut commands: Commands| { println!("Entity {:?} goes BOOM!", trigger.entity()); commands.entity(trigger.entity()).despawn(); }); 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 @@ -364,8 +364,29 @@ impl Observers { } impl World { - /// Spawns a "global" [`Observer`] and returns its [`Entity`]. - pub fn observe<E: Event, B: Bundle, M>( + /// Spawns a "global" [`Observer`] which will watch for the given event. + /// Returns its [`Entity`] as a [`EntityWorldMut`]. + /// + /// **Calling [`observe`](EntityWorldMut::observe) on the returned + /// [`EntityWorldMut`] will observe the observer itself, which you very + /// likely do not want.** + /// + /// # Example + /// + /// ``` + /// # use bevy_ecs::prelude::*; + /// #[derive(Component)] + /// struct A; + /// + /// # let mut world = World::new(); + /// world.add_observer(|_: Trigger<OnAdd, A>| { + /// // ... + /// }); + /// world.add_observer(|_: Trigger<OnRemove, A>| { + /// // ... + /// }); + /// ``` + pub fn add_observer<E: Event, B: Bundle, M>( &mut self, system: impl IntoObserverSystem<E, B, M>, ) -> EntityWorldMut { 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 @@ -111,7 +111,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// message: String, /// } /// -/// world.observe(|trigger: Trigger<Speak>| { +/// world.add_observer(|trigger: Trigger<Speak>| { /// println!("{}", trigger.event().message); /// }); /// 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 @@ -124,7 +124,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// }); /// ``` /// -/// Notice that we used [`World::observe`]. This is just a shorthand for spawning an [`Observer`] manually: +/// Notice that we used [`World::add_observer`]. This is just a shorthand for spawning an [`Observer`] manually: /// /// ``` /// # use bevy_ecs::prelude::*; 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 @@ -132,7 +132,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// # #[derive(Event)] /// # struct Speak; /// // These are functionally the same: -/// world.observe(|trigger: Trigger<Speak>| {}); +/// world.add_observer(|trigger: Trigger<Speak>| {}); /// world.spawn(Observer::new(|trigger: Trigger<Speak>| {})); /// ``` /// 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 @@ -145,7 +145,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// # struct PrintNames; /// # #[derive(Component, Debug)] /// # struct Name; -/// world.observe(|trigger: Trigger<PrintNames>, names: Query<&Name>| { +/// world.add_observer(|trigger: Trigger<PrintNames>, names: Query<&Name>| { /// for name in &names { /// println!("{name:?}"); /// } 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 @@ -163,7 +163,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// # struct SpawnThing; /// # #[derive(Component, Debug)] /// # struct Thing; -/// world.observe(|trigger: Trigger<SpawnThing>, mut commands: Commands| { +/// world.add_observer(|trigger: Trigger<SpawnThing>, mut commands: Commands| { /// commands.spawn(Thing); /// }); /// ``` 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 @@ -177,7 +177,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// # struct A; /// # #[derive(Event)] /// # struct B; -/// world.observe(|trigger: Trigger<A>, mut commands: Commands| { +/// world.add_observer(|trigger: Trigger<A>, mut commands: Commands| { /// commands.trigger(B); /// }); /// ``` 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 @@ -195,7 +195,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// #[derive(Event)] /// struct Explode; /// -/// world.observe(|trigger: Trigger<Explode>, mut commands: Commands| { +/// world.add_observer(|trigger: Trigger<Explode>, mut commands: Commands| { /// println!("Entity {:?} goes BOOM!", trigger.entity()); /// commands.entity(trigger.entity()).despawn(); /// }); 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 @@ -228,12 +228,12 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// # let e2 = world.spawn_empty().id(); /// # #[derive(Event)] /// # struct Explode; -/// world.entity_mut(e1).observe_entity(|trigger: Trigger<Explode>, mut commands: Commands| { +/// world.entity_mut(e1).observe(|trigger: Trigger<Explode>, mut commands: Commands| { /// println!("Boom!"); /// commands.entity(trigger.entity()).despawn(); /// }); /// -/// world.entity_mut(e2).observe_entity(|trigger: Trigger<Explode>, mut commands: Commands| { +/// world.entity_mut(e2).observe(|trigger: Trigger<Explode>, mut commands: Commands| { /// println!("The explosion fizzles! This entity is immune!"); /// }); /// ``` 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 @@ -241,7 +241,7 @@ pub type ObserverRunner = fn(DeferredWorld, ObserverTrigger, PtrMut, propagate: /// If all entities watched by a given [`Observer`] are despawned, the [`Observer`] entity will also be despawned. /// This protects against observer "garbage" building up over time. /// -/// The examples above calling [`EntityWorldMut::observe_entity`] to add entity-specific observer logic are (once again) +/// The examples above calling [`EntityWorldMut::observe`] to add entity-specific observer logic are (once again) /// just shorthand for spawning an [`Observer`] directly: /// /// ``` 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 @@ -832,8 +832,13 @@ impl<'w, 's> Commands<'w, 's> { self.queue(TriggerEvent { event, targets }); } - /// Spawns an [`Observer`] and returns the [`EntityCommands`] associated with the entity that stores the observer. - pub fn observe<E: Event, B: Bundle, M>( + /// Spawns an [`Observer`] and returns the [`EntityCommands`] associated + /// with the entity that stores the observer. + /// + /// **Calling [`observe`](EntityCommands::observe) on the returned + /// [`EntityCommands`] will observe the observer itself, which you very + /// likely do not want.** + pub fn add_observer<E: Event, B: Bundle, M>( &mut self, observer: impl IntoObserverSystem<E, B, M>, ) -> 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 @@ -1923,7 +1928,7 @@ fn observe<E: Event, B: Bundle, M>( ) -> impl EntityCommand { move |entity: Entity, world: &mut World| { if let Ok(mut entity) = world.get_entity_mut(entity) { - entity.observe_entity(observer); + entity.observe(observer); } } } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1854,7 +1854,7 @@ impl<'w> EntityWorldMut<'w> { /// Creates an [`Observer`] listening for events of type `E` targeting this entity. /// In order to trigger the callback the entity must also match the query when the event is fired. - pub fn observe_entity<E: Event, B: Bundle, M>( + pub fn observe<E: Event, B: Bundle, M>( &mut self, observer: impl IntoObserverSystem<E, B, M>, ) -> &mut Self { diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -458,8 +458,10 @@ impl Plugin for PbrPlugin { ) .init_resource::<LightMeta>(); - render_app.world_mut().observe(add_light_view_entities); - render_app.world_mut().observe(remove_light_view_entities); + render_app.world_mut().add_observer(add_light_view_entities); + render_app + .world_mut() + .add_observer(remove_light_view_entities); let shadow_pass_node = ShadowPassNode::new(render_app.world_mut()); let mut graph = render_app.world_mut().resource_mut::<RenderGraph>(); diff --git a/crates/bevy_picking/src/events.rs b/crates/bevy_picking/src/events.rs --- a/crates/bevy_picking/src/events.rs +++ b/crates/bevy_picking/src/events.rs @@ -11,7 +11,7 @@ //! # use bevy_picking::prelude::*; //! # let mut world = World::default(); //! world.spawn_empty() -//! .observe_entity(|trigger: Trigger<Pointer<Over>>| { +//! .observe(|trigger: Trigger<Pointer<Over>>| { //! println!("I am being hovered over"); //! }); //! ``` diff --git a/crates/bevy_picking/src/lib.rs b/crates/bevy_picking/src/lib.rs --- a/crates/bevy_picking/src/lib.rs +++ b/crates/bevy_picking/src/lib.rs @@ -15,7 +15,7 @@ //! # struct MyComponent; //! # let mut world = World::new(); //! world.spawn(MyComponent) -//! .observe_entity(|mut trigger: Trigger<Pointer<Click>>| { +//! .observe(|mut trigger: Trigger<Pointer<Click>>| { //! // Get the underlying event type //! let click_event: &Pointer<Click> = trigger.event(); //! // Stop the event from bubbling up the entity hierarchjy diff --git a/crates/bevy_render/src/sync_world.rs b/crates/bevy_render/src/sync_world.rs --- a/crates/bevy_render/src/sync_world.rs +++ b/crates/bevy_render/src/sync_world.rs @@ -85,12 +85,12 @@ pub struct SyncWorldPlugin; impl Plugin for SyncWorldPlugin { fn build(&self, app: &mut bevy_app::App) { app.init_resource::<PendingSyncEntity>(); - app.observe( + app.add_observer( |trigger: Trigger<OnAdd, SyncToRenderWorld>, mut pending: ResMut<PendingSyncEntity>| { pending.push(EntityRecord::Added(trigger.entity())); }, ); - app.observe( + app.add_observer( |trigger: Trigger<OnRemove, SyncToRenderWorld>, mut pending: ResMut<PendingSyncEntity>, query: Query<&RenderEntity>| { diff --git a/crates/bevy_winit/src/cursor.rs b/crates/bevy_winit/src/cursor.rs --- a/crates/bevy_winit/src/cursor.rs +++ b/crates/bevy_winit/src/cursor.rs @@ -31,7 +31,7 @@ impl Plugin for CursorPlugin { .init_resource::<CustomCursorCache>() .add_systems(Last, update_cursors); - app.observe(on_remove_cursor_icon); + app.add_observer(on_remove_cursor_icon); } } diff --git a/examples/animation/animated_fox.rs b/examples/animation/animated_fox.rs --- a/examples/animation/animated_fox.rs +++ b/examples/animation/animated_fox.rs @@ -24,7 +24,7 @@ fn main() { .add_systems(Startup, setup) .add_systems(Update, setup_scene_once_loaded.before(animate_targets)) .add_systems(Update, (keyboard_animation_control, simulate_particles)) - .observe(observe_on_step) + .add_observer(observe_on_step) .run(); } diff --git a/examples/ecs/observer_propagation.rs b/examples/ecs/observer_propagation.rs --- a/examples/ecs/observer_propagation.rs +++ b/examples/ecs/observer_propagation.rs @@ -14,7 +14,7 @@ fn main() { attack_armor.run_if(on_timer(Duration::from_millis(200))), ) // Add a global observer that will emit a line whenever an attack hits an entity. - .observe(attack_hits) + .add_observer(attack_hits) .run(); } diff --git a/examples/ecs/observers.rs b/examples/ecs/observers.rs --- a/examples/ecs/observers.rs +++ b/examples/ecs/observers.rs @@ -15,7 +15,7 @@ fn main() { .add_systems(Update, (draw_shapes, handle_click)) // Observers are systems that run when an event is "triggered". This observer runs whenever // `ExplodeMines` is triggered. - .observe( + .add_observer( |trigger: Trigger<ExplodeMines>, mines: Query<&Mine>, index: Res<SpatialIndex>, diff --git a/examples/ecs/observers.rs b/examples/ecs/observers.rs --- a/examples/ecs/observers.rs +++ b/examples/ecs/observers.rs @@ -35,10 +35,10 @@ fn main() { }, ) // This observer runs whenever the `Mine` component is added to an entity, and places it in a simple spatial index. - .observe(on_add_mine) + .add_observer(on_add_mine) // This observer runs whenever the `Mine` component is removed from an entity (including despawning it) // and removes it from the spatial index. - .observe(on_remove_mine) + .add_observer(on_remove_mine) .run(); } diff --git a/examples/ecs/removal_detection.rs b/examples/ecs/removal_detection.rs --- a/examples/ecs/removal_detection.rs +++ b/examples/ecs/removal_detection.rs @@ -17,7 +17,7 @@ fn main() { // This system will remove a component after two seconds. .add_systems(Update, remove_component) // This observer will react to the removal of the component. - .observe(react_on_removal) + .add_observer(react_on_removal) .run(); }
diff --git a/crates/bevy_dev_tools/src/ci_testing/systems.rs b/crates/bevy_dev_tools/src/ci_testing/systems.rs --- a/crates/bevy_dev_tools/src/ci_testing/systems.rs +++ b/crates/bevy_dev_tools/src/ci_testing/systems.rs @@ -25,7 +25,7 @@ pub(crate) fn send_events(world: &mut World, mut current_frame: Local<u32>) { let path = format!("./screenshot-{}.png", *current_frame); world .spawn(Screenshot::primary_window()) - .observe_entity(save_to_disk(path)); + .observe(save_to_disk(path)); info!("Took a screenshot at frame {}.", *current_frame); } // Custom events are forwarded to the world. 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 @@ -593,10 +614,14 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); - world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); - world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| res.observed("replace")); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); + world.add_observer(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); + world + .add_observer(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); + world.add_observer(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| { + res.observed("replace"); + }); + world + .add_observer(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); let entity = world.spawn(A).id(); world.despawn(entity); 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 @@ -611,10 +636,14 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); - world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); - world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| res.observed("replace")); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); + world.add_observer(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); + world + .add_observer(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); + world.add_observer(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| { + res.observed("replace"); + }); + world + .add_observer(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); let mut entity = world.spawn_empty(); entity.insert(A); 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 @@ -631,10 +660,14 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<OnAdd, S>, mut res: ResMut<Order>| res.observed("add")); - world.observe(|_: Trigger<OnInsert, S>, mut res: ResMut<Order>| res.observed("insert")); - world.observe(|_: Trigger<OnReplace, S>, mut res: ResMut<Order>| res.observed("replace")); - world.observe(|_: Trigger<OnRemove, S>, mut res: ResMut<Order>| res.observed("remove")); + world.add_observer(|_: Trigger<OnAdd, S>, mut res: ResMut<Order>| res.observed("add")); + world + .add_observer(|_: Trigger<OnInsert, S>, mut res: ResMut<Order>| res.observed("insert")); + world.add_observer(|_: Trigger<OnReplace, S>, mut res: ResMut<Order>| { + res.observed("replace"); + }); + world + .add_observer(|_: Trigger<OnRemove, S>, mut res: ResMut<Order>| res.observed("remove")); let mut entity = world.spawn_empty(); entity.insert(S); 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 @@ -653,10 +686,14 @@ mod tests { let entity = world.spawn(A).id(); - world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); - world.observe(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); - world.observe(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| res.observed("replace")); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); + world.add_observer(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add")); + world + .add_observer(|_: Trigger<OnInsert, A>, mut res: ResMut<Order>| res.observed("insert")); + world.add_observer(|_: Trigger<OnReplace, A>, mut res: ResMut<Order>| { + res.observed("replace"); + }); + world + .add_observer(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove")); // TODO: ideally this flush is not necessary, but right now observe() returns WorldEntityMut // and therefore does not automatically flush. 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 @@ -672,26 +709,26 @@ mod tests { fn observer_order_recursive() { let mut world = World::new(); world.init_resource::<Order>(); - world.observe( + world.add_observer( |obs: Trigger<OnAdd, A>, mut res: ResMut<Order>, mut commands: Commands| { res.observed("add_a"); commands.entity(obs.entity()).insert(B); }, ); - world.observe( + world.add_observer( |obs: Trigger<OnRemove, A>, mut res: ResMut<Order>, mut commands: Commands| { res.observed("remove_a"); commands.entity(obs.entity()).remove::<B>(); }, ); - world.observe( + world.add_observer( |obs: Trigger<OnAdd, B>, mut res: ResMut<Order>, mut commands: Commands| { res.observed("add_b"); commands.entity(obs.entity()).remove::<A>(); }, ); - world.observe(|_: Trigger<OnRemove, B>, mut res: ResMut<Order>| { + world.add_observer(|_: Trigger<OnRemove, B>, mut res: ResMut<Order>| { res.observed("remove_b"); }); 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 @@ -709,11 +746,11 @@ mod tests { fn observer_trigger_ref() { let mut world = World::new(); - world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 1); - world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 2); - world.observe(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 4); + world.add_observer(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 1); + world.add_observer(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 2); + world.add_observer(|mut trigger: Trigger<EventWithData>| trigger.event_mut().counter += 4); // This flush is required for the last observer to be called when triggering the event, - // due to `World::observe` returning `WorldEntityMut`. + // due to `World::add_observer` returning `WorldEntityMut`. world.flush(); let mut event = EventWithData { counter: 0 }; 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 @@ -725,11 +762,17 @@ mod tests { fn observer_trigger_targets_ref() { let mut world = World::new(); - world.observe(|mut trigger: Trigger<EventWithData, A>| trigger.event_mut().counter += 1); - world.observe(|mut trigger: Trigger<EventWithData, B>| trigger.event_mut().counter += 2); - world.observe(|mut trigger: Trigger<EventWithData, A>| trigger.event_mut().counter += 4); + world.add_observer(|mut trigger: Trigger<EventWithData, A>| { + trigger.event_mut().counter += 1; + }); + world.add_observer(|mut trigger: Trigger<EventWithData, B>| { + trigger.event_mut().counter += 2; + }); + world.add_observer(|mut trigger: Trigger<EventWithData, A>| { + trigger.event_mut().counter += 4; + }); // This flush is required for the last observer to be called when triggering the event, - // due to `World::observe` returning `WorldEntityMut`. + // due to `World::add_observer` returning `WorldEntityMut`. world.flush(); let mut event = EventWithData { counter: 0 }; 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 @@ -743,8 +786,8 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add_1")); - world.observe(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add_2")); + world.add_observer(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add_1")); + world.add_observer(|_: Trigger<OnAdd, A>, mut res: ResMut<Order>| res.observed("add_2")); world.spawn(A).flush(); assert_eq!(vec!["add_1", "add_2"], world.resource::<Order>().0); 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 @@ -782,7 +825,9 @@ mod tests { world.register_component::<A>(); world.register_component::<B>(); - world.observe(|_: Trigger<OnAdd, (A, B)>, mut res: ResMut<Order>| res.observed("add_ab")); + world.add_observer(|_: Trigger<OnAdd, (A, B)>, mut res: ResMut<Order>| { + res.observed("add_ab"); + }); let entity = world.spawn(A).id(); world.entity_mut(entity).insert(B); 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 @@ -795,7 +840,9 @@ mod tests { let mut world = World::new(); let observer = world - .observe(|_: Trigger<OnAdd, A>| panic!("Observer triggered after being despawned.")) + .add_observer(|_: Trigger<OnAdd, A>| { + panic!("Observer triggered after being despawned.") + }) .id(); world.despawn(observer); world.spawn(A).flush(); 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 @@ -809,10 +856,14 @@ mod tests { let entity = world.spawn((A, B)).flush(); - world.observe(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| res.observed("remove_a")); + world.add_observer(|_: Trigger<OnRemove, A>, mut res: ResMut<Order>| { + res.observed("remove_a"); + }); let observer = world - .observe(|_: Trigger<OnRemove, B>| panic!("Observer triggered after being despawned.")) + .add_observer(|_: Trigger<OnRemove, B>| { + panic!("Observer triggered after being despawned.") + }) .flush(); world.despawn(observer); 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 @@ -826,7 +877,9 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<OnAdd, (A, B)>, mut res: ResMut<Order>| res.observed("add_ab")); + world.add_observer(|_: Trigger<OnAdd, (A, B)>, mut res: ResMut<Order>| { + res.observed("add_ab"); + }); world.spawn((A, B)).flush(); assert_eq!(vec!["add_ab"], world.resource::<Order>().0); 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 @@ -839,8 +892,8 @@ mod tests { world .spawn_empty() - .observe_entity(|_: Trigger<EventA>| panic!("Trigger routed to non-targeted entity.")); - world.observe(move |obs: Trigger<EventA>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventA>| panic!("Trigger routed to non-targeted entity.")); + world.add_observer(move |obs: Trigger<EventA>, mut res: ResMut<Order>| { assert_eq!(obs.entity(), Entity::PLACEHOLDER); res.observed("event_a"); }); 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 @@ -860,12 +913,12 @@ mod tests { world .spawn_empty() - .observe_entity(|_: Trigger<EventA>| panic!("Trigger routed to non-targeted entity.")); + .observe(|_: Trigger<EventA>| panic!("Trigger routed to non-targeted entity.")); let entity = world .spawn_empty() - .observe_entity(|_: Trigger<EventA>, mut res: ResMut<Order>| res.observed("a_1")) + .observe(|_: Trigger<EventA>, mut res: ResMut<Order>| res.observed("a_1")) .id(); - world.observe(move |obs: Trigger<EventA>, mut res: ResMut<Order>| { + world.add_observer(move |obs: Trigger<EventA>, mut res: ResMut<Order>| { assert_eq!(obs.entity(), entity); res.observed("a_2"); }); 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 @@ -931,14 +984,14 @@ mod tests { let parent = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent"); }) .id(); let child = world .spawn(Parent(parent)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child"); }) .id(); 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 @@ -958,14 +1011,14 @@ mod tests { let parent = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent"); }) .id(); let child = world .spawn(Parent(parent)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child"); }) .id(); 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 @@ -988,14 +1041,14 @@ mod tests { let parent = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent"); }) .id(); let child = world .spawn(Parent(parent)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child"); }) .id(); 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 @@ -1018,14 +1071,14 @@ mod tests { let parent = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent"); }) .id(); let child = world .spawn(Parent(parent)) - .observe_entity( + .observe( |mut trigger: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child"); trigger.propagate(false); 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 @@ -1048,21 +1101,21 @@ mod tests { let parent = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent"); }) .id(); let child_a = world .spawn(Parent(parent)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child_a"); }) .id(); let child_b = world .spawn(Parent(parent)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child_b"); }) .id(); 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 @@ -1085,7 +1138,7 @@ mod tests { let entity = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("event"); }) .id(); 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 @@ -1105,14 +1158,14 @@ mod tests { let parent_a = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent_a"); }) .id(); let child_a = world .spawn(Parent(parent_a)) - .observe_entity( + .observe( |mut trigger: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child_a"); trigger.propagate(false); 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 @@ -1122,14 +1175,14 @@ mod tests { let parent_b = world .spawn_empty() - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("parent_b"); }) .id(); let child_b = world .spawn(Parent(parent_b)) - .observe_entity(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + .observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { res.observed("child_b"); }) .id(); 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 @@ -1150,7 +1203,9 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| res.observed("event")); + world.add_observer(|_: Trigger<EventPropagating>, mut res: ResMut<Order>| { + res.observed("event"); + }); let grandparent = world.spawn_empty().id(); let parent = world.spawn(Parent(grandparent)).id(); 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 @@ -1169,7 +1224,7 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - world.observe( + world.add_observer( |trigger: Trigger<EventPropagating>, query: Query<&A>, mut res: ResMut<Order>| { if query.get(trigger.entity()).is_ok() { res.observed("event"); 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 @@ -1196,7 +1251,7 @@ mod tests { let mut world = World::new(); // Observe the removal of A - this will run during despawn - world.observe(|_: Trigger<OnRemove, A>, mut cmd: Commands| { + world.add_observer(|_: Trigger<OnRemove, A>, mut cmd: Commands| { // Spawn a new entity - this reserves a new ID and requires a flush // afterward before Entities::free can be called. cmd.spawn_empty(); 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 @@ -1224,7 +1279,7 @@ mod tests { let mut world = World::new(); // This fails because `ResA` is not present in the world - world.observe(|_: Trigger<EventA>, _: Res<ResA>, mut commands: Commands| { + world.add_observer(|_: Trigger<EventA>, _: Res<ResA>, mut commands: Commands| { commands.insert_resource(ResB); }); world.trigger(EventA); 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 @@ -1241,7 +1296,7 @@ mod tests { struct ResA; let mut world = World::new(); - world.observe( + world.add_observer( |_: Trigger<EventA>, mut params: ParamSet<(Query<Entity>, Commands)>| { params.p1().insert_resource(ResA); }, diff --git a/crates/bevy_ecs/src/system/observer_system.rs b/crates/bevy_ecs/src/system/observer_system.rs --- a/crates/bevy_ecs/src/system/observer_system.rs +++ b/crates/bevy_ecs/src/system/observer_system.rs @@ -70,7 +70,7 @@ mod tests { fn b() {} let mut world = World::new(); - world.observe(a.pipe(b)); + world.add_observer(a.pipe(b)); } #[test] diff --git a/crates/bevy_ecs/src/system/observer_system.rs b/crates/bevy_ecs/src/system/observer_system.rs --- a/crates/bevy_ecs/src/system/observer_system.rs +++ b/crates/bevy_ecs/src/system/observer_system.rs @@ -81,6 +81,6 @@ mod tests { fn b(_: In<u32>) {} let mut world = World::new(); - world.observe(a.pipe(b)); + world.add_observer(a.pipe(b)); } } diff --git a/crates/bevy_render/src/sync_world.rs b/crates/bevy_render/src/sync_world.rs --- a/crates/bevy_render/src/sync_world.rs +++ b/crates/bevy_render/src/sync_world.rs @@ -248,12 +248,12 @@ mod tests { let mut render_world = World::new(); main_world.init_resource::<PendingSyncEntity>(); - main_world.observe( + main_world.add_observer( |trigger: Trigger<OnAdd, SyncToRenderWorld>, mut pending: ResMut<PendingSyncEntity>| { pending.push(EntityRecord::Added(trigger.entity())); }, ); - main_world.observe( + main_world.add_observer( |trigger: Trigger<OnRemove, SyncToRenderWorld>, mut pending: ResMut<PendingSyncEntity>, query: Query<&RenderEntity>| { 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 @@ -581,7 +581,7 @@ mod tests { fn observe_trigger(app: &mut App, scene_id: InstanceId, scene_entity: Entity) { // Add observer - app.world_mut().observe( + app.world_mut().add_observer( move |trigger: Trigger<SceneInstanceReady>, scene_spawner: Res<SceneSpawner>, mut trigger_count: ResMut<TriggerCount>| {
`observe_entity` on `EntityWorldMut` is confusing/inconsistent https://github.com/bevyengine/bevy/pull/15616 changed `observe` to `observe_entity` to avoid scenarios where users would chain `world.observe(..).observe(..)` and unintentionally end up observing their observer. This is because `world.observe` is really more like `world.spawn_observer` than the similarly named `app.observe` which just returns `App`. However, the `observe_entity` name is a bit confusing or unintuitive in the case of `world.spawn(..).observe_entity(..)`, since it seems expected that after spawning an entity you'd observe that entity. The `_entity` suffix adds additional information here that could imply it's doing something other than the obvious, i.e. adds verbosity that actually reduces clarity in the name of preventing other confusion. Possible solutions: - Rename `observe` on `App` and `World` to something like `add_observer`. - Have `observe` return `&mut World` instead of `EntityWorldMut`.
2024-10-08T23:32:59Z
1.81
2024-11-27T00:08:13Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "ci_testing::config::tests::deserialize", "change_detection::tests::as_deref_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_replace", "change_detection::tests::mut_from_non_send_mut", "bundle::tests::insert_if_new", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_recursive", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_tick_wraparound", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_no_panic", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::reserve_entity_len", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "entity::visit_entities::tests::visit_entities", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_filled", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_events", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_construction", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_component", "observer::tests::observer_invalid_params", "observer::tests::observer_apply_deferred_from_param_set", "observer::tests::observer_multiple_listeners", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_components", "observer::tests::observer_multiple_events", "observer::tests::observer_no_target", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_order_spawn_despawn", "query::access::tests::filtered_access_extend", "observer::tests::observer_order_replace", "observer::tests::observer_order_insert_remove", "query::access::tests::read_all_access_conflicts", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_multiple_matches", "query::access::tests::test_access_clone", "observer::tests::observer_propagating_halt", "query::access::tests::access_get_conflicts", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating", "observer::tests::observer_order_recursive", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::test_access_clone_from", "observer::tests::observer_propagating_world_skipping", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_access_filters_clone", "observer::tests::observer_propagating_join", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_trigger_targets_ref", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_with_without_static", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_dynamic", "query::error::test::query_does_not_match", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_transmute", "query::builder::tests::builder_or", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_added", "query::iter::tests::query_sorts", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_empty_tuple", "query::tests::any_query", "query::state::tests::join_with_get", "query::tests::has_query", "query::state::tests::can_transmute_entity_mut", "query::state::tests::transmute_from_dense_to_sparse", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::state::tests::join", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected", "query::tests::query_iter_combinations", "query::tests::query_iter_combinations_sparse", "query::tests::query", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::multi_storage_query", "query::tests::derived_worldqueries", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::iter::tests::query_sort_after_next - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "schedule::set::tests::test_derive_system_set", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_breakpoint", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::continue_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::disabled_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::schedules", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::remove_schedule", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::events", "schedule::stepping::tests::verify_cursor", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::aligned_zst", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::dependency_cycle", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::resource_and_entity_mut", "storage::sparse_set::tests::sparse_sets", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::builder::tests::custom_param_builder", "system::builder::tests::filtered_resource_conflicts_read_with_res", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::resize_test", "system::builder::tests::filtered_resource_conflicts_read_all_with_resmut - should panic", "system::builder::tests::filtered_resource_conflicts_read_with_resmut - should panic", "schedule::tests::system_ambiguity::read_world", "system::builder::tests::filtered_resource_mut_conflicts_read_with_resmut - should panic", "storage::table::tests::table", "system::builder::tests::filtered_resource_mut_conflicts_read_with_res", "system::builder::tests::dyn_builder", "system::builder::tests::filtered_resource_mut_conflicts_write_all_with_res - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_with_res - should panic", "schedule::tests::system_ambiguity::correct_ambiguities", "system::builder::tests::local_builder", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::filtered_resource_mut_conflicts_write_with_resmut - should panic", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::builder::tests::param_set_builder", "system::builder::tests::query_builder", "system::commands::tests::append", "system::builder::tests::param_set_vec_builder", "system::builder::tests::query_builder_state", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::commands", "system::commands::tests::remove_component_with_required_components", "system::commands::tests::entity_commands_entry", "system::commands::tests::insert_components", "system::commands::tests::test_commands_are_send_and_sync", "system::builder::tests::vec_builder", "system::commands::tests::remove_components", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_components_by_id", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::non_send_resources", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::tests::stepping::multi_threaded_executor", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::system::tests::run_system_once_invalid_params", "system::system::tests::run_system_once", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ambiguity::read_only", "system::system_name::tests::test_system_name_exclusive_param", "schedule::schedule::tests::add_systems_to_existing_schedule", "system::system::tests::run_two_systems", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_private_fields", "event::tests::test_event_mutator_iter_nth", "system::system_param::tests::system_param_where_clause", "schedule::tests::conditions::system_with_condition", "system::system_param::tests::system_param_phantom_data", "event::tests::test_event_reader_iter_nth", "system::system_param::tests::system_param_field_limit", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_execution::run_system", "system::system_registry::tests::cached_system_commands", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system_registry::tests::cached_system_adapters", "schedule::executor::tests::invalid_system_param_skips", "system::system_param::tests::system_param_struct_variants", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "system::system_registry::tests::exclusive_system", "schedule::schedule::tests::inserts_a_sync_point", "system::system_param::tests::non_sync_local", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::system_registry::tests::cached_system", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::conditions::systems_with_distributive_condition", "system::system_param::tests::param_set_non_send_first", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system_registry::tests::input_values", "system::system_registry::tests::change_detection", "schedule::stepping::tests::step_run_if_false", "system::system_param::tests::param_set_non_send_second", "schedule::condition::tests::run_condition_combinators", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_registry::tests::local_variables", "system::tests::assert_systems", "schedule::condition::tests::run_condition", "system::system_registry::tests::nested_systems", "system::system_registry::tests::run_system_invalid_params", "system::system_registry::tests::output_values", "system::system_registry::tests::system_with_input_mut", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::condition::tests::multiple_run_conditions", "system::system_registry::tests::system_with_input_ref", "system::tests::any_of_with_and_without_common", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::long_life_test", "system::tests::can_have_16_parameters", "system::tests::any_of_with_entity_and_mut", "system::tests::commands_param_set", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_and_without", "system::tests::immutable_mut_test", "system::tests::get_system_conflicts", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::non_send_option_system", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::into_iter_impl", "system::tests::any_of_working", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::convert_mut_to_immut", "event::tests::test_event_cursor_par_read_mut", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::nonconflicting_system_resources", "system::tests::disjoint_query_mut_system", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::tests::system_ordering::order_systems", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::changed_resource_system", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::local_system", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::any_of_with_conflicting - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::conflicting_query_sets_system - should panic", "system::tests::any_of_has_no_filter_with - should panic", "query::tests::par_iter_mut_change_detection", "system::tests::query_validates_world_id - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::pipe_change_detection", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_with_without_and_compatible_with_without", "system::tests::simple_system", "system::tests::query_is_empty", "system::tests::or_has_filter_with", "system::tests::system_state_change_detection", "system::tests::or_expanded_with_and_without_common", "system::tests::query_set_system", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_param_set_system", "system::tests::system_state_invalid_world - should panic", "system::tests::panic_inside_system - should panic", "system::tests::read_system_state", "system::tests::system_state_archetype_update", "schedule::schedule::tests::merges_sync_points_into_one", "tests::despawn_mixed_storage", "system::tests::or_expanded_nested_with_and_without_common", "tests::despawn_table_storage", "tests::clear_entities", "tests::added_tracking", "tests::added_queries", "tests::bundle_derive", "tests::filtered_query_access", "tests::generic_required_components", "system::tests::write_system_state", "tests::dynamic_required_components", "system::tests::removal_tracking", "tests::insert_or_spawn_batch", "tests::empty_spawn", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::changed_query", "tests::multiple_worlds_same_query_for_each - should panic", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::add_remove_components", "tests::insert_overwrite_drop", "tests::entity_ref_and_mut_query_panic - should panic", "tests::changed_trackers", "tests::duplicate_components_panic - should panic", "tests::non_send_resource", "event::tests::test_event_cursor_par_read", "tests::insert_overwrite_drop_sparse", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::exact_size_query", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::query_all", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch_invalid", "tests::query_filter_with_sparse", "system::tests::update_archetype_component_access_works", "system::tests::world_collections_system", "tests::query_all_for_each", "tests::non_send_resource_points_to_distinct_data", "tests::query_filter_with", "tests::query_get", "tests::query_filters_dont_collide_with_fetches", "tests::query_get_works_across_sparse_removal", "tests::query_filter_with_sparse_for_each", "tests::query_optional_component_sparse_no_match", "tests::query_filter_without", "tests::query_single_component_for_each", "tests::query_single_component", "tests::query_optional_component_table", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "tests::par_for_each_sparse", "tests::query_sparse_component", "tests::query_missing_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_optional_component_sparse", "tests::remove_bundle_and_his_required_components", "tests::remove_tracking", "tests::remove_component_and_his_required_components", "tests::required_components", "tests::required_components_retain_keeps_required", "system::tests::test_combinator_clone", "tests::required_components_take_leaves_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_spawn_nonexistent_hooks", "tests::remove_missing", "tests::required_components_inheritance_depth", "tests::resource", "tests::resource_scope", "tests::reserve_and_spawn", "tests::remove_component_and_his_runtime_required_components", "tests::runtime_required_components_existing_archetype", "tests::required_components_insert_existing_hooks", "tests::runtime_required_components", "tests::runtime_required_components_fail_with_duplicate", "tests::runtime_required_components_override_1", "tests::runtime_required_components_override_2", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_by_id_vec", "world::entity_ref::tests::get_mut_by_id_array", "world::entity_ref::tests::get_components", "world::entity_ref::tests::get_by_id_array", "world::entity_ref::tests::get_mut_by_id_vec", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "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::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::removing_dense_updates_table_row", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::retain_some_components", "world::tests::dynamic_resource", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::get_entity", "world::tests::get_entity_mut", "world::tests::get_resource_mut_by_id", "world::tests::get_resource_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_mut_reflect", "world::reflect::tests::get_component_as_reflect", "world::tests::iter_resources_mut", "world::tests::inspect_entity_components", "world::tests::spawn_empty_bundle", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::tests::iterate_entities", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 348) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1560) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 242) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 252) - compile", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 97)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/component.rs - component::Component (line 323)", "crates/bevy_ecs/src/component.rs - component::Component (line 45)", "crates/bevy_ecs/src/component.rs - component::Component (line 289)", "crates/bevy_ecs/src/component.rs - component::Component (line 358)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 72)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 400)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1576)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/component.rs - component::Component (line 91)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 30)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 810)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "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/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 413) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/component.rs - component::Component (line 181)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1305)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "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/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/component.rs - component::Component (line 151)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 125)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 1267)", "crates/bevy_ecs/src/component.rs - component::Component (line 109)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/component.rs - component::Component (line 129)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1865)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 835)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 437)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 959)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 703)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 105)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1888)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 65)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 236)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/lib.rs - (line 125)", "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 153)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/component.rs - component::Component (line 207)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 276) - compile fail", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 924) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 531)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 569)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1035) - compile", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 627)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 503)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamBuilder (line 128)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/system/builder.rs - system::builder::LocalBuilder (line 507)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 545)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 682)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 47)", "crates/bevy_ecs/src/system/builder.rs - system::builder::QueryParamBuilder (line 225)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 429)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 278)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 743)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 348)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 408)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 709) - compile fail", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 156)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 16)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 325)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2029) - compile fail", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamSetBuilder (line 338)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2005)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 720)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 654)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 232)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 835)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 193)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 49)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 234)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 115)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 308)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 209)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 75)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 265)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1540)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 224)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 131)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 461)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 180)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 243)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1262)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 856)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 977)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 498)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 602)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 74)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1583)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 95)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1297)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 460)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1116)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 656)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 819)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 267)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1144)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1062)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 190)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 632)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1340)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 676)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1039)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 165)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 631)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1428)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 209)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 83)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 2052)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 231)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1191)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 134)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2148)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 2159)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 300)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 680)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1767)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 2112)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 597)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 129) - compile", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 215)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 568)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 144)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 28)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1964)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 651)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 2216)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 280)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 700)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 167)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 2191)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 231)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 255)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1170)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 24)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 2019)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityRef (line 2246)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 214)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 302)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 185)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 373)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1908)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 2079)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1934)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 63)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 560)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 622)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 810)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 660)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 743)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityMut (line 2517)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1993)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 2136)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 639)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 96)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2917)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1820)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1554)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 1160)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1437)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1458)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 305)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 998)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 345)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 256)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 854)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2939)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1490)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 1233)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 863)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 787)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 764)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 1196)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 3016)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 1029)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 2222)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 888)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components_with (line 367)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1584)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 899)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components (line 319)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 681)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2694)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1651)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 2387)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1405)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 3279)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components_with (line 475)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1620)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 1306)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components (line 422)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 1272)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "primitives::tests::intersects_sphere_big_frustum_intersect", "primitives::tests::intersects_sphere_big_frustum_outside", "primitives::tests::aabb_enclosing", "primitives::tests::intersects_sphere_frustum_contained", "primitives::tests::intersects_sphere_frustum_dodges_1_plane", "primitives::tests::intersects_sphere_frustum_intersects_2_planes", "primitives::tests::intersects_sphere_frustum_intersects_3_planes", "primitives::tests::intersects_sphere_frustum_intersects_plane", "primitives::tests::intersects_sphere_frustum_surrounding", "primitives::tests::intersects_sphere_long_frustum_intersect", "primitives::tests::intersects_sphere_long_frustum_outside", "render_graph::graph::tests::test_get_node_typed", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_add_node_edges", "render_graph::graph::tests::test_graph_edges", "render_phase::rangefinder::tests::distance", "render_resource::bind_group::test::texture_visibility", "render_graph::graph::tests::test_slot_already_occupied", "view::visibility::render_layers::rendering_mask_tests::render_layer_iter_no_overflow", "view::visibility::render_layers::rendering_mask_tests::render_layer_ops", "view::visibility::render_layers::rendering_mask_tests::render_layer_shrink", "view::visibility::test::ensure_visibility_enum_size", "view::visibility::render_layers::rendering_mask_tests::rendering_mask_sanity", "sync_world::tests::sync_world", "view::visibility::test::visibility_propagation_with_invalid_parent", "view::visibility::test::visibility_propagation_change_detection", "view::visibility::test::visibility_propagation", "view::visibility::test::visibility_propagation_unconditional_visible", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect (line 435)", "crates/bevy_render/src/batching/gpu_preprocessing.rs - batching::gpu_preprocessing::IndirectParameters (line 144)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect_count (line 475)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect_count (line 392)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indexed_indirect (line 326)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect (line 354)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indirect (line 303)", "crates/bevy_render/src/extract_param.rs - extract_param::Extract (line 30)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::push_debug_group (line 592)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 184)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 266)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 239)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 77)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 201)", "crates/bevy_render/src/view/window/screenshot.rs - view::window::screenshot::Screenshot (line 62)", "crates/bevy_render/src/render_phase/draw.rs - render_phase::draw::RenderCommand (line 163)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 171)", "crates/bevy_render/src/camera/projection.rs - camera::projection::ScalingMode (line 287)", "crates/bevy_render/src/primitives/mod.rs - primitives::Aabb::enclosing (line 57)", "crates/bevy_render/src/camera/projection.rs - camera::projection::OrthographicProjection (line 384)", "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene::tests::resource_entity_map_maps_entities", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene::tests::no_panic_in_map_entities_after_pending_entity_in_hook", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_one_resource_twice", "scene_filter::tests::should_add_to_list", "scene_filter::tests::should_remove_from_list", "dynamic_scene_builder::tests::remove_componentless_entity", "scene_filter::tests::should_set_list_type_if_none", "dynamic_scene_builder::tests::should_extract_allowed_components", "dynamic_scene_builder::tests::should_not_extract_denied_components", "dynamic_scene_builder::tests::extract_query", "dynamic_scene_builder::tests::should_not_extract_denied_resources", "dynamic_scene_builder::tests::should_extract_allowed_resources", "scene_spawner::tests::clone_dynamic_entities", "serde::tests::should_roundtrip_bincode", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_serialize", "serde::tests::should_roundtrip_with_custom_serialization", "serde::tests::should_deserialize", "serde::tests::should_roundtrip_with_later_generations_and_obsolete_references", "scene_spawner::tests::observe_scene_as_child", "scene_spawner::tests::despawn_scene", "bundle::tests::spawn_and_delete", "scene_spawner::tests::observe_dynamic_scene", "scene_spawner::tests::observe_dynamic_scene_as_child", "scene_spawner::tests::observe_scene", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 40)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 242)", "crates/bevy_scene/src/serde.rs - serde::SceneSerializer (line 39)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 330)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,753
bevyengine__bevy-15753
[ "15726" ]
a89ae8e9d99c1f9187ab947616d8eb0b38dc5ca1
diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -365,12 +365,19 @@ impl<'w> DynamicSceneBuilder<'w> { return None; } - let resource = type_registry - .get(type_id)? + let type_registration = type_registry.get(type_id)?; + + let resource = type_registration .data::<ReflectResource>()? .reflect(self.original_world)?; - self.extracted_resources - .insert(component_id, resource.clone_value()); + + let resource = type_registration + .data::<ReflectFromReflect>() + .and_then(|fr| fr.from_reflect(resource.as_partial_reflect())) + .map(PartialReflect::into_partial_reflect) + .unwrap_or_else(|| resource.clone_value()); + + self.extracted_resources.insert(component_id, resource); Some(()) }; extract_and_push();
diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -688,4 +695,39 @@ mod tests { assert_eq!(scene.resources.len(), 1); assert!(scene.resources[0].represents::<ResourceB>()); } + + #[test] + fn should_use_from_reflect() { + #[derive(Resource, Component, Reflect)] + #[reflect(Resource, Component)] + struct SomeType(i32); + + let mut world = World::default(); + let atr = AppTypeRegistry::default(); + { + let mut register = atr.write(); + register.register::<SomeType>(); + } + world.insert_resource(atr); + + world.insert_resource(SomeType(123)); + let entity = world.spawn(SomeType(123)).id(); + + let scene = DynamicSceneBuilder::from_world(&world) + .extract_resources() + .extract_entities(vec![entity].into_iter()) + .build(); + + let component = &scene.entities[0].components[0]; + assert!(component + .try_as_reflect() + .expect("component should be concrete due to `FromReflect`") + .is::<SomeType>()); + + let resource = &scene.resources[0]; + assert!(resource + .try_as_reflect() + .expect("resource should be concrete due to `FromReflect`") + .is::<SomeType>()); + } }
Cannot deserialize `Vec3` in Resources ## Bevy version `0.15.0-dev - rev 0c959f77007c29eead7f902bddd3342a1ecbca20` ## What you did Attempted to serialize and then deserialize a resource with a `Vec3` ## What went wrong A Vec3 is serialized as a 'list' in components but a 'map' in resources. Issue is constistent in both `ron` and `serde_json` ```ron ( resources: { "test::MyType": (( x: 1.0, y: 2.0, z: 3.0, )), }, entities: { 4294967296: ( components: { "test::MyType": ((1.0, 2.0, 3.0)), }, ), }, ) ``` <details> <summary><h2>Full Reproducable</h2></summary> ```rust #[cfg(test)] mod test { use anyhow::Result; use bevy::prelude::*; use bevy::reflect::erased_serde::__private::serde::de::DeserializeSeed; use bevy::scene::ron; use bevy::scene::serde::SceneDeserializer; use bevy::scene::serde::SceneSerializer; #[derive(Resource, Component, Reflect)] #[reflect(Resource, Component)] struct MyType(pub Vec3); #[test] fn works() -> Result<()> { let mut app = App::new(); app.register_type::<MyType>(); app.insert_resource(MyType(Vec3::new(1., 2., 3.))); let entity = app.world_mut().spawn(MyType(Vec3::new(1., 2., 3.))).id(); let world = app.world(); let scene = DynamicSceneBuilder::from_world(world) .extract_resources() .extract_entities(vec![entity].into_iter()) .build(); let registry = app.world().resource::<AppTypeRegistry>().read(); let serializer = SceneSerializer::new(&scene, &registry); let str = ron::ser::to_string_pretty(&serializer, Default::default())?; let mut deserializer = ron::de::Deserializer::from_str(&str)?; println!("{}", str); SceneDeserializer { type_registry: &registry, } .deserialize(&mut deserializer)?; Ok(()) } } ``` </details> ## Additional information Possibly related to #15174, some discussion [in discord here](https://discord.com/channels/691052431525675048/1002362493634629796/1286581027975856129)
2024-10-08T23:11:52Z
1.81
2024-10-09T03:13:51Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "dynamic_scene_builder::tests::should_use_from_reflect" ]
[ "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::extract_one_resource_twice", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::should_extract_allowed_resources", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "dynamic_scene::tests::resource_entity_map_maps_entities", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene_builder::tests::extract_query", "dynamic_scene_builder::tests::remove_componentless_entity", "scene_filter::tests::should_add_to_list", "scene_filter::tests::should_remove_from_list", "scene_filter::tests::should_set_list_type_if_none", "dynamic_scene::tests::no_panic_in_map_entities_after_pending_entity_in_hook", "dynamic_scene_builder::tests::should_not_extract_denied_resources", "dynamic_scene_builder::tests::should_not_extract_denied_components", "dynamic_scene_builder::tests::should_extract_allowed_components", "scene_spawner::tests::clone_dynamic_entities", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::should_roundtrip_bincode", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_serialize", "serde::tests::should_deserialize", "serde::tests::should_roundtrip_with_custom_serialization", "serde::tests::should_roundtrip_with_later_generations_and_obsolete_references", "scene_spawner::tests::despawn_scene", "scene_spawner::tests::observe_dynamic_scene_as_child", "scene_spawner::tests::observe_dynamic_scene", "bundle::tests::spawn_and_delete", "scene_spawner::tests::observe_scene", "scene_spawner::tests::observe_scene_as_child", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 242)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 330)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 40)", "crates/bevy_scene/src/serde.rs - serde::SceneSerializer (line 39)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,702
bevyengine__bevy-15702
[ "8384" ]
bd0c74644fda1c6cbdd2524c2920e81fce063648
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 @@ -91,7 +91,7 @@ pub fn insert_commands(criterion: &mut Criterion) { command_queue.apply(&mut world); }); }); - group.bench_function("insert_batch", |bencher| { + group.bench_function("insert_or_spawn_batch", |bencher| { let mut world = World::default(); let mut command_queue = CommandQueue::default(); let mut entities = Vec::new(); 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 @@ -109,6 +109,24 @@ pub fn insert_commands(criterion: &mut Criterion) { command_queue.apply(&mut world); }); }); + group.bench_function("insert_batch", |bencher| { + let mut world = World::default(); + let mut command_queue = CommandQueue::default(); + let mut entities = Vec::new(); + for _ in 0..entity_count { + entities.push(world.spawn_empty().id()); + } + + bencher.iter(|| { + let mut commands = Commands::new(&mut command_queue, &world); + let mut values = Vec::with_capacity(entity_count); + for entity in &entities { + values.push((*entity, (Matrix::default(), Vec3::default()))); + } + commands.insert_batch(values); + command_queue.apply(&mut world); + }); + }); group.finish(); } 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 @@ -614,6 +614,110 @@ impl<'w, 's> Commands<'w, 's> { self.queue(insert_or_spawn_batch(bundles_iter)); } + /// Pushes a [`Command`] to the queue for adding a [`Bundle`] type to a batch of [`Entities`](Entity). + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// When the command is applied, for each `(Entity, Bundle)` pair in the given batch, + /// the `Bundle` is added to the `Entity`, overwriting any existing components shared by the `Bundle`. + /// + /// This method is equivalent to iterating the batch, + /// calling [`entity`](Self::entity) for each pair, + /// and passing the bundle to [`insert`](EntityCommands::insert), + /// but it is faster due to memory pre-allocation. + /// + /// # Panics + /// + /// This command panics if any of the given entities do not exist. + /// + /// For the non-panicking version, see [`try_insert_batch`](Self::try_insert_batch). + #[track_caller] + pub fn insert_batch<I, B>(&mut self, batch: I) + where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, + { + self.queue(insert_batch(batch)); + } + + /// Pushes a [`Command`] to the queue for adding a [`Bundle`] type to a batch of [`Entities`](Entity). + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// When the command is applied, for each `(Entity, Bundle)` pair in the given batch, + /// the `Bundle` is added to the `Entity`, except for any components already present on the `Entity`. + /// + /// This method is equivalent to iterating the batch, + /// calling [`entity`](Self::entity) for each pair, + /// and passing the bundle to [`insert_if_new`](EntityCommands::insert_if_new), + /// but it is faster due to memory pre-allocation. + /// + /// # Panics + /// + /// This command panics if any of the given entities do not exist. + /// + /// For the non-panicking version, see [`try_insert_batch_if_new`](Self::try_insert_batch_if_new). + #[track_caller] + pub fn insert_batch_if_new<I, B>(&mut self, batch: I) + where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, + { + self.queue(insert_batch_if_new(batch)); + } + + /// Pushes a [`Command`] to the queue for adding a [`Bundle`] type to a batch of [`Entities`](Entity). + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// When the command is applied, for each `(Entity, Bundle)` pair in the given batch, + /// the `Bundle` is added to the `Entity`, overwriting any existing components shared by the `Bundle`. + /// + /// This method is equivalent to iterating the batch, + /// calling [`get_entity`](Self::get_entity) for each pair, + /// and passing the bundle to [`insert`](EntityCommands::insert), + /// but it is faster due to memory pre-allocation. + /// + /// This command silently fails by ignoring any entities that do not exist. + /// + /// For the panicking version, see [`insert_batch`](Self::insert_batch). + #[track_caller] + pub fn try_insert_batch<I, B>(&mut self, batch: I) + where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, + { + self.queue(try_insert_batch(batch)); + } + + /// Pushes a [`Command`] to the queue for adding a [`Bundle`] type to a batch of [`Entities`](Entity). + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// When the command is applied, for each `(Entity, Bundle)` pair in the given batch, + /// the `Bundle` is added to the `Entity`, except for any components already present on the `Entity`. + /// + /// This method is equivalent to iterating the batch, + /// calling [`get_entity`](Self::get_entity) for each pair, + /// and passing the bundle to [`insert_if_new`](EntityCommands::insert_if_new), + /// but it is faster due to memory pre-allocation. + /// + /// This command silently fails by ignoring any entities that do not exist. + /// + /// For the panicking version, see [`insert_batch_if_new`](Self::insert_batch_if_new). + #[track_caller] + pub fn try_insert_batch_if_new<I, B>(&mut self, batch: I) + where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, + { + self.queue(try_insert_batch_if_new(batch)); + } + /// Pushes a [`Command`] to the queue for inserting a [`Resource`] in the [`World`] with an inferred value. /// /// The inferred value is determined by the [`FromWorld`] trait of the resource. 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 @@ -1734,6 +1838,94 @@ where } } +/// A [`Command`] that consumes an iterator to add a series of [`Bundles`](Bundle) to a set of entities. +/// If any entities do not exist in the world, this command will panic. +/// +/// This is more efficient than inserting the bundles individually. +#[track_caller] +fn insert_batch<I, B>(batch: I) -> impl Command +where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, +{ + #[cfg(feature = "track_change_detection")] + let caller = Location::caller(); + move |world: &mut World| { + world.insert_batch_with_caller( + batch, + InsertMode::Replace, + #[cfg(feature = "track_change_detection")] + caller, + ); + } +} + +/// A [`Command`] that consumes an iterator to add a series of [`Bundles`](Bundle) to a set of entities. +/// If any entities do not exist in the world, this command will panic. +/// +/// This is more efficient than inserting the bundles individually. +#[track_caller] +fn insert_batch_if_new<I, B>(batch: I) -> impl Command +where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, +{ + #[cfg(feature = "track_change_detection")] + let caller = Location::caller(); + move |world: &mut World| { + world.insert_batch_with_caller( + batch, + InsertMode::Keep, + #[cfg(feature = "track_change_detection")] + caller, + ); + } +} + +/// A [`Command`] that consumes an iterator to add a series of [`Bundles`](Bundle) to a set of entities. +/// If any entities do not exist in the world, this command will ignore them. +/// +/// This is more efficient than inserting the bundles individually. +#[track_caller] +fn try_insert_batch<I, B>(batch: I) -> impl Command +where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, +{ + #[cfg(feature = "track_change_detection")] + let caller = Location::caller(); + move |world: &mut World| { + world.try_insert_batch_with_caller( + batch, + InsertMode::Replace, + #[cfg(feature = "track_change_detection")] + caller, + ); + } +} + +/// A [`Command`] that consumes an iterator to add a series of [`Bundles`](Bundle) to a set of entities. +/// If any entities do not exist in the world, this command will ignore them. +/// +/// This is more efficient than inserting the bundles individually. +#[track_caller] +fn try_insert_batch_if_new<I, B>(batch: I) -> impl Command +where + I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static, + B: Bundle, +{ + #[cfg(feature = "track_change_detection")] + let caller = Location::caller(); + move |world: &mut World| { + world.try_insert_batch_with_caller( + batch, + InsertMode::Keep, + #[cfg(feature = "track_change_detection")] + caller, + ); + } +} + /// A [`Command`] that despawns a specific entity. /// This will emit a warning if the entity does not exist. /// 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 @@ -2466,6 +2466,309 @@ impl World { } } + /// For a given batch of ([`Entity`], [`Bundle`]) pairs, + /// adds the `Bundle` of components to each `Entity`. + /// This is faster than doing equivalent operations one-by-one. + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// This will overwrite any previous values of components shared by the `Bundle`. + /// See [`World::insert_batch_if_new`] to keep the old values instead. + /// + /// # Panics + /// + /// This function will panic if any of the associated entities do not exist. + /// + /// For the non-panicking version, see [`World::try_insert_batch`]. + #[track_caller] + pub fn insert_batch<I, B>(&mut self, batch: I) + where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.insert_batch_with_caller( + batch, + InsertMode::Replace, + #[cfg(feature = "track_change_detection")] + Location::caller(), + ); + } + + /// For a given batch of ([`Entity`], [`Bundle`]) pairs, + /// adds the `Bundle` of components to each `Entity` without overwriting. + /// This is faster than doing equivalent operations one-by-one. + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// This is the same as [`World::insert_batch`], but in case of duplicate + /// components it will leave the old values instead of replacing them with new ones. + /// + /// # Panics + /// + /// This function will panic if any of the associated entities do not exist. + /// + /// For the non-panicking version, see [`World::try_insert_batch_if_new`]. + #[track_caller] + pub fn insert_batch_if_new<I, B>(&mut self, batch: I) + where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.insert_batch_with_caller( + batch, + InsertMode::Keep, + #[cfg(feature = "track_change_detection")] + Location::caller(), + ); + } + + /// Split into a new function so we can differentiate the calling location. + /// + /// This can be called by: + /// - [`World::insert_batch`] + /// - [`World::insert_batch_if_new`] + /// - [`Commands::insert_batch`] + /// - [`Commands::insert_batch_if_new`] + #[inline] + pub(crate) fn insert_batch_with_caller<I, B>( + &mut self, + iter: I, + insert_mode: InsertMode, + #[cfg(feature = "track_change_detection")] caller: &'static Location, + ) where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.flush(); + + let change_tick = self.change_tick(); + + let bundle_id = self + .bundles + .register_info::<B>(&mut self.components, &mut self.storages); + + struct InserterArchetypeCache<'w> { + inserter: BundleInserter<'w>, + archetype_id: ArchetypeId, + } + + let mut batch = iter.into_iter(); + + if let Some((first_entity, first_bundle)) = batch.next() { + if let Some(first_location) = self.entities().get(first_entity) { + let mut cache = InserterArchetypeCache { + // SAFETY: we initialized this bundle_id in `register_info` + inserter: unsafe { + BundleInserter::new_with_id( + self, + first_location.archetype_id, + bundle_id, + change_tick, + ) + }, + archetype_id: first_location.archetype_id, + }; + // SAFETY: `entity` is valid, `location` matches entity, bundle matches inserter + unsafe { + cache.inserter.insert( + first_entity, + first_location, + first_bundle, + insert_mode, + #[cfg(feature = "track_change_detection")] + caller, + ) + }; + + for (entity, bundle) in batch { + if let Some(location) = cache.inserter.entities().get(entity) { + if location.archetype_id != cache.archetype_id { + cache = InserterArchetypeCache { + // SAFETY: we initialized this bundle_id in `register_info` + inserter: unsafe { + BundleInserter::new_with_id( + self, + location.archetype_id, + bundle_id, + change_tick, + ) + }, + archetype_id: location.archetype_id, + } + } + // SAFETY: `entity` is valid, `location` matches entity, bundle matches inserter + unsafe { + cache.inserter.insert( + entity, + location, + bundle, + insert_mode, + #[cfg(feature = "track_change_detection")] + caller, + ) + }; + } else { + panic!("error[B0003]: Could not insert a bundle (of type `{}`) for entity {:?} because it doesn't exist in this World. See: https://bevyengine.org/learn/errors/b0003", core::any::type_name::<B>(), entity); + } + } + } else { + panic!("error[B0003]: Could not insert a bundle (of type `{}`) for entity {:?} because it doesn't exist in this World. See: https://bevyengine.org/learn/errors/b0003", core::any::type_name::<B>(), first_entity); + } + } + } + + /// For a given batch of ([`Entity`], [`Bundle`]) pairs, + /// adds the `Bundle` of components to each `Entity`. + /// This is faster than doing equivalent operations one-by-one. + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// This will overwrite any previous values of components shared by the `Bundle`. + /// See [`World::try_insert_batch_if_new`] to keep the old values instead. + /// + /// This function silently fails by ignoring any entities that do not exist. + /// + /// For the panicking version, see [`World::insert_batch`]. + #[track_caller] + pub fn try_insert_batch<I, B>(&mut self, batch: I) + where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.try_insert_batch_with_caller( + batch, + InsertMode::Replace, + #[cfg(feature = "track_change_detection")] + Location::caller(), + ); + } + /// For a given batch of ([`Entity`], [`Bundle`]) pairs, + /// adds the `Bundle` of components to each `Entity` without overwriting. + /// This is faster than doing equivalent operations one-by-one. + /// + /// A batch can be any type that implements [`IntoIterator`] containing `(Entity, Bundle)` tuples, + /// such as a [`Vec<(Entity, Bundle)>`] or an array `[(Entity, Bundle); N]`. + /// + /// This is the same as [`World::try_insert_batch`], but in case of duplicate + /// components it will leave the old values instead of replacing them with new ones. + /// + /// This function silently fails by ignoring any entities that do not exist. + /// + /// For the panicking version, see [`World::insert_batch_if_new`]. + #[track_caller] + pub fn try_insert_batch_if_new<I, B>(&mut self, batch: I) + where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.try_insert_batch_with_caller( + batch, + InsertMode::Keep, + #[cfg(feature = "track_change_detection")] + Location::caller(), + ); + } + + /// Split into a new function so we can differentiate the calling location. + /// + /// This can be called by: + /// - [`World::try_insert_batch`] + /// - [`World::try_insert_batch_if_new`] + /// - [`Commands::try_insert_batch`] + /// - [`Commands::try_insert_batch_if_new`] + #[inline] + pub(crate) fn try_insert_batch_with_caller<I, B>( + &mut self, + iter: I, + insert_mode: InsertMode, + #[cfg(feature = "track_change_detection")] caller: &'static Location, + ) where + I: IntoIterator, + I::IntoIter: Iterator<Item = (Entity, B)>, + B: Bundle, + { + self.flush(); + + let change_tick = self.change_tick(); + + let bundle_id = self + .bundles + .register_info::<B>(&mut self.components, &mut self.storages); + + struct InserterArchetypeCache<'w> { + inserter: BundleInserter<'w>, + archetype_id: ArchetypeId, + } + + let mut batch = iter.into_iter(); + + if let Some((first_entity, first_bundle)) = batch.next() { + if let Some(first_location) = self.entities().get(first_entity) { + let mut cache = InserterArchetypeCache { + // SAFETY: we initialized this bundle_id in `register_info` + inserter: unsafe { + BundleInserter::new_with_id( + self, + first_location.archetype_id, + bundle_id, + change_tick, + ) + }, + archetype_id: first_location.archetype_id, + }; + // SAFETY: `entity` is valid, `location` matches entity, bundle matches inserter + unsafe { + cache.inserter.insert( + first_entity, + first_location, + first_bundle, + insert_mode, + #[cfg(feature = "track_change_detection")] + caller, + ) + }; + + for (entity, bundle) in batch { + if let Some(location) = cache.inserter.entities().get(entity) { + if location.archetype_id != cache.archetype_id { + cache = InserterArchetypeCache { + // SAFETY: we initialized this bundle_id in `register_info` + inserter: unsafe { + BundleInserter::new_with_id( + self, + location.archetype_id, + bundle_id, + change_tick, + ) + }, + archetype_id: location.archetype_id, + } + } + // SAFETY: `entity` is valid, `location` matches entity, bundle matches inserter + unsafe { + cache.inserter.insert( + entity, + location, + bundle, + insert_mode, + #[cfg(feature = "track_change_detection")] + caller, + ) + }; + } + } + } + } + } + /// Temporarily removes the requested resource from this [`World`], runs custom user code, /// then re-adds the resource before returning. ///
diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1699,6 +1699,134 @@ mod tests { ); } + #[test] + fn insert_batch() { + let mut world = World::default(); + let e0 = world.spawn(A(0)).id(); + let e1 = world.spawn(B(0)).id(); + + let values = vec![(e0, (A(1), B(0))), (e1, (A(0), B(1)))]; + + world.insert_batch(values); + + assert_eq!( + world.get::<A>(e0), + Some(&A(1)), + "first entity's A component should have been replaced" + ); + assert_eq!( + world.get::<B>(e0), + Some(&B(0)), + "first entity should have received B component" + ); + assert_eq!( + world.get::<A>(e1), + Some(&A(0)), + "second entity should have received A component" + ); + assert_eq!( + world.get::<B>(e1), + Some(&B(1)), + "second entity's B component should have been replaced" + ); + } + + #[test] + fn insert_batch_same_archetype() { + let mut world = World::default(); + let e0 = world.spawn((A(0), B(0))).id(); + let e1 = world.spawn((A(0), B(0))).id(); + let e2 = world.spawn(B(0)).id(); + + let values = vec![(e0, (B(1), C)), (e1, (B(2), C)), (e2, (B(3), C))]; + + world.insert_batch(values); + let mut query = world.query::<(Option<&A>, &B, &C)>(); + let component_values = query.get_many(&world, [e0, e1, e2]).unwrap(); + + assert_eq!( + component_values, + [(Some(&A(0)), &B(1), &C), (Some(&A(0)), &B(2), &C), (None, &B(3), &C)], + "all entities should have had their B component replaced, received C component, and had their A component (or lack thereof) unchanged" + ); + } + + #[test] + fn insert_batch_if_new() { + let mut world = World::default(); + let e0 = world.spawn(A(0)).id(); + let e1 = world.spawn(B(0)).id(); + + let values = vec![(e0, (A(1), B(0))), (e1, (A(0), B(1)))]; + + world.insert_batch_if_new(values); + + assert_eq!( + world.get::<A>(e0), + Some(&A(0)), + "first entity's A component should not have been replaced" + ); + assert_eq!( + world.get::<B>(e0), + Some(&B(0)), + "first entity should have received B component" + ); + assert_eq!( + world.get::<A>(e1), + Some(&A(0)), + "second entity should have received A component" + ); + assert_eq!( + world.get::<B>(e1), + Some(&B(0)), + "second entity's B component should not have been replaced" + ); + } + + #[test] + fn try_insert_batch() { + let mut world = World::default(); + let e0 = world.spawn(A(0)).id(); + let e1 = Entity::from_raw(1); + + let values = vec![(e0, (A(1), B(0))), (e1, (A(0), B(1)))]; + + world.try_insert_batch(values); + + assert_eq!( + world.get::<A>(e0), + Some(&A(1)), + "first entity's A component should have been replaced" + ); + assert_eq!( + world.get::<B>(e0), + Some(&B(0)), + "first entity should have received B component" + ); + } + + #[test] + fn try_insert_batch_if_new() { + let mut world = World::default(); + let e0 = world.spawn(A(0)).id(); + let e1 = Entity::from_raw(1); + + let values = vec![(e0, (A(1), B(0))), (e1, (A(0), B(1)))]; + + world.try_insert_batch_if_new(values); + + assert_eq!( + world.get::<A>(e0), + Some(&A(0)), + "first entity's A component should not have been replaced" + ); + assert_eq!( + world.get::<B>(e0), + Some(&B(0)), + "first entity should have received B component" + ); + } + #[test] fn required_components() { #[derive(Component)]
Add Commands::insert_batch ## What problem does this solve or what need does it fill? Creating multiple entities of the same prototype in the system is a very common requirement, and existing Commands::spawn_batch can create entities in bulk and achieve efficient insertion, but this interface cannot return the Enity I have already created. If I need these entities, I have adopted the following method: ```rust let mut entity_ list = Vec::new(); let mut bundle_ list= Vec::new(); for _ in 0..100 { let entity = commands.spawn_ empty(); entity_ list.push(entity); bundle_ list.push((entity, Bundle)) } commands.insert_ or_ spawn_ batch(bundle_list.into_iter()); ``` But I encountered a very serious performance issue, some entities may need to check if they are in pending , and this inspection will go through an iterative process, and the code snippet is: ```rust else if let Some(index) = self.pending.iter().position(|item| *item == entity.index) { self.pending.swap_ remove(index); let new_ free_ cursor = self.pending.len() as IdCursor; *self.free_ cursor.get_ mut() = new_ free_ cursor; self.len += 1; AllocAtWithoutReplacement::DidNotExist } ``` This approach is slower than inserting one at a time ## What solution would you like? Add Commands::insert_batch, but do not check if each entity is in pending, panic If the entity does not exist.
I see there is also `World::insert_or_spawn_batch`, should a similar thing be done there? Edit: Just saw that Command::insert_or_spawn_batch calls World::insert_or_spawn_batch I made a draft PR that I think addresses the issue. @wzjsun or @nicopap let me know if this solution is in line with what you're expecting @Connor-McMillin Thank you for reaching out. I'm pleased to inform you that my requirements have been met. I greatly appreciate the effort you have put into addressing this issue.
2024-10-07T16:20:26Z
1.81
2024-10-14T02:44:22Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "bundle::tests::component_hook_order_insert_remove", "entity::map_entities::tests::entity_mapper_no_panic", "bundle::tests::insert_if_new", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "entity::tests::entity_bits_roundtrip", "bundle::tests::component_hook_order_recursive", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::map_entities::tests::world_scope_reserves_generations", "change_detection::tests::change_expiration", "bundle::tests::component_hook_order_recursive_multiple", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "entity::visit_entities::tests::visit_entities", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_apply_deferred_from_param_set", "observer::tests::observer_dynamic_component", "query::access::tests::filtered_access_extend", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_multiple_listeners", "observer::tests::observer_multiple_components", "query::access::tests::filtered_access_extend_or", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_events", "query::access::tests::read_all_access_conflicts", "query::access::tests::access_get_conflicts", "observer::tests::observer_invalid_params", "observer::tests::observer_multiple_matches", "query::access::tests::test_access_clone_from", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "query::access::tests::filtered_combined_access", "query::access::tests::test_access_clone", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_propagating_no_next", "observer::tests::observer_order_replace", "observer::tests::observer_order_insert_remove", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "query::access::tests::test_access_filters_clone", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_world", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_no_target", "observer::tests::observer_order_recursive", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_propagating_join", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_halt", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_trigger_targets_ref", "query::access::tests::test_filtered_access_clone", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_components", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::builder::tests::builder_with_without_static", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_propagating_world_skipping", "query::error::test::query_does_not_match", "query::builder::tests::builder_or", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_struct_variants", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::iter::tests::query_sorts", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::has_query", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::many_entities", "query::tests::any_query", "query::state::tests::join", "reflect::entity_commands::tests::remove_reflected_bundle", "query::tests::multi_storage_query", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::state::tests::join_with_get", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::disabled_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::schedules", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::unknown_schedule", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::tests::stepping::multi_threaded_executor", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::tests::system_ambiguity::before_and_after", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_execution::run_exclusive_system", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::aligned_zst", "storage::sparse_set::tests::sparse_set", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::resize_test", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::inserts_a_sync_point", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "schedule::tests::conditions::mixed_conditions_and_change_detection", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::disable_auto_sync_points", "storage::table::tests::table", "storage::sparse_set::tests::sparse_sets", "event::tests::test_event_mutator_iter_nth", "system::builder::tests::filtered_resource_conflicts_read_all_with_resmut - should panic", "system::builder::tests::custom_param_builder", "schedule::stepping::tests::verify_cursor", "system::builder::tests::filtered_resource_conflicts_read_with_resmut - should panic", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::configure_set_on_new_schedule", "system::builder::tests::dyn_builder", "schedule::tests::system_ordering::order_exclusive_systems", "system::builder::tests::filtered_resource_mut_conflicts_read_with_resmut - should panic", "system::builder::tests::local_builder", "system::builder::tests::filtered_resource_conflicts_read_with_res", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::tests::system_execution::run_system", "system::builder::tests::filtered_resource_mut_conflicts_write_all_with_res - should panic", "system::builder::tests::multi_param_builder", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::builder::tests::multi_param_builder_inference", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::tests::conditions::system_with_condition", "system::builder::tests::filtered_resource_mut_conflicts_write_with_resmut - should panic", "schedule::stepping::tests::step_run_if_false", "schedule::tests::conditions::multiple_conditions_on_system", "system::builder::tests::filtered_resource_mut_conflicts_read_with_res", "system::builder::tests::filtered_resource_mut_conflicts_write_with_res - should panic", "system::commands::tests::append", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::builder::tests::query_builder", "system::builder::tests::param_set_builder", "system::builder::tests::param_set_vec_builder", "system::commands::tests::commands", "system::builder::tests::query_builder_state", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::commands::tests::remove_component_with_required_components", "system::commands::tests::insert_components", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "system::builder::tests::vec_builder", "system::commands::tests::remove_components", "schedule::set::tests::test_schedule_label", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::commands::tests::test_commands_are_send_and_sync", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system::tests::command_processing", "system::system::tests::non_send_resources", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::commands::tests::entity_commands_entry", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::executor::tests::invalid_system_param_skips", "event::tests::test_event_reader_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system::tests::run_system_once_invalid_params", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::remove_components_by_id", "system::system::tests::run_system_once", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_ambiguity::read_only", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::condition::tests::run_condition_combinators", "system::system::tests::run_two_systems", "schedule::condition::tests::run_condition", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::non_sync_local", "system::system_name::tests::test_system_name_exclusive_param", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "query::tests::par_iter_mut_change_detection", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "event::tests::test_event_cursor_par_read_mut", "schedule::schedule::tests::no_sync_chain::chain_first", "system::system_param::tests::system_param_where_clause", "schedule::tests::system_ordering::order_systems", "system::system_registry::tests::cached_system", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::cached_system_adapters", "system::system_param::tests::param_set_non_send_first", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "event::tests::test_event_cursor_par_read", "system::system_registry::tests::cached_system_commands", "schedule::schedule::tests::no_sync_chain::chain_second", "system::system_registry::tests::change_detection", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::input_values", "schedule::schedule::tests::merges_sync_points_into_one", "system::system_registry::tests::local_variables", "system::system_registry::tests::run_system_invalid_params", "system::system_registry::tests::output_values", "schedule::schedule::tests::no_sync_chain::chain_all", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::nested_systems", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::nested_systems_with_inputs", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_and_without", "system::tests::any_of_with_and_without_common", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_working", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::assert_systems", "system::tests::any_of_with_conflicting - should panic", "system::tests::can_have_16_parameters", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources - should panic", "system::tests::long_life_test", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::commands_param_set", "system::tests::immutable_mut_test", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_read_component_system", "system::tests::disjoint_query_mut_system", "system::tests::changed_resource_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_option_system", "system::tests::local_system", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::into_iter_impl", "system::tests::non_send_system", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::pipe_change_detection", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_expanded_with_and_without_common", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with", "system::tests::query_is_empty", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::read_system_state", "system::tests::system_state_change_detection", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::query_set_system", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::panic_inside_system - should panic", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "system::tests::or_param_set_system", "tests::changed_query", "tests::added_queries", "tests::despawn_table_storage", "tests::bundle_derive", "tests::added_tracking", "tests::clear_entities", "system::tests::world_collections_system", "tests::duplicate_components_panic - should panic", "system::tests::test_combinator_clone", "tests::despawn_mixed_storage", "tests::dynamic_required_components", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::add_remove_components", "system::tests::removal_tracking", "tests::empty_spawn", "tests::entity_ref_and_mut_query_panic - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::filtered_query_access", "tests::changed_trackers", "tests::generic_required_components", "tests::changed_trackers_sparse", "query::tests::query_filtered_exactsizeiterator_len", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::insert_overwrite_drop", "tests::multiple_worlds_same_query_for_each - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::mut_and_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_points_to_distinct_data", "tests::query_all", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_all_for_each", "tests::non_send_resource_panic - should panic", "tests::query_filter_with_sparse", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_filter_without", "tests::par_for_each_dense", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_optional_component_table", "tests::query_single_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::remove", "tests::remove_missing", "tests::remove_bundle_and_his_required_components", "tests::remove_component_and_his_required_components", "tests::remove_tracking", "tests::required_components", "tests::required_components_insert_existing_hooks", "tests::remove_component_and_his_runtime_required_components", "tests::required_components_inheritance_depth", "tests::required_components_retain_keeps_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_spawn_nonexistent_hooks", "tests::reserve_and_spawn", "tests::required_components_take_leaves_required", "tests::resource", "tests::resource_scope", "tests::runtime_required_components_fail_with_duplicate", "tests::runtime_required_components_existing_archetype", "tests::runtime_required_components", "tests::runtime_required_components_override_1", "tests::runtime_required_components_override_2", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner", "tests::take", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "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::get_by_id_array", "world::entity_ref::tests::get_by_id_vec", "world::entity_ref::tests::get_components", "world::entity_ref::tests::get_mut_by_id_array", "world::entity_ref::tests::get_mut_by_id_vec", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_system_param", "world::tests::dynamic_resource", "world::tests::get_entity", "world::tests::get_entity_mut", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::init_non_send_resource_does_not_overwrite", "world::reflect::tests::get_component_as_reflect", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1560) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 348) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 242) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 252) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/component.rs - component::Component (line 45)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 400)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 30)", "crates/bevy_ecs/src/component.rs - component::Component (line 323)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 358)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/component.rs - component::Component (line 91)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/component.rs - component::Component (line 289)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1576)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 72)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 95)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 810)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "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::xnor (line 413) - compile fail", "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::xor (line 432) - compile fail", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 703)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 125)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 105)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 437)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 835)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/component.rs - component::Component (line 109)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 125)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 1267)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1888)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1865)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 65)", "crates/bevy_ecs/src/component.rs - component::Component (line 129)", "crates/bevy_ecs/src/component.rs - component::Component (line 207)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 20)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1305)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 236)", "crates/bevy_ecs/src/observer/mod.rs - observer::World::add_observer (line 376)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 959)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/component.rs - component::Component (line 151)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/component.rs - component::Component (line 181)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 276) - compile fail", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "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_and_changed (line 770)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 924) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 569)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 531)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1035) - compile", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamBuilder (line 128)", "crates/bevy_ecs/src/system/builder.rs - system::builder::LocalBuilder (line 507)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 47)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 461)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 325)", "crates/bevy_ecs/src/system/builder.rs - system::builder::QueryParamBuilder (line 225)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 429)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 408)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 278)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 156)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 709) - compile fail", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 835)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 348)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 503)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2029) - compile fail", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 232)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 17)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 265)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 720)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2005)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamSetBuilder (line 338)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 49)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 545)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 115)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 209)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 243)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 193)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 131)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 95)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 856)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 234)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 308)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 224)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 180)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1540)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1297)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 74)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1583)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 460)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 602)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 498)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 977)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 819)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1262)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 656)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1191)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 267)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1428)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 300)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1116)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1062)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2148)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 632)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 83)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 651)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 373)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 680)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 255)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 215)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1039)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 134)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 167)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 568)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 28)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1767)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 676)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 631)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1340)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 214)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 2019)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 129) - compile", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1908)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 700)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 209)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 190)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 165)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 231)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1170)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 2052)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 2216)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityRef (line 2246)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1964)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 185)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1993)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 2079)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 305)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 2136)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 2112)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 63)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1934)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 2191)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 256)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 622)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityMut (line 2517)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 2159)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 144)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 345)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 24)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1820)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 597)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 639)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1554)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 743)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 302)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 280)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 231)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1437)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 787)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 1196)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 1029)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 764)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 1160)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1490)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_init (line 2159)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 560)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 96)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 998)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 660)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 810)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 681)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_insert_with (line 2107)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 1233)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 854)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1458)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 899)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 2311)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 863)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components_with (line 367)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1620)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components (line 422)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 888)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 1306)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components (line 319)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 1272)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components_with (line 475)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1584)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1405)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1651)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,546
bevyengine__bevy-15546
[ "15541" ]
429987ebf811da7fa30adc57dca5d83ed9c7e871
diff --git a/crates/bevy_animation/src/graph.rs b/crates/bevy_animation/src/graph.rs --- a/crates/bevy_animation/src/graph.rs +++ b/crates/bevy_animation/src/graph.rs @@ -508,11 +508,11 @@ impl AssetLoader for AnimationGraphAssetLoader { type Error = AnimationGraphLoadError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _: &'a Self::Settings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _: &Self::Settings, + load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -30,11 +30,11 @@ pub trait AssetLoader: Send + Sync + 'static { /// The type of [error](`std::error::Error`) which could be encountered by this loader. type Error: Into<Box<dyn core::error::Error + Send + Sync + 'static>>; /// Asynchronously loads [`AssetLoader::Asset`] (and any other labeled assets) from the bytes provided by [`Reader`]. - fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a Self::Settings, - load_context: &'a mut LoadContext, + fn load( + &self, + reader: &mut dyn Reader, + settings: &Self::Settings, + load_context: &mut LoadContext, ) -> impl ConditionalSendFuture<Output = Result<Self::Asset, Self::Error>>; /// Returns a list of extensions supported by this [`AssetLoader`], without the preceding dot. diff --git a/crates/bevy_asset/src/meta.rs b/crates/bevy_asset/src/meta.rs --- a/crates/bevy_asset/src/meta.rs +++ b/crates/bevy_asset/src/meta.rs @@ -173,11 +173,11 @@ impl Process for () { type Settings = (); type OutputLoader = (); - async fn process<'a>( - &'a self, - _context: &'a mut bevy_asset::processor::ProcessContext<'_>, + async fn process( + &self, + _context: &mut bevy_asset::processor::ProcessContext<'_>, _meta: AssetMeta<(), Self>, - _writer: &'a mut bevy_asset::io::Writer, + _writer: &mut bevy_asset::io::Writer, ) -> Result<(), bevy_asset::processor::ProcessError> { unreachable!() } diff --git a/crates/bevy_asset/src/meta.rs b/crates/bevy_asset/src/meta.rs --- a/crates/bevy_asset/src/meta.rs +++ b/crates/bevy_asset/src/meta.rs @@ -196,11 +196,11 @@ impl AssetLoader for () { type Asset = (); type Settings = (); type Error = std::io::Error; - async fn load<'a>( - &'a self, - _reader: &'a mut dyn crate::io::Reader, - _settings: &'a Self::Settings, - _load_context: &'a mut crate::LoadContext<'_>, + async fn load( + &self, + _reader: &mut dyn crate::io::Reader, + _settings: &Self::Settings, + _load_context: &mut crate::LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { unreachable!(); } diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -83,7 +83,7 @@ use thiserror::Error; /// [`AssetProcessor`] can be run in the background while a Bevy App is running. Changes to assets will be automatically detected and hot-reloaded. /// /// Assets will only be re-processed if they have been changed. A hash of each asset source is stored in the metadata of the processed version of the -/// asset, which is used to determine if the asset source has actually changed. +/// asset, which is used to determine if the asset source has actually changed. /// /// A [`ProcessorTransactionLog`] is produced, which uses "write-ahead logging" to make the [`AssetProcessor`] crash and failure resistant. If a failed/unfinished /// transaction from a previous run is detected, the affected asset(s) will be re-processed. diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -155,10 +155,10 @@ impl AssetProcessor { /// Retrieves the [`AssetSource`] for this processor #[inline] - pub fn get_source<'a, 'b>( - &'a self, - id: impl Into<AssetSourceId<'b>>, - ) -> Result<&'a AssetSource, MissingAssetSourceError> { + pub fn get_source<'a>( + &self, + id: impl Into<AssetSourceId<'a>>, + ) -> Result<&AssetSource, MissingAssetSourceError> { self.data.sources.get(id.into()) } diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -565,11 +565,11 @@ impl AssetProcessor { /// Retrieves asset paths recursively. If `clean_empty_folders_writer` is Some, it will be used to clean up empty /// folders when they are discovered. - async fn get_asset_paths<'a>( - reader: &'a dyn ErasedAssetReader, - clean_empty_folders_writer: Option<&'a dyn ErasedAssetWriter>, + async fn get_asset_paths( + reader: &dyn ErasedAssetReader, + clean_empty_folders_writer: Option<&dyn ErasedAssetWriter>, path: PathBuf, - paths: &'a mut Vec<PathBuf>, + paths: &mut Vec<PathBuf>, ) -> Result<bool, AssetReaderError> { if reader.is_directory(&path).await? { let mut path_stream = reader.read_directory(&path).await?; diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -1093,11 +1093,11 @@ impl<T: Process> Process for InstrumentedAssetProcessor<T> { type Settings = T::Settings; type OutputLoader = T::OutputLoader; - fn process<'a>( - &'a self, - context: &'a mut ProcessContext, + fn process( + &self, + context: &mut ProcessContext, meta: AssetMeta<(), Self>, - writer: &'a mut crate::io::Writer, + writer: &mut crate::io::Writer, ) -> impl ConditionalSendFuture< Output = Result<<Self::OutputLoader as crate::AssetLoader>::Settings, ProcessError>, > { diff --git a/crates/bevy_asset/src/processor/process.rs b/crates/bevy_asset/src/processor/process.rs --- a/crates/bevy_asset/src/processor/process.rs +++ b/crates/bevy_asset/src/processor/process.rs @@ -27,11 +27,11 @@ pub trait Process: Send + Sync + Sized + 'static { type OutputLoader: AssetLoader; /// Processes the asset stored on `context` in some way using the settings stored on `meta`. The results are written to `writer`. The /// final written processed asset is loadable using [`Process::OutputLoader`]. This load will use the returned [`AssetLoader::Settings`]. - fn process<'a>( - &'a self, - context: &'a mut ProcessContext, + fn process( + &self, + context: &mut ProcessContext, meta: AssetMeta<(), Self>, - writer: &'a mut Writer, + writer: &mut Writer, ) -> impl ConditionalSendFuture< Output = Result<<Self::OutputLoader as AssetLoader>::Settings, ProcessError>, >; diff --git a/crates/bevy_asset/src/processor/process.rs b/crates/bevy_asset/src/processor/process.rs --- a/crates/bevy_asset/src/processor/process.rs +++ b/crates/bevy_asset/src/processor/process.rs @@ -179,11 +179,11 @@ where LoadTransformAndSaveSettings<Loader::Settings, Transformer::Settings, Saver::Settings>; type OutputLoader = Saver::OutputLoader; - async fn process<'a>( - &'a self, - context: &'a mut ProcessContext<'_>, + async fn process( + &self, + context: &mut ProcessContext<'_>, meta: AssetMeta<(), Self>, - writer: &'a mut Writer, + writer: &mut Writer, ) -> Result<<Self::OutputLoader as AssetLoader>::Settings, ProcessError> { let AssetAction::Process { settings, .. } = meta.asset else { return Err(ProcessError::WrongMetaType); diff --git a/crates/bevy_asset/src/saver.rs b/crates/bevy_asset/src/saver.rs --- a/crates/bevy_asset/src/saver.rs +++ b/crates/bevy_asset/src/saver.rs @@ -24,12 +24,12 @@ pub trait AssetSaver: Send + Sync + 'static { type Error: Into<Box<dyn core::error::Error + Send + Sync + 'static>>; /// Saves the given runtime [`Asset`] by writing it to a byte format using `writer`. The passed in `settings` can influence how the - /// `asset` is saved. - fn save<'a>( - &'a self, - writer: &'a mut Writer, - asset: SavedAsset<'a, Self::Asset>, - settings: &'a Self::Settings, + /// `asset` is saved. + fn save( + &self, + writer: &mut Writer, + asset: SavedAsset<'_, Self::Asset>, + settings: &Self::Settings, ) -> impl ConditionalSendFuture< Output = Result<<Self::OutputLoader as AssetLoader>::Settings, Self::Error>, >; diff --git a/crates/bevy_asset/src/saver.rs b/crates/bevy_asset/src/saver.rs --- a/crates/bevy_asset/src/saver.rs +++ b/crates/bevy_asset/src/saver.rs @@ -38,7 +38,7 @@ pub trait AssetSaver: Send + Sync + 'static { /// A type-erased dynamic variant of [`AssetSaver`] that allows callers to save assets without knowing the actual type of the [`AssetSaver`]. pub trait ErasedAssetSaver: Send + Sync + 'static { /// Saves the given runtime [`ErasedLoadedAsset`] by writing it to a byte format using `writer`. The passed in `settings` can influence how the - /// `asset` is saved. + /// `asset` is saved. fn save<'a>( &'a self, writer: &'a mut Writer, diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -282,7 +282,7 @@ impl AssetInfos { pub(crate) fn get_path_and_type_id_handle( &self, - path: &AssetPath, + path: &AssetPath<'_>, type_id: TypeId, ) -> Option<UntypedHandle> { let id = self.path_to_id.get(path)?.get(&type_id)?; diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -291,7 +291,7 @@ impl AssetInfos { pub(crate) fn get_path_ids<'a>( &'a self, - path: &'a AssetPath<'a>, + path: &'a AssetPath<'_>, ) -> impl Iterator<Item = UntypedAssetId> + 'a { /// Concrete type to allow returning an `impl Iterator` even if `self.path_to_id.get(&path)` is `None` enum HandlesByPathIterator<T> { diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -322,7 +322,7 @@ impl AssetInfos { pub(crate) fn get_path_handles<'a>( &'a self, - path: &'a AssetPath<'a>, + path: &'a AssetPath<'_>, ) -> impl Iterator<Item = UntypedHandle> + 'a { self.get_path_ids(path) .filter_map(|id| self.get_id_handle(id)) diff --git a/crates/bevy_asset/src/server/loaders.rs b/crates/bevy_asset/src/server/loaders.rs --- a/crates/bevy_asset/src/server/loaders.rs +++ b/crates/bevy_asset/src/server/loaders.rs @@ -311,11 +311,11 @@ impl<T: AssetLoader> AssetLoader for InstrumentedAssetLoader<T> { type Settings = T::Settings; type Error = T::Error; - fn load<'a>( - &'a self, - reader: &'a mut dyn crate::io::Reader, - settings: &'a Self::Settings, - load_context: &'a mut crate::LoadContext, + fn load( + &self, + reader: &mut dyn crate::io::Reader, + settings: &Self::Settings, + load_context: &mut crate::LoadContext, ) -> impl ConditionalSendFuture<Output = Result<Self::Asset, Self::Error>> { let span = info_span!( "asset loading", diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -131,10 +131,10 @@ impl AssetServer { } /// Retrieves the [`AssetSource`] for the given `source`. - pub fn get_source<'a, 'b>( - &'a self, - source: impl Into<AssetSourceId<'b>>, - ) -> Result<&'a AssetSource, MissingAssetSourceError> { + pub fn get_source<'a>( + &self, + source: impl Into<AssetSourceId<'a>>, + ) -> Result<&AssetSource, MissingAssetSourceError> { self.data.sources.get(source.into()) } diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -218,9 +218,9 @@ impl AssetServer { } /// Retrieves the default [`AssetLoader`] for the given path, if one can be found. - pub async fn get_path_asset_loader<'a, 'b>( + pub async fn get_path_asset_loader<'a>( &self, - path: impl Into<AssetPath<'b>>, + path: impl Into<AssetPath<'a>>, ) -> Result<Arc<dyn ErasedAssetLoader>, MissingAssetLoaderForExtensionError> { let path = path.into(); diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -245,7 +245,7 @@ impl AssetServer { } /// Retrieves the default [`AssetLoader`] for the given [`Asset`] [`TypeId`], if one can be found. - pub async fn get_asset_loader_with_asset_type_id<'a>( + pub async fn get_asset_loader_with_asset_type_id( &self, type_id: TypeId, ) -> Result<Arc<dyn ErasedAssetLoader>, MissingAssetLoaderForTypeIdError> { diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -257,7 +257,7 @@ impl AssetServer { } /// Retrieves the default [`AssetLoader`] for the given [`Asset`] type, if one can be found. - pub async fn get_asset_loader_with_asset_type<'a, A: Asset>( + pub async fn get_asset_loader_with_asset_type<A: Asset>( &self, ) -> Result<Arc<dyn ErasedAssetLoader>, MissingAssetLoaderForTypeIdError> { self.get_asset_loader_with_asset_type_id(TypeId::of::<A>()) diff --git a/crates/bevy_audio/src/audio_source.rs b/crates/bevy_audio/src/audio_source.rs --- a/crates/bevy_audio/src/audio_source.rs +++ b/crates/bevy_audio/src/audio_source.rs @@ -42,11 +42,11 @@ impl AssetLoader for AudioLoader { type Settings = (); type Error = std::io::Error; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a Self::Settings, - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &Self::Settings, + _load_context: &mut LoadContext<'_>, ) -> Result<AudioSource, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_audio/src/audio_source.rs b/crates/bevy_audio/src/audio_source.rs --- a/crates/bevy_audio/src/audio_source.rs +++ b/crates/bevy_audio/src/audio_source.rs @@ -111,7 +111,7 @@ pub trait AddAudioSource { /// so that it can be converted to a [`rodio::Source`] type, /// and [`Asset`], so that it can be registered as an asset. /// To use this method on [`App`][bevy_app::App], - /// the [audio][super::AudioPlugin] and [asset][bevy_asset::AssetPlugin] plugins must be added first. + /// the [audio][super::AudioPlugin] and [asset][bevy_asset::AssetPlugin] plugins must be added first. fn add_audio_source<T>(&mut self) -> &mut Self where T: Decodable + Asset, diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -179,11 +179,11 @@ impl AssetLoader for GltfLoader { type Asset = Gltf; type Settings = GltfLoaderSettings; type Error = GltfError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a GltfLoaderSettings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + settings: &GltfLoaderSettings, + load_context: &mut LoadContext<'_>, ) -> Result<Gltf, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_pbr/src/meshlet/asset.rs b/crates/bevy_pbr/src/meshlet/asset.rs --- a/crates/bevy_pbr/src/meshlet/asset.rs +++ b/crates/bevy_pbr/src/meshlet/asset.rs @@ -93,11 +93,11 @@ impl AssetSaver for MeshletMeshSaverLoader { type OutputLoader = Self; type Error = MeshletMeshSaveOrLoadError; - async fn save<'a>( - &'a self, - writer: &'a mut Writer, - asset: SavedAsset<'a, MeshletMesh>, - _settings: &'a (), + async fn save( + &self, + writer: &mut Writer, + asset: SavedAsset<'_, MeshletMesh>, + _settings: &(), ) -> Result<(), MeshletMeshSaveOrLoadError> { // Write asset magic number writer diff --git a/crates/bevy_pbr/src/meshlet/asset.rs b/crates/bevy_pbr/src/meshlet/asset.rs --- a/crates/bevy_pbr/src/meshlet/asset.rs +++ b/crates/bevy_pbr/src/meshlet/asset.rs @@ -127,11 +127,11 @@ impl AssetLoader for MeshletMeshSaverLoader { type Settings = (); type Error = MeshletMeshSaveOrLoadError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + _load_context: &mut LoadContext<'_>, ) -> Result<MeshletMesh, MeshletMeshSaveOrLoadError> { // Load and check magic number let magic = async_read_u64(reader).await?; diff --git a/crates/bevy_render/src/render_resource/shader.rs b/crates/bevy_render/src/render_resource/shader.rs --- a/crates/bevy_render/src/render_resource/shader.rs +++ b/crates/bevy_render/src/render_resource/shader.rs @@ -259,11 +259,11 @@ impl AssetLoader for ShaderLoader { type Asset = Shader; type Settings = (); type Error = ShaderLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a Self::Settings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &Self::Settings, + load_context: &mut LoadContext<'_>, ) -> Result<Shader, Self::Error> { let ext = load_context.path().extension().unwrap().to_str().unwrap(); let path = load_context.asset_path().to_string(); diff --git a/crates/bevy_render/src/texture/compressed_image_saver.rs b/crates/bevy_render/src/texture/compressed_image_saver.rs --- a/crates/bevy_render/src/texture/compressed_image_saver.rs +++ b/crates/bevy_render/src/texture/compressed_image_saver.rs @@ -19,11 +19,11 @@ impl AssetSaver for CompressedImageSaver { type OutputLoader = ImageLoader; type Error = CompressedImageSaverError; - async fn save<'a>( - &'a self, - writer: &'a mut bevy_asset::io::Writer, - image: SavedAsset<'a, Self::Asset>, - _settings: &'a Self::Settings, + async fn save( + &self, + writer: &mut bevy_asset::io::Writer, + image: SavedAsset<'_, Self::Asset>, + _settings: &Self::Settings, ) -> Result<ImageLoaderSettings, Self::Error> { let is_srgb = image.texture_descriptor.format.is_srgb(); diff --git a/crates/bevy_render/src/texture/exr_texture_loader.rs b/crates/bevy_render/src/texture/exr_texture_loader.rs --- a/crates/bevy_render/src/texture/exr_texture_loader.rs +++ b/crates/bevy_render/src/texture/exr_texture_loader.rs @@ -35,11 +35,11 @@ impl AssetLoader for ExrTextureLoader { type Settings = ExrTextureLoaderSettings; type Error = ExrTextureLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a Self::Settings, - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + settings: &Self::Settings, + _load_context: &mut LoadContext<'_>, ) -> Result<Image, Self::Error> { let format = TextureFormat::Rgba32Float; debug_assert_eq!( diff --git a/crates/bevy_render/src/texture/hdr_texture_loader.rs b/crates/bevy_render/src/texture/hdr_texture_loader.rs --- a/crates/bevy_render/src/texture/hdr_texture_loader.rs +++ b/crates/bevy_render/src/texture/hdr_texture_loader.rs @@ -30,11 +30,11 @@ impl AssetLoader for HdrTextureLoader { type Asset = Image; type Settings = HdrTextureLoaderSettings; type Error = HdrTextureLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a Self::Settings, - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + settings: &Self::Settings, + _load_context: &mut LoadContext<'_>, ) -> Result<Image, Self::Error> { let format = TextureFormat::Rgba32Float; debug_assert_eq!( diff --git a/crates/bevy_render/src/texture/image_loader.rs b/crates/bevy_render/src/texture/image_loader.rs --- a/crates/bevy_render/src/texture/image_loader.rs +++ b/crates/bevy_render/src/texture/image_loader.rs @@ -86,11 +86,11 @@ impl AssetLoader for ImageLoader { type Asset = Image; type Settings = ImageLoaderSettings; type Error = ImageLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a ImageLoaderSettings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + settings: &ImageLoaderSettings, + load_context: &mut LoadContext<'_>, ) -> Result<Image, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_scene/src/scene_loader.rs b/crates/bevy_scene/src/scene_loader.rs --- a/crates/bevy_scene/src/scene_loader.rs +++ b/crates/bevy_scene/src/scene_loader.rs @@ -46,11 +46,11 @@ impl AssetLoader for SceneLoader { type Settings = (); type Error = SceneLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + _load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_text/src/font_loader.rs b/crates/bevy_text/src/font_loader.rs --- a/crates/bevy_text/src/font_loader.rs +++ b/crates/bevy_text/src/font_loader.rs @@ -22,11 +22,11 @@ impl AssetLoader for FontLoader { type Asset = Font; type Settings = (); type Error = FontLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + _load_context: &mut LoadContext<'_>, ) -> Result<Font, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/examples/asset/asset_decompression.rs b/examples/asset/asset_decompression.rs --- a/examples/asset/asset_decompression.rs +++ b/examples/asset/asset_decompression.rs @@ -39,11 +39,12 @@ impl AssetLoader for GzAssetLoader { type Asset = GzAsset; type Settings = (); type Error = GzAssetLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - load_context: &'a mut LoadContext<'_>, + + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { let compressed_path = load_context.path(); let file_name = compressed_path diff --git a/examples/asset/custom_asset.rs b/examples/asset/custom_asset.rs --- a/examples/asset/custom_asset.rs +++ b/examples/asset/custom_asset.rs @@ -33,11 +33,11 @@ impl AssetLoader for CustomAssetLoader { type Asset = CustomAsset; type Settings = (); type Error = CustomAssetLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + _load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/examples/asset/custom_asset.rs b/examples/asset/custom_asset.rs --- a/examples/asset/custom_asset.rs +++ b/examples/asset/custom_asset.rs @@ -72,11 +72,11 @@ impl AssetLoader for BlobAssetLoader { type Settings = (); type Error = BlobAssetLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a (), - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &(), + _load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { info!("Loading Blob..."); let mut bytes = Vec::new(); diff --git a/examples/asset/processing/asset_processing.rs b/examples/asset/processing/asset_processing.rs --- a/examples/asset/processing/asset_processing.rs +++ b/examples/asset/processing/asset_processing.rs @@ -81,11 +81,11 @@ impl AssetLoader for TextLoader { type Asset = Text; type Settings = TextSettings; type Error = std::io::Error; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - settings: &'a TextSettings, - _load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + settings: &TextSettings, + _load_context: &mut LoadContext<'_>, ) -> Result<Text, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/examples/asset/processing/asset_processing.rs b/examples/asset/processing/asset_processing.rs --- a/examples/asset/processing/asset_processing.rs +++ b/examples/asset/processing/asset_processing.rs @@ -135,11 +135,11 @@ impl AssetLoader for CoolTextLoader { type Settings = (); type Error = CoolTextLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a Self::Settings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &Self::Settings, + load_context: &mut LoadContext<'_>, ) -> Result<CoolText, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/examples/asset/processing/asset_processing.rs b/examples/asset/processing/asset_processing.rs --- a/examples/asset/processing/asset_processing.rs +++ b/examples/asset/processing/asset_processing.rs @@ -211,11 +211,11 @@ impl AssetSaver for CoolTextSaver { type OutputLoader = TextLoader; type Error = std::io::Error; - async fn save<'a>( - &'a self, - writer: &'a mut Writer, - asset: SavedAsset<'a, Self::Asset>, - _settings: &'a Self::Settings, + async fn save( + &self, + writer: &mut Writer, + asset: SavedAsset<'_, Self::Asset>, + _settings: &Self::Settings, ) -> Result<TextSettings, Self::Error> { writer.write_all(asset.text.as_bytes()).await?; Ok(TextSettings::default())
diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -676,11 +676,11 @@ mod tests { type Error = CoolTextLoaderError; - async fn load<'a>( - &'a self, - reader: &'a mut dyn Reader, - _settings: &'a Self::Settings, - load_context: &'a mut LoadContext<'_>, + async fn load( + &self, + reader: &mut dyn Reader, + _settings: &Self::Settings, + load_context: &mut LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; diff --git a/crates/bevy_asset/src/server/loaders.rs b/crates/bevy_asset/src/server/loaders.rs --- a/crates/bevy_asset/src/server/loaders.rs +++ b/crates/bevy_asset/src/server/loaders.rs @@ -383,11 +383,11 @@ mod tests { type Error = String; - async fn load<'a>( - &'a self, - _: &'a mut dyn crate::io::Reader, - _: &'a Self::Settings, - _: &'a mut crate::LoadContext<'_>, + async fn load( + &self, + _: &mut dyn crate::io::Reader, + _: &Self::Settings, + _: &mut crate::LoadContext<'_>, ) -> Result<Self::Asset, Self::Error> { self.sender.send(()).unwrap();
AssetServer lifetimes can probably be simplified > I might be missing something, but I think these can be simplified. There's also other functions in the same file that has unused `'a` lifetimes. _Originally posted by @kristoff3r in https://github.com/bevyengine/bevy/pull/15533#pullrequestreview-2337163550_
2024-09-30T20:18:46Z
1.81
2024-09-30T22:13:39Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "assets::test::asset_index_round_trip", "handle::tests::equality", "handle::tests::conversion", "handle::tests::ordering", "id::tests::conversion", "handle::tests::hashing", "id::tests::equality", "id::tests::hashing", "id::tests::ordering", "io::embedded::tests::embedded_asset_path_from_external_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_root_src_path", "io::embedded::tests::embedded_asset_path_from_external_crate_is_ambiguous", "io::embedded::tests::embedded_asset_path_from_local_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_extraneous_beginning_slashes - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_bad_src - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_blank_src_path_questionable", "io::embedded::tests::embedded_asset_path_from_local_example_crate", "path::tests::parse_asset_path", "io::memory::test::memory_dir", "path::tests::test_parent", "path::tests::test_get_extension", "io::embedded::tests::remove_embedded_asset", "path::tests::test_resolve_absolute", "path::tests::test_resolve_canonicalize", "path::tests::test_resolve_asset_source", "path::tests::test_resolve_canonicalize_base", "path::tests::test_resolve_canonicalize_with_source", "path::tests::test_resolve_full", "path::tests::test_resolve_explicit_relative", "path::tests::test_resolve_implicit_relative", "path::tests::test_resolve_insufficient_elements", "path::tests::test_resolve_label", "path::tests::test_resolve_trailing_slash", "path::tests::test_with_source", "path::tests::test_without_label", "server::loaders::tests::basic", "server::loaders::tests::extension_resolution", "server::loaders::tests::ambiguity_resolution", "server::loaders::tests::path_resolution", "server::loaders::tests::type_resolution_shadow", "server::loaders::tests::type_resolution", "server::loaders::tests::total_resolution", "handle::tests::strong_handle_reflect_clone", "reflect::tests::test_reflect_asset_operations", "tests::ignore_system_ambiguities_on_assets", "tests::failure_load_states", "tests::dependency_load_states", "tests::load_folder", "tests::load_dependencies", "tests::keep_gotten_strong_handles", "tests::manual_asset_management", "tests::load_error_events", "crates/bevy_asset/src/reflect.rs - reflect::ReflectHandle (line 189) - compile", "crates/bevy_asset/src/reflect.rs - reflect::ReflectAsset::get_unchecked_mut (line 70) - compile", "crates/bevy_asset/src/server/mod.rs - server::AssetServer::load (line 296) - compile", "crates/bevy_asset/src/server/mod.rs - server::AssetServer::load (line 278) - compile", "crates/bevy_asset/src/io/embedded/mod.rs - io::embedded::embedded_asset (line 206) - compile", "crates/bevy_asset/src/io/mod.rs - io::AssetReader::read (line 145) - compile", "crates/bevy_asset/src/path.rs - path::AssetPath (line 24) - compile", "crates/bevy_asset/src/loader.rs - loader::LoadContext<'a>::begin_labeled_asset (line 353) - compile", "crates/bevy_asset/src/server/mod.rs - server::AssetServer::load_untyped (line 476)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve (line 341)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve_embed (line 391)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,526
bevyengine__bevy-15526
[ "15394" ]
9cc7e7c080fdc7f1ae95fd7ac386973771e82fce
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 @@ -374,8 +374,10 @@ fn observer_system_runner<E: Event, B: Bundle, S: ObserverSystem<E, B>>( // - system is the same type erased system from above unsafe { (*system).update_archetype_component_access(world); - (*system).run_unsafe(trigger, world); - (*system).queue_deferred(world.into_deferred()); + if (*system).validate_param_unsafe(world) { + (*system).run_unsafe(trigger, world); + (*system).queue_deferred(world.into_deferred()); + } } } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -1,5 +1,6 @@ use bevy_utils::tracing::warn; use core::fmt::Debug; +use thiserror::Error; use crate::{ archetype::ArchetypeComponentId, diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -269,7 +270,7 @@ where /// let mut world = World::default(); /// let entity = world.run_system_once(|mut commands: Commands| { /// commands.spawn_empty().id() -/// }); +/// }).unwrap(); /// # assert!(world.get_entity(entity).is_some()); /// ``` /// diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -289,7 +290,7 @@ where /// world.spawn(T(1)); /// let count = world.run_system_once(|query: Query<&T>| { /// query.iter().filter(|t| t.0 == 1).count() -/// }); +/// }).unwrap(); /// /// # assert_eq!(count, 2); /// ``` diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -311,25 +312,25 @@ where /// world.spawn(T(0)); /// world.spawn(T(1)); /// world.spawn(T(1)); -/// let count = world.run_system_once(count); +/// let count = world.run_system_once(count).unwrap(); /// /// # assert_eq!(count, 2); /// ``` pub trait RunSystemOnce: Sized { - /// Runs a system and applies its deferred parameters. - fn run_system_once<T, Out, Marker>(self, system: T) -> Out + /// Tries to run a system and apply its deferred parameters. + fn run_system_once<T, Out, Marker>(self, system: T) -> Result<Out, RunSystemError> where T: IntoSystem<(), Out, Marker>, { self.run_system_once_with((), system) } - /// Runs a system with given input and applies its deferred parameters. + /// Tries to run a system with given input and apply deferred parameters. fn run_system_once_with<T, In, Out, Marker>( self, input: SystemIn<'_, T::System>, system: T, - ) -> Out + ) -> Result<Out, RunSystemError> where T: IntoSystem<In, Out, Marker>, In: SystemInput; diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -340,14 +341,36 @@ impl RunSystemOnce for &mut World { self, input: SystemIn<'_, T::System>, system: T, - ) -> Out + ) -> Result<Out, RunSystemError> where T: IntoSystem<In, Out, Marker>, In: SystemInput, { let mut system: T::System = IntoSystem::into_system(system); system.initialize(self); - system.run(input, self) + if system.validate_param(self) { + Ok(system.run(input, self)) + } else { + Err(RunSystemError::InvalidParams(system.name())) + } + } +} + +/// Running system failed. +#[derive(Error)] +pub enum RunSystemError { + /// System could not be run due to parameters that failed validation. + /// + /// This can occur because the data required by the system was not present in the world. + #[error("The data required by the system {0:?} was not found in the world and the system did not run due to failed parameter validation.")] + InvalidParams(Cow<'static, str>), +} + +impl Debug for RunSystemError { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::InvalidParams(arg0) => f.debug_tuple("InvalidParams").field(arg0).finish(), + } } } diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -3,8 +3,7 @@ use crate::{ bundle::Bundle, change_detection::Mut, entity::Entity, - system::input::SystemInput, - system::{BoxedSystem, IntoSystem, System}, + system::{input::SystemInput, BoxedSystem, IntoSystem, System}, world::{Command, World}, }; use bevy_ecs_macros::{Component, Resource}; diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -337,7 +336,12 @@ impl World { system.initialize(self); initialized = true; } - let result = system.run(input, self); + + let result = if system.validate_param(self) { + Ok(system.run(input, self)) + } else { + Err(RegisteredSystemError::InvalidParams(id)) + }; // return ownership of system trait object (if entity still exists) if let Some(mut entity) = self.get_entity_mut(id.entity) { diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -346,7 +350,7 @@ impl World { system, }); } - Ok(result) + result } /// Registers a system or returns its cached [`SystemId`]. diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -496,7 +500,7 @@ where { #[inline] fn apply(self, world: &mut World) { - let _ = world.run_system_with_input(self.system_id, self.input); + _ = world.run_system_with_input(self.system_id, self.input); } } diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -595,6 +599,11 @@ pub enum RegisteredSystemError<I: SystemInput = (), O = ()> { /// A system tried to remove itself. #[error("System {0:?} tried to remove itself")] SelfRemove(SystemId<I, O>), + /// System could not be run due to parameters that failed validation. + /// + /// This can occur because the data required by the system was not present in the world. + #[error("The data required by the system {0:?} was not found in the world and the system did not run due to failed parameter validation.")] + InvalidParams(SystemId<I, O>), } impl<I: SystemInput, O> core::fmt::Debug for RegisteredSystemError<I, O> { diff --git a/examples/ecs/one_shot_systems.rs b/examples/ecs/one_shot_systems.rs --- a/examples/ecs/one_shot_systems.rs +++ b/examples/ecs/one_shot_systems.rs @@ -46,7 +46,7 @@ fn setup_with_commands(mut commands: Commands) { fn setup_with_world(world: &mut World) { // We can run it once manually - world.run_system_once(system_b); + world.run_system_once(system_b).unwrap(); // Or with a Callback let system_id = world.register_system(system_b); world.spawn((Callback(system_id), B));
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 @@ -1190,4 +1190,25 @@ mod tests { // after the observer's spawn_empty. world.despawn(ent); } + + #[test] + fn observer_invalid_params() { + #[derive(Event)] + struct EventA; + + #[derive(Resource)] + struct ResA; + + #[derive(Resource)] + struct ResB; + + let mut world = World::new(); + // This fails because `ResA` is not present in the world + world.observe(|_: Trigger<EventA>, _: Res<ResA>, mut commands: Commands| { + commands.insert_resource(ResB); + }); + world.trigger(EventA); + + assert!(world.get_resource::<ResB>().is_none()); + } } diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -386,8 +386,8 @@ mod tests { .build_state(&mut world) .build_system(local_system); - let result = world.run_system_once(system); - assert_eq!(result, 10); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 10); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -403,8 +403,8 @@ mod tests { .build_state(&mut world) .build_system(query_system); - let result = world.run_system_once(system); - assert_eq!(result, 1); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 1); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -418,8 +418,8 @@ mod tests { let system = (state,).build_state(&mut world).build_system(query_system); - let result = world.run_system_once(system); - assert_eq!(result, 1); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 1); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -433,8 +433,8 @@ mod tests { .build_state(&mut world) .build_system(multi_param_system); - let result = world.run_system_once(system); - assert_eq!(result, 1); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 1); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -464,8 +464,8 @@ mod tests { count }); - let result = world.run_system_once(system); - assert_eq!(result, 3); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 3); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -479,8 +479,8 @@ mod tests { .build_state(&mut world) .build_system(|a, b| *a + *b + 1); - let result = world.run_system_once(system); - assert_eq!(result, 1); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 1); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -506,8 +506,8 @@ mod tests { params.p0().iter().count() + params.p1().iter().count() }); - let result = world.run_system_once(system); - assert_eq!(result, 5); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 5); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -535,8 +535,8 @@ mod tests { count }); - let result = world.run_system_once(system); - assert_eq!(result, 5); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 5); } #[test] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -564,8 +564,8 @@ mod tests { }, ); - let result = world.run_system_once(system); - assert_eq!(result, 4); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 4); } #[derive(SystemParam)] diff --git a/crates/bevy_ecs/src/system/builder.rs b/crates/bevy_ecs/src/system/builder.rs --- a/crates/bevy_ecs/src/system/builder.rs +++ b/crates/bevy_ecs/src/system/builder.rs @@ -591,7 +591,7 @@ mod tests { .build_state(&mut world) .build_system(|param: CustomParam| *param.local + param.query.iter().count()); - let result = world.run_system_once(system); - assert_eq!(result, 101); + let output = world.run_system_once(system).unwrap(); + assert_eq!(output, 101); } } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -369,7 +392,7 @@ mod tests { } let mut world = World::default(); - let n = world.run_system_once_with(1, system); + let n = world.run_system_once_with(1, system).unwrap(); assert_eq!(n, 2); assert_eq!(world.resource::<T>().0, 1); } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -387,9 +410,9 @@ mod tests { let mut world = World::new(); world.init_resource::<Counter>(); assert_eq!(*world.resource::<Counter>(), Counter(0)); - world.run_system_once(count_up); + world.run_system_once(count_up).unwrap(); assert_eq!(*world.resource::<Counter>(), Counter(1)); - world.run_system_once(count_up); + world.run_system_once(count_up).unwrap(); assert_eq!(*world.resource::<Counter>(), Counter(2)); } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -402,7 +425,7 @@ mod tests { fn command_processing() { let mut world = World::new(); assert_eq!(world.entities.len(), 0); - world.run_system_once(spawn_entity); + world.run_system_once(spawn_entity).unwrap(); assert_eq!(world.entities.len(), 1); } diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -415,7 +438,20 @@ mod tests { let mut world = World::new(); world.insert_non_send_resource(Counter(10)); assert_eq!(*world.non_send_resource::<Counter>(), Counter(10)); - world.run_system_once(non_send_count_down); + world.run_system_once(non_send_count_down).unwrap(); assert_eq!(*world.non_send_resource::<Counter>(), Counter(9)); } + + #[test] + fn run_system_once_invalid_params() { + struct T; + impl Resource for T {} + fn system(_: Res<T>) {} + + let mut world = World::default(); + // This fails because `T` has not been added to the world yet. + let result = world.run_system_once(system); + + assert!(matches!(result, Err(RunSystemError::InvalidParams(_)))); + } } diff --git a/crates/bevy_ecs/src/system/system_name.rs b/crates/bevy_ecs/src/system/system_name.rs --- a/crates/bevy_ecs/src/system/system_name.rs +++ b/crates/bevy_ecs/src/system/system_name.rs @@ -141,7 +141,7 @@ mod tests { let mut world = World::default(); let system = IntoSystem::into_system(|name: SystemName| name.name().to_owned()).with_name("testing"); - let name = world.run_system_once(system); + let name = world.run_system_once(system).unwrap(); assert_eq!(name, "testing"); } diff --git a/crates/bevy_ecs/src/system/system_name.rs b/crates/bevy_ecs/src/system/system_name.rs --- a/crates/bevy_ecs/src/system/system_name.rs +++ b/crates/bevy_ecs/src/system/system_name.rs @@ -151,7 +151,7 @@ mod tests { let system = IntoSystem::into_system(|_world: &mut World, name: SystemName| name.name().to_owned()) .with_name("testing"); - let name = world.run_system_once(system); + let name = world.run_system_once(system).unwrap(); assert_eq!(name, "testing"); } } diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -606,13 +615,14 @@ impl<I: SystemInput, O> core::fmt::Debug for RegisteredSystemError<I, O> { Self::SystemNotCached => write!(f, "SystemNotCached"), Self::Recursive(arg0) => f.debug_tuple("Recursive").field(arg0).finish(), Self::SelfRemove(arg0) => f.debug_tuple("SelfRemove").field(arg0).finish(), + Self::InvalidParams(arg0) => f.debug_tuple("InvalidParams").field(arg0).finish(), } } } mod tests { - use crate as bevy_ecs; use crate::prelude::*; + use crate::{self as bevy_ecs}; #[derive(Resource, Default, PartialEq, Debug)] struct Counter(u8); diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -913,4 +923,23 @@ mod tests { .unwrap(); assert!(event.cancelled); } + + #[test] + fn run_system_invalid_params() { + use crate::system::RegisteredSystemError; + + struct T; + impl Resource for T {} + fn system(_: Res<T>) {} + + let mut world = World::new(); + let id = world.register_system_cached(system); + // This fails because `T` has not been added to the world yet. + let result = world.run_system(id); + + assert!(matches!( + result, + Err(RegisteredSystemError::InvalidParams(_)) + )); + } } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3225,7 +3225,7 @@ mod tests { // This should panic, because we have a mutable borrow on // `TestComponent` but have a simultaneous indirect immutable borrow on // that component via `EntityRefExcept`. - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<(&mut TestComponent, EntityRefExcept<TestComponent2>)>) {} } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3241,7 +3241,7 @@ mod tests { // This should panic, because we have a mutable borrow on // `TestComponent` but have a simultaneous indirect immutable borrow on // that component via `EntityRefExcept`. - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<&mut TestComponent>, _: Query<EntityRefExcept<TestComponent2>>) {} } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3253,7 +3253,7 @@ mod tests { let mut world = World::new(); world.spawn(TestComponent(0)).insert(TestComponent2(0)); - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<&mut TestComponent>, query: Query<EntityRefExcept<TestComponent>>) { for entity_ref in query.iter() { diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3301,7 +3301,7 @@ mod tests { // This should panic, because we have a mutable borrow on // `TestComponent` but have a simultaneous indirect immutable borrow on // that component via `EntityRefExcept`. - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<(&mut TestComponent, EntityMutExcept<TestComponent2>)>) {} } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3317,7 +3317,7 @@ mod tests { // This should panic, because we have a mutable borrow on // `TestComponent` but have a simultaneous indirect immutable borrow on // that component via `EntityRefExcept`. - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<&mut TestComponent>, mut query: Query<EntityMutExcept<TestComponent2>>) { for mut entity_mut in query.iter_mut() { diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3335,7 +3335,7 @@ mod tests { let mut world = World::new(); world.spawn(TestComponent(0)).insert(TestComponent2(0)); - world.run_system_once(system); + world.run_system_once(system).unwrap(); fn system(_: Query<&mut TestComponent>, mut query: Query<EntityMutExcept<TestComponent>>) { for mut entity_mut in query.iter_mut() { 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 @@ -557,16 +557,18 @@ mod tests { } fn build_scene(app: &mut App) -> Handle<Scene> { - app.world_mut().run_system_once( - |world: &World, - type_registry: Res<'_, AppTypeRegistry>, - asset_server: Res<'_, AssetServer>| { - asset_server.add( - Scene::from_dynamic_scene(&DynamicScene::from_world(world), &type_registry) - .unwrap(), - ) - }, - ) + app.world_mut() + .run_system_once( + |world: &World, + type_registry: Res<'_, AppTypeRegistry>, + asset_server: Res<'_, AssetServer>| { + asset_server.add( + Scene::from_dynamic_scene(&DynamicScene::from_world(world), &type_registry) + .unwrap(), + ) + }, + ) + .expect("Failed to run scene builder system.") } fn build_dynamic_scene(app: &mut App) -> Handle<DynamicScene> { 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 @@ -574,6 +576,7 @@ mod tests { .run_system_once(|world: &World, asset_server: Res<'_, AssetServer>| { asset_server.add(DynamicScene::from_world(world)) }) + .expect("Failed to run dynamic scene builder system.") } fn observe_trigger(app: &mut App, scene_id: InstanceId, scene_entity: Entity) { 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 @@ -608,7 +611,8 @@ mod tests { trigger_count.0, 1, "wrong number of `SceneInstanceReady` triggers" ); - }); + }) + .unwrap(); } #[test] 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 @@ -619,11 +623,12 @@ mod tests { let scene = build_scene(&mut app); // Spawn scene. - let scene_id = - app.world_mut() - .run_system_once(move |mut scene_spawner: ResMut<'_, SceneSpawner>| { - scene_spawner.spawn(scene.clone()) - }); + let scene_id = app + .world_mut() + .run_system_once(move |mut scene_spawner: ResMut<'_, SceneSpawner>| { + scene_spawner.spawn(scene.clone()) + }) + .unwrap(); // Check trigger. observe_trigger(&mut app, scene_id, Entity::PLACEHOLDER); 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 @@ -637,11 +642,12 @@ mod tests { let scene = build_dynamic_scene(&mut app); // Spawn scene. - let scene_id = - app.world_mut() - .run_system_once(move |mut scene_spawner: ResMut<'_, SceneSpawner>| { - scene_spawner.spawn_dynamic(scene.clone()) - }); + let scene_id = app + .world_mut() + .run_system_once(move |mut scene_spawner: ResMut<'_, SceneSpawner>| { + scene_spawner.spawn_dynamic(scene.clone()) + }) + .unwrap(); // Check trigger. observe_trigger(&mut app, scene_id, Entity::PLACEHOLDER); 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 @@ -655,13 +661,17 @@ mod tests { let scene = build_scene(&mut app); // Spawn scene as child. - let (scene_id, scene_entity) = app.world_mut().run_system_once( - move |mut commands: Commands<'_, '_>, mut scene_spawner: ResMut<'_, SceneSpawner>| { - let entity = commands.spawn_empty().id(); - let id = scene_spawner.spawn_as_child(scene.clone(), entity); - (id, entity) - }, - ); + let (scene_id, scene_entity) = app + .world_mut() + .run_system_once( + move |mut commands: Commands<'_, '_>, + mut scene_spawner: ResMut<'_, SceneSpawner>| { + let entity = commands.spawn_empty().id(); + let id = scene_spawner.spawn_as_child(scene.clone(), entity); + (id, entity) + }, + ) + .unwrap(); // Check trigger. observe_trigger(&mut app, scene_id, scene_entity); 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 @@ -675,13 +685,17 @@ mod tests { let scene = build_dynamic_scene(&mut app); // Spawn scene as child. - let (scene_id, scene_entity) = app.world_mut().run_system_once( - move |mut commands: Commands<'_, '_>, mut scene_spawner: ResMut<'_, SceneSpawner>| { - let entity = commands.spawn_empty().id(); - let id = scene_spawner.spawn_dynamic_as_child(scene.clone(), entity); - (id, entity) - }, - ); + let (scene_id, scene_entity) = app + .world_mut() + .run_system_once( + move |mut commands: Commands<'_, '_>, + mut scene_spawner: ResMut<'_, SceneSpawner>| { + let entity = commands.spawn_empty().id(); + let id = scene_spawner.spawn_dynamic_as_child(scene.clone(), entity); + (id, entity) + }, + ) + .unwrap(); // Check trigger. observe_trigger(&mut app, scene_id, scene_entity); 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 @@ -718,13 +732,15 @@ mod tests { check(app.world_mut(), count); // Despawn scene. - app.world_mut().run_system_once( - |mut commands: Commands, query: Query<Entity, With<ComponentA>>| { - for entity in query.iter() { - commands.entity(entity).despawn_recursive(); - } - }, - ); + app.world_mut() + .run_system_once( + |mut commands: Commands, query: Query<Entity, With<ComponentA>>| { + for entity in query.iter() { + commands.entity(entity).despawn_recursive(); + } + }, + ) + .unwrap(); app.update(); check(app.world_mut(), 0); diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -944,7 +944,7 @@ mod tests { new_pos: Vec2, expected_camera_entity: &Entity, ) { - world.run_system_once_with(new_pos, move_ui_node); + world.run_system_once_with(new_pos, move_ui_node).unwrap(); ui_schedule.run(world); let (ui_node_entity, TargetCamera(target_camera_entity)) = world .query_filtered::<(Entity, &TargetCamera), With<MovingUiNode>>() diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -995,7 +995,7 @@ mod tests { // add total cameras - 1 (the assumed default) to get an idea for how many nodes we should expect let expected_max_taffy_node_count = get_taffy_node_count(&world) + total_cameras - 1; - world.run_system_once(update_camera_viewports); + world.run_system_once(update_camera_viewports).unwrap(); ui_schedule.run(&mut world);
Respect `SystemParam::validate_param` for observers and other non-executor system runners ## What problem does this solve or what need does it fill? Currently only schedule executors respect the `SystemParam::validate_param` to prevent panics when running systems with unavailable resources. As a follow up to #15276 this should be implemented for other places that run systems like: - observers, - manually executed systems through `&mut World` ## What solution would you like? Check `validate_param` directly before running the systems and if it fails, don't run them.
Trying to implement this, few topics to resolve: 1. Where to store the warning mechanism (#15391). Right now it's a macro in the executors, but we need it in observers and `run_once` world methods. Should I put it in `system_param.rs`? 2. There is a lot of `validate` -> `run` patterns. The only reason this is separated is for multithreaded executor, where we want to save on task spawning. This would also help us centralize the warnings. 3. Observers don't return values, so validate support is trivial. The problem is in `run_once` methods, which can return a value. We can either: a) Add `Option` to all return values. b) Add a new family of methods with `try_` prefix. The latter is less intrusive, but in the long run it prevents us from **requiring** `validate_param` before running the systems. Now that we're actually shipping `Single` and friends, this is a blocker to the 0.15 release: https://discord.com/channels/691052431525675048/749335865876021248/1289685595676868661
2024-09-29T19:57:11Z
1.81
2024-09-30T01:18:30Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "change_detection::tests::as_deref_mut", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_recursive", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_new", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_expiration", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper_no_panic", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "identifier::tests::id_construction", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "query::access::tests::filtered_access_extend", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "query::access::tests::test_access_clone_from", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_dynamic_component", "observer::tests::observer_entity_routing", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_multiple_events", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_multiple_components", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_multiple_listeners", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_no_target", "query::access::tests::test_filtered_access_set_from", "query::error::test::query_does_not_match", "observer::tests::observer_order_insert_remove", "observer::tests::observer_propagating", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_order_replace", "observer::tests::observer_multiple_matches", "observer::tests::observer_propagating_no_next", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::read_only_field_visibility", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_with_without_static", "observer::tests::observer_order_recursive", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_world_skipping", "query::builder::tests::builder_static_components", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_halt", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_or", "observer::tests::observer_propagating_parallel_propagation", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::fetch::tests::world_query_struct_variants", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_mut_fetch", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::state::tests::can_transmute_changed", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_entity_mut", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_to_more_general", "query::builder::tests::builder_transmute", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::join", "query::state::tests::join_with_get", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::has_query", "query::tests::any_query", "query::tests::many_entities", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::right_world_get_many_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::transmute_with_different_world - should panic", "query::state::tests::right_world_get - should panic", "query::tests::query_iter_combinations_sparse", "query::tests::multi_storage_query", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_iter_combinations", "query::tests::self_conflicting_worldquery - should panic", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::anonymous_set_name", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::stepping::tests::verify_cursor", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::resize_test", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "storage::table::tests::table", "storage::sparse_set::tests::sparse_sets", "system::builder::tests::custom_param_builder", "system::builder::tests::local_builder", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::dyn_builder", "system::builder::tests::query_builder", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "system::builder::tests::param_set_builder", "system::builder::tests::query_builder_state", "system::builder::tests::param_set_vec_builder", "system::commands::tests::append", "system::builder::tests::vec_builder", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::remove_resources", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::commands", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::insert_components", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "schedule::tests::stepping::multi_threaded_executor", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "system::commands::tests::remove_components", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::tests::system_ordering::order_exclusive_systems", "event::tests::test_event_mutator_iter_nth", "system::commands::tests::entity_commands_entry", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::system::tests::non_send_resources", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::condition::tests::multiple_run_conditions", "system::system::tests::run_system_once", "event::tests::test_event_reader_iter_nth", "schedule::tests::system_ambiguity::read_only", "system::system::tests::run_two_systems", "system::commands::tests::remove_components_by_id", "system::system_name::tests::test_system_name_exclusive_param", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::disable_auto_sync_points", "system::system_name::tests::test_system_name_regular_param", "system::system::tests::command_processing", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::system_param::tests::system_param_const_generics", "schedule::executor::tests::invalid_system_param_skips", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::configure_set_on_new_schedule", "system::system_param::tests::param_set_non_send_first", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::stepping::tests::step_run_if_false", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_param::tests::system_param_generic_bounds", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_phantom_data", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system_param::tests::system_param_field_limit", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system_param::tests::system_param_private_fields", "schedule::tests::conditions::systems_nested_in_system_sets", "system::system_param::tests::param_set_non_send_second", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::non_sync_local", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::condition::tests::run_condition", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::change_detection", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "schedule::tests::system_ordering::order_systems", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::system_registry::tests::nested_systems", "system::system_registry::tests::cached_system_adapters", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::cached_system_commands", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::output_values", "system::system_registry::tests::cached_system", "system::tests::any_of_has_filter_with_when_both_have_it", "system::system_registry::tests::system_with_input_ref", "schedule::condition::tests::run_condition_combinators", "system::system_registry::tests::system_with_input_mut", "system::tests::any_of_with_and_without_common", "system::tests::any_of_and_without", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_mut_and_option - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "query::tests::par_iter_mut_change_detection", "system::tests::any_of_working", "system::tests::get_system_conflicts", "system::tests::changed_trackers_or_conflict - should panic", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::assert_systems", "system::tests::long_life_test", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::disjoint_query_mut_system", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::immutable_mut_test", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::commands_param_set", "event::tests::test_event_cursor_par_read_mut", "system::tests::convert_mut_to_immut", "system::tests::can_have_16_parameters", "system::tests::disjoint_query_mut_read_component_system", "system::tests::into_iter_impl", "system::tests::local_system", "event::tests::test_event_cursor_par_read", "system::tests::changed_resource_system", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::option_has_no_filter_with - should panic", "system::tests::nonconflicting_system_resources", "system::tests::non_send_option_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::non_send_system", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::simple_system", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_expanded_with_and_without_common", "system::tests::query_is_empty", "system::tests::system_state_archetype_update", "system::tests::system_state_change_detection", "system::tests::read_system_state", "system::tests::system_state_invalid_world - should panic", "system::tests::or_has_filter_with", "system::tests::query_validates_world_id - should panic", "system::tests::panic_inside_system - should panic", "system::tests::query_set_system", "system::tests::update_archetype_component_access_works", "system::tests::write_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::or_with_without_and_compatible_with_without", "tests::clear_entities", "tests::despawn_mixed_storage", "system::tests::or_param_set_system", "tests::duplicate_components_panic - should panic", "tests::bundle_derive", "tests::added_tracking", "tests::changed_query", "tests::add_remove_components", "tests::added_queries", "tests::dynamic_required_components", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::despawn_table_storage", "system::tests::test_combinator_clone", "tests::empty_spawn", "tests::entity_ref_and_entity_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::entity_ref_and_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "system::tests::world_collections_system", "tests::changed_trackers_sparse", "tests::changed_trackers", "tests::filtered_query_access", "tests::generic_required_components", "tests::exact_size_query", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::query_all_for_each", "tests::non_send_resource_panic - should panic", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::query_missing_component", "tests::query_get", "tests::par_for_each_dense", "tests::par_for_each_sparse", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_optional_component_sparse_no_match", "tests::query_single_component_for_each", "tests::random_access", "tests::query_sparse_component", "tests::remove_missing", "tests::ref_and_mut_query_panic - should panic", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::remove", "tests::remove_tracking", "tests::required_components_retain_keeps_required", "tests::resource_scope", "tests::required_components_take_leaves_required", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_spawn_then_insert_no_overwrite", "tests::reserve_and_spawn", "tests::resource", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "query::tests::query_filtered_exactsizeiterator_len", "world::command_queue::test::test_command_queue_inner", "tests::reserve_entities_across_worlds", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::stateful_query_handles_new_archetype", "tests::take", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::get_components", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::get_resource_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iter_resources", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::reflect::tests::get_component_as_reflect", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::reflect::tests::get_component_as_mut_reflect", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1236) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 304) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 240) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::Component (line 314)", "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/component.rs - component::StorageType (line 354)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1252)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/component.rs - component::Component (line 279)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 810)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "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::xnor (line 413) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 703)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1008)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1888)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 959)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1865)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 65)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 835)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 236)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 970)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "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::Component (line 127)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 391)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 266) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "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_added (line 666)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 522)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 915) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 560)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1026) - compile", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 47)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 457)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 420)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 16)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 324)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 623)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 650)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 695) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1061)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1440)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 404)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 938)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1283)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1416)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 739)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 278)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1236)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1999) - compile fail", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 1006)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 968)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 499)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 678)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1188)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1975)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 177)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 706)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1392)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 122)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 859)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 346)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 144)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 215)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 200)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 171)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 66)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 541)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1531)", "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>::get (line 847)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 183)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 299)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 225)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 86)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1253)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 968)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 738)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1288)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1135)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 233)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1574)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 106)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 593)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 647)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 148)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 489)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 45)", "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>::par_iter_mut (line 810)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1332)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1419)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1017)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1212)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 451)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1107)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 50)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1040)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1182)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 514)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1424)", "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::Resource (line 666)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1331)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 578)", "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 543)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 360)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1477)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1148)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1130)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 854)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 394)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1565)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1709)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1591)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1183)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1077)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1736)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 129)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 765)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2523)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 823)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 630)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1816)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1793)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1621)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1045)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 433)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1098)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 487)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2545)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1676)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 476)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 442)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2622)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 595)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1650)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1213)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 717)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1873)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1834)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 560)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1848)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 912)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1769)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2885)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1280)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2300)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 946)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1249)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1999)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,501
bevyengine__bevy-15501
[ "15448" ]
7ee5143d45f9246f9cffc52e916ae12d85a71779
diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -836,7 +836,7 @@ pub struct Components { } impl Components { - /// Registers a component of type `T` with this instance. + /// Registers a [`Component`] of type `T` with this instance. /// If a component of this type has already been registered, this will return /// the ID of the pre-existing component. /// diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -876,9 +876,9 @@ impl Components { /// Registers a component described by `descriptor`. /// - /// ## Note + /// # Note /// - /// If this method is called multiple times with identical descriptors, a distinct `ComponentId` + /// If this method is called multiple times with identical descriptors, a distinct [`ComponentId`] /// will be created for each one. /// /// # See also diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1034,6 +1034,7 @@ impl Components { /// # See also /// /// * [`Components::resource_id()`] + /// * [`Components::register_resource_with_descriptor()`] #[inline] pub fn register_resource<T: Resource>(&mut self) -> ComponentId { // SAFETY: The [`ComponentDescriptor`] matches the [`TypeId`] diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1044,6 +1045,24 @@ impl Components { } } + /// Registers a [`Resource`] described by `descriptor`. + /// + /// # Note + /// + /// If this method is called multiple times with identical descriptors, a distinct [`ComponentId`] + /// will be created for each one. + /// + /// # See also + /// + /// * [`Components::resource_id()`] + /// * [`Components::register_resource()`] + pub fn register_resource_with_descriptor( + &mut self, + descriptor: ComponentDescriptor, + ) -> ComponentId { + Components::register_resource_inner(&mut self.components, descriptor) + } + /// Registers a [non-send resource](crate::system::NonSend) of type `T` with this instance. /// If a resource of this type has already been registered, this will return /// the ID of the pre-existing resource. diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1069,12 +1088,20 @@ impl Components { let components = &mut self.components; *self.resource_indices.entry(type_id).or_insert_with(|| { let descriptor = func(); - let component_id = ComponentId(components.len()); - components.push(ComponentInfo::new(component_id, descriptor)); - component_id + Components::register_resource_inner(components, descriptor) }) } + #[inline] + fn register_resource_inner( + components: &mut Vec<ComponentInfo>, + descriptor: ComponentDescriptor, + ) -> ComponentId { + let component_id = ComponentId(components.len()); + components.push(ComponentInfo::new(component_id, descriptor)); + component_id + } + /// Gets an iterator over all components registered with this instance. pub fn iter(&self) -> impl Iterator<Item = &ComponentInfo> + '_ { self.components.iter() 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 @@ -1300,6 +1300,23 @@ impl World { .map(Into::into) } + /// Registers a new [`Resource`] type and returns the [`ComponentId`] created for it. + /// + /// This enables the dynamic registration of new [`Resource`] definitions at runtime for + /// advanced use cases. + /// + /// # Note + /// + /// Registering a [`Resource`] does not insert it into [`World`]. For insertion, you could use + /// [`World::insert_resource_by_id`]. + pub fn register_resource_with_descriptor( + &mut self, + descriptor: ComponentDescriptor, + ) -> ComponentId { + self.components + .register_resource_with_descriptor(descriptor) + } + /// Initializes a new resource and returns the [`ComponentId`] created for it. /// /// If the resource already exists, nothing happens.
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 @@ -3225,6 +3242,39 @@ mod tests { ); } + #[test] + fn dynamic_resource() { + let mut world = World::new(); + + let descriptor = ComponentDescriptor::new_resource::<TestResource>(); + + let component_id = world.register_resource_with_descriptor(descriptor); + + let value = 0; + OwningPtr::make(value, |ptr| { + // SAFETY: value is valid for the layout of `TestResource` + unsafe { + world.insert_resource_by_id( + component_id, + ptr, + #[cfg(feature = "track_change_detection")] + panic::Location::caller(), + ); + } + }); + + // SAFETY: We know that the resource is of type `TestResource` + let resource = unsafe { + world + .get_resource_by_id(component_id) + .unwrap() + .deref::<TestResource>() + }; + assert_eq!(resource.0, 0); + + assert!(world.remove_resource_by_id(component_id).is_some()); + } + #[test] fn custom_resource_with_layout() { static DROP_COUNT: AtomicU32 = AtomicU32::new(0); 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 @@ -3245,7 +3295,7 @@ mod tests { ) }; - let component_id = world.register_component_with_descriptor(descriptor); + let component_id = world.register_resource_with_descriptor(descriptor); let value: [u8; 8] = [0, 1, 2, 3, 4, 5, 6, 7]; OwningPtr::make(value, |ptr| {
Add `init_resource_with_descriptor` ## What problem does this solve or what need does it fill? I'm making a scripting language and I would like to be able define resources from it dynamically. I can already do this with components by calling `init_component_with_descriptor` with a `ComponentDescriptor::<Box<dyn PartialReflect>>` but there is no equivalent for resources. ## What solution would you like? Add `init_component_with_descriptor` - takes in `ComponentDescriptor` - a unique `ComponentId` should be returned for each call ## What alternative(s) have you considered? I have a `Wrapper(Box<dyn PartialReflect>)` and I call `let id = init_resource::<Wrapper>(); remove_resource_by_id(id)` but that doesn't allow for multiple resources with the same underlying type.
Am I misunderstanding something here? Can't you just use [register_component_with_descriptor](https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.World.html#method.init_component_with_descriptor) in conjunction with [insert_resource_by_id](https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.World.html#method.insert_resource_by_id) to achieve this already? Shouldn't that allow for multiple resources with the same type? I saw [this test](https://github.com/bevyengine/bevy/blob/7ee5143d45f9246f9cffc52e916ae12d85a71779/crates/bevy_ecs/src/world/mod.rs#L3229) when working on a PR for this, which demonstrates what I mean. I'm not super familiar with ECS internals, so apologies in advance 😅. Edit: I realise `register_resource_with_descriptor` would still be a plus, just confirming my understanding.
2024-09-28T17:48:17Z
1.81
2024-09-30T18:30:55Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_replace", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::change_tick_wraparound", "entity::map_entities::tests::entity_mapper", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper_iteration", "entity::map_entities::tests::entity_mapper_no_panic", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::same_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::test_access_clone", "observer::tests::observer_dynamic_trigger", "query::access::tests::filtered_combined_access", "query::access::tests::test_access_clone_from", "observer::tests::observer_despawn", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_order_replace", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_listeners", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_filters_clone", "observer::tests::observer_propagating_world", "observer::tests::observer_no_target", "observer::tests::observer_multiple_matches", "observer::tests::observer_trigger_ref", "observer::tests::observer_multiple_components", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_trigger_targets_ref", "query::access::tests::test_access_filters_clone_from", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating_no_next", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_order_insert_remove", "observer::tests::observer_multiple_events", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_halt", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_propagating", "observer::tests::observer_order_recursive", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_propagating_join", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_transmute", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_propagating_world_skipping", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_or", "query::builder::tests::builder_static_components", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_with_without_static", "query::error::test::query_does_not_match", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::join_with_get", "query::iter::tests::query_sort_after_next - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::join", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::tests::has_query", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::tests::multi_storage_query", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::many_entities", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::transmute_with_different_world - should panic", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected", "query::tests::query", "reflect::entity_commands::tests::remove_reflected", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::derived_worldqueries", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::tests::any_query", "reflect::entity_commands::tests::remove_reflected_bundle", "schedule::executor::simple::skip_automatic_sync_points", "query::tests::query_filtered_iter_combinations", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::schedules", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::stepping::tests::verify_cursor", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::resources", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "storage::blob_vec::tests::blob_vec", "schedule::tests::stepping::multi_threaded_executor", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::tests::system_ambiguity::read_world", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "storage::sparse_set::tests::sparse_sets", "event::tests::test_event_reader_iter_nth", "event::tests::test_event_mutator_iter_nth", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::systems_nested_in_system_sets", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::builder::tests::custom_param_builder", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::tests::conditions::system_with_condition", "storage::blob_vec::tests::aligned_zst", "schedule::schedule::tests::configure_set_on_new_schedule", "system::builder::tests::dyn_builder", "system::commands::tests::append", "system::builder::tests::query_builder_state", "system::builder::tests::local_builder", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::conditions::run_exclusive_system_with_condition", "storage::table::tests::table", "system::builder::tests::param_set_vec_builder", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ordering::order_exclusive_systems", "storage::sparse_set::tests::sparse_set", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::commands::tests::remove_resources", "system::builder::tests::query_builder", "system::builder::tests::multi_param_builder", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "system::commands::tests::entity_commands_entry", "schedule::schedule::tests::inserts_a_sync_point", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::commands::tests::insert_components", "schedule::tests::conditions::multiple_conditions_on_system", "system::builder::tests::vec_builder", "storage::blob_vec::tests::resize_test", "system::system::tests::command_processing", "system::builder::tests::multi_param_builder_inference", "schedule::tests::conditions::systems_with_distributive_condition", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::commands::tests::commands", "schedule::executor::tests::invalid_system_param_skips", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::commands::tests::remove_components", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system_name::tests::test_system_name_exclusive_param", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::non_sync_local", "schedule::condition::tests::run_condition_combinators", "system::commands::tests::test_commands_are_send_and_sync", "schedule::condition::tests::run_condition", "system::system::tests::non_send_resources", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::run_system_once", "system::system::tests::run_two_systems", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_regular_param", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_param::tests::param_set_non_send_first", "system::system_param::tests::param_set_non_send_second", "system::builder::tests::param_set_builder", "schedule::tests::system_ambiguity::read_only", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::commands::tests::remove_components_by_id", "schedule::tests::system_ordering::order_systems", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "event::tests::test_event_cursor_par_read_mut", "system::system_param::tests::system_param_private_fields", "system::system_registry::tests::cached_system_commands", "system::system_registry::tests::cached_system_adapters", "schedule::schedule::tests::no_sync_chain::chain_all", "event::tests::test_event_cursor_par_read", "system::system_registry::tests::exclusive_system", "schedule::schedule::tests::no_sync_chain::chain_second", "system::system_registry::tests::cached_system", "system::system_registry::tests::change_detection", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::local_variables", "schedule::schedule::tests::no_sync_chain::chain_first", "system::system_registry::tests::output_values", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::input_values", "system::tests::any_of_with_conflicting - should panic", "system::system_registry::tests::nested_systems", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_and_without_common", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_and_without", "system::system_registry::tests::nested_systems_with_inputs", "schedule::schedule::tests::merges_sync_points_into_one", "query::tests::par_iter_mut_change_detection", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::any_of_working", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::assert_systems", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_immut_system - should panic", "system::tests::commands_param_set", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::immutable_mut_test", "system::tests::long_life_test", "system::tests::disjoint_query_mut_read_component_system", "system::tests::convert_mut_to_immut", "system::tests::changed_resource_system", "system::tests::local_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_system", "system::tests::non_send_option_system", "system::tests::non_send_system", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::into_iter_impl", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_expanded_with_and_without_common", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_has_filter_with", "system::tests::query_is_empty", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::query_validates_world_id - should panic", "system::tests::or_with_without_and_compatible_with_without", "system::tests::read_system_state", "system::tests::simple_system", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::query_set_system", "system::tests::panic_inside_system - should panic", "system::tests::or_param_set_system", "system::tests::system_state_archetype_update", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "tests::changed_query", "tests::added_queries", "tests::added_tracking", "system::tests::world_collections_system", "system::tests::test_combinator_clone", "system::tests::removal_tracking", "tests::despawn_mixed_storage", "tests::clear_entities", "tests::bundle_derive", "tests::add_remove_components", "tests::despawn_table_storage", "tests::dynamic_required_components", "tests::duplicate_components_panic - should panic", "tests::empty_spawn", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::changed_trackers_sparse", "tests::changed_trackers", "tests::filtered_query_access", "tests::exact_size_query", "tests::generic_required_components", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_get", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::query_sparse_component", "tests::remove_missing", "tests::remove", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_retain_keeps_required", "tests::remove_tracking", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_take_leaves_required", "tests::reserve_and_spawn", "tests::resource", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "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::get_components", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::reflect::tests::get_component_as_mut_reflect", "world::reflect::tests::get_component_as_reflect", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::iterate_entities_mut", "world::tests::spawn_empty_bundle", "world::tests::test_verify_unique_entities", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "world::tests::inspect_entity_components", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1030) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1038) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 240) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 304) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/component.rs - component::Component (line 314)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 354)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 724)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/component.rs - component::Component (line 279)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "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 238)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 810)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - 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 185) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "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::xnor (line 413) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1008)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 962)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 970)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 819)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 669)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 706)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/component.rs - component::Component (line 127)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1888)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 65)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 391)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1865)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 835)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 236)", "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/system/mod.rs - system::assert_is_read_only_system (line 266) - compile fail", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "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::Condition (line 59)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "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_added (line 666)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "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/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_exists (line 546)", "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::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 675)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 324)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 538)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1437)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 343)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 454)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 47)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 16)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 554) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 935)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 496)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1233)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 1003)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1859) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 620)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 647)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 401)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 565)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 965)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1835)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1329)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 228)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1185)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1058)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 278)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 856)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 736)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 144)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 738)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 242)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1389)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1413)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1280)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 177)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "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>::iter (line 447)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "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 167)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 233)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 183)", "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>::is_empty (line 1249)", "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 144)", "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 (line 295)", "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<'w,'s,D,F>::get_single (line 1131)", "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>::contains (line 1284)", "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>::single_mut (line 1178)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 262)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 295)", "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>::single (line 1103)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 876)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 230)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 437)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1978)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 402)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 470)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 899)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 209)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 275)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1591)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1709)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 525)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 250)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 373)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1873)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1816)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 129)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1793)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1650)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1424)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1477)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 297)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1848)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1621)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1736)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1676)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1769)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1565)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1007)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,454
bevyengine__bevy-15454
[ "15451" ]
5fcbdc137a6e3e636aef3e5fd9190b0bc6ec2887
diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -205,7 +205,7 @@ unsafe impl<C: Component> Bundle for C { storages: &mut Storages, ids: &mut impl FnMut(ComponentId), ) { - ids(components.init_component::<C>(storages)); + ids(components.register_component::<C>(storages)); } unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Self diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -786,7 +786,7 @@ impl<'w> BundleInserter<'w> { ) -> Self { let bundle_id = world .bundles - .init_info::<T>(&mut world.components, &mut world.storages); + .register_info::<T>(&mut world.components, &mut world.storages); // SAFETY: We just ensured this bundle exists unsafe { Self::new_with_id(world, archetype_id, bundle_id, change_tick) } } diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1135,7 +1135,7 @@ impl<'w> BundleSpawner<'w> { pub fn new<T: Bundle>(world: &'w mut World, change_tick: Tick) -> Self { let bundle_id = world .bundles - .init_info::<T>(&mut world.components, &mut world.storages); + .register_info::<T>(&mut world.components, &mut world.storages); // SAFETY: we initialized this bundle_id in `init_info` unsafe { Self::new_with_id(world, bundle_id, change_tick) } } diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -1318,10 +1318,10 @@ impl Bundles { self.bundle_ids.get(&type_id).cloned() } - /// Initializes a new [`BundleInfo`] for a statically known type. + /// Registers a new [`BundleInfo`] for a statically known type. /// - /// Also initializes all the components in the bundle. - pub(crate) fn init_info<T: Bundle>( + /// Also registers all the components in the bundle. + pub(crate) fn register_info<T: Bundle>( &mut self, components: &mut Components, storages: &mut Storages, diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -652,7 +652,7 @@ impl ComponentInfo { /// [`World`]. /// /// Each time a new `Component` type is registered within a `World` using -/// e.g. [`World::init_component`] or [`World::init_component_with_descriptor`] +/// e.g. [`World::register_component`] or [`World::register_component_with_descriptor`] /// or a Resource with e.g. [`World::init_resource`], /// a corresponding `ComponentId` is created to track it. /// diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -837,16 +837,16 @@ pub struct Components { } impl Components { - /// Initializes a component of type `T` with this instance. - /// If a component of this type has already been initialized, this will return + /// Registers a component of type `T` with this instance. + /// If a component of this type has already been registered, this will return /// the ID of the pre-existing component. /// /// # See also /// /// * [`Components::component_id()`] - /// * [`Components::init_component_with_descriptor()`] + /// * [`Components::register_component_with_descriptor()`] #[inline] - pub fn init_component<T: Component>(&mut self, storages: &mut Storages) -> ComponentId { + pub fn register_component<T: Component>(&mut self, storages: &mut Storages) -> ComponentId { let mut registered = false; let id = { let Components { diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -856,7 +856,7 @@ impl Components { } = self; let type_id = TypeId::of::<T>(); *indices.entry(type_id).or_insert_with(|| { - let id = Components::init_component_inner( + let id = Components::register_component_inner( components, storages, ComponentDescriptor::new::<T>(), diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -875,7 +875,7 @@ impl Components { id } - /// Initializes a component described by `descriptor`. + /// Registers a component described by `descriptor`. /// /// ## Note /// diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -885,17 +885,17 @@ impl Components { /// # See also /// /// * [`Components::component_id()`] - /// * [`Components::init_component()`] - pub fn init_component_with_descriptor( + /// * [`Components::register_component()`] + pub fn register_component_with_descriptor( &mut self, storages: &mut Storages, descriptor: ComponentDescriptor, ) -> ComponentId { - Components::init_component_inner(&mut self.components, storages, descriptor) + Components::register_component_inner(&mut self.components, storages, descriptor) } #[inline] - fn init_component_inner( + fn register_component_inner( components: &mut Vec<ComponentInfo>, storages: &mut Storages, descriptor: ComponentDescriptor, diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -966,7 +966,7 @@ impl Components { /// instance. /// /// Returns [`None`] if the `Component` type has not - /// yet been initialized using [`Components::init_component()`]. + /// yet been initialized using [`Components::register_component()`]. /// /// ``` /// use bevy_ecs::prelude::*; diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -976,7 +976,7 @@ impl Components { /// #[derive(Component)] /// struct ComponentA; /// - /// let component_a_id = world.init_component::<ComponentA>(); + /// let component_a_id = world.register_component::<ComponentA>(); /// /// assert_eq!(component_a_id, world.components().component_id::<ComponentA>().unwrap()) /// ``` diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1004,7 +1004,7 @@ impl Components { /// instance. /// /// Returns [`None`] if the `Resource` type has not - /// yet been initialized using [`Components::init_resource()`]. + /// yet been initialized using [`Components::register_resource()`]. /// /// ``` /// use bevy_ecs::prelude::*; diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1028,31 +1028,31 @@ impl Components { self.get_resource_id(TypeId::of::<T>()) } - /// Initializes a [`Resource`] of type `T` with this instance. - /// If a resource of this type has already been initialized, this will return + /// Registers a [`Resource`] of type `T` with this instance. + /// If a resource of this type has already been registered, this will return /// the ID of the pre-existing resource. /// /// # See also /// /// * [`Components::resource_id()`] #[inline] - pub fn init_resource<T: Resource>(&mut self) -> ComponentId { + pub fn register_resource<T: Resource>(&mut self) -> ComponentId { // SAFETY: The [`ComponentDescriptor`] matches the [`TypeId`] unsafe { - self.get_or_insert_resource_with(TypeId::of::<T>(), || { + self.get_or_register_resource_with(TypeId::of::<T>(), || { ComponentDescriptor::new_resource::<T>() }) } } - /// Initializes a [non-send resource](crate::system::NonSend) of type `T` with this instance. - /// If a resource of this type has already been initialized, this will return + /// Registers a [non-send resource](crate::system::NonSend) of type `T` with this instance. + /// If a resource of this type has already been registered, this will return /// the ID of the pre-existing resource. #[inline] - pub fn init_non_send<T: Any>(&mut self) -> ComponentId { + pub fn register_non_send<T: Any>(&mut self) -> ComponentId { // SAFETY: The [`ComponentDescriptor`] matches the [`TypeId`] unsafe { - self.get_or_insert_resource_with(TypeId::of::<T>(), || { + self.get_or_register_resource_with(TypeId::of::<T>(), || { ComponentDescriptor::new_non_send::<T>(StorageType::default()) }) } diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1062,7 +1062,7 @@ impl Components { /// /// The [`ComponentDescriptor`] must match the [`TypeId`] #[inline] - unsafe fn get_or_insert_resource_with( + unsafe fn get_or_register_resource_with( &mut self, type_id: TypeId, func: impl FnOnce() -> ComponentDescriptor, diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1293,7 +1293,7 @@ struct InitComponentId<T: Component> { impl<T: Component> FromWorld for InitComponentId<T> { fn from_world(world: &mut World) -> Self { Self { - component_id: world.init_component::<T>(), + component_id: world.register_component::<T>(), marker: PhantomData, } } diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -1384,7 +1384,7 @@ impl RequiredComponents { storages: &mut Storages, constructor: fn() -> C, ) { - let component_id = components.init_component::<C>(storages); + let component_id = components.register_component::<C>(storages); let erased: RequiredComponentConstructor = RequiredComponentConstructor(Arc::new( move |table, sparse_sets, 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 @@ -393,7 +393,7 @@ fn hook_on_add<E: Event, B: Bundle, S: ObserverSystem<E, B>>( _: ComponentId, ) { world.commands().queue(move |world: &mut World| { - let event_type = world.init_component::<E>(); + let event_type = world.register_component::<E>(); let mut components = Vec::new(); B::component_ids(&mut world.components, &mut world.storages, &mut |id| { components.push(id); diff --git a/crates/bevy_ecs/src/observer/trigger_event.rs b/crates/bevy_ecs/src/observer/trigger_event.rs --- a/crates/bevy_ecs/src/observer/trigger_event.rs +++ b/crates/bevy_ecs/src/observer/trigger_event.rs @@ -16,14 +16,14 @@ pub struct TriggerEvent<E, Targets: TriggerTargets = ()> { impl<E: Event, Targets: TriggerTargets> TriggerEvent<E, Targets> { pub(super) fn trigger(mut self, world: &mut World) { - let event_type = world.init_component::<E>(); + let event_type = world.register_component::<E>(); trigger_event(world, event_type, &mut self.event, self.targets); } } impl<E: Event, Targets: TriggerTargets> TriggerEvent<&mut E, Targets> { pub(super) fn trigger_ref(self, world: &mut World) { - let event_type = world.init_component::<E>(); + let event_type = world.register_component::<E>(); trigger_event(world, event_type, self.event, self.targets); } } diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1188,7 +1188,7 @@ unsafe impl<T: Component> WorldQuery for &T { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1387,7 +1387,7 @@ unsafe impl<'__w, T: Component> WorldQuery for Ref<'__w, T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1586,7 +1586,7 @@ unsafe impl<'__w, T: Component> WorldQuery for &'__w mut T { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -1976,7 +1976,7 @@ unsafe impl<T: Component> WorldQuery for Has<T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -191,7 +191,7 @@ unsafe impl<T: Component> WorldQuery for With<T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -302,7 +302,7 @@ unsafe impl<T: Component> WorldQuery for Without<T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<Self::State> { diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -730,7 +730,7 @@ unsafe impl<T: Component> WorldQuery for Added<T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<ComponentId> { diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -948,7 +948,7 @@ unsafe impl<T: Component> WorldQuery for Changed<T> { } fn init_state(world: &mut World) -> ComponentId { - world.init_component::<T>() + world.register_component::<T>() } fn get_state(components: &Components) -> Option<ComponentId> { diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -127,13 +127,13 @@ impl Schedules { /// Ignore system order ambiguities caused by conflicts on [`Component`]s of type `T`. pub fn allow_ambiguous_component<T: Component>(&mut self, world: &mut World) { self.ignored_scheduling_ambiguities - .insert(world.init_component::<T>()); + .insert(world.register_component::<T>()); } /// Ignore system order ambiguities caused by conflicts on [`Resource`]s of type `T`. pub fn allow_ambiguous_resource<T: Resource>(&mut self, world: &mut World) { self.ignored_scheduling_ambiguities - .insert(world.components.init_resource::<T>()); + .insert(world.components.register_resource::<T>()); } /// Iterate through the [`ComponentId`]'s that will be ignored. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -591,7 +591,7 @@ unsafe impl<'a, T: Resource> SystemParam for Res<'a, T> { type Item<'w, 's> = Res<'w, T>; fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { - let component_id = world.components.init_resource::<T>(); + let component_id = world.components.register_resource::<T>(); let archetype_component_id = world.initialize_resource_internal(component_id).id(); let combined_access = system_meta.component_access_set.combined_access(); diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -698,7 +698,7 @@ unsafe impl<'a, T: Resource> SystemParam for ResMut<'a, T> { type Item<'w, 's> = ResMut<'w, T>; fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { - let component_id = world.components.init_resource::<T>(); + let component_id = world.components.register_resource::<T>(); let archetype_component_id = world.initialize_resource_internal(component_id).id(); let combined_access = system_meta.component_access_set.combined_access(); diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1248,7 +1248,7 @@ unsafe impl<'a, T: 'static> SystemParam for NonSend<'a, T> { fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { system_meta.set_non_send(); - let component_id = world.components.init_non_send::<T>(); + let component_id = world.components.register_non_send::<T>(); let archetype_component_id = world.initialize_non_send_internal(component_id).id(); let combined_access = system_meta.component_access_set.combined_access(); diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1352,7 +1352,7 @@ unsafe impl<'a, T: 'static> SystemParam for NonSendMut<'a, T> { fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { system_meta.set_non_send(); - let component_id = world.components.init_non_send::<T>(); + let component_id = world.components.register_non_send::<T>(); let archetype_component_id = world.initialize_non_send_internal(component_id).id(); let combined_access = system_meta.component_access_set.combined_access(); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -955,7 +955,7 @@ impl<'w> EntityWorldMut<'w> { let world = &mut self.world; let storages = &mut world.storages; let components = &mut world.components; - let bundle_id = world.bundles.init_info::<T>(components, storages); + let bundle_id = world.bundles.register_info::<T>(components, storages); // SAFETY: We just ensured this bundle exists let bundle_info = unsafe { world.bundles.get_unchecked(bundle_id) }; let old_location = self.location; diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1221,7 +1221,7 @@ impl<'w> EntityWorldMut<'w> { pub fn remove<T: Bundle>(&mut self) -> &mut Self { let storages = &mut self.world.storages; let components = &mut self.world.components; - let bundle_info = self.world.bundles.init_info::<T>(components, storages); + let bundle_info = self.world.bundles.register_info::<T>(components, storages); // SAFETY: the `BundleInfo` is initialized above self.location = unsafe { self.remove_bundle(bundle_info) }; diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1237,7 +1237,7 @@ impl<'w> EntityWorldMut<'w> { let storages = &mut self.world.storages; let components = &mut self.world.components; - let retained_bundle = self.world.bundles.init_info::<T>(components, storages); + let retained_bundle = self.world.bundles.register_info::<T>(components, storages); // SAFETY: `retained_bundle` exists as we just initialized it. let retained_bundle_info = unsafe { self.world.bundles.get_unchecked(retained_bundle) }; let old_location = self.location; 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 @@ -172,10 +172,10 @@ impl World { /// This _must_ be run as part of constructing a [`World`], before it is returned to the caller. #[inline] fn bootstrap(&mut self) { - assert_eq!(ON_ADD, self.init_component::<OnAdd>()); - assert_eq!(ON_INSERT, self.init_component::<OnInsert>()); - assert_eq!(ON_REPLACE, self.init_component::<OnReplace>()); - assert_eq!(ON_REMOVE, self.init_component::<OnRemove>()); + assert_eq!(ON_ADD, self.register_component::<OnAdd>()); + assert_eq!(ON_INSERT, self.register_component::<OnInsert>()); + assert_eq!(ON_REPLACE, self.register_component::<OnReplace>()); + assert_eq!(ON_REMOVE, self.register_component::<OnRemove>()); } /// Creates a new empty [`World`]. /// 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 @@ -261,17 +261,17 @@ impl World { unsafe { Commands::new_raw_from_entities(self.command_queue.clone(), &self.entities) } } - /// Initializes a new [`Component`] type and returns the [`ComponentId`] created for it. - pub fn init_component<T: Component>(&mut self) -> ComponentId { - self.components.init_component::<T>(&mut self.storages) + /// Registers a new [`Component`] type and returns the [`ComponentId`] created for it. + pub fn register_component<T: Component>(&mut self) -> ComponentId { + self.components.register_component::<T>(&mut self.storages) } /// Returns a mutable reference to the [`ComponentHooks`] for a [`Component`] type. /// /// Will panic if `T` exists in any archetypes. pub fn register_component_hooks<T: Component>(&mut self) -> &mut ComponentHooks { - let index = self.init_component::<T>(); - assert!(!self.archetypes.archetypes.iter().any(|a| a.contains(index)), "Components hooks cannot be modified if the component already exists in an archetype, use init_component if {} may already be in use", std::any::type_name::<T>()); + let index = self.register_component::<T>(); + assert!(!self.archetypes.archetypes.iter().any(|a| a.contains(index)), "Components hooks cannot be modified if the component already exists in an archetype, use register_component if {} may already be in use", std::any::type_name::<T>()); // SAFETY: We just created this component unsafe { self.components.get_hooks_mut(index).debug_checked_unwrap() } } 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 @@ -283,25 +283,25 @@ impl World { &mut self, id: ComponentId, ) -> Option<&mut ComponentHooks> { - assert!(!self.archetypes.archetypes.iter().any(|a| a.contains(id)), "Components hooks cannot be modified if the component already exists in an archetype, use init_component if the component with id {:?} may already be in use", id); + assert!(!self.archetypes.archetypes.iter().any(|a| a.contains(id)), "Components hooks cannot be modified if the component already exists in an archetype, use register_component if the component with id {:?} may already be in use", id); self.components.get_hooks_mut(id) } - /// Initializes a new [`Component`] type and returns the [`ComponentId`] created for it. + /// Registers a new [`Component`] type and returns the [`ComponentId`] created for it. /// - /// This method differs from [`World::init_component`] in that it uses a [`ComponentDescriptor`] - /// to initialize the new component type instead of statically available type information. This - /// enables the dynamic initialization of new component definitions at runtime for advanced use cases. + /// This method differs from [`World::register_component`] in that it uses a [`ComponentDescriptor`] + /// to register the new component type instead of statically available type information. This + /// enables the dynamic registration of new component definitions at runtime for advanced use cases. /// - /// While the option to initialize a component from a descriptor is useful in type-erased - /// contexts, the standard `World::init_component` function should always be used instead + /// While the option to register a component from a descriptor is useful in type-erased + /// contexts, the standard [`World::register_component`] function should always be used instead /// when type information is available at compile time. - pub fn init_component_with_descriptor( + pub fn register_component_with_descriptor( &mut self, descriptor: ComponentDescriptor, ) -> ComponentId { self.components - .init_component_with_descriptor(&mut self.storages, descriptor) + .register_component_with_descriptor(&mut self.storages, descriptor) } /// Returns the [`ComponentId`] of the given [`Component`] type `T`. 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 @@ -310,7 +310,7 @@ impl World { /// it was retrieved from and should not be used with another `World` instance. /// /// Returns [`None`] if the `Component` type has not yet been initialized within - /// the `World` using [`World::init_component`]. + /// the `World` using [`World::register_component`]. /// /// ``` /// use bevy_ecs::prelude::*; 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 @@ -320,7 +320,7 @@ impl World { /// #[derive(Component)] /// struct ComponentA; /// - /// let component_a_id = world.init_component::<ComponentA>(); + /// let component_a_id = world.register_component::<ComponentA>(); /// /// assert_eq!(component_a_id, world.component_id::<ComponentA>().unwrap()) /// ``` 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 @@ -1312,7 +1312,7 @@ impl World { pub fn init_resource<R: Resource + FromWorld>(&mut self) -> ComponentId { #[cfg(feature = "track_change_detection")] let caller = Location::caller(); - let component_id = self.components.init_resource::<R>(); + let component_id = self.components.register_resource::<R>(); if self .storages .resources 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 @@ -1358,7 +1358,7 @@ impl World { value: R, #[cfg(feature = "track_change_detection")] caller: &'static Location, ) { - let component_id = self.components.init_resource::<R>(); + let component_id = self.components.register_resource::<R>(); OwningPtr::make(value, |ptr| { // SAFETY: component_id was just initialized and corresponds to resource of type R. unsafe { 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 @@ -1388,7 +1388,7 @@ impl World { pub fn init_non_send_resource<R: 'static + FromWorld>(&mut self) -> ComponentId { #[cfg(feature = "track_change_detection")] let caller = Location::caller(); - let component_id = self.components.init_non_send::<R>(); + let component_id = self.components.register_non_send::<R>(); if self .storages .non_send_resources 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 @@ -1425,7 +1425,7 @@ impl World { pub fn insert_non_send_resource<R: 'static>(&mut self, value: R) { #[cfg(feature = "track_change_detection")] let caller = Location::caller(); - let component_id = self.components.init_non_send::<R>(); + let component_id = self.components.register_non_send::<R>(); OwningPtr::make(value, |ptr| { // SAFETY: component_id was just initialized and corresponds to resource of type R. unsafe { 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 @@ -1704,7 +1704,7 @@ impl World { let change_tick = self.change_tick(); let last_change_tick = self.last_change_tick(); - let component_id = self.components.init_resource::<R>(); + let component_id = self.components.register_resource::<R>(); let data = self.initialize_resource_internal(component_id); if !data.is_present() { OwningPtr::make(func(), |ptr| { 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 @@ -1861,7 +1861,7 @@ impl World { let bundle_id = self .bundles - .init_info::<B>(&mut self.components, &mut self.storages); + .register_info::<B>(&mut self.components, &mut self.storages); enum SpawnOrInsert<'w> { Spawn(BundleSpawner<'w>), Insert(BundleInserter<'w>, ArchetypeId), 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 @@ -2441,16 +2441,16 @@ impl World { self.storages.non_send_resources.clear(); } - /// Initializes all of the components in the given [`Bundle`] and returns both the component + /// Registers all of the components in the given [`Bundle`] and returns both the component /// ids and the bundle id. /// - /// This is largely equivalent to calling [`init_component`](Self::init_component) on each + /// This is largely equivalent to calling [`register_component`](Self::register_component) on each /// component in the bundle. #[inline] - pub fn init_bundle<B: Bundle>(&mut self) -> &BundleInfo { + pub fn register_bundle<B: Bundle>(&mut self) -> &BundleInfo { let id = self .bundles - .init_info::<B>(&mut self.components, &mut self.storages); + .register_info::<B>(&mut self.components, &mut self.storages); // SAFETY: We just initialised the bundle so its id should definitely be valid. unsafe { self.bundles.get(id).debug_checked_unwrap() } } diff --git a/examples/ecs/dynamic.rs b/examples/ecs/dynamic.rs --- a/examples/ecs/dynamic.rs +++ b/examples/ecs/dynamic.rs @@ -85,7 +85,7 @@ fn main() { }; // Register our new component to the world with a layout specified by it's size // SAFETY: [u64] is Send + Sync - let id = world.init_component_with_descriptor(unsafe { + let id = world.register_component_with_descriptor(unsafe { ComponentDescriptor::new_with_layout( name.to_string(), StorageType::Table,
diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -181,8 +181,8 @@ mod tests { assert_eq!( ids, &[ - world.init_component::<TableStored>(), - world.init_component::<SparseStored>(), + world.register_component::<TableStored>(), + world.register_component::<SparseStored>(), ] ); diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -235,10 +235,10 @@ mod tests { assert_eq!( ids, &[ - world.init_component::<A>(), - world.init_component::<TableStored>(), - world.init_component::<SparseStored>(), - world.init_component::<B>(), + world.register_component::<A>(), + world.register_component::<TableStored>(), + world.register_component::<SparseStored>(), + world.register_component::<B>(), ] ); diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -288,7 +288,7 @@ mod tests { }, ); - assert_eq!(ids, &[world.init_component::<C>(),]); + assert_eq!(ids, &[world.register_component::<C>(),]); let e4 = world .spawn(BundleWithIgnored { diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -2011,7 +2011,7 @@ mod tests { struct Y; let mut world = World::new(); - let x_id = world.init_component::<X>(); + let x_id = world.register_component::<X>(); let mut e = world.spawn_empty(); 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 @@ -733,7 +733,7 @@ mod tests { world.flush(); let mut event = EventWithData { counter: 0 }; - let component_a = world.init_component::<A>(); + let component_a = world.register_component::<A>(); world.trigger_targets_ref(&mut event, component_a); assert_eq!(5, event.counter); } 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 @@ -756,7 +756,7 @@ mod tests { fn observer_multiple_events() { let mut world = World::new(); world.init_resource::<Order>(); - let on_remove = world.init_component::<OnRemove>(); + let on_remove = world.register_component::<OnRemove>(); world.spawn( // SAFETY: OnAdd and OnRemove are both unit types, so this is safe unsafe { 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 @@ -779,8 +779,8 @@ mod tests { fn observer_multiple_components() { let mut world = World::new(); world.init_resource::<Order>(); - world.init_component::<A>(); - world.init_component::<B>(); + world.register_component::<A>(); + world.register_component::<B>(); world.observe(|_: Trigger<OnAdd, (A, B)>, mut res: ResMut<Order>| res.observed("add_ab")); 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 @@ -883,7 +883,7 @@ mod tests { let mut world = World::new(); world.init_resource::<Order>(); - let component_id = world.init_component::<A>(); + let component_id = world.register_component::<A>(); world.spawn( Observer::new(|_: Trigger<OnAdd>, mut res: ResMut<Order>| res.observed("event_a")) .with_component(component_id), 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 @@ -905,7 +905,7 @@ mod tests { fn observer_dynamic_trigger() { let mut world = World::new(); world.init_resource::<Order>(); - let event_a = world.init_component::<EventA>(); + let event_a = world.register_component::<EventA>(); world.spawn(ObserverState { // SAFETY: we registered `event_a` above and it matches the type of TriggerA diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -312,9 +312,9 @@ mod tests { let mut world = World::new(); let entity_a = world.spawn((A(0), B(0))).id(); let entity_b = world.spawn((A(0), C(0))).id(); - let component_id_a = world.init_component::<A>(); - let component_id_b = world.init_component::<B>(); - let component_id_c = world.init_component::<C>(); + let component_id_a = world.register_component::<A>(); + let component_id_b = world.register_component::<B>(); + let component_id_c = world.register_component::<C>(); let mut query_a = QueryBuilder::<Entity>::new(&mut world) .with_id(component_id_a) diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -401,8 +401,8 @@ mod tests { fn builder_dynamic_components() { let mut world = World::new(); let entity = world.spawn((A(0), B(1))).id(); - let component_id_a = world.init_component::<A>(); - let component_id_b = world.init_component::<B>(); + let component_id_a = world.register_component::<A>(); + let component_id_b = world.register_component::<B>(); let mut query = QueryBuilder::<FilteredEntityRef>::new(&mut world) .ref_id(component_id_a) diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1866,7 +1866,7 @@ mod tests { #[test] fn can_transmute_empty_tuple() { let mut world = World::new(); - world.init_component::<A>(); + world.register_component::<A>(); let entity = world.spawn(A(10)).id(); let q = world.query::<()>(); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1922,8 +1922,8 @@ mod tests { )] fn cannot_transmute_to_include_data_not_in_original_query() { let mut world = World::new(); - world.init_component::<A>(); - world.init_component::<B>(); + world.register_component::<A>(); + world.register_component::<B>(); world.spawn(A(0)); let query_state = world.query::<&A>(); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1962,7 +1962,7 @@ mod tests { )] fn cannot_transmute_entity_ref() { let mut world = World::new(); - world.init_component::<A>(); + world.register_component::<A>(); let q = world.query::<EntityRef>(); let _ = q.transmute::<&A>(&world); diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2030,8 +2030,8 @@ mod tests { )] fn cannot_transmute_changed_without_access() { let mut world = World::new(); - world.init_component::<A>(); - world.init_component::<B>(); + world.register_component::<A>(); + world.register_component::<B>(); let query = QueryState::<&A>::new(&mut world); let _new_query = query.transmute_filtered::<Entity, Changed<B>>(&world); } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2044,7 +2044,7 @@ mod tests { world.spawn((A(1), B(2))); let mut world2 = World::new(); - world2.init_component::<B>(); + world2.register_component::<B>(); world.query::<(&A, &B)>().transmute::<&B>(&world2); } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -2134,7 +2134,7 @@ mod tests { (&bevy_ecs::query::state::tests::A, ()) joined with (&bevy_ecs::query::state::tests::B, ()).")] fn cannot_join_wrong_fetch() { let mut world = World::new(); - world.init_component::<C>(); + world.register_component::<C>(); let query_1 = QueryState::<&A>::new(&mut world); let query_2 = QueryState::<&B>::new(&mut world); let _query: QueryState<&C> = query_1.join(&world, &query_2); diff --git a/crates/bevy_ecs/src/storage/table/mod.rs b/crates/bevy_ecs/src/storage/table/mod.rs --- a/crates/bevy_ecs/src/storage/table/mod.rs +++ b/crates/bevy_ecs/src/storage/table/mod.rs @@ -831,7 +831,7 @@ mod tests { fn table() { let mut components = Components::default(); let mut storages = Storages::default(); - let component_id = components.init_component::<W<TableRow>>(&mut storages); + let component_id = components.register_component::<W<TableRow>>(&mut storages); let columns = &[component_id]; let mut table = TableBuilder::with_capacity(0, columns.len()) .add_column(components.get_info(component_id).unwrap()) diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -1445,7 +1445,7 @@ mod tests { let mut world = World::default(); let mut system = IntoSystem::into_system(a_not_b_system); let mut expected_ids = HashSet::<ArchetypeComponentId>::new(); - let a_id = world.init_component::<A>(); + let a_id = world.register_component::<A>(); // set up system and verify its access is empty system.initialize(&mut world); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3107,7 +3107,7 @@ mod tests { #[test] fn entity_mut_insert_by_id() { let mut world = World::new(); - let test_component_id = world.init_component::<TestComponent>(); + let test_component_id = world.register_component::<TestComponent>(); let mut entity = world.spawn_empty(); OwningPtr::make(TestComponent(42), |ptr| { diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3135,8 +3135,8 @@ mod tests { #[test] fn entity_mut_insert_bundle_by_id() { let mut world = World::new(); - let test_component_id = world.init_component::<TestComponent>(); - let test_component_2_id = world.init_component::<TestComponent2>(); + let test_component_id = world.register_component::<TestComponent>(); + let test_component_2_id = world.register_component::<TestComponent2>(); let component_ids = [test_component_id, test_component_2_id]; let test_component_value = TestComponent(42); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3175,7 +3175,7 @@ mod tests { #[test] fn entity_mut_remove_by_id() { let mut world = World::new(); - let test_component_id = world.init_component::<TestComponent>(); + let test_component_id = world.register_component::<TestComponent>(); let mut entity = world.spawn(TestComponent(42)); entity.remove_by_id(test_component_id); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3192,8 +3192,8 @@ mod tests { #[test] fn entity_ref_except() { let mut world = World::new(); - world.init_component::<TestComponent>(); - world.init_component::<TestComponent2>(); + world.register_component::<TestComponent>(); + world.register_component::<TestComponent2>(); world.spawn(TestComponent(0)).insert(TestComponent2(0)); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3458,7 +3458,7 @@ mod tests { #[test] fn filtered_entity_ref_normal() { let mut world = World::new(); - let a_id = world.init_component::<A>(); + let a_id = world.register_component::<A>(); let e: FilteredEntityRef = world.spawn(A).into(); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3472,7 +3472,7 @@ mod tests { #[test] fn filtered_entity_ref_missing() { let mut world = World::new(); - let a_id = world.init_component::<A>(); + let a_id = world.register_component::<A>(); let e: FilteredEntityRef = world.spawn(()).into(); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3486,7 +3486,7 @@ mod tests { #[test] fn filtered_entity_mut_normal() { let mut world = World::new(); - let a_id = world.init_component::<A>(); + let a_id = world.register_component::<A>(); let mut e: FilteredEntityMut = world.spawn(A).into(); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3502,7 +3502,7 @@ mod tests { #[test] fn filtered_entity_mut_missing() { let mut world = World::new(); - let a_id = world.init_component::<A>(); + let a_id = world.register_component::<A>(); let mut e: FilteredEntityMut = world.spawn(()).into(); 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 @@ -3246,7 +3246,7 @@ mod tests { ) }; - let component_id = world.init_component_with_descriptor(descriptor); + let component_id = world.register_component_with_descriptor(descriptor); let value: [u8; 8] = [0, 1, 2, 3, 4, 5, 6, 7]; OwningPtr::make(value, |ptr| {
Rename `init_component` and `init_component_with_desciptor` ## What problem does this solve or what need does it fill? `App::init_component` registers a component with the App's main world, configuring its `ComponentDescriptor`. It should almost never be called by end users as they're called internally when setting up queries. `App::init_resource` initializes a resource with default values in the world, and is a common API. This false parallel is confusing! ## What solution would you like? Rename `init_component` and `init_component_with_desciptor` to be called `register_*`, wherever they are defined (both App and World have methods at least). Consider improving the docs for these methods while you're there, but you don't have to. ## What alternative(s) have you considered? We could call these `initalize_component`, but that's still unclear and confusing. We could instead call these `get_component_id`, but that's also a bit misleading: these methods do actually initialize things and need to be called even if the result is discarded. ## Additional context #15448 recommends adding another parallel method for resources. This should be renamed as well.
2024-09-26T19:35:21Z
1.81
2024-09-26T23:05:20Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::insert_if_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::set_if_neq", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "bundle::tests::component_hook_order_recursive", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "entity::map_entities::tests::entity_mapper", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper_iteration", "entity::map_entities::tests::entity_mapper_no_panic", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn_archetype_flags", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_combined_access", "query::access::tests::filtered_access_extend_or", "query::access::tests::test_access_clone", "query::access::tests::test_access_filters_clone", "query::access::tests::filtered_access_extend", "observer::tests::observer_dynamic_component", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone_from", "observer::tests::observer_multiple_components", "observer::tests::observer_entity_routing", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_multiple_events", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_multiple_listeners", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_multiple_matches", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_order_spawn_despawn", "query::access::tests::test_access_filters_clone_from", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_no_next", "observer::tests::observer_no_target", "observer::tests::observer_propagating", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_join", "observer::tests::observer_order_replace", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_with_without_dynamic", "observer::tests::observer_order_insert_remove", "observer::tests::observer_propagating_parallel_propagation", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::fetch::tests::world_query_phantom_data", "query::error::test::query_does_not_match", "observer::tests::observer_order_insert_remove_sparse", "query::builder::tests::builder_static_components", "observer::tests::observer_order_recursive", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_or", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_changed", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::join_with_get", "query::tests::any_query", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::has_query", "query::state::tests::join", "query::tests::query", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::query_iter_combinations_sparse", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::state::tests::cannot_join_wrong_fetch - should panic", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_bundle", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_system_set", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::schedules", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::clear_system", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::waiting_never_run", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::components", "schedule::stepping::tests::verify_cursor", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::ambiguous_with_label", "storage::blob_vec::tests::blob_vec", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_vec::tests::resize_test", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "schedule::tests::system_ambiguity::resources", "storage::table::tests::table", "system::builder::tests::custom_param_builder", "system::builder::tests::local_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::dyn_builder", "system::builder::tests::multi_param_builder", "system::builder::tests::query_builder", "system::builder::tests::query_builder_state", "system::builder::tests::param_set_builder", "system::commands::tests::append", "schedule::tests::system_ambiguity::read_world", "system::builder::tests::param_set_vec_builder", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "system::builder::tests::vec_builder", "system::commands::tests::entity_commands_entry", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::insert_components", "schedule::tests::conditions::system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "system::commands::tests::remove_resources", "system::commands::tests::test_commands_are_send_and_sync", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_components", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::observer_system::tests::test_piped_observer_systems_no_input", "schedule::tests::system_ordering::order_exclusive_systems", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "schedule::condition::tests::multiple_run_conditions", "system::system::tests::command_processing", "system::system::tests::run_two_systems", "system::commands::tests::remove_components_by_id", "system::commands::tests::commands", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system::tests::run_system_once", "system::system::tests::non_send_resources", "system::system_name::tests::test_system_name_regular_param", "system::system_name::tests::test_closure_system_name_regular_param", "schedule::tests::system_ambiguity::read_only", "schedule::tests::conditions::systems_with_distributive_condition", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_flexibility", "schedule::stepping::tests::step_run_if_false", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::disable_auto_sync_points", "system::system_param::tests::non_sync_local", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_const_generics", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::tests::system_execution::run_system", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::system_param::tests::system_param_invariant_lifetime", "schedule::tests::conditions::multiple_conditions_on_system", "system::system_param::tests::system_param_generic_bounds", "schedule::executor::tests::invalid_system_param_skips", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::system_param::tests::system_param_where_clause", "schedule::set::tests::test_schedule_label", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system_param::tests::system_param_phantom_data", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::cached_system_commands", "system::system_param::tests::system_param_name_collision", "schedule::tests::conditions::systems_nested_in_system_sets", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "event::tests::test_event_reader_iter_nth", "event::tests::test_event_mutator_iter_nth", "system::system_registry::tests::local_variables", "system::system_registry::tests::cached_system", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::nested_systems", "system::system_registry::tests::system_with_input_ref", "system::system_param::tests::param_set_non_send_second", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_registry::tests::change_detection", "system::system_registry::tests::cached_system_adapters", "system::system_registry::tests::output_values", "system::system_registry::tests::input_values", "schedule::condition::tests::run_condition", "schedule::condition::tests::run_condition_combinators", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_with_and_without_common", "system::tests::any_of_and_without", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_conflicting - should panic", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::any_of_working", "query::tests::par_iter_mut_change_detection", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::assert_systems", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_query_mut_system - should panic", "event::tests::test_event_cursor_par_read_mut", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_with_query_set_system - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::conflicting_query_sets_system - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::get_system_conflicts", "system::tests::immutable_mut_test", "system::tests::commands_param_set", "system::tests::long_life_test", "system::tests::disjoint_query_mut_system", "system::tests::convert_mut_to_immut", "system::tests::changed_resource_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::local_system", "system::tests::into_iter_impl", "event::tests::test_event_cursor_par_read", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_option_system", "system::tests::non_send_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_has_no_filter_with - should panic", "system::tests::pipe_change_detection", "system::tests::or_expanded_with_and_without_common", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with", "system::tests::query_validates_world_id - should panic", "system::tests::query_is_empty", "system::tests::read_system_state", "system::tests::simple_system", "system::tests::panic_inside_system - should panic", "system::tests::or_with_without_and_compatible_with_without", "system::tests::or_param_set_system", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::system_state_invalid_world - should panic", "system::tests::query_set_system", "system::tests::write_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::changed_query", "tests::added_tracking", "system::tests::test_combinator_clone", "system::tests::removal_tracking", "tests::bundle_derive", "tests::clear_entities", "tests::add_remove_components", "tests::despawn_mixed_storage", "system::tests::world_collections_system", "tests::despawn_table_storage", "tests::dynamic_required_components", "tests::duplicate_components_panic - should panic", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::empty_spawn", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::changed_trackers", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::changed_trackers_sparse", "tests::generic_required_components", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::query_all", "query::tests::query_filtered_exactsizeiterator_len", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all_for_each", "tests::query_filter_with_for_each", "tests::query_filter_with", "tests::par_for_each_sparse", "tests::query_filter_with_sparse_for_each", "tests::query_filter_with_sparse", "tests::query_filter_without", "tests::query_filters_dont_collide_with_fetches", "tests::par_for_each_dense", "tests::non_send_resource_panic - should panic", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_get", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::query_sparse_component", "tests::remove_missing", "tests::remove", "tests::required_components", "tests::remove_tracking", "tests::required_components_insert_existing_hooks", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_retain_keeps_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::reserve_and_spawn", "tests::required_components_take_leaves_required", "tests::resource", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "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::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_reflect", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::test_verify_unique_entities", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1029) - 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 1037) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 240) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 305) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 723)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 93)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 44)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/component.rs - component::Component (line 90)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/component.rs - component::Component (line 246)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "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/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 184) - compile fail", "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/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 236) - compile fail", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "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/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 121)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 431) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 33)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 26)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/component.rs - component::Component (line 128)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 961)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/component.rs - component::Component (line 150)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 153)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 818)", "crates/bevy_ecs/src/component.rs - component::Component (line 108)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/component.rs - component::Component (line 172)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/component.rs - component::Component (line 198)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 705)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 668)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 66)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 237)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 210)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 266) - compile fail", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "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::not (line 1040)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "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::Condition::and (line 101)", "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_added (line 665)", "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::condition_changed (line 1081)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "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/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "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 (line 518)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1022) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "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/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "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::run_once (line 507)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 497)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 48)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1132)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 279)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1059)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 966)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 402)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 936)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 15)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 554) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 455)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 676)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 621)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1859) - compile fail", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 233)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 19)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 176)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 183)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 648)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 565)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 344)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 843)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1390)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1330)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1281)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1438)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1835)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 737)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1186)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "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>::get_mut (line 964)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 737)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 323)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 539)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1234)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 1004)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 143)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1414)", "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 (line 118)", "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<'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/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1570)", "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>::contains (line 1284)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 261)", "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>::iter (line 447)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 485)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 857)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)", "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>::single (line 1103)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 899)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 229)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 876)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1007)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1978)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 274)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1709)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1591)", "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 437)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1793)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1477)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1621)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 297)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 402)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 373)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 294)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 129)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 226)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1814)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 209)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 470)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1676)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1736)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2503)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1650)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 250)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1848)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2602)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1769)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1873)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1979)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2525)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1565)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1424)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1816)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 525)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2280)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2865)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,410
bevyengine__bevy-15410
[ "15373" ]
efda7f3f9c96164f6e5be04d2be9c267919c6a0a
diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -1115,11 +1115,11 @@ pub mod common_conditions { CIn: SystemInput, C: Condition<Marker, CIn>, { - condition.pipe(|In(new): In<bool>, mut prev: Local<bool>| { + IntoSystem::into_system(condition.pipe(|In(new): In<bool>, mut prev: Local<bool>| { let changed = *prev != new; *prev = new; changed - }) + })) } /// Generates a [`Condition`] that returns true when the result of diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -1171,11 +1171,13 @@ pub mod common_conditions { CIn: SystemInput, C: Condition<Marker, CIn>, { - condition.pipe(move |In(new): In<bool>, mut prev: Local<bool>| -> bool { - let now_true = *prev != new && new == to; - *prev = new; - now_true - }) + IntoSystem::into_system(condition.pipe( + move |In(new): In<bool>, mut prev: Local<bool>| -> bool { + let now_true = *prev != new && new == to; + *prev = new; + now_true + }, + )) } } diff --git a/crates/bevy_ecs/src/system/adapter_system.rs b/crates/bevy_ecs/src/system/adapter_system.rs --- a/crates/bevy_ecs/src/system/adapter_system.rs +++ b/crates/bevy_ecs/src/system/adapter_system.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use super::{ReadOnlySystem, System}; +use super::{IntoSystem, ReadOnlySystem, System}; use crate::{ schedule::InternedSystemSet, system::{input::SystemInput, SystemIn}, diff --git a/crates/bevy_ecs/src/system/adapter_system.rs b/crates/bevy_ecs/src/system/adapter_system.rs --- a/crates/bevy_ecs/src/system/adapter_system.rs +++ b/crates/bevy_ecs/src/system/adapter_system.rs @@ -62,6 +62,40 @@ pub trait Adapt<S: System>: Send + Sync + 'static { ) -> Self::Out; } +/// An [`IntoSystem`] creating an instance of [`AdapterSystem`]. +#[derive(Clone)] +pub struct IntoAdapterSystem<Func, S> { + func: Func, + system: S, +} + +impl<Func, S> IntoAdapterSystem<Func, S> { + /// Creates a new [`IntoSystem`] that uses `func` to adapt `system`, via the [`Adapt`] trait. + pub const fn new(func: Func, system: S) -> Self { + Self { func, system } + } +} + +#[doc(hidden)] +pub struct IsAdapterSystemMarker; + +impl<Func, S, I, O, M> IntoSystem<Func::In, Func::Out, (IsAdapterSystemMarker, I, O, M)> + for IntoAdapterSystem<Func, S> +where + Func: Adapt<S::System>, + I: SystemInput, + S: IntoSystem<I, O, M>, +{ + type System = AdapterSystem<Func, S::System>; + + // Required method + fn into_system(this: Self) -> Self::System { + let system = IntoSystem::into_system(this.system); + let name = system.name(); + AdapterSystem::new(this.func, system, name) + } +} + /// A [`System`] that takes the output of `S` and transforms it by applying `Func` to it. #[derive(Clone)] pub struct AdapterSystem<Func, S> { diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -10,7 +10,7 @@ use crate::{ world::unsafe_world_cell::UnsafeWorldCell, }; -use super::{ReadOnlySystem, System}; +use super::{IntoSystem, ReadOnlySystem, System}; /// Customizes the behavior of a [`CombinatorSystem`]. /// diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -273,6 +273,40 @@ where } } +/// An [`IntoSystem`] creating an instance of [`PipeSystem`]. +pub struct IntoPipeSystem<A, B> { + a: A, + b: B, +} + +impl<A, B> IntoPipeSystem<A, B> { + /// Creates a new [`IntoSystem`] that pipes two inner systems. + pub const fn new(a: A, b: B) -> Self { + Self { a, b } + } +} + +#[doc(hidden)] +pub struct IsPipeSystemMarker; + +impl<A, B, IA, OA, IB, OB, MA, MB> IntoSystem<IA, OB, (IsPipeSystemMarker, OA, IB, MA, MB)> + for IntoPipeSystem<A, B> +where + IA: SystemInput, + A: IntoSystem<IA, OA, MA>, + B: IntoSystem<IB, OB, MB>, + for<'a> IB: SystemInput<Inner<'a> = OA>, +{ + type System = PipeSystem<A::System, B::System>; + + fn into_system(this: Self) -> Self::System { + let system_a = IntoSystem::into_system(this.a); + let system_b = IntoSystem::into_system(this.b); + let name = format!("Pipe({}, {})", system_a.name(), system_b.name()); + PipeSystem::new(system_a, system_b, Cow::Owned(name)) + } +} + /// A [`System`] created by piping the output of the first system into the input of the second. /// /// This can be repeated indefinitely, but system pipes cannot branch: the output is consumed by the receiving system. diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -296,7 +330,7 @@ where /// world.insert_resource(Message("42".to_string())); /// /// // pipe the `parse_message_system`'s output into the `filter_system`s input -/// let mut piped_system = parse_message_system.pipe(filter_system); +/// let mut piped_system = IntoSystem::into_system(parse_message_system.pipe(filter_system)); /// piped_system.initialize(&mut world); /// assert_eq!(piped_system.run((), &mut world), Some(42)); /// } 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 @@ -786,7 +786,10 @@ impl<'w, 's> Commands<'w, 's> { /// [`CachedSystemId`](crate::system::CachedSystemId) resource. /// /// See [`World::register_system_cached`] for more information. - pub fn run_system_cached<M: 'static, S: IntoSystem<(), (), M> + 'static>(&mut self, system: S) { + pub fn run_system_cached<M: 'static, S: IntoSystem<(), (), M> + Send + 'static>( + &mut self, + system: S, + ) { self.run_system_cached_with(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 @@ -798,7 +801,7 @@ impl<'w, 's> Commands<'w, 's> { where I: SystemInput<Inner<'static>: Send> + Send + 'static, M: 'static, - S: IntoSystem<I, (), M> + 'static, + S: IntoSystem<I, (), M> + Send + 'static, { self.queue(RunSystemCachedWith::new(system, input)); } diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -117,7 +117,7 @@ mod system_name; mod system_param; mod system_registry; -use std::{any::TypeId, borrow::Cow}; +use std::any::TypeId; pub use adapter_system::*; pub use builder::*; diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -168,16 +168,13 @@ pub trait IntoSystem<In: SystemInput, Out, Marker>: Sized { /// /// The second system must have [`In<T>`](crate::system::In) as its first parameter, /// where `T` is the return type of the first system. - fn pipe<B, BIn, BOut, MarkerB>(self, system: B) -> PipeSystem<Self::System, B::System> + fn pipe<B, BIn, BOut, MarkerB>(self, system: B) -> IntoPipeSystem<Self, B> where Out: 'static, B: IntoSystem<BIn, BOut, MarkerB>, for<'a> BIn: SystemInput<Inner<'a> = Out>, { - let system_a = IntoSystem::into_system(self); - let system_b = IntoSystem::into_system(system); - let name = format!("Pipe({}, {})", system_a.name(), system_b.name()); - PipeSystem::new(system_a, system_b, Cow::Owned(name)) + IntoPipeSystem::new(self, system) } /// Pass the output of this system into the passed function `f`, creating a new system that diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -199,13 +196,11 @@ pub trait IntoSystem<In: SystemInput, Out, Marker>: Sized { /// # Err(()) /// } /// ``` - fn map<T, F>(self, f: F) -> AdapterSystem<F, Self::System> + fn map<T, F>(self, f: F) -> IntoAdapterSystem<F, Self> where F: Send + Sync + 'static + FnMut(Out) -> T, { - let system = Self::into_system(self); - let name = system.name(); - AdapterSystem::new(f, system, name) + IntoAdapterSystem::new(f, self) } /// Get the [`TypeId`] of the [`System`] produced after calling [`into_system`](`IntoSystem::into_system`). diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -1,8 +1,10 @@ +use std::marker::PhantomData; + use crate::{ bundle::Bundle, change_detection::Mut, entity::Entity, - system::{input::SystemInput, BoxedSystem, IntoSystem, System, SystemIn}, + system::{input::SystemInput, BoxedSystem, IntoSystem, System}, world::{Command, World}, {self as bevy_ecs}, }; diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -48,7 +50,7 @@ impl<I, O> RemovedSystem<I, O> { /// and are created via [`World::register_system`]. pub struct SystemId<I: SystemInput = (), O = ()> { pub(crate) entity: Entity, - pub(crate) marker: std::marker::PhantomData<fn(I) -> O>, + pub(crate) marker: PhantomData<fn(I) -> O>, } impl<I: SystemInput, O> SystemId<I, O> { diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -69,7 +71,7 @@ impl<I: SystemInput, O> SystemId<I, O> { pub fn from_entity(entity: Entity) -> Self { Self { entity, - marker: std::marker::PhantomData, + marker: PhantomData, } } } diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -536,28 +538,38 @@ where /// [`Commands`](crate::system::Commands). /// /// See [`World::register_system_cached`] for more information. -pub struct RunSystemCachedWith<S: System<Out = ()>> { +pub struct RunSystemCachedWith<S, I, O, M> +where + I: SystemInput, + S: IntoSystem<I, O, M>, +{ system: S, - input: SystemIn<'static, S>, + input: I::Inner<'static>, + _phantom: PhantomData<(fn() -> O, fn() -> M)>, } -impl<S: System<Out = ()>> RunSystemCachedWith<S> { +impl<S, I, O, M> RunSystemCachedWith<S, I, O, M> +where + I: SystemInput, + S: IntoSystem<I, O, M>, +{ /// Creates a new [`Command`] struct, which can be added to /// [`Commands`](crate::system::Commands). - pub fn new<M>( - system: impl IntoSystem<S::In, (), M, System = S>, - input: SystemIn<'static, S>, - ) -> Self { + pub fn new(system: S, input: I::Inner<'static>) -> Self { Self { - system: IntoSystem::into_system(system), + system, input, + _phantom: PhantomData, } } } -impl<S: System<Out = ()>> Command for RunSystemCachedWith<S> +impl<S, I, O, M> Command for RunSystemCachedWith<S, I, O, M> where - S::In: SystemInput<Inner<'static>: Send>, + I: SystemInput<Inner<'static>: Send> + Send + 'static, + O: Send + 'static, + S: IntoSystem<I, O, M> + Send + 'static, + M: 'static, { fn apply(self, world: &mut World) { let _ = world.run_system_cached_with(self.system, self.input);
diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -1680,7 +1675,7 @@ mod tests { let mut world = World::new(); world.init_resource::<Flag>(); - let mut sys = first.pipe(second); + let mut sys = IntoSystem::into_system(first.pipe(second)); sys.initialize(&mut world); sys.run(default(), &mut world); diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -824,6 +836,40 @@ mod tests { assert!(matches!(output, Ok(x) if x == four())); } + #[test] + fn cached_system_commands() { + fn sys(mut counter: ResMut<Counter>) { + counter.0 = 1; + } + + let mut world = World::new(); + world.insert_resource(Counter(0)); + + world.commands().run_system_cached(sys); + world.flush_commands(); + + assert_eq!(world.resource::<Counter>().0, 1); + } + + #[test] + fn cached_system_adapters() { + fn four() -> i32 { + 4 + } + + fn double(In(i): In<i32>) -> i32 { + i * 2 + } + + let mut world = World::new(); + + let output = world.run_system_cached(four.pipe(double)); + assert!(matches!(output, Ok(8))); + + let output = world.run_system_cached(four.map(|i| i * 2)); + assert!(matches!(output, Ok(8))); + } + #[test] fn system_with_input_ref() { fn with_ref(InRef(input): InRef<u8>, mut counter: ResMut<Counter>) {
`run_system_cached` API will reject systems created by `pipe` and `map` From https://github.com/bevyengine/bevy/pull/14920#pullrequestreview-2320905305: > The only maybe issue I can see is that the ZST check won't work for systems created by `pipe` and `map`, even when the systems and closures involved are ZSTs. This is due to `pipe` and `map` eagerly calling `into_system` on their receiver, which will result in non-ZST types even when called on ZST types. The solution would be changing them to be lazy and call `into_system` on their receiver only when `into_system` is directly called on them. \- @SkiFire13
(This will be blocked until the linked PR is merged but I don't want to have to change the labels)
2024-09-24T12:49:28Z
1.81
2024-09-24T18:43:07Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::map_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::insert_if_new", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_recursive", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_reader_iter_last", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone_from", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_clone", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "observer::tests::observer_despawn", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_order_insert_remove", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_multiple_listeners", "observer::tests::observer_no_target", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_multiple_events", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_dynamic_component", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_propagating_no_next", "observer::tests::observer_multiple_components", "observer::tests::observer_propagating_halt", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_world", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_multiple_matches", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_dynamic_components", "observer::tests::observer_order_replace", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_trigger_ref", "query::builder::tests::builder_static_components", "query::builder::tests::builder_transmute", "query::builder::tests::builder_with_without_static", "observer::tests::observer_order_recursive", "observer::tests::observer_propagating_world_skipping", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_propagating", "observer::tests::observer_order_spawn_despawn", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "observer::tests::observer_propagating_parallel_propagation", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_struct_variants", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::builder::tests::builder_or", "observer::tests::observer_propagating_join", "query::iter::tests::query_sorts", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::join_with_get", "query::state::tests::join", "query::state::tests::transmute_from_dense_to_sparse", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::tests::any_query", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::transmute_with_different_world - should panic", "query::tests::many_entities", "query::tests::self_conflicting_worldquery - should panic", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::multi_storage_query", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::has_query", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::insert_reflected", "schedule::executor::simple::skip_automatic_sync_points", "query::tests::query_filtered_iter_combinations", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::continue_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::disabled_never_run", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::events", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::stepping::tests::verify_cursor", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::aligned_zst", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::resources", "schedule::executor::tests::invalid_system_param_skips", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::sparse_set::tests::sparse_set", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::resize_test", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::conditions::system_with_condition", "storage::sparse_set::tests::sparse_sets", "system::builder::tests::multi_param_builder", "system::builder::tests::local_builder", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "storage::table::tests::table", "schedule::schedule::tests::configure_set_on_new_schedule", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::custom_param_builder", "schedule::tests::system_ambiguity::resource_and_entity_mut", "system::builder::tests::dyn_builder", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::builder::tests::param_set_builder", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::multiple_conditions_on_system_sets", "event::tests::test_event_reader_iter_nth", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::commands", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::stepping::tests::step_run_if_false", "system::commands::tests::remove_resources", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::builder::tests::query_builder", "system::commands::tests::insert_components", "system::builder::tests::query_builder_state", "system::commands::tests::entity_commands_entry", "schedule::tests::system_execution::run_system", "system::commands::tests::remove_components", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "schedule::schedule::tests::add_systems_to_existing_schedule", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::remove_components_by_id", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::conditions::multiple_conditions_on_system", "system::builder::tests::vec_builder", "schedule::schedule::tests::disable_auto_sync_points", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system::tests::command_processing", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "system::builder::tests::param_set_vec_builder", "system::commands::tests::append", "system::system::tests::non_send_resources", "system::system_name::tests::test_system_name_exclusive_param", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system::tests::run_system_once", "schedule::set::tests::test_schedule_label", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_regular_param", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::system::tests::run_two_systems", "system::system_param::tests::system_param_generic_bounds", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_param::tests::system_param_flexibility", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::conditions::system_conditions_and_change_detection", "event::tests::test_event_mutator_iter_nth", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::param_set_non_send_second", "system::system_param::tests::system_param_phantom_data", "schedule::tests::system_ambiguity::read_only", "schedule::schedule::tests::inserts_a_sync_point", "system::system_param::tests::non_sync_local", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_param::tests::system_param_private_fields", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_param::tests::param_set_non_send_first", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::input_values", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::system_registry::tests::output_values", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::change_detection", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::exclusive_system", "schedule::condition::tests::run_condition", "system::system_registry::tests::nested_systems", "system::system_registry::tests::local_variables", "schedule::condition::tests::run_condition_combinators", "system::system_registry::tests::cached_system", "schedule::tests::system_ordering::order_systems", "schedule::schedule::tests::merges_sync_points_into_one", "system::system_registry::tests::nested_systems_with_inputs", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_and_without", "system::tests::assert_systems", "system::tests::any_of_with_and_without_common", "system::tests::any_of_working", "event::tests::test_event_cursor_par_read_mut", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::disjoint_query_mut_read_component_system", "system::tests::commands_param_set", "system::tests::long_life_test", "system::tests::get_system_conflicts", "query::tests::par_iter_mut_change_detection", "system::tests::can_have_16_parameters", "system::tests::convert_mut_to_immut", "system::tests::immutable_mut_test", "system::tests::disjoint_query_mut_system", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::conflicting_query_sets_system - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::local_system", "system::tests::into_iter_impl", "system::tests::conflicting_query_mut_system - should panic", "event::tests::test_event_cursor_par_read", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::non_send_system", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources - should panic", "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_no_filter_with - should panic", "system::tests::non_send_option_system", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::nonconflicting_system_resources", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::changed_resource_system", "system::tests::pipe_change_detection", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_has_filter_with", "system::tests::or_expanded_with_and_without_common", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::panic_inside_system - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_with_without_and_compatible_with_without", "system::tests::simple_system", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::query_set_system", "system::tests::or_param_set_system", "system::tests::read_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::changed_query", "system::tests::write_system_state", "tests::added_tracking", "system::tests::update_archetype_component_access_works", "tests::duplicate_components_panic - should panic", "tests::despawn_mixed_storage", "tests::clear_entities", "tests::bundle_derive", "tests::despawn_table_storage", "tests::empty_spawn", "tests::added_queries", "tests::dynamic_required_components", "system::tests::world_collections_system", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "system::tests::test_combinator_clone", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::add_remove_components", "tests::entity_ref_and_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::changed_trackers", "tests::changed_trackers_sparse", "tests::exact_size_query", "tests::filtered_query_access", "tests::insert_or_spawn_batch", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::generic_required_components", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_ref_query_panic - should panic", "tests::multiple_worlds_same_query_for_each - should panic", "tests::non_send_resource_drop_from_same_thread", "query::tests::query_filtered_exactsizeiterator_len", "tests::non_send_resource_points_to_distinct_data", "tests::query_all_for_each", "tests::query_all", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_dense", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_filter_without", "tests::par_for_each_sparse", "tests::non_send_resource_panic - should panic", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_get", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component", "tests::query_sparse_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove_missing", "tests::remove", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::remove_tracking", "tests::required_components_retain_keeps_required", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_take_leaves_required", "tests::reserve_and_spawn", "tests::resource_scope", "tests::resource", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_is_send", "tests::stateful_query_handles_new_archetype", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_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_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "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::get_components", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "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::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::iter_resources", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_reflect", "world::tests::spawn_empty_bundle", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities_mut", "world::tests::test_verify_unique_entities", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1029) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1037) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 240) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 305) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1237) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 93)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 723)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/component.rs - component::Component (line 90)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 246)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/component.rs - component::Component (line 44)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 40)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 214) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "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::nor (line 266) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 184) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "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::xnor (line 412) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "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/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 379) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 33)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 26)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 121)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 153)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/component.rs - component::Component (line 198)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 668)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 705)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/component.rs - component::Component (line 108)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/component.rs - component::Component (line 150)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 961)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 66)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 818)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 210)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 237)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/component.rs - component::Component (line 128)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 812)", "crates/bevy_ecs/src/component.rs - component::Component (line 172)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "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::resource_removed (line 897)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1132)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 584)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "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 (line 715)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 737)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 497)", "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>::iter_combinations_mut (line 556)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 621)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 48)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 279)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 15)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 539)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 455)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 648)", "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::run_if (line 392)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 554) - compile fail", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1859) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 565)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 676)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 402)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1835)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1131)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 143)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 344)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "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>::iter_mut (line 485)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 19)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1284)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 876)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 229)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 176)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 402)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 806)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 737)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1178)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1007)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "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>::is_empty (line 1249)", "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>::iter_inner (line 1570)", "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 (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 261)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1978)", "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::Resource (line 525)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 437)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 589)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)", "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 221)", "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>::iter (line 447)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "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 1424)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 274)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 129)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1621)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 899)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 294)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 373)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1591)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1650)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1477)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 470)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1769)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1676)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1736)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1816)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1709)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1565)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2503)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1793)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2280)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2602)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2525)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1979)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1848)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1814)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2865)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1873)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,405
bevyengine__bevy-15405
[ "14300" ]
efda7f3f9c96164f6e5be04d2be9c267919c6a0a
diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -183,6 +183,9 @@ impl<'m> SceneEntityMapper<'m> { /// Creates a new [`SceneEntityMapper`], spawning a temporary base [`Entity`] in the provided [`World`] pub fn new(map: &'m mut EntityHashMap<Entity>, world: &mut World) -> Self { + // We're going to be calling methods on `Entities` that require advance + // flushing, such as `alloc` and `free`. + world.flush_entities(); Self { map, // SAFETY: Entities data is kept in a valid state via `EntityMapper::world_scope`
diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -292,6 +295,23 @@ mod tests { ); } + #[test] + fn entity_mapper_no_panic() { + let mut world = World::new(); + // "Dirty" the `Entities`, requiring a flush afterward. + world.entities.reserve_entity(); + assert!(world.entities.needs_flush()); + + // Create and exercise a SceneEntityMapper - should not panic because it flushes + // `Entities` first. + SceneEntityMapper::world_scope(&mut Default::default(), &mut world, |_, m| { + m.map_entity(Entity::PLACEHOLDER); + }); + + // The SceneEntityMapper should leave `Entities` in a flushed state. + assert!(!world.entities.needs_flush()); + } + #[test] fn dyn_entity_mapper_object_safe() { assert_object_safe::<dyn DynEntityMapper>(); 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 @@ -209,14 +209,19 @@ where #[cfg(test)] mod tests { use bevy_ecs::{ + component::Component, entity::{Entity, EntityHashMap, EntityMapper, MapEntities}, - reflect::{AppTypeRegistry, ReflectMapEntitiesResource, ReflectResource}, + reflect::{ + AppTypeRegistry, ReflectComponent, ReflectMapEntities, ReflectMapEntitiesResource, + ReflectResource, + }, system::Resource, world::{Command, World}, }; use bevy_hierarchy::{AddChild, Parent}; use bevy_reflect::Reflect; + use crate::dynamic_scene::DynamicScene; use crate::dynamic_scene_builder::DynamicSceneBuilder; #[derive(Resource, Reflect, Debug)] 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 @@ -348,4 +353,51 @@ mod tests { "something is wrong with the this test or the code reloading scenes since the relationship between scene entities is broken" ); } + + // Regression test for https://github.com/bevyengine/bevy/issues/14300 + // Fails before the fix in https://github.com/bevyengine/bevy/pull/15405 + #[test] + fn no_panic_in_map_entities_after_pending_entity_in_hook() { + #[derive(Default, Component, Reflect)] + #[reflect(Component)] + struct A; + + #[derive(Component, Reflect)] + #[reflect(Component, MapEntities)] + struct B(pub Entity); + + impl MapEntities for B { + fn map_entities<M: EntityMapper>(&mut self, entity_mapper: &mut M) { + self.0 = entity_mapper.map_entity(self.0); + } + } + + let reg = AppTypeRegistry::default(); + { + let mut reg_write = reg.write(); + reg_write.register::<A>(); + reg_write.register::<B>(); + } + + let mut scene_world = World::new(); + scene_world.insert_resource(reg.clone()); + scene_world.spawn((B(Entity::PLACEHOLDER), A)); + let scene = DynamicScene::from_world(&scene_world); + + let mut dst_world = World::new(); + dst_world + .register_component_hooks::<A>() + .on_add(|mut world, _, _| { + world.commands().spawn_empty(); + }); + dst_world.insert_resource(reg.clone()); + + // Should not panic. + // Prior to fix, the `Entities::alloc` call in + // `EntityMapper::map_entity` would panic due to pending entities from the observer + // not having been flushed. + scene + .write_to_world(&mut dst_world, &mut Default::default()) + .unwrap(); + } }
Panic calling `DynamicScene::write_to_world` with `MapEntities` and `ComponentHooks` ## Bevy version `0.14.0` ## What you did - call `DynamicScene::write_to_world` with two components: 1. One that uses `MapEntities` 2. One that calls `world.commands().spawn_empty()` in `ComponentHooks::on_add` ## What went wrong Panics at `bevy_ecs::entity::Entities::verify_flushed`, traced back to `scene::write_to_world` ``` thread 'main' panicked at C:\work-ref\bevy\crates\bevy_ecs\src\entity\mod.rs:582:9: flush() needs to be called before this operation is legal ``` ## Additional information I dont know enough about the ecs internals to understand whats happening, possibly commands from the DeferredWorld in `ComponentHooks::on_add` are being called at an inappropriate time? ## Full reproducible ```rust use bevy::ecs::entity::MapEntities; use bevy::ecs::reflect::ReflectMapEntities; use bevy::prelude::*; #[derive(Default, Component, Reflect)] #[reflect(Component)] struct CompA; #[derive(Component, Reflect)] // #[reflect(Component)] // OK #[reflect(Component, MapEntities)] // Breaks struct CompB(pub Entity); impl MapEntities for CompB { fn map_entities<M: EntityMapper>(&mut self, entity_mapper: &mut M) { self.0 = entity_mapper.map_entity(self.0); } } fn main() { let mut app = App::new(); app.register_type::<CompA>().register_type::<CompB>(); let world = app.world_mut(); world .register_component_hooks::<CompA>() .on_add(|mut world, _, _| { world .commands() .spawn_empty(); }); world.spawn((CompB(Entity::PLACEHOLDER), CompA)); let scene = DynamicScene::from_world(world); scene.write_to_world(world, &mut default()).unwrap(); } ```
looks related to https://github.com/bevyengine/bevy/issues/14465
2024-09-24T00:11:46Z
1.81
2024-09-24T17:54:36Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "entity::map_entities::tests::entity_mapper_no_panic" ]
[ "change_detection::tests::as_deref_mut", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_replace", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive", "change_detection::tests::map_mut", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::change_tick_wraparound", "change_detection::tests::mut_from_res_mut", "change_detection::tests::change_expiration", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::id_comparison", "identifier::tests::from_bits", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "query::access::tests::filtered_combined_access", "observer::tests::observer_dynamic_trigger", "query::access::tests::test_access_clone_from", "query::access::tests::test_access_clone", "query::access::tests::read_all_access_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_access_extend", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_trigger_ref", "query::access::tests::access_get_conflicts", "observer::tests::observer_multiple_matches", "observer::tests::observer_multiple_listeners", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_world", "query::access::tests::test_access_filters_clone", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_events", "observer::tests::observer_order_insert_remove", "observer::tests::observer_multiple_components", "observer::tests::observer_order_replace", "observer::tests::observer_no_target", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_propagating", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_propagating_no_next", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_order_spawn_despawn", "query::access::tests::test_access_filters_clone_from", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_order_recursive", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_clone", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_dynamic_components", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_static_components", "observer::tests::observer_propagating_join", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_or", "query::builder::tests::builder_transmute", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_generalize_with_option", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_mut_fetch", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - 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::get_many_unchecked_manual_uniqueness", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::join", "query::state::tests::join_with_get", "query::tests::any_query", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::transmute_with_different_world - should panic", "query::tests::has_query", "query::tests::query_iter_combinations_sparse", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_iter_combinations", "query::tests::many_entities", "query::tests::self_conflicting_worldquery - should panic", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::tests::multi_storage_query", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::clear_schedule", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::continue_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::unknown_schedule", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::waiting_always_run", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::stepping::tests::step_always_run", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_never_run", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::stepping::tests::step_breakpoint", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "storage::blob_vec::tests::aligned_zst", "schedule::tests::stepping::multi_threaded_executor", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::resize_test", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::before_and_after", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::system_execution::run_exclusive_system", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::disable_auto_sync_points", "system::builder::tests::param_set_vec_builder", "storage::sparse_set::tests::sparse_set", "schedule::stepping::tests::verify_cursor", "storage::sparse_set::tests::sparse_sets", "system::builder::tests::query_builder", "system::commands::tests::append", "system::builder::tests::query_builder_state", "event::tests::test_event_mutator_iter_nth", "schedule::condition::tests::multiple_run_conditions", "system::builder::tests::custom_param_builder", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_with_condition", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "event::tests::test_event_reader_iter_nth", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::system_ordering::order_exclusive_systems", "system::builder::tests::vec_builder", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::schedule::tests::inserts_a_sync_point", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "system::builder::tests::local_builder", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "schedule::tests::conditions::multiple_conditions_on_system", "system::commands::tests::entity_commands_entry", "schedule::stepping::tests::step_run_if_false", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::system::tests::command_processing", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "storage::table::tests::table", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::function_system::tests::into_system_type_id_consistency", "system::builder::tests::dyn_builder", "system::system::tests::run_two_systems", "schedule::tests::system_ambiguity::correct_ambiguities", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::commands::tests::insert_components", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system::tests::non_send_resources", "schedule::schedule::tests::configure_set_on_new_schedule", "system::system_name::tests::test_system_name_regular_param", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::builder::tests::multi_param_builder", "system::system_param::tests::system_param_flexibility", "system::system::tests::run_system_once", "system::commands::tests::remove_components_by_id", "system::commands::tests::commands", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::system_param::tests::system_param_const_generics", "schedule::executor::tests::invalid_system_param_skips", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_generic_bounds", "schedule::set::tests::test_schedule_label", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::commands::tests::remove_components", "system::builder::tests::param_set_builder", "system::builder::tests::multi_param_builder_inference", "schedule::schedule::tests::configure_set_on_existing_schedule", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::non_sync_local", "system::system_param::tests::param_set_non_send_first", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::system_param::tests::system_param_phantom_data", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_registry::tests::cached_system", "system::system_registry::tests::change_detection", "system::system_param::tests::param_set_non_send_second", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_registry::tests::local_variables", "schedule::tests::system_ambiguity::read_only", "schedule::condition::tests::run_condition", "system::system_registry::tests::output_values", "schedule::tests::system_ordering::order_systems", "system::system_registry::tests::exclusive_system", "schedule::schedule::tests::merges_sync_points_into_one", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::system_with_input_mut", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::assert_entity_mut_system_does_conflict - should panic", "schedule::condition::tests::run_condition_combinators", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::assert_systems", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::conflicting_query_mut_system - should panic", "system::tests::any_of_with_and_without_common", "system::tests::any_of_and_without", "system::tests::get_system_conflicts", "system::tests::conflicting_system_resources - should panic", "system::tests::long_life_test", "system::tests::immutable_mut_test", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::any_of_working", "system::tests::any_of_with_entity_and_mut", "system::tests::option_has_no_filter_with - should panic", "system::tests::disjoint_query_mut_read_component_system", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "event::tests::test_event_cursor_par_read_mut", "system::tests::can_have_16_parameters", "system::tests::convert_mut_to_immut", "system::tests::commands_param_set", "system::tests::conflicting_query_sets_system - should panic", "system::tests::non_send_system", "system::tests::changed_resource_system", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::nonconflicting_system_resources", "schedule::tests::system_ordering::add_systems_correct_order_nested", "query::tests::par_iter_mut_change_detection", "system::tests::pipe_change_detection", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::disjoint_query_mut_system", "system::tests::into_iter_impl", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::non_send_option_system", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_has_no_filter_with - should panic", "event::tests::test_event_cursor_par_read", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::local_system", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::system_state_archetype_update", "system::tests::query_validates_world_id - should panic", "system::tests::system_state_change_detection", "system::tests::or_with_without_and_compatible_with_without", "system::tests::query_set_system", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::panic_inside_system - should panic", "system::tests::or_expanded_with_and_without_common", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::system_state_invalid_world - should panic", "system::tests::query_is_empty", "system::tests::or_param_set_system", "system::tests::or_has_filter_with", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::removal_tracking", "tests::changed_query", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::added_queries", "query::tests::query_filtered_exactsizeiterator_len", "tests::added_tracking", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::clear_entities", "tests::duplicate_components_panic - should panic", "tests::dynamic_required_components", "tests::add_remove_components", "system::tests::test_combinator_clone", "tests::bundle_derive", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::empty_spawn", "tests::filtered_query_access", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::changed_trackers_sparse", "system::tests::world_collections_system", "tests::generic_required_components", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::exact_size_query", "tests::insert_or_spawn_batch_invalid", "tests::changed_trackers", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource", "tests::non_send_resource_points_to_distinct_data", "tests::query_all", "tests::query_filter_with", "tests::query_filters_dont_collide_with_fetches", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "tests::query_all_for_each", "tests::query_filter_without", "tests::query_filter_with_sparse", "tests::query_missing_component", "tests::par_for_each_sparse", "tests::query_get_works_across_sparse_removal", "tests::non_send_resource_panic - should panic", "tests::query_optional_component_sparse", "tests::query_filter_with_sparse_for_each", "tests::query_get", "tests::query_optional_component_table", "tests::query_optional_component_sparse_no_match", "tests::ref_and_mut_query_panic - should panic", "tests::query_single_component_for_each", "tests::query_single_component", "tests::random_access", "tests::query_sparse_component", "tests::remove", "tests::required_components", "tests::required_components_spawn_nonexistent_hooks", "tests::remove_missing", "tests::required_components_retain_keeps_required", "tests::required_components_insert_existing_hooks", "tests::required_components_take_leaves_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::remove_tracking", "tests::resource", "tests::reserve_and_spawn", "tests::resource_scope", "world::command_queue::test::test_command_is_send", "tests::sparse_set_add_remove_many", "tests::reserve_entities_across_worlds", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_compatible", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::get_resource_mut_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_mut_reflect", "world::reflect::tests::get_component_as_reflect", "world::tests::spawn_empty_bundle", "world::tests::panic_while_overwriting_component", "world::tests::test_verify_unique_entities", "world::tests::iterate_entities_mut", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "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/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1029) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 240) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1037) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 90)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::Component (line 44)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::Component (line 246)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 93)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 723)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 78)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 40)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "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 266) - compile fail", "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::nor (line 236) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1512)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 412) - compile fail", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "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::xor (line 431) - compile fail", "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 33)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 121)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1498)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 26)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/component.rs - component::Component (line 198)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 129)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 961)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 210)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/component.rs - component::Component (line 108)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 818)", "crates/bevy_ecs/src/component.rs - component::Component (line 150)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 106)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 222)", "crates/bevy_ecs/src/component.rs - component::Component (line 128)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 247)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/component.rs - component::Component (line 172)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 191)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 173)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 66)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 141)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 153)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 210)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 237)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 668)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 705)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 648)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 271) - compile fail", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 159)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "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::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "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::on_event (line 949)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "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::not (line 1040)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1022) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "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::common_conditions::condition_changed_to (line 1132)", "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::resource_removed (line 897)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 15)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 402)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 497)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 621)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1183)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 344)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 648)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 48)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 554) - compile fail", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 1001)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1327)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1435)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1231)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 143)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1278)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 289)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 963)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1859) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 933)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1411)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1387)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 565)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 455)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 176)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 676)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 279)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 854)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 737)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 539)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 44)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1835)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 19)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 186)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1056)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "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 211)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 238)", "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 221)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "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>::contains (line 1284)", "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>::get_inner (line 1527)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 737)", "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/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 261)", "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/query.rs - system::query::Query (line 41)", "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>::iter_inner (line 1570)", "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>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1208)", "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>::par_iter_mut (line 806)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1131)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 229)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 294)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 274)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 402)", "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 1424)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 876)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 899)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 129)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1591)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 373)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1978)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 437)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 207)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1650)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1736)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 295)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 248)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 525)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1007)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 224)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2602)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 78)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1676)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2503)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 470)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1979)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1477)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1621)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1769)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2280)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1816)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1814)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1709)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2525)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1793)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1565)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1873)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1848)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2865)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,398
bevyengine__bevy-15398
[ "14467" ]
1a41c736b39a01f4dbef75c4282edf3ced5f01e9
diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1297,7 +1297,6 @@ impl<'w> EntityWorldMut<'w> { /// See [`World::despawn`] for more details. pub fn despawn(self) { let world = self.world; - world.flush_entities(); let archetype = &world.archetypes[self.location.archetype_id]; // SAFETY: Archetype cannot be mutably aliased by DeferredWorld diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1323,6 +1322,10 @@ impl<'w> EntityWorldMut<'w> { world.removed_components.send(component_id, self.entity); } + // Observers and on_remove hooks may reserve new entities, which + // requires a flush before Entities::free may be called. + world.flush_entities(); + let location = world .entities .free(self.entity)
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 @@ -1160,4 +1160,26 @@ mod tests { world.flush(); assert_eq!(vec!["event", "event"], world.resource::<Order>().0); } + + // Regression test for https://github.com/bevyengine/bevy/issues/14467 + // Fails prior to https://github.com/bevyengine/bevy/pull/15398 + #[test] + fn observer_on_remove_during_despawn_spawn_empty() { + let mut world = World::new(); + + // Observe the removal of A - this will run during despawn + world.observe(|_: Trigger<OnRemove, A>, mut cmd: Commands| { + // Spawn a new entity - this reserves a new ID and requires a flush + // afterward before Entities::free can be called. + cmd.spawn_empty(); + }); + + let ent = world.spawn(A).id(); + + // Despawn our entity, which runs the OnRemove observer and allocates a + // new Entity. + // Should not panic - if it does, then Entities was not flushed properly + // after the observer's spawn_empty. + world.despawn(ent); + } }
Panic when a despawning `Entity`'s observer spawns an `Entity` ## Bevy version `0.14.0` ## What you did ```rust use bevy::prelude::*; fn main() { App::new() .add_plugins(MinimalPlugins) .add_systems(Startup, startup) .add_systems(Update, update) .run(); } #[derive(Component)] struct Marker; fn startup(mut commands: Commands) { commands.spawn(Marker).observe(|_: Trigger<OnRemove, Marker>, mut commands: Commands| { commands.spawn_empty(); }); } fn update( query: Query<Entity, With<Marker>>, mut commands: Commands ) { for entity in &query { commands.entity(entity).despawn(); } } ``` ## What went wrong ### What were you expecting? 1. Entity with `Marker` component gets queued for despawning. 2. Its observer runs and queues the spawning of a new entity. 3. End result is the entity with `Marker` being despawned, and a new empty entity being spawned. 4. App continues to run. ### What actually happened? ``` thread 'main' panicked at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\entity\mod.rs:582:9: flush() needs to be called before this operation is legal note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic when applying buffers for system `flush_panic_repro::update`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! error: process didn't exit successfully: `target\debug\flush_panic_repro.exe` (exit code: 101) ``` ## Additional information #14300 runs into the same panic, but involves component hooks, `MapEntities`, and `DynamicScene`. I don't know enough about Bevy's internals to know if these are ultimately the same bug, or just coincidentally panic in the same spot. --- If just the `Marker` component is removed without despawning its entity, the observer still runs (as expected) but there is no panic: ```rust fn update( query: Query<Entity, With<Marker>>, mut commands: Commands ) { for entity in &query { commands.entity(entity).remove::<Marker>(); // Does NOT panic. } } // Rest of code is unchanged. ``` --- Here's what seems like the most relevant part of the panic backtrace: ``` 2: bevy_ecs::entity::Entities::verify_flushed at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\entity\mod.rs:582 3: bevy_ecs::entity::Entities::free at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\entity\mod.rs:680 4: bevy_ecs::world::entity_ref::EntityWorldMut::despawn at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\world\entity_ref.rs:1235 5: bevy_ecs::world::World::despawn at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\world\mod.rs:1105 6: bevy_ecs::system::commands::despawn at F:\packages\cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\system\commands\mod.rs:1241 ```
2024-09-23T20:28:24Z
1.81
2024-09-24T01:25:13Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "observer::tests::observer_on_remove_during_despawn_spawn_empty" ]
[ "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_tick_wraparound", "change_detection::tests::map_mut", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_recursive_multiple", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_bits_roundtrip", "change_detection::tests::as_deref_mut", "change_detection::tests::set_if_neq", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "change_detection::tests::mut_from_res_mut", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "entity::tests::entity_const", "entity::tests::entity_niche_optimization", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "event::tests::test_event_cursor_len_filled", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_iter_len_updated", "entity::tests::entity_display", "entity::tests::reserve_generations_and_alloc", "entity::tests::reserve_generations", "bundle::tests::component_hook_order_recursive", "entity::tests::entity_comparison", "entity::tests::reserve_entity_len", "entity::tests::get_reserved_and_invalid", "event::tests::test_event_cursor_read", "event::tests::test_events_empty", "identifier::masks::tests::get_u64_parts", "event::tests::test_event_cursor_len_empty", "entity::tests::entity_debug", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_len_update", "entity::map_entities::tests::world_scope_reserves_generations", "identifier::masks::tests::pack_kind_bits", "change_detection::tests::change_expiration", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "observer::tests::observer_entity_routing", "event::tests::test_events_update_drain", "event::tests::test_event_reader_iter_last", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "identifier::masks::tests::extract_high_value", "event::tests::test_events_drain_and_read", "event::tests::test_events_clear_and_read", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_kind", "event::tests::test_events_send_default", "event::tests::test_events_extend_impl", "observer::tests::observer_no_target", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "intern::tests::static_sub_strings", "intern::tests::same_interned_content", "observer::tests::observer_order_replace", "label::tests::dyn_eq_object_safe", "observer::tests::observer_propagating", "intern::tests::zero_sized_type", "observer::tests::observer_propagating_join", "intern::tests::fieldless_enum", "observer::tests::observer_order_insert_remove", "observer::tests::observer_multiple_components", "intern::tests::same_interned_instance", "observer::tests::observer_multiple_matches", "observer::tests::observer_order_insert_remove_sparse", "label::tests::dyn_hash_object_safe", "identifier::tests::from_bits", "observer::tests::observer_order_recursive", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_multiple_events", "identifier::tests::id_construction", "identifier::tests::id_comparison", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_propagating_halt", "observer::tests::observer_order_spawn_despawn", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "query::access::tests::access_get_conflicts", "query::access::tests::test_access_filters_clone", "query::access::tests::filtered_access_extend", "query::access::tests::test_access_filters_clone_from", "query::access::tests::filtered_combined_access", "observer::tests::observer_propagating_world", "observer::tests::observer_trigger_ref", "observer::tests::observer_despawn", "query::access::tests::filtered_access_extend_or", "identifier::masks::tests::pack_into_u64", "intern::tests::different_interned_content", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_clone", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_dynamic_component", "query::access::tests::test_access_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_from", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_dynamic", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "event::tests::ensure_reader_readonly", "observer::tests::observer_multiple_listeners", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_static_components", "query::iter::tests::query_sort_after_next - should panic", "query::builder::tests::builder_transmute", "query::access::tests::test_filtered_access_set_clone", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::state::tests::can_transmute_changed", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_metadata_collision", "query::iter::tests::query_sort_after_next_dense - should panic", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_mut_fetch", "query::iter::tests::query_sorts", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_generalize_with_option", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::builder::tests::builder_with_without_static", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::join_with_get", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::any_query", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::transmute_from_dense_to_sparse", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::many_entities", "query::tests::has_query", "query::state::tests::join", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::query", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::tests::query_iter_combinations", "event::tests::test_event_reader_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "event::tests::test_event_mutator_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::condition::tests::distributive_run_if_compiles", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::executor::simple::skip_automatic_sync_points", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::configure_set_on_new_schedule", "query::state::tests::right_world_get_many - should panic", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "query::tests::derived_worldqueries", "event::tests::test_event_cursor_par_read", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::executor::tests::invalid_condition_param_skips_system", "query::state::tests::transmute_with_different_world - should panic", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "query::tests::multi_storage_query", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::tests::query_iter_combinations_sparse", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::continue_never_run", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::schedules", "schedule::stepping::tests::disabled_breakpoint", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "query::tests::self_conflicting_worldquery - should panic", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::set::tests::test_schedule_label", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::remove_schedule", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_never_run", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::stepping::tests::continue_always_run", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::tests::conditions::system_with_condition", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::stepping::tests::verify_cursor", "schedule::stepping::tests::step_duplicate_systems", "schedule::schedule::tests::disable_auto_sync_points", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::disabled_never_run", "reflect::entity_commands::tests::remove_reflected_bundle", "schedule::executor::tests::invalid_system_param_skips", "schedule::stepping::tests::clear_schedule", "reflect::entity_commands::tests::remove_reflected", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::disabled_always_run", "event::tests::test_event_cursor_par_read_mut", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::stepping::tests::step_run_if_false", "schedule::stepping::tests::clear_breakpoint", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::merges_sync_points_into_one", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::schedule::tests::no_sync_chain::chain_first", "query::tests::par_iter_mut_change_detection", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::components", "query::tests::query_filtered_iter_combinations", "schedule::condition::tests::run_condition", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_execution::run_system", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::read_only", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::exclusive", "system::builder::tests::multi_param_builder", "system::builder::tests::custom_param_builder", "system::builder::tests::param_set_builder", "system::builder::tests::query_builder_state", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::commands::tests::entity_commands_entry", "storage::blob_vec::tests::resize_test", "storage::blob_vec::tests::blob_vec", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ordering::order_exclusive_systems", "system::builder::tests::dyn_builder", "system::commands::tests::test_commands_are_send_and_sync", "system::system::tests::run_system_once", "system::system::tests::run_two_systems", "system::builder::tests::param_set_vec_builder", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system_name::tests::test_system_name_exclusive_param", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::builder::tests::vec_builder", "storage::sparse_set::tests::sparse_sets", "system::system_name::tests::test_system_name_regular_param", "system::system::tests::non_send_resources", "system::builder::tests::query_builder", "system::system_param::tests::system_param_const_generics", "storage::table::tests::table", "system::builder::tests::local_builder", "system::system_param::tests::system_param_field_limit", "system::function_system::tests::into_system_type_id_consistency", "system::system_name::tests::test_closure_system_name_regular_param", "system::commands::tests::remove_resources", "system::system_param::tests::system_param_flexibility", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::insert_components", "system::system_param::tests::param_set_non_send_second", "system::builder::tests::multi_param_builder_inference", "system::system::tests::command_processing", "system::commands::tests::remove_components", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_param::tests::system_param_generic_bounds", "system::commands::tests::commands", "system::commands::tests::append", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::non_sync_local", "system::commands::tests::remove_components_by_id", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::system_param::tests::param_set_non_send_first", "schedule::schedule::tests::no_sync_chain::chain_second", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_where_clause", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_registry::tests::cached_system", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::local_variables", "system::tests::assert_entity_mut_system_does_conflict - should panic", "schedule::condition::tests::run_condition_combinators", "system::tests::any_of_with_ref_and_mut - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::any_of_working", "system::system_registry::tests::nested_systems", "system::system_registry::tests::system_with_input_ref", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::assert_systems", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::long_life_test", "system::tests::immutable_mut_test", "system::system_registry::tests::system_with_input_mut", "system::tests::non_send_option_system", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::commands_param_set", "system::tests::into_iter_impl", "system::tests::disjoint_query_mut_read_component_system", "system::tests::convert_mut_to_immut", "system::tests::disjoint_query_mut_system", "system::tests::get_system_conflicts", "system::tests::local_system", "system::tests::non_send_system", "system::tests::any_of_with_and_without_common", "system::tests::changed_resource_system", "system::system_param::tests::system_param_private_fields", "system::tests::any_of_and_without", "system::tests::any_of_with_empty_and_mut", "system::system_registry::tests::output_values", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::system_registry::tests::input_values", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::any_of_with_entity_and_mut", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::read_system_state", "system::tests::option_has_no_filter_with - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_with_without_and_compatible_with_without", "system::tests::panic_inside_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::pipe_change_detection", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::simple_system", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::query_set_system", "query::tests::query_filtered_exactsizeiterator_len", "system::tests::or_has_no_filter_with - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_param_set_system", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_with_and_without_common", "system::tests::conflicting_system_resources - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_filter_with", "system::tests::get_many_is_ordered", "system::tests::test_combinator_clone", "system::tests::update_archetype_component_access_works", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::add_remove_components", "tests::despawn_mixed_storage", "tests::clear_entities", "tests::insert_or_spawn_batch", "system::tests::world_collections_system", "tests::multiple_worlds_same_query_for_each - should panic", "tests::filtered_query_access", "tests::multiple_worlds_same_query_get - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::dynamic_required_components", "tests::generic_required_components", "tests::empty_spawn", "tests::insert_overwrite_drop", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::insert_or_spawn_batch_invalid", "tests::mut_and_ref_query_panic - should panic", "tests::insert_overwrite_drop_sparse", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::changed_trackers_sparse", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_panic - should panic", "system::tests::removal_tracking", "tests::changed_trackers", "schedule::tests::system_execution::parallel_execution", "tests::par_for_each_dense", "tests::added_tracking", "tests::par_for_each_sparse", "tests::duplicate_components_panic - should panic", "tests::added_queries", "system::tests::write_system_state", "tests::bundle_derive", "tests::despawn_table_storage", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::changed_query", "tests::exact_size_query", "tests::query_filter_with", "tests::query_all", "tests::query_missing_component", "tests::query_get", "tests::query_filter_with_sparse", "tests::query_filter_with_for_each", "tests::query_filter_without", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::remove", "tests::query_optional_component_sparse_no_match", "tests::remove_tracking", "tests::required_components_take_leaves_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components", "tests::remove_missing", "tests::required_components_insert_existing_hooks", "tests::required_components_retain_keeps_required", "tests::ref_and_mut_query_panic - should panic", "tests::query_single_component_for_each", "tests::query_single_component", "tests::random_access", "tests::query_sparse_component", "tests::reserve_and_spawn", "tests::resource", "tests::query_optional_component_table", "tests::reserve_entities_across_worlds", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_panic_safe", "tests::resource_scope", "tests::take", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "tests::query_filter_with_sparse_for_each", "tests::required_components_spawn_nonexistent_hooks", "tests::query_all_for_each", "tests::test_is_archetypal_size_hints", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_is_send", "world::entity_ref::tests::entity_mut_except", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "tests::stateful_query_handles_new_archetype", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "tests::sparse_set_add_remove_many", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::tests::custom_resource_with_layout", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::reflect::tests::get_component_as_mut_reflect", "world::reflect::tests::get_component_as_reflect", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::identifier::tests::world_id_system_param", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::tests::get_resource_mut_by_id", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::iterate_entities_mut", "world::tests::init_non_send_resource_does_not_overwrite", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::spawn_empty_bundle", "world::tests::test_verify_unique_entities", "world::tests::iter_resources", "world::tests::iterate_entities", "world::tests::get_resource_by_id", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1028) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1036) - 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 240) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 250) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 70)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1513)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/lib.rs - (line 166)", "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/event/collections.rs - event::collections::Events (line 38)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 722)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "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/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 413) - compile fail", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "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::nand (line 185) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 125)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 960)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/lib.rs - (line 54)", "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 140)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 205)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 105)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 704)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 209)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 172)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 817)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 66)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 237)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 271) - compile fail", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 246)", "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_and_equals (line 623)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/component.rs - component::Component (line 127)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "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::condition_changed_to (line 1133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 556)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 518)", "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::Condition::or (line 289)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 676)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 648)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 1001)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 19)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 231)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1411)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 245)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 556) - compile fail", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 737)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 963)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 539)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 497)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 48)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1861) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 621)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1056)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 143)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 567)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1278)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1837)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1387)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 455)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 344)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 402)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 737)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1435)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 176)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 238)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1327)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1183)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1231)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "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 (line 118)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 289)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1527)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 933)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 279)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 146)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1570)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1284)", "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 211)", "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_mut (line 485)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 186)", "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>::is_empty (line 1249)", "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 (line 843)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 229)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 261)", "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 41)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 854)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 274)", "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::Local (line 878)", "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 221)", "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>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 223)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 439)", "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<'w,'s,D,F>::single_mut (line 1178)", "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 375)", "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 404)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1009)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "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>::transmute_lens (line 1327)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 294)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 294)", "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::DynSystemParam (line 1980)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 901)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 206)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 527)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 472)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 247)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2602)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2525)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1814)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1979)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2503)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "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 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2865)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2280)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,385
bevyengine__bevy-15385
[ "14331" ]
4d0961cc8a280ac24e73957537d5c4d060bf8059
diff --git a/benches/benches/bevy_ecs/events/iter.rs b/benches/benches/bevy_ecs/events/iter.rs --- a/benches/benches/bevy_ecs/events/iter.rs +++ b/benches/benches/bevy_ecs/events/iter.rs @@ -17,7 +17,7 @@ impl<const SIZE: usize> Benchmark<SIZE> { } pub fn run(&mut self) { - let mut reader = self.0.get_reader(); + let mut reader = self.0.get_cursor(); for evt in reader.read(&self.0) { std::hint::black_box(evt); } diff --git a/benches/benches/bevy_ecs/observers/propagation.rs b/benches/benches/bevy_ecs/observers/propagation.rs --- a/benches/benches/bevy_ecs/observers/propagation.rs +++ b/benches/benches/bevy_ecs/observers/propagation.rs @@ -1,14 +1,14 @@ use bevy_ecs::{ component::Component, entity::Entity, - event::{Event, EventWriter}, + event::Event, observer::Trigger, world::World, }; -use bevy_hierarchy::{BuildChildren, Children, Parent}; +use bevy_hierarchy::{BuildChildren, Parent}; -use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use rand::{prelude::SliceRandom, SeedableRng}; +use criterion::{black_box, Criterion}; +use rand::SeedableRng; use rand::{seq::IteratorRandom, Rng}; use rand_chacha::ChaCha8Rng; diff --git a/benches/benches/bevy_ecs/observers/propagation.rs b/benches/benches/bevy_ecs/observers/propagation.rs --- a/benches/benches/bevy_ecs/observers/propagation.rs +++ b/benches/benches/bevy_ecs/observers/propagation.rs @@ -71,7 +71,7 @@ pub fn event_propagation(criterion: &mut Criterion) { struct TestEvent<const N: usize> {} impl<const N: usize> Event for TestEvent<N> { - type Traversal = Parent; + type Traversal = &'static Parent; const AUTO_PROPAGATE: bool = true; } diff --git a/benches/benches/bevy_ecs/observers/simple.rs b/benches/benches/bevy_ecs/observers/simple.rs --- a/benches/benches/bevy_ecs/observers/simple.rs +++ b/benches/benches/bevy_ecs/observers/simple.rs @@ -1,6 +1,6 @@ use bevy_ecs::{entity::Entity, event::Event, observer::Trigger, world::World}; -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{black_box, Criterion}; use rand::{prelude::SliceRandom, SeedableRng}; use rand_chacha::ChaCha8Rng; fn deterministic_rand() -> ChaCha8Rng { 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 @@ -43,7 +43,7 @@ pub fn spawn_commands(criterion: &mut Criterion) { bencher.iter(|| { let mut commands = Commands::new(&mut command_queue, &world); for i in 0..entity_count { - let mut entity = commands + let entity = commands .spawn_empty() .insert_if(A, || black_box(i % 2 == 0)) .insert_if(B, || black_box(i % 3 == 0)) diff --git a/benches/benches/bevy_reflect/function.rs b/benches/benches/bevy_reflect/function.rs --- a/benches/benches/bevy_reflect/function.rs +++ b/benches/benches/bevy_reflect/function.rs @@ -1,5 +1,4 @@ use bevy_reflect::func::{ArgList, IntoFunction, IntoFunctionMut, TypedFunction}; -use bevy_reflect::prelude::*; use criterion::{criterion_group, criterion_main, BatchSize, Criterion}; criterion_group!(benches, typed, into, call, clone); diff --git a/crates/bevy_ecs/macros/src/component.rs b/crates/bevy_ecs/macros/src/component.rs --- a/crates/bevy_ecs/macros/src/component.rs +++ b/crates/bevy_ecs/macros/src/component.rs @@ -26,7 +26,7 @@ pub fn derive_event(input: TokenStream) -> TokenStream { TokenStream::from(quote! { impl #impl_generics #bevy_ecs_path::event::Event for #struct_name #type_generics #where_clause { - type Traversal = #bevy_ecs_path::traversal::TraverseNone; + type Traversal = (); const AUTO_PROPAGATE: bool = false; } 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 @@ -90,7 +90,7 @@ impl<'w, E, B: Bundle> Trigger<'w, E, B> { /// Enables or disables event propagation, allowing the same event to trigger observers on a chain of different entities. /// /// The path an event will propagate along is specified by its associated [`Traversal`] component. By default, events - /// use `TraverseNone` which ends the path immediately and prevents propagation. + /// use `()` which ends the path immediately and prevents propagation. /// /// To enable propagation, you must: /// + Set [`Event::Traversal`] to the component you want to propagate along. diff --git a/crates/bevy_ecs/src/traversal.rs b/crates/bevy_ecs/src/traversal.rs --- a/crates/bevy_ecs/src/traversal.rs +++ b/crates/bevy_ecs/src/traversal.rs @@ -1,15 +1,11 @@ //! A trait for components that let you traverse the ECS. -use crate::{ - component::{Component, StorageType}, - entity::Entity, -}; +use crate::{entity::Entity, query::ReadOnlyQueryData}; /// A component that can point to another entity, and which can be used to define a path through the ECS. /// -/// Traversals are used to [specify the direction] of [event propagation] in [observers]. By default, -/// events use the [`TraverseNone`] placeholder component, which cannot actually be created or added to -/// an entity and so never causes traversal. +/// Traversals are used to [specify the direction] of [event propagation] in [observers]. +/// The default query is `()`. /// /// Infinite loops are possible, and are not checked for. While looping can be desirable in some contexts /// (for example, an observer that triggers itself multiple times before stopping), following an infinite diff --git a/crates/bevy_ecs/src/traversal.rs b/crates/bevy_ecs/src/traversal.rs --- a/crates/bevy_ecs/src/traversal.rs +++ b/crates/bevy_ecs/src/traversal.rs @@ -20,24 +16,13 @@ use crate::{ /// [specify the direction]: crate::event::Event::Traversal /// [event propagation]: crate::observer::Trigger::propagate /// [observers]: crate::observer::Observer -pub trait Traversal: Component { +pub trait Traversal: ReadOnlyQueryData { /// Returns the next entity to visit. - fn traverse(&self) -> Option<Entity>; + fn traverse(item: Self::Item<'_>) -> Option<Entity>; } -/// A traversal component that doesn't traverse anything. Used to provide a default traversal -/// implementation for events. -/// -/// It is not possible to actually construct an instance of this component. -pub enum TraverseNone {} - -impl Traversal for TraverseNone { - #[inline(always)] - fn traverse(&self) -> Option<Entity> { +impl Traversal for () { + fn traverse(_: Self::Item<'_>) -> Option<Entity> { None } } - -impl Component for TraverseNone { - const STORAGE_TYPE: StorageType = StorageType::Table; -} diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -148,8 +148,8 @@ impl<'w> DeferredWorld<'w> { match self.get_resource_mut() { Some(x) => x, None => panic!( - "Requested resource {} does not exist in the `World`. - Did you forget to add it using `app.insert_resource` / `app.init_resource`? + "Requested resource {} does not exist in the `World`. + Did you forget to add it using `app.insert_resource` / `app.init_resource`? Resources are also implicitly added via `app.add_event`, and can be added by plugins.", std::any::type_name::<R>() diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -178,8 +178,8 @@ impl<'w> DeferredWorld<'w> { match self.get_non_send_resource_mut() { Some(x) => x, None => panic!( - "Requested non-send resource {} does not exist in the `World`. - Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`? + "Requested non-send resource {} does not exist in the `World`. + Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`? Non-send resources can also be added by plugins.", std::any::type_name::<R>() ), diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -387,7 +387,7 @@ impl<'w> DeferredWorld<'w> { /// # Safety /// Caller must ensure `E` is accessible as the type represented by `event` #[inline] - pub(crate) unsafe fn trigger_observers_with_data<E, C>( + pub(crate) unsafe fn trigger_observers_with_data<E, T>( &mut self, event: ComponentId, mut entity: Entity, diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -395,7 +395,7 @@ impl<'w> DeferredWorld<'w> { data: &mut E, mut propagate: bool, ) where - C: Traversal, + T: Traversal, { loop { Observers::invoke::<_>( diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -409,7 +409,11 @@ impl<'w> DeferredWorld<'w> { if !propagate { break; } - if let Some(traverse_to) = self.get::<C>(entity).and_then(C::traverse) { + if let Some(traverse_to) = self + .get_entity(entity) + .and_then(|entity| entity.get_components::<T>()) + .and_then(T::traverse) + { entity = traverse_to; } else { break; diff --git a/crates/bevy_hierarchy/src/components/parent.rs b/crates/bevy_hierarchy/src/components/parent.rs --- a/crates/bevy_hierarchy/src/components/parent.rs +++ b/crates/bevy_hierarchy/src/components/parent.rs @@ -79,8 +79,8 @@ impl Deref for Parent { /// `Parent::traverse` will never form loops in properly-constructed hierarchies. /// /// [event propagation]: bevy_ecs::observer::Trigger::propagate -impl Traversal for Parent { - fn traverse(&self) -> Option<Entity> { - Some(self.0) +impl Traversal for &Parent { + fn traverse(item: Self::Item<'_>) -> Option<Entity> { + Some(item.0) } } diff --git a/crates/bevy_picking/src/events.rs b/crates/bevy_picking/src/events.rs --- a/crates/bevy_picking/src/events.rs +++ b/crates/bevy_picking/src/events.rs @@ -73,7 +73,7 @@ impl<E> Event for Pointer<E> where E: Debug + Clone + Reflect, { - type Traversal = Parent; + type Traversal = &'static Parent; const AUTO_PROPAGATE: bool = true; } diff --git a/examples/ecs/observer_propagation.rs b/examples/ecs/observer_propagation.rs --- a/examples/ecs/observer_propagation.rs +++ b/examples/ecs/observer_propagation.rs @@ -53,7 +53,7 @@ impl Event for Attack { // 1. Which component we want to propagate along. In this case, we want to "bubble" (meaning propagate // from child to parent) so we use the `Parent` component for propagation. The component supplied // must implement the `Traversal` trait. - type Traversal = Parent; + type Traversal = &'static Parent; // 2. We can also choose whether or not this event will propagate by default when triggered. If this is // false, it will only propagate following a call to `Trigger::propagate(true)`. const AUTO_PROPAGATE: bool = true;
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 @@ -550,9 +550,9 @@ mod tests { #[derive(Component)] struct Parent(Entity); - impl Traversal for Parent { - fn traverse(&self) -> Option<Entity> { - Some(self.0) + impl Traversal for &'_ Parent { + fn traverse(item: Self::Item<'_>) -> Option<Entity> { + Some(item.0) } } 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 @@ -560,7 +560,7 @@ mod tests { struct EventPropagating; impl Event for EventPropagating { - type Traversal = Parent; + type Traversal = &'static Parent; const AUTO_PROPAGATE: bool = true; }
Bubbling observers `Traversal` should use `QueryData` + `Traversal` should be changed to use `QueryData` as described [here](https://github.com/bevyengine/bevy/pull/13991#discussion_r1668917646). _Originally posted by @NthTensor in https://github.com/bevyengine/bevy/issues/13991#issuecomment-2217115536_
2024-09-23T08:56:20Z
1.81
2024-11-10T07:57:42Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::as_deref_mut", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_replace", "bundle::tests::insert_if_new", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_expiration", "entity::map_entities::tests::entity_mapper", "change_detection::tests::set_if_neq", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::entity_mapper_iteration", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_reader_iter_last", "event::tests::test_event_mutator_iter_last", "event::tests::test_events", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_construction", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::zero_sized_type", "intern::tests::static_sub_strings", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "observer::tests::observer_despawn", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_access_filters_clone", "query::access::tests::read_all_access_conflicts", "observer::tests::observer_dynamic_trigger", "query::access::tests::test_access_clone", "query::access::tests::test_access_clone_from", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::filtered_access_extend_or", "query::access::tests::access_get_conflicts", "observer::tests::observer_no_target", "observer::tests::observer_dynamic_component", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_world", "observer::tests::observer_despawn_archetype_flags", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_multiple_listeners", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_order_insert_remove", "observer::tests::observer_entity_routing", "query::fetch::tests::read_only_field_visibility", "observer::tests::observer_multiple_events", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_multiple_matches", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_static", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_order_replace", "observer::tests::observer_multiple_components", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_halt", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_transmute", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_order_recursive", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::builder::tests::builder_or", "observer::tests::observer_propagating", "observer::tests::observer_propagating_parallel_propagation", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::fetch::tests::world_query_struct_variants", "query::builder::tests::builder_dynamic_components", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_transmute_entity_mut", "query::iter::tests::query_sorts", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_changed", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_mut_fetch", "query::iter::tests::query_sort_after_next_dense - should panic", "query::iter::tests::query_sort_after_next - should panic", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::join_with_get", "query::state::tests::right_world_get - should panic", "query::state::tests::join", "query::tests::many_entities", "query::tests::any_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::query_iter_combinations_sparse", "query::tests::query", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::query_iter_combinations", "query::state::tests::transmute_from_sparse_to_dense", "query::state::tests::right_world_get_many - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::tests::has_query", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::self_conflicting_worldquery - should panic", "reflect::entity_commands::tests::insert_reflected", "query::tests::multi_storage_query", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected_bundle", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::executor::simple::skip_automatic_sync_points", "query::tests::derived_worldqueries", "schedule::stepping::tests::clear_breakpoint", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_system", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_breakpoint", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::aligned_zst", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::resize_test", "schedule::stepping::tests::verify_cursor", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::table::tests::table", "system::builder::tests::dyn_builder", "system::builder::tests::local_builder", "system::builder::tests::custom_param_builder", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::query_builder", "system::builder::tests::param_set_builder", "system::builder::tests::param_set_vec_builder", "system::builder::tests::query_builder_state", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::append", "system::builder::tests::vec_builder", "schedule::tests::system_ambiguity::read_only", "system::commands::tests::commands", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::entity_commands_entry", "system::commands::tests::remove_components", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::non_send_resources", "system::system::tests::run_system_once", "system::system::tests::command_processing", "system::system::tests::run_two_systems", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::insert_components", "system::system_name::tests::test_closure_system_name_regular_param", "system::commands::tests::remove_resources", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_flexibility", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_phantom_data", "system::commands::tests::remove_components_by_id", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "system::system_registry::tests::cached_system", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::input_values", "event::tests::test_event_mutator_iter_nth", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::tests::system_ordering::order_exclusive_systems", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::output_values", "event::tests::test_event_reader_iter_nth", "system::system_registry::tests::local_variables", "system::system_param::tests::param_set_non_send_second", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::condition::tests::multiple_run_conditions", "system::system_param::tests::non_sync_local", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::tests::system_execution::run_system", "schedule::tests::conditions::system_conditions_and_change_detection", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::schedule::tests::disable_auto_sync_points", "schedule::stepping::tests::step_run_if_false", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::tests::any_of_working", "system::system_registry::tests::change_detection", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::assert_systems", "system::system_registry::tests::nested_systems_with_inputs", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::any_of_with_and_without_common", "system::tests::commands_param_set", "system::tests::immutable_mut_test", "schedule::condition::tests::run_condition_combinators", "schedule::condition::tests::run_condition", "system::tests::convert_mut_to_immut", "system::tests::long_life_test", "system::tests::disjoint_query_mut_read_component_system", "system::system_registry::tests::nested_systems", "system::tests::get_system_conflicts", "system::tests::into_iter_impl", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::disjoint_query_mut_system", "system::tests::any_of_with_entity_and_mut", "system::tests::can_have_16_parameters", "system::tests::local_system", "system::tests::conflicting_system_resources - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::non_send_system", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::any_of_with_empty_and_mut", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::changed_resource_system", "system::tests::any_of_with_mut_and_ref - should panic", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::pipe_change_detection", "system::tests::conflicting_query_mut_system - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "event::tests::test_event_cursor_par_read_mut", "system::tests::or_param_set_system", "system::tests::option_has_no_filter_with - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::query_validates_world_id - should panic", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_with_and_without_common", "system::tests::or_with_without_and_compatible_with_without", "system::tests::non_send_option_system", "system::tests::panic_inside_system - should panic", "system::tests::read_system_state", "system::tests::or_has_no_filter_with - should panic", "system::tests::query_is_empty", "system::tests::system_state_change_detection", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::tests::system_ordering::order_systems", "system::tests::simple_system", "system::tests::any_of_and_without", "system::tests::conflicting_query_sets_system - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::or_has_filter_with", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::query_set_system", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::system_state_archetype_update", "system::tests::write_system_state", "system::tests::system_state_invalid_world - should panic", "event::tests::test_event_cursor_par_read", "tests::add_remove_components", "tests::added_queries", "system::tests::update_archetype_component_access_works", "tests::added_tracking", "query::tests::par_iter_mut_change_detection", "tests::clear_entities", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::empty_spawn", "tests::dynamic_required_components", "tests::entity_ref_and_entity_ref_query_no_panic", "system::tests::test_combinator_clone", "system::tests::world_collections_system", "tests::bundle_derive", "tests::changed_query", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::filtered_query_access", "tests::duplicate_components_panic - should panic", "system::tests::removal_tracking", "tests::entity_mut_and_entity_mut_query_panic - should panic", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::changed_trackers", "tests::entity_ref_and_mut_query_panic - should panic", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_for_each - should panic", "tests::changed_trackers_sparse", "tests::generic_required_components", "tests::exact_size_query", "tests::multiple_worlds_same_query_get - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource_points_to_distinct_data", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::query_all_for_each", "tests::query_filter_with_for_each", "tests::query_all", "tests::query_filters_dont_collide_with_fetches", "tests::non_send_resource_panic - should panic", "tests::query_filter_with", "tests::query_filter_with_sparse_for_each", "tests::query_filter_with_sparse", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_filter_without", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_missing_component", "tests::query_get", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_get_works_across_sparse_removal", "tests::query_single_component", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::query_optional_component_table", "tests::remove_missing", "tests::remove", "tests::required_components_insert_existing_hooks", "tests::required_components", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_spawn_nonexistent_hooks", "tests::remove_tracking", "tests::reserve_and_spawn", "tests::resource_scope", "tests::resource", "tests::required_components_take_leaves_required", "tests::required_components_retain_keeps_required", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "tests::spawn_batch", "tests::take", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_remove_by_id", "world::command_queue::test::test_command_is_send", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::tests::custom_resource_with_layout", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_by_id", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::test_verify_unique_entities", "world::reflect::tests::get_component_as_reflect", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "query::tests::query_filtered_exactsizeiterator_len", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1028) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1036) - 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/component.rs - component::ComponentTicks::set_changed (line 1237) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 38)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/component.rs - component::Component (line 280)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "crates/bevy_ecs/src/lib.rs - (line 166)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 60)", "crates/bevy_ecs/src/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 722)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 69)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 100)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 574)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 38)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "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::nand (line 184) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)", "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::nor (line 266) - compile fail", "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/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 100)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1513)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 412) - compile fail", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "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::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/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 125)", "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/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 704)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 117)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)", "crates/bevy_ecs/src/component.rs - component::Component (line 127)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 205)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)", "crates/bevy_ecs/src/lib.rs - (line 335)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 817)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 209)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "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 149)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "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::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 152)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "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::Condition::and_then (line 133)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 66)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 140)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 217)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 993)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 960)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 246)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 172)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "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::Condition (line 34)", "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/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 335)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "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::not (line 1040)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 545)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "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_mut (line 1022) - compile", "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::condition_changed_to (line 1130)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 622)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 556)", "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/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 830)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 416)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 278)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 601)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 435)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 529) - compile fail", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 1164)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 897)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 48)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 324)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if_new_and (line 1259)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::queue (line 1392)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert_if (line 1037)", "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/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1757) - compile fail", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "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::Resource (line 540)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 382)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 1416)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 1368)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)", "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>::is_empty (line 1249)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 714)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 259)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 628)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert_if (line 1212)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 914)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "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>::get_single (line 1131)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 477)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 656)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "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>::contains (line 1284)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 519)", "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>::iter_many (line 589)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 982)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 643)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1327)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 843)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::entry (line 944)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1570)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 1308)", "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>::get_mut (line 964)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 712)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 195)", "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 (line 295)", "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/commands/mod.rs - system::commands::EntityCommand (line 835)", "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>::single_mut (line 1178)", "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>::iter_mut (line 485)", "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::ParamSet (line 348)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 227)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 412)", "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 196)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 260)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 445)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 955)", "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::EntityWorldMut<'w>::world_scope (line 1421)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1814)", "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::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 804)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 377)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1871)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 131)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 213)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "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::Entry<'w,'a,T>::insert_entry (line 1589)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 237)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1767)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 80)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1964)", "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::Entry<'w,'a,T>::or_default (line 1674)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 273)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1619)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2850)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 1865)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2510)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1799)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 847)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "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::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 2265)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1474)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2488)", "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 284)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2587)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1563)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
15,276
bevyengine__bevy-15276
[ "15265" ]
9386bd0114c44c9f00a2e9c41db1225aaa78d159
diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -271,6 +271,15 @@ pub fn impl_param_set(_input: TokenStream) -> TokenStream { <(#(#param,)*) as SystemParam>::apply(state, system_meta, world); } + #[inline] + unsafe fn validate_param<'w, 's>( + state: &'s Self::State, + system_meta: &SystemMeta, + world: UnsafeWorldCell<'w>, + ) -> bool { + <(#(#param,)*) as SystemParam>::validate_param(state, system_meta, world) + } + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, diff --git a/crates/bevy_ecs/macros/src/lib.rs b/crates/bevy_ecs/macros/src/lib.rs --- a/crates/bevy_ecs/macros/src/lib.rs +++ b/crates/bevy_ecs/macros/src/lib.rs @@ -512,6 +521,16 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream { <#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::queue(&mut state.state, system_meta, world); } + #[inline] + unsafe fn validate_param<'w, 's>( + state: &'s Self::State, + system_meta: &#path::system::SystemMeta, + world: #path::world::unsafe_world_cell::UnsafeWorldCell<'w>, + ) -> bool { + <(#(#tuple_types,)*) as #path::system::SystemParam>::validate_param(&state.state, system_meta, world) + } + + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &#path::system::SystemMeta, diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -79,7 +79,7 @@ pub trait Condition<Marker, In = ()>: sealed::Condition<Marker, In> { /// /// # Examples /// - /// ```should_panic + /// ``` /// use bevy_ecs::prelude::*; /// /// #[derive(Resource, PartialEq)] diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -89,7 +89,7 @@ pub trait Condition<Marker, In = ()>: sealed::Condition<Marker, In> { /// # let mut world = World::new(); /// # fn my_system() {} /// app.add_systems( - /// // The `resource_equals` run condition will panic since we don't initialize `R`, + /// // The `resource_equals` run condition will fail since we don't initialize `R`, /// // just like if we used `Res<R>` in a system. /// my_system.run_if(resource_equals(R(0))), /// ); diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -130,7 +130,7 @@ pub trait Condition<Marker, In = ()>: sealed::Condition<Marker, In> { /// /// # Examples /// - /// ```should_panic + /// ``` /// use bevy_ecs::prelude::*; /// /// #[derive(Resource, PartialEq)] diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -140,7 +140,7 @@ pub trait Condition<Marker, In = ()>: sealed::Condition<Marker, In> { /// # let mut world = World::new(); /// # fn my_system() {} /// app.add_systems( - /// // The `resource_equals` run condition will panic since we don't initialize `R`, + /// // The `resource_equals` run condition will fail since we don't initialize `R`, /// // just like if we used `Res<R>` in a system. /// my_system.run_if(resource_equals(R(0))), /// ); diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -19,6 +19,7 @@ use crate::{ query::Access, schedule::{is_apply_deferred, BoxedCondition, ExecutorKind, SystemExecutor, SystemSchedule}, system::BoxedSystem, + warn_system_skipped, world::{unsafe_world_cell::UnsafeWorldCell, World}, }; diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -519,15 +520,16 @@ impl ExecutorState { /// the system's conditions: this includes conditions for the system /// itself, and conditions for any of the system's sets. /// * `update_archetype_component` must have been called with `world` - /// for each run condition in `conditions`. + /// for the system as well as system and system set's run conditions. unsafe fn should_run( &mut self, system_index: usize, - _system: &BoxedSystem, + system: &BoxedSystem, conditions: &mut Conditions, world: UnsafeWorldCell, ) -> bool { let mut should_run = !self.skipped_systems.contains(system_index); + for set_idx in conditions.sets_with_conditions_of_systems[system_index].ones() { if self.evaluated_sets.contains(set_idx) { continue; diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -566,6 +568,19 @@ impl ExecutorState { should_run &= system_conditions_met; + // SAFETY: + // - The caller ensures that `world` has permission to read any data + // required by the system. + // - `update_archetype_component_access` has been called for system. + let valid_params = unsafe { system.validate_param_unsafe(world) }; + + if !valid_params { + warn_system_skipped!("System", system.name()); + self.skipped_systems.insert(system_index); + } + + should_run &= valid_params; + should_run } diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -731,8 +746,18 @@ unsafe fn evaluate_and_fold_conditions( conditions .iter_mut() .map(|condition| { - // SAFETY: The caller ensures that `world` has permission to - // access any data required by the condition. + // SAFETY: + // - The caller ensures that `world` has permission to read any data + // required by the condition. + // - `update_archetype_component_access` has been called for condition. + if !unsafe { condition.validate_param_unsafe(world) } { + warn_system_skipped!("Condition", condition.name()); + return false; + } + // SAFETY: + // - The caller ensures that `world` has permission to read any data + // required by the condition. + // - `update_archetype_component_access` has been called for condition. unsafe { __rust_begin_short_backtrace::readonly_run_unsafe(&mut **condition, world) } }) .fold(true, |acc, res| acc && res) diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -7,6 +7,7 @@ use crate::{ schedule::{ executor::is_apply_deferred, BoxedCondition, ExecutorKind, SystemExecutor, SystemSchedule, }, + warn_system_skipped, world::World, }; diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -79,6 +80,15 @@ impl SystemExecutor for SimpleExecutor { should_run &= system_conditions_met; + let system = &mut schedule.systems[system_index]; + let valid_params = system.validate_param(world); + + if !valid_params { + warn_system_skipped!("System", system.name()); + } + + should_run &= valid_params; + #[cfg(feature = "trace")] should_run_span.exit(); diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -89,7 +99,6 @@ impl SystemExecutor for SimpleExecutor { continue; } - let system = &mut schedule.systems[system_index]; if is_apply_deferred(system) { continue; } diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -128,7 +137,13 @@ fn evaluate_and_fold_conditions(conditions: &mut [BoxedCondition], world: &mut W #[allow(clippy::unnecessary_fold)] conditions .iter_mut() - .map(|condition| __rust_begin_short_backtrace::readonly_run(&mut **condition, world)) + .map(|condition| { + if !condition.validate_param(world) { + warn_system_skipped!("Condition", condition.name()); + return false; + } + __rust_begin_short_backtrace::readonly_run(&mut **condition, world) + }) .fold(true, |acc, res| acc && res) } diff --git a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs @@ -5,6 +5,7 @@ use std::panic::AssertUnwindSafe; use crate::{ schedule::{is_apply_deferred, BoxedCondition, ExecutorKind, SystemExecutor, SystemSchedule}, + warn_system_skipped, world::World, }; diff --git a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs @@ -85,6 +86,15 @@ impl SystemExecutor for SingleThreadedExecutor { should_run &= system_conditions_met; + let system = &mut schedule.systems[system_index]; + let valid_params = system.validate_param(world); + + if !valid_params { + warn_system_skipped!("System", system.name()); + } + + should_run &= valid_params; + #[cfg(feature = "trace")] should_run_span.exit(); diff --git a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs @@ -95,7 +105,6 @@ impl SystemExecutor for SingleThreadedExecutor { continue; } - let system = &mut schedule.systems[system_index]; if is_apply_deferred(system) { self.apply_deferred(schedule, world); continue; diff --git a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs --- a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs @@ -160,6 +169,12 @@ fn evaluate_and_fold_conditions(conditions: &mut [BoxedCondition], world: &mut W #[allow(clippy::unnecessary_fold)] conditions .iter_mut() - .map(|condition| __rust_begin_short_backtrace::readonly_run(&mut **condition, world)) + .map(|condition| { + if !condition.validate_param(world) { + warn_system_skipped!("Condition", condition.name()); + return false; + } + __rust_begin_short_backtrace::readonly_run(&mut **condition, world) + }) .fold(true, |acc, res| acc && res) } diff --git a/crates/bevy_ecs/src/system/adapter_system.rs b/crates/bevy_ecs/src/system/adapter_system.rs --- a/crates/bevy_ecs/src/system/adapter_system.rs +++ b/crates/bevy_ecs/src/system/adapter_system.rs @@ -132,6 +132,11 @@ where self.system.queue_deferred(world); } + #[inline] + unsafe fn validate_param_unsafe(&self, world: UnsafeWorldCell) -> bool { + self.system.validate_param_unsafe(world) + } + fn initialize(&mut self, world: &mut crate::prelude::World) { self.system.initialize(world); } diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -193,6 +193,7 @@ where ) } + #[inline] fn apply_deferred(&mut self, world: &mut World) { self.a.apply_deferred(world); self.b.apply_deferred(world); diff --git a/crates/bevy_ecs/src/system/combinator.rs b/crates/bevy_ecs/src/system/combinator.rs --- a/crates/bevy_ecs/src/system/combinator.rs +++ b/crates/bevy_ecs/src/system/combinator.rs @@ -204,6 +205,11 @@ where self.b.queue_deferred(world); } + #[inline] + unsafe fn validate_param_unsafe(&self, world: UnsafeWorldCell) -> bool { + self.a.validate_param_unsafe(world) && self.b.validate_param_unsafe(world) + } + fn initialize(&mut self, world: &mut World) { self.a.initialize(world); self.b.initialize(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 @@ -14,8 +14,8 @@ use crate::{ observer::{Observer, TriggerEvent, TriggerTargets}, system::{RunSystemWithInput, SystemId}, world::{ - command_queue::RawCommandQueue, Command, CommandQueue, EntityWorldMut, FromWorld, - SpawnBatchIter, World, + command_queue::RawCommandQueue, unsafe_world_cell::UnsafeWorldCell, Command, CommandQueue, + EntityWorldMut, FromWorld, SpawnBatchIter, World, }, }; use bevy_ptr::OwningPtr; 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 @@ -93,7 +93,9 @@ const _: () = { // SAFETY: Only reads Entities unsafe impl bevy_ecs::system::SystemParam for Commands<'_, '_> { type State = FetchState; + type Item<'w, 's> = Commands<'w, 's>; + fn init_state( world: &mut World, system_meta: &mut bevy_ecs::system::SystemMeta, 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 @@ -105,6 +107,7 @@ const _: () = { ), } } + unsafe fn new_archetype( state: &mut Self::State, archetype: &bevy_ecs::archetype::Archetype, 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 @@ -119,6 +122,7 @@ const _: () = { ); }; } + fn apply( state: &mut Self::State, system_meta: &bevy_ecs::system::SystemMeta, 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 @@ -130,6 +134,7 @@ const _: () = { world, ); } + fn queue( state: &mut Self::State, system_meta: &bevy_ecs::system::SystemMeta, 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 @@ -141,13 +146,28 @@ const _: () = { world, ); } + + #[inline] + unsafe fn validate_param( + state: &Self::State, + system_meta: &bevy_ecs::system::SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + <(Deferred<CommandQueue>, &Entities) as bevy_ecs::system::SystemParam>::validate_param( + &state.state, + system_meta, + world, + ) + } + + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &bevy_ecs::system::SystemMeta, - world: bevy_ecs::world::unsafe_world_cell::UnsafeWorldCell<'w>, + world: UnsafeWorldCell<'w>, change_tick: bevy_ecs::component::Tick, ) -> Self::Item<'w, 's> { - let(f0,f1,) = <(Deferred<'s,CommandQueue> , &'w Entities,)as bevy_ecs::system::SystemParam> ::get_param(&mut state.state,system_meta,world,change_tick); + let(f0, f1) = <(Deferred<'s, CommandQueue>, &'w Entities) as bevy_ecs::system::SystemParam>::get_param(&mut state.state, system_meta, world, change_tick); Commands { queue: InternalQueue::CommandQueue(f0), entities: f1, diff --git a/crates/bevy_ecs/src/system/exclusive_function_system.rs b/crates/bevy_ecs/src/system/exclusive_function_system.rs --- a/crates/bevy_ecs/src/system/exclusive_function_system.rs +++ b/crates/bevy_ecs/src/system/exclusive_function_system.rs @@ -144,6 +144,11 @@ where // might have buffers to apply, but this is handled by `PipeSystem`. } + #[inline] + unsafe fn validate_param_unsafe(&self, _world: UnsafeWorldCell) -> bool { + true + } + #[inline] fn initialize(&mut self, world: &mut World) { self.system_meta.last_run = world.change_tick().relative_to(Tick::MAX); diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -340,6 +340,18 @@ impl<Param: SystemParam> SystemState<Param> { Param::apply(&mut self.param_state, &self.meta, world); } + /// Wrapper over [`SystemParam::validate_param`]. + /// + /// # Safety + /// + /// - The passed [`UnsafeWorldCell`] must have read-only access to + /// world data in `archetype_component_access`. + /// - `world` must be the same [`World`] that was used to initialize [`state`](SystemParam::init_state). + pub unsafe fn validate_param(state: &Self, world: UnsafeWorldCell) -> bool { + // SAFETY: Delegated to existing `SystemParam` implementations. + unsafe { Param::validate_param(&state.param_state, &state.meta, world) } + } + /// Returns `true` if `world_id` matches the [`World`] that was used to call [`SystemState::new`]. /// Otherwise, this returns false. #[inline] diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -636,6 +648,12 @@ where F::Param::queue(param_state, &self.system_meta, world); } + #[inline] + unsafe fn validate_param_unsafe(&self, world: UnsafeWorldCell) -> bool { + let param_state = self.param_state.as_ref().expect(Self::PARAM_MESSAGE); + F::Param::validate_param(param_state, &self.system_meta, world) + } + #[inline] fn initialize(&mut self, world: &mut World) { if let Some(id) = self.world_id { diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -59,11 +59,11 @@ pub trait System: Send + Sync + 'static { /// /// # Safety /// - /// - The caller must ensure that `world` has permission to access any world data - /// registered in [`Self::archetype_component_access`]. There must be no conflicting + /// - The caller must ensure that [`world`](UnsafeWorldCell) has permission to access any world data + /// registered in `archetype_component_access`. There must be no conflicting /// simultaneous accesses while the system is running. - /// - The method [`Self::update_archetype_component_access`] must be called at some - /// point before this one, with the same exact [`World`]. If `update_archetype_component_access` + /// - The method [`System::update_archetype_component_access`] must be called at some + /// point before this one, with the same exact [`World`]. If [`System::update_archetype_component_access`] /// panics (or otherwise does not return for any reason), this method must not be called. unsafe fn run_unsafe(&mut self, input: Self::In, world: UnsafeWorldCell) -> Self::Out; diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -94,6 +94,34 @@ pub trait System: Send + Sync + 'static { /// of this system into the world's command buffer. fn queue_deferred(&mut self, world: DeferredWorld); + /// Validates that all parameters can be acquired and that system can run without panic. + /// Built-in executors use this to prevent invalid systems from running. + /// + /// However calling and respecting [`System::validate_param_unsafe`] or it's safe variant + /// is not a strict requirement, both [`System::run`] and [`System::run_unsafe`] + /// should provide their own safety mechanism to prevent undefined behavior. + /// + /// # Safety + /// + /// - The caller must ensure that [`world`](UnsafeWorldCell) has permission to access any world data + /// registered in `archetype_component_access`. There must be no conflicting + /// simultaneous accesses while the system is running. + /// - The method [`System::update_archetype_component_access`] must be called at some + /// point before this one, with the same exact [`World`]. If [`System::update_archetype_component_access`] + /// panics (or otherwise does not return for any reason), this method must not be called. + unsafe fn validate_param_unsafe(&self, world: UnsafeWorldCell) -> bool; + + /// Safe version of [`System::validate_param_unsafe`]. + /// that runs on exclusive, single-threaded `world` pointer. + fn validate_param(&mut self, world: &World) -> bool { + let world_cell = world.as_unsafe_world_cell_readonly(); + self.update_archetype_component_access(world_cell); + // SAFETY: + // - We have exclusive access to the entire world. + // - `update_archetype_component_access` has been called. + unsafe { self.validate_param_unsafe(world_cell) } + } + /// Initialize the system. fn initialize(&mut self, _world: &mut World); diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1,5 +1,4 @@ pub use crate::change_detection::{NonSendMut, Res, ResMut}; -use crate::query::AccessConflicts; use crate::storage::SparseSetIndex; use crate::{ archetype::{Archetype, Archetypes}, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -14,6 +13,7 @@ use crate::{ system::{Query, SystemMeta}, world::{unsafe_world_cell::UnsafeWorldCell, DeferredWorld, FromWorld, World}, }; +use crate::{query::AccessConflicts, storage::ResourceData}; use bevy_ecs_macros::impl_param_set; pub use bevy_ecs_macros::Resource; pub use bevy_ecs_macros::SystemParam; diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -184,17 +184,17 @@ pub unsafe trait SystemParam: Sized { /// The item type returned when constructing this system param. /// The value of this associated type should be `Self`, instantiated with new lifetimes. /// - /// You could think of `SystemParam::Item<'w, 's>` as being an *operation* that changes the lifetimes bound to `Self`. + /// You could think of [`SystemParam::Item<'w, 's>`] as being an *operation* that changes the lifetimes bound to `Self`. type Item<'world, 'state>: SystemParam<State = Self::State>; /// Registers any [`World`] access used by this [`SystemParam`] - /// and creates a new instance of this param's [`State`](Self::State). + /// and creates a new instance of this param's [`State`](SystemParam::State). fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State; /// For the specified [`Archetype`], registers the components accessed by this [`SystemParam`] (if applicable).a /// /// # Safety - /// `archetype` must be from the [`World`] used to initialize `state` in `init_state`. + /// `archetype` must be from the [`World`] used to initialize `state` in [`SystemParam::init_state`]. #[inline] #[allow(unused_variables)] unsafe fn new_archetype( diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -217,15 +217,42 @@ pub unsafe trait SystemParam: Sized { #[allow(unused_variables)] fn queue(state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld) {} - /// Creates a parameter to be passed into a [`SystemParamFunction`]. + /// Validates that the param can be acquired by the [`get_param`](SystemParam::get_param). + /// Built-in executors use this to prevent systems with invalid params from running. + /// For nested [`SystemParam`]s validation will fail if any + /// delegated validation fails. /// - /// [`SystemParamFunction`]: super::SystemParamFunction + /// However calling and respecting [`SystemParam::validate_param`] + /// is not a strict requirement, [`SystemParam::get_param`] should + /// provide it's own safety mechanism to prevent undefined behavior. + /// + /// The [`world`](UnsafeWorldCell) can only be used to read param's data + /// and world metadata. No data can be written. + /// + /// # Safety + /// + /// - The passed [`UnsafeWorldCell`] must have read-only access to world data + /// registered in [`init_state`](SystemParam::init_state). + /// - `world` must be the same [`World`] that was used to initialize [`state`](SystemParam::init_state). + /// - all `world`'s archetypes have been processed by [`new_archetype`](SystemParam::new_archetype). + unsafe fn validate_param( + _state: &Self::State, + _system_meta: &SystemMeta, + _world: UnsafeWorldCell, + ) -> bool { + // By default we allow panics in [`SystemParam::get_param`] and return `true`. + // Preventing panics is an optional feature. + true + } + + /// Creates a parameter to be passed into a [`SystemParamFunction`](super::SystemParamFunction). /// /// # Safety /// /// - The passed [`UnsafeWorldCell`] must have access to any world data /// registered in [`init_state`](SystemParam::init_state). - /// - `world` must be the same `World` that was used to initialize [`state`](SystemParam::init_state). + /// - `world` must be the same [`World`] that was used to initialize [`state`](SystemParam::init_state). + /// - all `world`'s archetypes have been processed by [`new_archetype`](SystemParam::new_archetype). unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -587,6 +614,19 @@ unsafe impl<'a, T: Resource> SystemParam for Res<'a, T> { component_id } + #[inline] + unsafe fn validate_param( + &component_id: &Self::State, + _system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Read-only access to resource metadata. + unsafe { world.storages() } + .resources + .get(component_id) + .is_some_and(ResourceData::is_present) + } + #[inline] unsafe fn get_param<'w, 's>( &mut component_id: &'s mut Self::State, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -684,6 +724,19 @@ unsafe impl<'a, T: Resource> SystemParam for ResMut<'a, T> { component_id } + #[inline] + unsafe fn validate_param( + &component_id: &Self::State, + _system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Read-only access to resource metadata. + unsafe { world.storages() } + .resources + .get(component_id) + .is_some_and(ResourceData::is_present) + } + #[inline] unsafe fn get_param<'w, 's>( &mut component_id: &'s mut Self::State, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -778,6 +831,7 @@ unsafe impl SystemParam for &'_ World { system_meta.component_access_set.add(filtered_access); } + #[inline] unsafe fn get_param<'w, 's>( _state: &'s mut Self::State, _system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1102,6 +1156,7 @@ unsafe impl<T: SystemBuffer> SystemParam for Deferred<'_, T> { state.get().queue(system_meta, world); } + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, _system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1216,6 +1271,19 @@ unsafe impl<'a, T: 'static> SystemParam for NonSend<'a, T> { component_id } + #[inline] + unsafe fn validate_param( + &component_id: &Self::State, + _system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Read-only access to resource metadata. + unsafe { world.storages() } + .non_send_resources + .get(component_id) + .is_some_and(ResourceData::is_present) + } + #[inline] unsafe fn get_param<'w, 's>( &mut component_id: &'s mut Self::State, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1310,6 +1378,19 @@ unsafe impl<'a, T: 'static> SystemParam for NonSendMut<'a, T> { component_id } + #[inline] + unsafe fn validate_param( + &component_id: &Self::State, + _system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Read-only access to resource metadata. + unsafe { world.storages() } + .non_send_resources + .get(component_id) + .is_some_and(ResourceData::is_present) + } + #[inline] unsafe fn get_param<'w, 's>( &mut component_id: &'s mut Self::State, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1486,6 +1567,7 @@ unsafe impl SystemParam for SystemChangeTick { fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State {} + #[inline] unsafe fn get_param<'w, 's>( _state: &'s mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1511,6 +1593,18 @@ unsafe impl<T: SystemParam> SystemParam for Vec<T> { Vec::new() } + #[inline] + unsafe fn validate_param( + state: &Self::State, + system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + state + .iter() + .all(|state| T::validate_param(state, system_meta, world)) + } + + #[inline] unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1562,6 +1656,7 @@ unsafe impl<T: SystemParam> SystemParam for ParamSet<'_, '_, Vec<T>> { Vec::new() } + #[inline] unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1668,6 +1763,16 @@ macro_rules! impl_system_param_tuple { $($param::queue($param, _system_meta, _world.reborrow());)* } + #[inline] + unsafe fn validate_param( + state: &Self::State, + _system_meta: &SystemMeta, + _world: UnsafeWorldCell, + ) -> bool { + let ($($param,)*) = state; + $($param::validate_param($param, _system_meta, _world)&&)* true + } + #[inline] #[allow(clippy::unused_unit)] unsafe fn get_param<'w, 's>( diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1676,7 +1781,6 @@ macro_rules! impl_system_param_tuple { _world: UnsafeWorldCell<'w>, _change_tick: Tick, ) -> Self::Item<'w, 's> { - let ($($param,)*) = state; ($($param::get_param($param, _system_meta, _world, _change_tick),)*) } diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1826,6 +1930,16 @@ unsafe impl<P: SystemParam + 'static> SystemParam for StaticSystemParam<'_, '_, P::queue(state, system_meta, world); } + #[inline] + unsafe fn validate_param( + state: &Self::State, + system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + P::validate_param(state, system_meta, world) + } + + #[inline] unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1844,6 +1958,7 @@ unsafe impl<T: ?Sized> SystemParam for PhantomData<T> { fn init_state(_world: &mut World, _system_meta: &mut SystemMeta) -> Self::State {} + #[inline] unsafe fn get_param<'world, 'state>( _state: &'state mut Self::State, _system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -2049,7 +2164,7 @@ trait DynParamState: Sync + Send { /// For the specified [`Archetype`], registers the components accessed by this [`SystemParam`] (if applicable).a /// /// # Safety - /// `archetype` must be from the [`World`] used to initialize `state` in `init_state`. + /// `archetype` must be from the [`World`] used to initialize `state` in [`SystemParam::init_state`]. unsafe fn new_archetype(&mut self, archetype: &Archetype, system_meta: &mut SystemMeta); /// Applies any deferred mutations stored in this [`SystemParam`]'s state. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -2060,6 +2175,12 @@ trait DynParamState: Sync + Send { /// Queues any deferred mutations to be applied at the next [`apply_deferred`](crate::prelude::apply_deferred). fn queue(&mut self, system_meta: &SystemMeta, world: DeferredWorld); + + /// Refer to [`SystemParam::validate_param`]. + /// + /// # Safety + /// Refer to [`SystemParam::validate_param`]. + unsafe fn validate_param(&self, system_meta: &SystemMeta, world: UnsafeWorldCell) -> bool; } /// A wrapper around a [`SystemParam::State`] that can be used as a trait object in a [`DynSystemParam`]. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -2082,6 +2203,10 @@ impl<T: SystemParam + 'static> DynParamState for ParamState<T> { fn queue(&mut self, system_meta: &SystemMeta, world: DeferredWorld) { T::queue(&mut self.0, system_meta, world); } + + unsafe fn validate_param(&self, system_meta: &SystemMeta, world: UnsafeWorldCell) -> bool { + T::validate_param(&self.0, system_meta, world) + } } // SAFETY: `init_state` creates a state of (), which performs no access. The interesting safety checks are on the `SystemParamBuilder`. diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -2094,6 +2219,16 @@ unsafe impl SystemParam for DynSystemParam<'_, '_> { DynSystemParamState::new::<()>(()) } + #[inline] + unsafe fn validate_param( + state: &Self::State, + system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + state.0.validate_param(system_meta, world) + } + + #[inline] unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, system_meta: &SystemMeta, diff --git a/crates/bevy_ecs/src/world/identifier.rs b/crates/bevy_ecs/src/world/identifier.rs --- a/crates/bevy_ecs/src/world/identifier.rs +++ b/crates/bevy_ecs/src/world/identifier.rs @@ -56,6 +56,7 @@ unsafe impl SystemParam for WorldId { fn init_state(_: &mut World, _: &mut SystemMeta) -> Self::State {} + #[inline] unsafe fn get_param<'world, 'state>( _: &'state mut Self::State, _: &SystemMeta, 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 @@ -1477,8 +1477,16 @@ impl World { self.components .get_resource_id(TypeId::of::<R>()) .and_then(|component_id| self.storages.resources.get(component_id)) - .map(ResourceData::is_present) - .unwrap_or(false) + .is_some_and(ResourceData::is_present) + } + + /// Returns `true` if a resource with provided `component_id` exists. Otherwise returns `false`. + #[inline] + pub fn contains_resource_by_id(&self, component_id: ComponentId) -> bool { + self.storages + .resources + .get(component_id) + .is_some_and(ResourceData::is_present) } /// Returns `true` if a resource of type `R` exists. Otherwise returns `false`. 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 @@ -1487,8 +1495,16 @@ impl World { self.components .get_resource_id(TypeId::of::<R>()) .and_then(|component_id| self.storages.non_send_resources.get(component_id)) - .map(ResourceData::is_present) - .unwrap_or(false) + .is_some_and(ResourceData::is_present) + } + + /// Returns `true` if a resource with provided `component_id` exists. Otherwise returns `false`. + #[inline] + pub fn contains_non_send_by_id(&self, component_id: ComponentId) -> bool { + self.storages + .non_send_resources + .get(component_id) + .is_some_and(ResourceData::is_present) } /// Returns `true` if a resource of type `R` exists and was added since the world's 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 @@ -1501,8 +1517,7 @@ impl World { pub fn is_resource_added<R: Resource>(&self) -> bool { self.components .get_resource_id(TypeId::of::<R>()) - .map(|component_id| self.is_resource_added_by_id(component_id)) - .unwrap_or(false) + .is_some_and(|component_id| self.is_resource_added_by_id(component_id)) } /// Returns `true` if a resource with id `component_id` exists and was added since the world's diff --git a/crates/bevy_gizmos/src/gizmos.rs b/crates/bevy_gizmos/src/gizmos.rs --- a/crates/bevy_gizmos/src/gizmos.rs +++ b/crates/bevy_gizmos/src/gizmos.rs @@ -187,13 +187,24 @@ where GizmosState::<Config, Clear>::apply(&mut state.state, system_meta, world); } + #[inline] + unsafe fn validate_param( + state: &Self::State, + system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Delegated to existing `SystemParam` implementations. + unsafe { GizmosState::<Config, Clear>::validate_param(&state.state, system_meta, world) } + } + + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's> { - // SAFETY: Delegated to existing `SystemParam` implementations + // SAFETY: Delegated to existing `SystemParam` implementations. let (f0, f1) = unsafe { GizmosState::<Config, Clear>::get_param( &mut state.state, diff --git a/crates/bevy_render/src/extract_param.rs b/crates/bevy_render/src/extract_param.rs --- a/crates/bevy_render/src/extract_param.rs +++ b/crates/bevy_render/src/extract_param.rs @@ -74,6 +74,29 @@ where } } + #[inline] + unsafe fn validate_param( + state: &Self::State, + _system_meta: &SystemMeta, + world: UnsafeWorldCell, + ) -> bool { + // SAFETY: Read-only access to world data registered in `init_state`. + let result = unsafe { world.get_resource_by_id(state.main_world_state) }; + let Some(main_world) = result else { + return false; + }; + // SAFETY: Type is guaranteed by `SystemState`. + let main_world: &World = unsafe { main_world.deref() }; + // SAFETY: We provide the main world on which this system state was initialized on. + unsafe { + SystemState::<P>::validate_param( + &state.state, + main_world.as_unsafe_world_cell_readonly(), + ) + } + } + + #[inline] unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &SystemMeta,
diff --git a/crates/bevy_ecs/src/schedule/executor/mod.rs b/crates/bevy_ecs/src/schedule/executor/mod.rs --- a/crates/bevy_ecs/src/schedule/executor/mod.rs +++ b/crates/bevy_ecs/src/schedule/executor/mod.rs @@ -176,3 +176,100 @@ mod __rust_begin_short_backtrace { black_box(system.run((), world)) } } + +#[macro_export] +/// Emits a warning about system being skipped. +macro_rules! warn_system_skipped { + ($ty:literal, $sys:expr) => { + bevy_utils::tracing::warn!( + "{} {} was skipped due to inaccessible system parameters.", + $ty, + $sys + ) + }; +} + +#[cfg(test)] +mod tests { + use crate::{ + self as bevy_ecs, + prelude::{IntoSystemConfigs, IntoSystemSetConfigs, Resource, Schedule, SystemSet}, + schedule::ExecutorKind, + system::{Commands, In, IntoSystem, Res}, + world::World, + }; + + #[derive(Resource)] + struct R1; + + #[derive(Resource)] + struct R2; + + const EXECUTORS: [ExecutorKind; 3] = [ + ExecutorKind::Simple, + ExecutorKind::SingleThreaded, + ExecutorKind::MultiThreaded, + ]; + + #[test] + fn invalid_system_param_skips() { + for executor in EXECUTORS { + invalid_system_param_skips_core(executor); + } + } + + fn invalid_system_param_skips_core(executor: ExecutorKind) { + let mut world = World::new(); + let mut schedule = Schedule::default(); + schedule.set_executor_kind(executor); + schedule.add_systems( + ( + // Combined systems get skipped together. + (|mut commands: Commands| { + commands.insert_resource(R1); + }) + .pipe(|_: In<()>, _: Res<R1>| {}), + // This system depends on a system that is always skipped. + |mut commands: Commands| { + commands.insert_resource(R2); + }, + ) + .chain(), + ); + schedule.run(&mut world); + assert!(world.get_resource::<R1>().is_none()); + assert!(world.get_resource::<R2>().is_some()); + } + + #[derive(SystemSet, Hash, Debug, PartialEq, Eq, Clone)] + struct S1; + + #[test] + fn invalid_condition_param_skips_system() { + for executor in EXECUTORS { + invalid_condition_param_skips_system_core(executor); + } + } + + fn invalid_condition_param_skips_system_core(executor: ExecutorKind) { + let mut world = World::new(); + let mut schedule = Schedule::default(); + schedule.set_executor_kind(executor); + schedule.configure_sets(S1.run_if(|_: Res<R1>| true)); + schedule.add_systems(( + // System gets skipped if system set run conditions fail validation. + (|mut commands: Commands| { + commands.insert_resource(R1); + }) + .in_set(S1), + // System gets skipped if run conditions fail validation. + (|mut commands: Commands| { + commands.insert_resource(R2); + }) + .run_if(|_: Res<R2>| true), + )); + schedule.run(&mut world); + assert!(world.get_resource::<R1>().is_none()); + assert!(world.get_resource::<R2>().is_none()); + } +}
Systems should be skipped if their resources cannot be fetched > The solution to this I would prefer is to lean into the ECS paradigm more & treat more things as if they were querying the world. If a Res<Foo> doesn't exist the system just doesn't run. Similar to how iterating over a Query<Bar> that matches nothing loops over nothing. If users want a more explicit panicky behavior they can use Option<Res<Foo>> & unwrap. I do think we should do this, and if we can get this behavior in place I'd prefer to encourage the use of the `Single` system param from #15264. This would go a long way to addressing the problem and ensuring non-panicking behavior by default without an ergonomics hit. _Originally posted by @iiYese and @alice-i-cecile in https://github.com/bevyengine/bevy/issues/14275#issuecomment-2356344841_
I really quite like this idea: I think it's generally a pretty robust solution. The design challenge here is: a) how do we provide warnings to users that their system isn't running because they forgot to initialize a resource or whatever b) how do we easily silence that warning for cases where this behavior is expected +1 for this, this has bitten me before I guess a warning could tell you to explicitly use `Option` or `Single` if it's missing? Discord notes from a [conversation on 2024-09-17](https://discordapp.com/channels/691052431525675048/749335865876021248/1285634512838987816). > SystemParam::get_param can mutate SystemParam::State, so it'd need to be split into try_get (immutable state) and apply_get (mutable, post access) - @MiniaczQ > Semantically there's not much difference between SystemParam and WorldQuery, they both grab pointers from the world, cache state etc. IMO reaching convergence there so queries and systems are one and the same would be nice, but is so much code churn that I don't know if it's realistic at this point @james-j-obrien What about logging a warning on first run (or not-run?) that says more or less "system did not run because `XXX` resource was not present in the world. To suppress this warning, either insert the resource or add `.run_if(resource_exists::<XXX>)` to the system" Yeah, I'm happy with that as an initial solution. I'd prefer for this to be an expected default that designs take into consideration cause it's more consistent with the behaviors of ECS. A diagnostic warning about missing resources is mostly going to be for transitioning from the old behavior. Is there a mechanism to have custom lints? If there is we could have one for all instances of `Res` & `ResMut` in `0.16` that people can suppress with `#![allow(..)]` that just reads: > "Systems will not run when resources can't be fetched from `0.16` onward. Use `Option<Res<_>>` or `Option<ResMut<_>>` to change this". Another implication of this is that `System::run_unsafe -> Self::Out` can sometimes not run, so we need to wrap the return value in option, probably rename the function to `try_run_unsafe` as well. Returning `None` will invalidate all chaining/piping/etc. Unless we decide to do param validation before `run_unsafe` We could also add an associated const on the resource trait ```rs pub trait Resource: Send + Sync + 'static { const NOISY: bool = false; } ``` With a helper attribute for the derive that sets this to `true`. When checking if a system runs where there is a missing resource that has this set to `true` it will cause a panic instead of the system not running. Should `SystemParam::validate_param` run before or inside `System::run_unsafe`? The latter requires us to return `Option<System::Out>` instead of `System::Out`. > I'd rather it be before instead of inside to avoid unnecessary wrapping in the cases where the validation can (potentially) be elided. *From @james7132 in [discord](https://discord.com/channels/691052431525675048/749335865876021248/1285647422940516545)* I agree with @james7132 there: validation should be distinct from running the system, and be done by schedulers. @iiYese for custom lints, we'd need https://github.com/theBevyFlock/bevy_cli. I think I like the associated constant idea better though, although we should have various log levels (including panic), rather than just a `bool`. Defaulting to `error` feels correct though. @MiniaczQ points out that run conditions are systems too. If a run condition cannot be evaluated, it should be treated as if it returned false. @hymm points out that we should perform the validation checks as soon as possible, before spawning a task for the scheduler. For piped systems, al params must be checked at the start, and the whole piped collection of systems must be skipped if any are invalid. This is because piped systems are opaque to the schedule. For warnings, should we add a system config flag that decides whether to emit a warning? Some systems will use this as run conditions, but in others this can be an accidental decision. By default it would be `true`. But then disabling it is a massive pain. Yeah, I was thinking about that in terms of system config initially, but I wasn't happy with the disabling ergonomics. I don't mind it existing, but in most cases I think that adding this at the resource / component level will better match the user intent and result in fewer bugs and boilerplate. Can we perhaps leverage module-filtering for this? People could then selectively filter modules where they resolved this and no longer receive warnings. This would play along with plugins too, since they're essentially modules. Actually no, that doesn't make sense. There is a solution to be made with disabling this per plugin, but it's a bit more work. > although we should have various log levels (including panic), rather than just a `bool`. Defaulting to `error` feels correct though. I'm not sure about this cause for anything other than panic you'll get a wall of errors like WGPU which isn't much more helpful than a panic. Errors by default means you'll get a lot of opting out (which is indicative of a bad default). I think some people might be worried but would be surprised to find how sane this behavior actually is. Hmm. Panic might be a better default, yeah. I worry about adding more causes of "what the heck why isn't my system working": forgetting to add the system and forgetting to add the plugin are both super frustrating currently. Actually `error` would be fine if we add a `bool` to `Schedule` or something to track if first time diagnostics are emitted. It's a bool that would be changed at most *once* so it's easy for branch predictors to optimize out. > We could also add an associated const on the resource trait > ```rs > pub trait Resource: Send + Sync + 'static { > const NOISY: bool = false; > } > ``` If this is considered, I'd prefer a const generic bool `SKIP_SYSTEM_IF_MISSING` on `Res`/`ResMut`. Though this will probably conflict with `Option<Res>` if the default is `true` as that makes no sense in that case. @iiYese we already have a warn_once family of macros for exactly this purpose. Adding an associated type or constant on Resource will break trait objects for it, so that needs to be considered carefully. > Adding an associated type or constant on Resource will break trait objects for it, so that needs to be considered carefully. Why would people have trait objects of an empty trait tho? :thinking: Inserting arbitrary components / resources is something I've seen people want to do. That said, we already do this with the `Storage` associated type, and those users probably actually want to use reflection. So yeah, I think adding associated constants or types is fine.
2024-09-17T21:57:23Z
1.81
2024-10-20T14:32:02Z
60b2c7ce7755a49381c5265021ff175d3624218c
[ "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::executor::tests::invalid_system_param_skips" ]
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::dyn_entity_mapper_object_safe", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::set_if_neq", "change_detection::tests::change_tick_wraparound", "entity::map_entities::tests::entity_mapper", "change_detection::tests::change_expiration", "entity::tests::entity_bits_roundtrip", "entity::map_entities::tests::world_scope_reserves_generations", "entity::map_entities::tests::entity_mapper_iteration", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "event::tests::test_event_cursor_clear", "event::tests::test_event_cursor_iter_len_updated", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::zero_sized_type", "intern::tests::static_sub_strings", "label::tests::dyn_eq_object_safe", "label::tests::dyn_hash_object_safe", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::filtered_access_extend_or", "query::access::tests::test_access_clone_from", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::filtered_combined_access", "observer::tests::observer_despawn", "observer::tests::observer_dynamic_component", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_access_clone", "query::access::tests::access_get_conflicts", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_multiple_listeners", "query::access::tests::filtered_access_extend", "observer::tests::observer_order_spawn_despawn", "query::fetch::tests::read_only_field_visibility", "observer::tests::observer_propagating", "observer::tests::observer_order_insert_remove", "observer::tests::observer_propagating_halt", "query::builder::tests::builder_static_dense_dynamic_sparse", "observer::tests::observer_order_insert_remove_sparse", "query::builder::tests::builder_transmute", "observer::tests::observer_propagating_no_next", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_static_components", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_propagating_world", "observer::tests::observer_multiple_matches", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_dynamic_components", "query::fetch::tests::world_query_phantom_data", "observer::tests::observer_no_target", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "observer::tests::observer_entity_routing", "observer::tests::observer_multiple_events", "query::iter::tests::query_sorts", "observer::tests::observer_order_replace", "query::fetch::tests::world_query_struct_variants", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_multiple_components", "query::state::tests::can_transmute_added", "query::fetch::tests::world_query_metadata_collision", "observer::tests::observer_order_recursive", "observer::tests::observer_propagating_join", "query::state::tests::can_transmute_mut_fetch", "query::builder::tests::builder_or", "observer::tests::observer_propagating_parallel_propagation", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_immut_fetch", "query::iter::tests::empty_query_sort_after_next_does_not_panic", "query::state::tests::can_generalize_with_option", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_to_more_general", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::tests::any_query", "query::state::tests::join", "query::state::tests::join_with_get", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::many_entities", "schedule::condition::tests::distributive_run_if_compiles", "query::state::tests::transmute_from_dense_to_sparse", "query::tests::query", "query::tests::has_query", "query::tests::query_iter_combinations_sparse", "query::tests::multi_storage_query", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::insert_reflect_bundle", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::remove_reflected_with_registry", "schedule::executor::simple::skip_automatic_sync_points", "query::tests::derived_worldqueries", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "query::iter::tests::query_sort_after_next_dense - should panic", "query::iter::tests::query_sort_after_next - should panic", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::transmute_with_different_world - should panic", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::remove_schedule", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::schedules", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::unknown_schedule", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::step_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::exclusive", "storage::blob_vec::tests::blob_vec", "schedule::tests::system_ambiguity::ambiguous_with_system", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "storage::blob_vec::tests::resize_test", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::shared_resource_mut_component", "storage::table::tests::table", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "system::builder::tests::dyn_builder", "schedule::tests::system_ambiguity::before_and_after", "storage::sparse_set::tests::sparse_set", "system::builder::tests::multi_param_builder", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::correct_ambiguities", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::custom_param_builder", "system::builder::tests::param_set_vec_builder", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::tests::system_ambiguity::read_world", "schedule::stepping::tests::verify_cursor", "system::builder::tests::local_builder", "system::builder::tests::query_builder_state", "system::commands::tests::append", "system::commands::tests::commands", "system::builder::tests::vec_builder", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::entity_commands_entry", "system::builder::tests::query_builder", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::builder::tests::param_set_builder", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::insert_components", "system::system::tests::non_send_resources", "system::commands::tests::remove_components", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::commands::tests::remove_components_by_id", "system::system::tests::command_processing", "system::system::tests::run_system_once", "system::system::tests::run_two_systems", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::tests::system_ambiguity::read_only", "system::system_name::tests::test_system_name_exclusive_param", "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::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::local_variables", "system::system_registry::tests::change_detection", "schedule::tests::stepping::multi_threaded_executor", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "system::system_registry::tests::output_values", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::system_registry::tests::input_values", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::system_execution::run_exclusive_system", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_registry::tests::nested_systems", "schedule::tests::system_ordering::order_exclusive_systems", "system::system_param::tests::param_set_non_send_second", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::nested_systems_with_inputs", "system::system_param::tests::non_sync_local", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "schedule::tests::conditions::multiple_conditions_on_system", "event::tests::test_event_mutator_iter_nth", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_mut_system_does_conflict - should panic", "schedule::schedule::tests::configure_set_on_new_schedule", "event::tests::test_event_reader_iter_nth", "system::tests::assert_system_does_not_conflict - should panic", "schedule::schedule::tests::inserts_a_sync_point", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_mut_and_option - should panic", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "system::tests::assert_systems", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "system::tests::conflicting_query_immut_system - should panic", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "schedule::tests::system_execution::run_system", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::stepping::tests::step_run_if_false", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::disable_auto_sync_points", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::tests::any_of_has_filter_with_when_both_have_it", "schedule::tests::conditions::system_with_condition", "schedule::condition::tests::multiple_run_conditions", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::tests::long_life_test", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::any_of_with_and_without_common", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::conditions::system_conditions_and_change_detection", "system::tests::conflicting_system_resources - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::changed_trackers_or_conflict - should panic", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::set::tests::test_schedule_label", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::any_of_and_without", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::get_system_conflicts", "system::tests::disjoint_query_mut_read_component_system", "system::tests::immutable_mut_test", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "system::tests::disjoint_query_mut_system", "system::tests::conflicting_query_mut_system - should panic", "schedule::tests::system_ordering::add_systems_correct_order", "system::tests::commands_param_set", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::any_of_with_entity_and_mut", "system::tests::can_have_16_parameters", "system::tests::convert_mut_to_immut", "system::tests::local_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::into_iter_impl", "schedule::condition::tests::run_condition_combinators", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::non_send_option_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::pipe_change_detection", "system::tests::nonconflicting_system_resources", "schedule::condition::tests::run_condition", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::changed_resource_system", "system::tests::query_is_empty", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::or_has_filter_with", "system::tests::or_expanded_nested_with_and_common_nested_without", "schedule::tests::system_ordering::order_systems", "system::tests::any_of_working", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::system_state_archetype_update", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::system_state_change_detection", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::or_expanded_with_and_without_common", "query::tests::par_iter_mut_change_detection", "system::tests::query_set_system", "event::tests::test_event_cursor_par_read_mut", "system::tests::or_with_without_and_compatible_with_without", "system::tests::system_state_invalid_world - should panic", "system::tests::update_archetype_component_access_works", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::panic_inside_system - should panic", "system::tests::write_system_state", "system::tests::removal_tracking", "system::tests::or_param_set_system", "tests::changed_query", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::test_combinator_clone", "event::tests::test_event_cursor_par_read", "system::tests::world_collections_system", "tests::added_tracking", "tests::despawn_table_storage", "tests::clear_entities", "tests::despawn_mixed_storage", "tests::add_remove_components", "tests::dynamic_required_components", "tests::added_queries", "tests::bundle_derive", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::empty_spawn", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::filtered_query_access", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::exact_size_query", "tests::entity_ref_and_mut_query_panic - should panic", "tests::generic_required_components", "tests::changed_trackers_sparse", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::multiple_worlds_same_query_for_each - should panic", "tests::changed_trackers", "tests::multiple_worlds_same_query_iter - should panic", "tests::insert_or_spawn_batch_invalid", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_ref_query_panic - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::mut_and_entity_ref_query_panic - should panic", "tests::insert_overwrite_drop_sparse", "tests::non_send_resource_points_to_distinct_data", "tests::query_all", "tests::query_filter_with", "tests::query_filters_dont_collide_with_fetches", "tests::non_send_resource_panic - should panic", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::query_all_for_each", "tests::par_for_each_sparse", "tests::query_filter_without", "tests::query_get", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "tests::query_missing_component", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_single_component_for_each", "tests::random_access", "tests::ref_and_mut_query_panic - should panic", "tests::remove_missing", "tests::query_sparse_component", "tests::required_components_insert_existing_hooks", "tests::query_optional_component_table", "tests::remove_tracking", "tests::remove", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_retain_keeps_required", "tests::reserve_and_spawn", "tests::required_components_take_leaves_required", "tests::resource", "tests::resource_scope", "world::command_queue::test::test_command_is_send", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner", "tests::take", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "query::tests::query_filtered_exactsizeiterator_len", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_insert_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_except", "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::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_components", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::reflect::tests::get_component_as_reflect", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::spawn_empty_bundle", "world::tests::test_verify_unique_entities", "world::tests::iterate_entities_mut", "world::tests::inspect_entity_components", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1028) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1036) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 305) - compile fail", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1237) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 249) - compile", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper::mappings (line 88)", "crates/bevy_ecs/src/component.rs - component::Component (line 43)", "crates/bevy_ecs/src/component.rs - component::Component (line 89)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 722)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1253)", "crates/bevy_ecs/src/component.rs - component::Component (line 245)", "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/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 69)", "crates/bevy_ecs/src/lib.rs - (line 190)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "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/component.rs - component::Component (line 315)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 355)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 91)", "crates/bevy_ecs/src/lib.rs - (line 213)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 238)", "crates/bevy_ecs/src/lib.rs - (line 286)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "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/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 38)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 789)", "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::nand (line 184) - 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::nor (line 266) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 63)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 1499)", "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_mut (line 100)", "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/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 (line 24)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 379) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 125)", "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/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/component.rs - component::Component (line 149)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 704)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1009)", "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 246)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 105)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/lib.rs - (line 253)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 10)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 598)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 140)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 158)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 960)", "crates/bevy_ecs/src/component.rs - component::Component (line 107)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "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 172)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 817)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 971)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 814)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 89)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/component.rs - component::Component (line 127)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1883)", "crates/bevy_ecs/src/lib.rs - (line 310)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 101)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 209)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 64)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 205)", "crates/bevy_ecs/src/component.rs - component::Component (line 197)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 190)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/component.rs - component::Component (line 171)", "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/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 295) - compile fail", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1860)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 221)", "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::Condition::or_else (line 335)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 128)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1130)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 665)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 152)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 288)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 769)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 841)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 394)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 556)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 715)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 82)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1417)", "crates/bevy_ecs/src/lib.rs - (line 125)", "crates/bevy_ecs/src/lib.rs - (line 335)", "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::resource_equals (line 584)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1040)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 911) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1081)", "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_exists (line 545)", "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::resource_exists_and_equals (line 622)", "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::any_with_component (line 993)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 949)", "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 (line 58)", "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::resource_exists_and_changed (line 769)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 46)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 359)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 250)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 144)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 392)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 507)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 46)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 18)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 18)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "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 (line 102)", "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 211)", "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 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 262)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 68)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 140)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1284)", "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 (line 167)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 233)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1103)", "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>::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/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1178)", "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>::get_inner (line 1527)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1131)", "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/mod.rs - system::IntoSystem::map (line 182)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 964)", "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>::par_iter_mut (line 806)", "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>::transmute_lens (line 1327)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1415)", "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>::iter_many_mut (line 643)", "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::SystemParam (line 131)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1563)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 698)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1791)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1814)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 202)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 80)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 341)", "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_default (line 1674)", "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 226)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 273)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 746)", "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 1589)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1078)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 835)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 27)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 926)", "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/mod.rs - world::World::component_id (line 315)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1110)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 457)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1260)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 414)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 468)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1057)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1707)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 541)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1767)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 576)", "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_many_entities_dynamic_mut (line 804)", "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::VacantEntry<'w,'a,T>::insert (line 1846)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1193)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 611)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 375)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1474)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1025)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1163)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1229)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 31)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 893)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,867
bevyengine__bevy-12867
[ "12837" ]
fae2200b1ad1df3ec97b6d3545022e8e5581e245
diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -834,14 +834,14 @@ impl Primitive3d for Tetrahedron {} impl Default for Tetrahedron { /// Returns the default [`Tetrahedron`] with the vertices - /// `[0.0, 0.5, 0.0]`, `[-0.5, -0.5, 0.0]`, `[0.5, -0.5, 0.0]` and `[0.0, 0.0, 0.5]`. + /// `[0.5, 0.5, 0.5]`, `[-0.5, 0.5, -0.5]`, `[-0.5, -0.5, 0.5]` and `[0.5, -0.5, -0.5]`. fn default() -> Self { Self { vertices: [ - Vec3::new(0.0, 0.5, 0.0), - Vec3::new(-0.5, -0.5, 0.0), - Vec3::new(0.5, -0.5, 0.0), - Vec3::new(0.0, 0.0, 0.5), + Vec3::new(0.5, 0.5, 0.5), + Vec3::new(-0.5, 0.5, -0.5), + Vec3::new(-0.5, -0.5, 0.5), + Vec3::new(0.5, -0.5, -0.5), ], } }
diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -1085,20 +1085,17 @@ mod tests { ); assert_relative_eq!(tetrahedron.centroid(), Vec3::new(-0.225, -0.375, 1.55)); - assert_eq!(Tetrahedron::default().area(), 1.4659258, "incorrect area"); + assert_eq!(Tetrahedron::default().area(), 3.4641016, "incorrect area"); assert_eq!( Tetrahedron::default().volume(), - 0.083333336, + 0.33333334, "incorrect volume" ); assert_eq!( Tetrahedron::default().signed_volume(), - 0.083333336, + -0.33333334, "incorrect signed volume" ); - assert_relative_eq!( - Tetrahedron::default().centroid(), - Vec3::new(0.0, -0.125, 0.125) - ); + assert_relative_eq!(Tetrahedron::default().centroid(), Vec3::ZERO); } }
Default tetrahedron origin should be at (0, 0, 0) I think the default tet should be centered on the origin. It's going to rotate strangely when people mesh it and apply transforms. I believe all other default primitives have their center of mass more or less at the origin. _Originally posted by @NthTensor in https://github.com/bevyengine/bevy/pull/12688#pullrequestreview-1971768933_
2024-04-03T22:04:48Z
1.77
2024-04-03T23:15:04Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "primitives::dim3::tests::tetrahedron_math" ]
[ "bounding::bounded2d::aabb2d_tests::area", "bounding::bounded2d::aabb2d_tests::closest_point", "bounding::bounded2d::aabb2d_tests::center", "bounding::bounded2d::aabb2d_tests::contains", "bounding::bounded2d::aabb2d_tests::grow", "bounding::bounded2d::aabb2d_tests::half_size", "bounding::bounded2d::aabb2d_tests::intersect_aabb", "bounding::bounded2d::aabb2d_tests::intersect_bounding_circle", "bounding::bounded2d::aabb2d_tests::merge", "bounding::bounded2d::aabb2d_tests::scale_around_center", "bounding::bounded2d::aabb2d_tests::shrink", "bounding::bounded2d::aabb2d_tests::transform", "bounding::bounded2d::bounding_circle_tests::area", "bounding::bounded2d::bounding_circle_tests::closest_point", "bounding::bounded2d::bounding_circle_tests::contains", "bounding::bounded2d::bounding_circle_tests::contains_identical", "bounding::bounded2d::bounding_circle_tests::grow", "bounding::bounded2d::bounding_circle_tests::intersect_bounding_circle", "bounding::bounded2d::bounding_circle_tests::merge", "bounding::bounded2d::bounding_circle_tests::merge_identical", "bounding::bounded2d::bounding_circle_tests::scale_around_center", "bounding::bounded2d::bounding_circle_tests::shrink", "bounding::bounded2d::bounding_circle_tests::transform", "bounding::bounded2d::primitive_impls::tests::acute_triangle", "bounding::bounded2d::primitive_impls::tests::capsule", "bounding::bounded2d::primitive_impls::tests::circle", "bounding::bounded2d::primitive_impls::tests::ellipse", "bounding::bounded2d::primitive_impls::tests::line", "bounding::bounded2d::primitive_impls::tests::obtuse_triangle", "bounding::bounded2d::primitive_impls::tests::plane", "bounding::bounded2d::primitive_impls::tests::polygon", "bounding::bounded2d::primitive_impls::tests::polyline", "bounding::bounded2d::primitive_impls::tests::rectangle", "bounding::bounded2d::primitive_impls::tests::regular_polygon", "bounding::bounded2d::primitive_impls::tests::segment", "bounding::bounded3d::aabb3d_tests::area", "bounding::bounded3d::aabb3d_tests::center", "bounding::bounded3d::aabb3d_tests::closest_point", "bounding::bounded3d::aabb3d_tests::contains", "bounding::bounded3d::aabb3d_tests::grow", "bounding::bounded3d::aabb3d_tests::half_size", "bounding::bounded3d::aabb3d_tests::intersect_aabb", "bounding::bounded3d::aabb3d_tests::intersect_bounding_sphere", "bounding::bounded3d::aabb3d_tests::merge", "bounding::bounded3d::aabb3d_tests::scale_around_center", "bounding::bounded3d::aabb3d_tests::shrink", "bounding::bounded3d::aabb3d_tests::transform", "bounding::bounded3d::bounding_sphere_tests::area", "bounding::bounded3d::bounding_sphere_tests::closest_point", "bounding::bounded3d::bounding_sphere_tests::contains", "bounding::bounded3d::bounding_sphere_tests::contains_identical", "bounding::bounded3d::bounding_sphere_tests::grow", "bounding::bounded3d::bounding_sphere_tests::intersect_bounding_sphere", "bounding::bounded3d::bounding_sphere_tests::merge", "bounding::bounded3d::bounding_sphere_tests::merge_identical", "bounding::bounded3d::bounding_sphere_tests::scale_around_center", "bounding::bounded3d::bounding_sphere_tests::shrink", "bounding::bounded3d::bounding_sphere_tests::transform", "bounding::bounded3d::primitive_impls::tests::capsule", "bounding::bounded3d::primitive_impls::tests::cone", "bounding::bounded3d::primitive_impls::tests::conical_frustum", "bounding::bounded3d::primitive_impls::tests::cuboid", "bounding::bounded3d::primitive_impls::tests::cylinder", "bounding::bounded3d::primitive_impls::tests::line", "bounding::bounded3d::primitive_impls::tests::plane", "bounding::bounded3d::primitive_impls::tests::polyline", "bounding::bounded3d::primitive_impls::tests::segment", "bounding::bounded3d::primitive_impls::tests::sphere", "bounding::bounded3d::primitive_impls::tests::torus", "bounding::bounded3d::primitive_impls::tests::wide_conical_frustum", "bounding::raycast2d::tests::test_aabb_cast_hits", "bounding::raycast2d::tests::test_circle_cast_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_inside", "bounding::raycast2d::tests::test_ray_intersection_aabb_misses", "bounding::raycast2d::tests::test_ray_intersection_circle_hits", "bounding::raycast2d::tests::test_ray_intersection_circle_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_misses", "bounding::raycast3d::tests::test_ray_intersection_aabb_hits", "bounding::raycast3d::tests::test_aabb_cast_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_misses", "bounding::raycast3d::tests::test_ray_intersection_aabb_inside", "bounding::raycast3d::tests::test_ray_intersection_sphere_hits", "bounding::raycast3d::tests::test_ray_intersection_sphere_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_inside", "bounding::raycast3d::tests::test_sphere_cast_hits", "cubic_splines::tests::cardinal_control_pts", "cubic_splines::tests::cubic_to_rational", "cubic_splines::tests::easing_overshoot", "cubic_splines::tests::cubic", "cubic_splines::tests::easing_simple", "cubic_splines::tests::nurbs_circular_arc", "cubic_splines::tests::easing_undershoot", "direction::tests::dir2_creation", "direction::tests::dir3_creation", "direction::tests::dir3a_creation", "float_ord::tests::float_ord_cmp", "float_ord::tests::float_ord_cmp_operators", "float_ord::tests::float_ord_eq", "float_ord::tests::float_ord_hash", "primitives::dim2::tests::annulus_closest_point", "primitives::dim2::tests::annulus_math", "primitives::dim2::tests::circle_closest_point", "primitives::dim2::tests::circle_math", "primitives::dim2::tests::ellipse_math", "primitives::dim2::tests::rectangle_closest_point", "primitives::dim2::tests::rectangle_math", "primitives::dim2::tests::regular_polygon_math", "primitives::dim2::tests::regular_polygon_vertices", "primitives::dim2::tests::triangle_circumcenter", "primitives::dim2::tests::triangle_math", "primitives::dim2::tests::triangle_winding_order", "primitives::dim3::tests::capsule_math", "primitives::dim3::tests::cone_math", "primitives::dim3::tests::cuboid_closest_point", "primitives::dim3::tests::cuboid_math", "primitives::dim3::tests::cylinder_math", "primitives::dim3::tests::direction_creation", "primitives::dim3::tests::plane_from_points", "primitives::dim3::tests::sphere_closest_point", "primitives::dim3::tests::sphere_math", "primitives::dim3::tests::torus_math", "ray::tests::intersect_plane_2d", "ray::tests::intersect_plane_3d", "rects::irect::tests::rect_inset", "rects::irect::tests::rect_intersect", "rects::irect::tests::rect_union", "rects::irect::tests::rect_union_pt", "rects::irect::tests::well_formed", "rects::rect::tests::rect_inset", "rects::rect::tests::rect_intersect", "rects::rect::tests::rect_union", "rects::rect::tests::rect_union_pt", "rects::rect::tests::well_formed", "rects::urect::tests::rect_inset", "rects::urect::tests::rect_intersect", "rects::urect::tests::rect_union", "rects::urect::tests::rect_union_pt", "rects::urect::tests::well_formed", "rotation2d::tests::add", "rotation2d::tests::creation", "rotation2d::tests::is_near_identity", "rotation2d::tests::length", "rotation2d::tests::nlerp", "rotation2d::tests::normalize", "rotation2d::tests::rotate", "rotation2d::tests::slerp", "rotation2d::tests::subtract", "rotation2d::tests::try_normalize", "shape_sampling::tests::circle_boundary_sampling", "shape_sampling::tests::circle_interior_sampling", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_corners (line 46)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::new (line 29)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::height (line 144)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::is_empty (line 116)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::contains (line 208)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::new (line 29)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::height (line 140)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::contains (line 196)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::width (line 130)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_size (line 69)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_half_size (line 90)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::size (line 154)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::height (line 141)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::inset (line 300)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::intersect (line 260)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::half_size (line 176)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union_point (line 237)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::width (line 126)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::is_empty (line 112)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_size (line 73)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_size (line 73)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::contains (line 205)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::center (line 194)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::inset (line 288)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::is_empty (line 113)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::new (line 29)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::inset (line 297)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union (line 223)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::half_size (line 168)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicCardinalSpline (line 169)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicHermite (line 97)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::intersect (line 272)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::width (line 127)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union (line 214)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::center (line 191)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::size (line 155)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::half_size (line 173)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::normalize (line 317)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union_point (line 249)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::center (line 182)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBezier (line 32)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicSegment<Vec2>::ease (line 701)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union_point (line 246)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d (line 11)", "crates/bevy_math/src/shape_sampling.rs - shape_sampling::ShapeSample::sample_interior (line 19)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBSpline (line 256)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::intersect (line 269)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::size (line 158)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::nlerp (line 290)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::slerp (line 328)", "crates/bevy_math/src/shape_sampling.rs - shape_sampling::ShapeSample::sample_boundary (line 33)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicNurbs (line 369)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union (line 226)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,842
bevyengine__bevy-12842
[ "9261" ]
8092e2c86d32a0f83c7c7d97233130d6d7f68dc4
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 @@ -4,6 +4,7 @@ use super::{Deferred, IntoSystem, RegisterSystem, Resource}; use crate::{ self as bevy_ecs, bundle::Bundle, + component::ComponentId, entity::{Entities, Entity}, system::{RunSystemWithInput, SystemId}, world::{Command, CommandQueue, EntityWorldMut, FromWorld, 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 @@ -893,6 +894,11 @@ impl EntityCommands<'_> { self.add(remove::<T>) } + /// Removes a component from the entity. + pub fn remove_by_id(&mut self, component_id: ComponentId) -> &mut Self { + self.add(remove_by_id(component_id)) + } + /// Despawns the entity. /// /// See [`World::despawn`] for more details. 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 @@ -1102,8 +1108,20 @@ fn try_insert(bundle: impl Bundle) -> impl EntityCommand { /// For a [`Bundle`] type `T`, this will remove any components in the bundle. /// Any components in the bundle that aren't found on the entity will be ignored. fn remove<T: Bundle>(entity: Entity, world: &mut World) { - if let Some(mut entity_mut) = world.get_entity_mut(entity) { - entity_mut.remove::<T>(); + if let Some(mut entity) = world.get_entity_mut(entity) { + entity.remove::<T>(); + } +} + +/// An [`EntityCommand`] that removes components with a provided [`ComponentId`] from an entity. +/// # Panics +/// +/// Panics if the provided [`ComponentId`] does not exist in the [`World`]. +fn remove_by_id(component_id: ComponentId) -> impl EntityCommand { + move |entity: Entity, world: &mut World| { + if let Some(mut entity) = world.get_entity_mut(entity) { + entity.remove_by_id(component_id); + } } } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1151,6 +1151,27 @@ impl<'w> EntityWorldMut<'w> { self } + /// Removes a dynamic [`Component`] from the entity if it exists. + /// + /// You should prefer to use the typed API [`EntityWorldMut::remove`] where possible. + /// + /// # Panics + /// + /// Panics if the provided [`ComponentId`] does not exist in the [`World`]. + pub fn remove_by_id(&mut self, component_id: ComponentId) -> &mut Self { + let components = &mut self.world.components; + + let bundle_id = self + .world + .bundles + .init_component_info(components, component_id); + + // SAFETY: the `BundleInfo` for this `component_id` is initialized above + self.location = unsafe { self.remove_bundle(bundle_id) }; + + self + } + /// Despawns the current entity. /// /// See [`World::despawn`] for more details.
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 @@ -1153,9 +1171,12 @@ mod tests { system::{Commands, Resource}, world::{CommandQueue, World}, }; - use std::sync::{ - atomic::{AtomicUsize, Ordering}, - Arc, + use std::{ + any::TypeId, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, }; #[allow(dead_code)] 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,6 +1303,59 @@ mod tests { assert_eq!(results_after_u64, vec![]); } + #[test] + fn remove_components_by_id() { + let mut world = World::default(); + + let mut command_queue = CommandQueue::default(); + let (dense_dropck, dense_is_dropped) = DropCk::new_pair(); + let (sparse_dropck, sparse_is_dropped) = DropCk::new_pair(); + let sparse_dropck = SparseDropCk(sparse_dropck); + + let entity = Commands::new(&mut command_queue, &world) + .spawn((W(1u32), W(2u64), dense_dropck, sparse_dropck)) + .id(); + command_queue.apply(&mut world); + let results_before = world + .query::<(&W<u32>, &W<u64>)>() + .iter(&world) + .map(|(a, b)| (a.0, b.0)) + .collect::<Vec<_>>(); + assert_eq!(results_before, vec![(1u32, 2u64)]); + + // test component removal + Commands::new(&mut command_queue, &world) + .entity(entity) + .remove_by_id(world.components().get_id(TypeId::of::<W<u32>>()).unwrap()) + .remove_by_id(world.components().get_id(TypeId::of::<W<u64>>()).unwrap()) + .remove_by_id(world.components().get_id(TypeId::of::<DropCk>()).unwrap()) + .remove_by_id( + world + .components() + .get_id(TypeId::of::<SparseDropCk>()) + .unwrap(), + ); + + assert_eq!(dense_is_dropped.load(Ordering::Relaxed), 0); + assert_eq!(sparse_is_dropped.load(Ordering::Relaxed), 0); + command_queue.apply(&mut world); + assert_eq!(dense_is_dropped.load(Ordering::Relaxed), 1); + assert_eq!(sparse_is_dropped.load(Ordering::Relaxed), 1); + + let results_after = world + .query::<(&W<u32>, &W<u64>)>() + .iter(&world) + .map(|(a, b)| (a.0, b.0)) + .collect::<Vec<_>>(); + assert_eq!(results_after, vec![]); + let results_after_u64 = world + .query::<&W<u64>>() + .iter(&world) + .map(|v| v.0) + .collect::<Vec<_>>(); + assert_eq!(results_after_u64, vec![]); + } + #[test] fn remove_resources() { let mut world = World::default(); diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -2767,6 +2788,22 @@ mod tests { assert_eq!(dynamic_components, static_components); } + #[test] + fn entity_mut_remove_by_id() { + let mut world = World::new(); + let test_component_id = world.init_component::<TestComponent>(); + + let mut entity = world.spawn(TestComponent(42)); + entity.remove_by_id(test_component_id); + + let components: Vec<_> = world.query::<&TestComponent>().iter(&world).collect(); + + assert_eq!(components, vec![] as Vec<&TestComponent>); + + // remove non-existent component does not panic + world.spawn_empty().remove_by_id(test_component_id); + } + #[derive(Component)] struct A;
Missing `remove_by_id` The untyped API seems to be missing the comparable `EntityMut::remove_by_id` or `EntityCommands::remove_by_id` methods. There are, however, `World::remove_resource_by_id` and `World::remove_non_send_by_id` for some reason.
i would like to solve this isssue in a decent way as my first contribution but i'm actually really new at bevy. So could someone verify my approach maybe. I already defined a method called `EntitiyMut::remove_by_id(&mut self, component_id)` which takes a `component_id` and uses the instance of the world attribute to call the already existing method `World::remove_resource_by_id`. With that i can remove the wished component. ![grafik](https://github.com/bevyengine/bevy/assets/74780331/9cbfd849-f859-447f-9760-5212c53f2ef9) For `EntityCommands` (if its necessary) i don't have a solution right now. @TimoCak There is no `insert_by_id` method on `EntityCommands` either, having `remove_by_id` on `EntityMut` would already be an improvement, don't hesitate to make a PR for it! I don't think your implementation is right though. From what I understand your implementation is just removing a `Resource` from the `World`, instead of removing a `Component` from an `Entity`. I think you're supposed to do something similar to the implementation of the `remove` method, but instead of `for component_id in bundle_info.components().iter().cloned()` you have only one component_id. I'd like to work on this and open a PR, if possible :) I stumbled on these methods missing today as I would like to use them. Currently I consider to instead store `fn(&mut World, Entity)` commands instead to generate component removals at a place I don't have the type anymore. Is the PR by @mateuseap still wip?
2024-04-02T01:46:02Z
1.77
2024-04-03T10:04:59Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::change_tick_wraparound", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::change_tick_scan", "entity::map_entities::tests::entity_mapper", "change_detection::tests::change_expiration", "bundle::tests::component_hook_order_recursive_multiple", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_combined_access", "query::access::tests::filtered_access_extend_or", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_or", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_transmute", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::state::tests::can_generalize_with_option", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::has_query", "query::state::tests::join", "query::state::tests::join_with_get", "query::tests::any_query", "query::tests::many_entities", "query::tests::query_iter_combinations_sparse", "query::tests::multi_storage_query", "query::tests::query", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::tests::query_iter_combinations", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::tests::self_conflicting_worldquery - should panic", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::insert_reflected", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::insert_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_system_set", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::unknown_schedule", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::waiting_never_run", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::events", "schedule::stepping::tests::verify_cursor", "schedule::tests::stepping::simple_executor", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "storage::blob_vec::tests::blob_vec", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::tests::stepping::multi_threaded_executor", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::system_ambiguity::resources", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::schedule_build_errors::dependency_cycle", "storage::table::tests::table", "schedule::tests::system_execution::run_system", "event::tests::test_event_iter_nth", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::disable_auto_sync_points", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::schedule::tests::inserts_a_sync_point", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::set::tests::test_schedule_label", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "storage::sparse_set::tests::sparse_set", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "schedule::stepping::tests::step_run_if_false", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::conditions::mixed_conditions_and_change_detection", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_resources", "system::commands::tests::remove_components", "system::system::tests::command_processing", "system::system::tests::non_send_resources", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::condition::tests::run_condition_combinators", "storage::blob_vec::tests::resize_test", "storage::sparse_set::tests::sparse_sets", "system::function_system::tests::into_system_type_id_consistency", "system::system::tests::run_system_once", "system::exclusive_system_param::tests::test_exclusive_system_params", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::commands::tests::commands", "system::commands::tests::append", "system::system::tests::run_two_systems", "schedule::condition::tests::run_condition", "schedule::tests::system_ordering::add_systems_correct_order", "system::system_param::tests::system_param_name_collision", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "system::system_name::tests::test_system_name_exclusive_param", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::tests::system_ambiguity::nonsend", "system::system_registry::tests::exclusive_system", "system::system_param::tests::system_param_const_generics", "system::system_registry::tests::input_values", "system::system_registry::tests::change_detection", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_generic_bounds", "system::system_registry::tests::local_variables", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::non_sync_local", "system::system_param::tests::system_param_invariant_lifetime", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_field_limit", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::no_sync_chain::chain_first", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::output_values", "system::tests::assert_systems", "schedule::tests::system_ambiguity::read_only", "system::tests::assert_system_does_not_conflict - should panic", "system::system_param::tests::param_set_non_send_second", "system::tests::any_of_and_without", "system::tests::any_of_has_no_filter_with - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "query::tests::par_iter_mut_change_detection", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::commands_param_set", "system::tests::conflicting_system_resources - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::conflicting_query_mut_system - should panic", "system::tests::convert_mut_to_immut", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::get_system_conflicts", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::disjoint_query_mut_system", "system::tests::long_life_test", "system::tests::changed_resource_system", "system::tests::immutable_mut_test", "system::tests::disjoint_query_mut_read_component_system", "system::tests::local_system", "system::tests::into_iter_impl", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::non_send_option_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::pipe_change_detection", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_has_no_filter_with - should panic", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::or_expanded_with_and_without_common", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::query_validates_world_id - should panic", "system::tests::query_is_empty", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_with_without_and_compatible_with_without", "system::tests::simple_system", "system::tests::read_system_state", "system::tests::or_has_filter_with", "system::tests::query_set_system", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::system_state_invalid_world - should panic", "system::tests::or_param_set_system", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::update_archetype_component_access_works", "system::tests::panic_inside_system - should panic", "system::tests::write_system_state", "tests::added_queries", "tests::added_tracking", "tests::changed_query", "tests::add_remove_components", "tests::bundle_derive", "system::tests::world_collections_system", "tests::despawn_mixed_storage", "tests::clear_entities", "tests::despawn_table_storage", "system::tests::removal_tracking", "tests::empty_spawn", "tests::duplicate_components_panic - should panic", "tests::changed_trackers_sparse", "tests::changed_trackers", "system::tests::test_combinator_clone", "tests::entity_ref_and_mut_query_panic - should panic", "tests::filtered_query_access", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_points_to_distinct_data", "query::tests::query_filtered_exactsizeiterator_len", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::query_all", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_filters_dont_collide_with_fetches", "tests::query_get", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_single_component", "tests::query_sparse_component", "tests::random_access", "tests::ref_and_mut_query_panic - should panic", "tests::remove", "tests::remove_missing", "tests::reserve_and_spawn", "tests::remove_tracking", "tests::resource", "tests::reserve_entities_across_worlds", "tests::resource_scope", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "tests::spawn_batch", "world::command_queue::test::test_command_is_send", "world::command_queue::test::test_command_queue_inner", "tests::take", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "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_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::identifier::tests::world_ids_unique", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iterate_entities_mut", "world::tests::spawn_empty_bundle", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "world::tests::inspect_entity_components", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 866) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 235) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 910) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 245) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 858) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 106) - compile fail", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 166)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 926)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 538)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 635)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 506)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 447)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 58)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 461)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 744)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::NextState (line 146)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::States (line 33)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::State (line 78)", "crates/bevy_ecs/src/event.rs - event::Events (line 118)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 449)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1543)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 109)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 483)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 800)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 329)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 652)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 923)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 100)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 120)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 217)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 287) - compile fail", "crates/bevy_ecs/src/event.rs - event::ManualEventReader (line 573)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 690)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 259)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1520)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 723)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 375)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 176)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 255)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 425)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 710)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 586)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 271)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 651)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 619)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 832)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 294)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1000) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 214)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 349)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 138)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 382)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 404) - compile fail", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1308)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 562)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1435) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 188)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 190)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 540)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1411)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 415)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 610)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 41)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 876)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 332)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 779)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 479)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 140)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 225)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 665)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 55)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1108)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1185)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1226)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 942)", "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_inner (line 1512)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 254)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 579)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 112) - compile", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 327)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 693)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1261)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 292)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 670)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1080)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1155)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 174)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 219)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 252)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1304)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 75)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 263)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "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>::iter_inner (line 1555)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 258)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 170)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 211)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 916)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 299)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 273)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 535)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 799)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 654)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 372)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 333)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 415)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 232)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 1925)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 958)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 884)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 713)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1561)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 837)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 863)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 623)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 988)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 381)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2302)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 426)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 500)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1673)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1055)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1024)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 746)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,829
bevyengine__bevy-12829
[ "12019" ]
93fd02e8ea0361d9d58f2cc797d012216084b082
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 @@ -2136,6 +2136,209 @@ impl World { } } + /// Iterates over all resources in the world. + /// + /// The returned iterator provides lifetimed, but type-unsafe pointers. Actually reading the contents + /// of each resource will require the use of unsafe code. + /// + /// # Examples + /// + /// ## Printing the size of all resources + /// + /// ``` + /// # use bevy_ecs::prelude::*; + /// # #[derive(Resource)] + /// # struct A(u32); + /// # #[derive(Resource)] + /// # struct B(u32); + /// # + /// # let mut world = World::new(); + /// # world.insert_resource(A(1)); + /// # world.insert_resource(B(2)); + /// let mut total = 0; + /// for (info, _) in world.iter_resources() { + /// println!("Resource: {}", info.name()); + /// println!("Size: {} bytes", info.layout().size()); + /// total += info.layout().size(); + /// } + /// println!("Total size: {} bytes", total); + /// # assert_eq!(total, std::mem::size_of::<A>() + std::mem::size_of::<B>()); + /// ``` + /// + /// ## Dynamically running closures for resources matching specific `TypeId`s + /// + /// ``` + /// # use bevy_ecs::prelude::*; + /// # use std::collections::HashMap; + /// # use std::any::TypeId; + /// # use bevy_ptr::Ptr; + /// # #[derive(Resource)] + /// # struct A(u32); + /// # #[derive(Resource)] + /// # struct B(u32); + /// # + /// # let mut world = World::new(); + /// # world.insert_resource(A(1)); + /// # world.insert_resource(B(2)); + /// # + /// // In this example, `A` and `B` are resources. We deliberately do not use the + /// // `bevy_reflect` crate here to showcase the low-level [`Ptr`] usage. You should + /// // probably use something like `ReflectFromPtr` in a real-world scenario. + /// + /// // Create the hash map that will store the closures for each resource type + /// let mut closures: HashMap<TypeId, Box<dyn Fn(&Ptr<'_>)>> = HashMap::new(); + /// + /// // Add closure for `A` + /// closures.insert(TypeId::of::<A>(), Box::new(|ptr| { + /// // SAFETY: We assert ptr is the same type of A with TypeId of A + /// let a = unsafe { &ptr.deref::<A>() }; + /// # assert_eq!(a.0, 1); + /// // ... do something with `a` here + /// })); + /// + /// // Add closure for `B` + /// closures.insert(TypeId::of::<B>(), Box::new(|ptr| { + /// // SAFETY: We assert ptr is the same type of B with TypeId of B + /// let b = unsafe { &ptr.deref::<B>() }; + /// # assert_eq!(b.0, 2); + /// // ... do something with `b` here + /// })); + /// + /// // Iterate all resources, in order to run the closures for each matching resource type + /// for (info, ptr) in world.iter_resources() { + /// let Some(type_id) = info.type_id() else { + /// // It's possible for resources to not have a `TypeId` (e.g. non-Rust resources + /// // dynamically inserted via a scripting language) in which case we can't match them. + /// continue; + /// }; + /// + /// let Some(closure) = closures.get(&type_id) else { + /// // No closure for this resource type, skip it. + /// continue; + /// }; + /// + /// // Run the closure for the resource + /// closure(&ptr); + /// } + /// ``` + #[inline] + pub fn iter_resources(&self) -> impl Iterator<Item = (&ComponentInfo, Ptr<'_>)> { + self.storages + .resources + .iter() + .filter_map(|(component_id, data)| { + // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with it's ID. + let component_info = unsafe { + self.components + .get_info(component_id) + .debug_checked_unwrap() + }; + Some((component_info, data.get_data()?)) + }) + } + + /// Mutably iterates over all resources in the world. + /// + /// The returned iterator provides lifetimed, but type-unsafe pointers. Actually reading from or writing + /// to the contents of each resource will require the use of unsafe code. + /// + /// # Example + /// + /// ``` + /// # use bevy_ecs::prelude::*; + /// # use bevy_ecs::change_detection::MutUntyped; + /// # use std::collections::HashMap; + /// # use std::any::TypeId; + /// # #[derive(Resource)] + /// # struct A(u32); + /// # #[derive(Resource)] + /// # struct B(u32); + /// # + /// # let mut world = World::new(); + /// # world.insert_resource(A(1)); + /// # world.insert_resource(B(2)); + /// # + /// // In this example, `A` and `B` are resources. We deliberately do not use the + /// // `bevy_reflect` crate here to showcase the low-level `MutUntyped` usage. You should + /// // probably use something like `ReflectFromPtr` in a real-world scenario. + /// + /// // Create the hash map that will store the mutator closures for each resource type + /// let mut mutators: HashMap<TypeId, Box<dyn Fn(&mut MutUntyped<'_>)>> = HashMap::new(); + /// + /// // Add mutator closure for `A` + /// mutators.insert(TypeId::of::<A>(), Box::new(|mut_untyped| { + /// // Note: `MutUntyped::as_mut()` automatically marks the resource as changed + /// // for ECS change detection, and gives us a `PtrMut` we can use to mutate the resource. + /// // SAFETY: We assert ptr is the same type of A with TypeId of A + /// let a = unsafe { &mut mut_untyped.as_mut().deref_mut::<A>() }; + /// # a.0 += 1; + /// // ... mutate `a` here + /// })); + /// + /// // Add mutator closure for `B` + /// mutators.insert(TypeId::of::<B>(), Box::new(|mut_untyped| { + /// // SAFETY: We assert ptr is the same type of B with TypeId of B + /// let b = unsafe { &mut mut_untyped.as_mut().deref_mut::<B>() }; + /// # b.0 += 1; + /// // ... mutate `b` here + /// })); + /// + /// // Iterate all resources, in order to run the mutator closures for each matching resource type + /// for (info, mut mut_untyped) in world.iter_resources_mut() { + /// let Some(type_id) = info.type_id() else { + /// // It's possible for resources to not have a `TypeId` (e.g. non-Rust resources + /// // dynamically inserted via a scripting language) in which case we can't match them. + /// continue; + /// }; + /// + /// let Some(mutator) = mutators.get(&type_id) else { + /// // No mutator closure for this resource type, skip it. + /// continue; + /// }; + /// + /// // Run the mutator closure for the resource + /// mutator(&mut mut_untyped); + /// } + /// # assert_eq!(world.resource::<A>().0, 2); + /// # assert_eq!(world.resource::<B>().0, 3); + /// ``` + #[inline] + pub fn iter_resources_mut(&mut self) -> impl Iterator<Item = (&ComponentInfo, MutUntyped<'_>)> { + self.storages + .resources + .iter() + .filter_map(|(component_id, data)| { + // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with it's ID. + let component_info = unsafe { + self.components + .get_info(component_id) + .debug_checked_unwrap() + }; + let (ptr, ticks) = data.get_with_ticks()?; + + // SAFETY: + // - We have exclusive access to the world, so no other code can be aliasing the `TickCells` + // - We only hold one `TicksMut` at a time, and we let go of it before getting the next one + let ticks = unsafe { + TicksMut::from_tick_cells( + ticks, + self.last_change_tick(), + self.read_change_tick(), + ) + }; + + let mut_untyped = MutUntyped { + // SAFETY: + // - We have exclusive access to the world, so no other code can be aliasing the `Ptr` + // - We iterate one resource at a time, and we let go of each `PtrMut` before getting the next one + value: unsafe { ptr.assert_unique() }, + ticks, + }; + + Some((component_info, mut_untyped)) + }) + } + /// Gets a `!Send` resource to the resource with the id [`ComponentId`] if it exists. /// The returned pointer must not be used to modify the resource, and must not be /// dereferenced after the immutable borrow of the [`World`] ends.
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 @@ -2554,6 +2757,12 @@ mod tests { #[derive(Resource)] struct TestResource(u32); + #[derive(Resource)] + struct TestResource2(String); + + #[derive(Resource)] + struct TestResource3; + #[test] fn get_resource_by_id() { let mut world = World::new(); 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 @@ -2594,6 +2803,66 @@ mod tests { assert_eq!(resource.0, 43); } + #[test] + fn iter_resources() { + let mut world = World::new(); + world.insert_resource(TestResource(42)); + world.insert_resource(TestResource2("Hello, world!".to_string())); + world.insert_resource(TestResource3); + world.remove_resource::<TestResource3>(); + + let mut iter = world.iter_resources(); + + let (info, ptr) = iter.next().unwrap(); + assert_eq!(info.name(), std::any::type_name::<TestResource>()); + // SAFETY: We know that the resource is of type `TestResource` + assert_eq!(unsafe { ptr.deref::<TestResource>().0 }, 42); + + let (info, ptr) = iter.next().unwrap(); + assert_eq!(info.name(), std::any::type_name::<TestResource2>()); + assert_eq!( + // SAFETY: We know that the resource is of type `TestResource2` + unsafe { &ptr.deref::<TestResource2>().0 }, + &"Hello, world!".to_string() + ); + + assert!(iter.next().is_none()); + } + + #[test] + fn iter_resources_mut() { + let mut world = World::new(); + world.insert_resource(TestResource(42)); + world.insert_resource(TestResource2("Hello, world!".to_string())); + world.insert_resource(TestResource3); + world.remove_resource::<TestResource3>(); + + let mut iter = world.iter_resources_mut(); + + let (info, mut mut_untyped) = iter.next().unwrap(); + assert_eq!(info.name(), std::any::type_name::<TestResource>()); + // SAFETY: We know that the resource is of type `TestResource` + unsafe { + mut_untyped.as_mut().deref_mut::<TestResource>().0 = 43; + }; + + let (info, mut mut_untyped) = iter.next().unwrap(); + assert_eq!(info.name(), std::any::type_name::<TestResource2>()); + // SAFETY: We know that the resource is of type `TestResource2` + unsafe { + mut_untyped.as_mut().deref_mut::<TestResource2>().0 = "Hello, world?".to_string(); + }; + + assert!(iter.next().is_none()); + std::mem::drop(iter); + + assert_eq!(world.resource::<TestResource>().0, 43); + assert_eq!( + world.resource::<TestResource2>().0, + "Hello, world?".to_string() + ); + } + #[test] fn custom_resource_with_layout() { static DROP_COUNT: AtomicU32 = AtomicU32::new(0);
Add `World::iter_resources()` and `World::iter_resources_mut()` methods # Objective - I would like to be able to easily iterate over all the resources in a given `World`; - As I'm doing so, I'd like be able to query `ComponentInfo` (e.g. for reflection) and also read (and optionally mutate) the resources directly. ## Solution - Introduce `World::iter_resources()` and `World::iter_resources_mut()` methods; - These methods return `impl Iterator<Item = (&ComponentInfo, Ptr<'_>)>` and `impl Iterator<Item = (&ComponentInfo, MutUntyped<'_>)>`, respectively. **Note:** My original implementation in the remote protocol branch also added methods for `!Send` resources, but as suggested by WrongShoe on discord, I'm holding off on that since #9122 is likely to land soon. **Note 2:** Related to #4955 (But much smaller/more constrained, this requires `World` access and `unsafe`) --- ## Changelog - Added `World::iter_resources()` and `World::iter_resources_mut()` methods for iterating all resources dynamically at run time;
@james-j-obrien, can I get your review / help with this? It very much feels like a sibling of the dynamic query work. @james-j-obrien Thanks! That makes me more confident with what I was doing. Updated the safety comments with the explanations. Edit: Added you as a co-author, if that's okay, since I really wouldn't have been able to verify this on my own (or even be able to fully reason about the safety of this without your explanations.) Hmm honestly I wasn't aware you could do that, TIL. If I understand it correctly, besides being more easily discoverable and somewhat shorter to use, the API in this PR has the benefits of: - Not requiring the filtering (so it should be faster, depending on how many non-resource components are in the world. Not sure how relevant that is in practice for real scenarios) - It allows you to easily mutate the resources as you iterate them, which would be cumbersome otherwise, since the filter closure needs a read reference to the world
2024-04-01T17:08:31Z
1.77
2024-06-19T19:58:06Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "change_detection::tests::map_mut", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_untyped_to_reflect", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::set_if_neq", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "entity::map_entities::tests::entity_mapper", "bundle::tests::component_hook_order_recursive_multiple", "bundle::tests::component_hook_order_recursive", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "change_detection::tests::change_expiration", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_niche_optimization", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "query::access::tests::access_get_conflicts", "identifier::tests::id_construction", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::read_all_access_conflicts", "query::access::tests::filtered_combined_access", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_transmute", "query::builder::tests::builder_static_components", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_struct_variants", "query::fetch::tests::world_query_phantom_data", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::tests::has_query", "query::tests::any_query", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::tests::multi_storage_query", "query::state::tests::join_with_get", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::tests::query", "query::state::tests::right_world_get - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_iter_combinations_sparse", "query::state::tests::join", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::insert_reflected", "query::tests::many_entities", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_never_run", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::step_always_run", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::remove_schedule", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::stepping::single_threaded_executor", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "storage::blob_vec::tests::blob_vec", "schedule::stepping::tests::verify_cursor", "storage::blob_vec::tests::aligned_zst", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::sparse_set::tests::sparse_set", "schedule::tests::system_ambiguity::read_world", "system::commands::tests::commands", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::sparse_set::tests::sparse_sets", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_resources", "storage::table::tests::table", "storage::blob_vec::tests::resize_test", "system::system::tests::non_send_resources", "system::commands::tests::append", "system::system::tests::command_processing", "system::commands::tests::remove_components", "system::system::tests::run_system_once", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::system::tests::run_two_systems", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::system_name::tests::test_system_name_exclusive_param", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "system::exclusive_system_param::tests::test_exclusive_system_params", "event::tests::test_event_iter_nth", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system_name::tests::test_system_name_regular_param", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::set::tests::test_schedule_label", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::system_ambiguity::read_only", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_invariant_lifetime", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::system_execution::run_system", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::conditions::system_with_condition", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "system::system_param::tests::system_param_where_clause", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::stepping::tests::step_run_if_false", "schedule::schedule::tests::disable_auto_sync_points", "system::system_param::tests::non_sync_local", "schedule::schedule::tests::inserts_a_sync_point", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system_registry::tests::local_variables", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_private_fields", "system::system_registry::tests::output_values", "system::system_param::tests::system_param_struct_variants", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system_registry::tests::nested_systems_with_inputs", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::condition::tests::run_condition", "system::system_param::tests::system_param_flexibility", "system::system_registry::tests::exclusive_system", "schedule::condition::tests::run_condition_combinators", "system::system_param::tests::system_param_field_limit", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems", "system::system_param::tests::system_param_name_collision", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::tests::assert_systems", "system::system_param::tests::param_set_non_send_second", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_and_without", "system::system_registry::tests::change_detection", "system::system_param::tests::param_set_non_send_first", "system::tests::can_have_16_parameters", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::any_of_has_no_filter_with - should panic", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::conflicting_query_mut_system - should panic", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::commands_param_set", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_query_immut_system - should panic", "schedule::tests::system_ordering::order_systems", "system::tests::changed_resource_system", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::get_system_conflicts", "system::tests::convert_mut_to_immut", "system::tests::immutable_mut_test", "query::tests::par_iter_mut_change_detection", "system::tests::long_life_test", "system::tests::disjoint_query_mut_read_component_system", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::disjoint_query_mut_system", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::local_system", "system::tests::into_iter_impl", "system::tests::non_send_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_option_system", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_has_no_filter_with - should panic", "system::tests::nonconflicting_system_resources", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::pipe_change_detection", "system::tests::query_validates_world_id - should panic", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::or_param_set_system", "system::tests::query_is_empty", "system::tests::read_system_state", "system::tests::or_has_filter_with", "system::tests::system_state_change_detection", "system::tests::system_state_archetype_update", "system::tests::system_state_invalid_world - should panic", "system::tests::query_set_system", "system::tests::panic_inside_system - should panic", "system::tests::write_system_state", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::update_archetype_component_access_works", "tests::add_remove_components", "tests::added_queries", "tests::changed_query", "system::tests::world_collections_system", "system::tests::removal_tracking", "tests::bundle_derive", "tests::added_tracking", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::entity_ref_and_mut_query_panic - should panic", "tests::clear_entities", "tests::changed_trackers", "tests::duplicate_components_panic - should panic", "tests::changed_trackers_sparse", "tests::empty_spawn", "system::tests::test_combinator_clone", "tests::filtered_query_access", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop_sparse", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::par_for_each_dense", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_get", "tests::query_missing_component", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::remove_missing", "tests::remove", "tests::reserve_and_spawn", "tests::resource", "tests::remove_tracking", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "world::command_queue::test::test_command_queue_inner", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner_drop", "world::command_queue::test::test_command_queue_inner_drop_early", "query::tests::query_filtered_exactsizeiterator_len", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_get_by_id", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::identifier::tests::world_ids_unique", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::spawn_empty_bundle", "world::tests::inspect_entity_components", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 866) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 858) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 235) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 910) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "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 245) - compile", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 744)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 635)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 461)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 506)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 538)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 926)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 447)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 166)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 58)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/event.rs - event::Events (line 118)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 55)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::States (line 33)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::State (line 78)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::NextState (line 146)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 100)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 652)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 120)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 800)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 769)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 710)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 109)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 876)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 37)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 425)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 287) - compile fail", "crates/bevy_ecs/src/event.rs - event::ManualEventReader (line 573)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 690)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 217)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 619)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 197)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 483)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 723)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 259)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 911)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 176)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1543)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 957)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 779)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 255)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 294)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 375)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 124)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 309)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 138)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 832)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 595)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 724)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 100)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 190)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 188)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 349)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 256)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1520)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 351)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 329)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 449)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 132)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 651)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1000) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 586)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 214)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 478)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 537)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 382)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 479)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 425)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 451)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 610)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 404) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 332)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 562)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 923)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1435) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 631)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 540)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1308)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 665)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 934)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 759)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 415)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1411)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 271)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 55)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 41)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 812)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1108)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 579)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 187)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 140)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 225)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 219)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 858)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1555)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 232)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 263)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 327)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 693)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1520)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 75)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 112) - compile", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 211)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1487)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 258)", "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>::get_inner (line 1512)", "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>::single_mut (line 1155)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 916)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1627)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1402)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1461)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 863)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1580)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 273)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1659)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1185)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 174)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 299)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 170)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 942)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1432)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1275)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1080)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1304)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 535)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 670)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1684)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 958)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 292)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 254)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1261)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1328)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1547)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 187)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 799)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1376)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 333)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 500)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 252)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 654)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1604)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 623)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1226)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 1925)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 884)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 381)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 426)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1561)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 415)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 713)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 372)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1055)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1673)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1024)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 988)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 837)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,816
bevyengine__bevy-12816
[ "12184" ]
a27ce270d00cdc54d4ecd2aae1d9edb6978ed0f7
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -32,6 +32,12 @@ pub struct LayoutContext { } impl LayoutContext { + pub const DEFAULT: Self = Self { + scale_factor: 1.0, + physical_size: Vec2::ZERO, + min_size: 0.0, + max_size: 0.0, + }; /// create new a [`LayoutContext`] from the window's physical size and scale factor fn new(scale_factor: f32, physical_size: Vec2) -> Self { Self { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -43,6 +49,12 @@ impl LayoutContext { } } +impl Default for LayoutContext { + fn default() -> Self { + Self::DEFAULT + } +} + #[derive(Debug, Error)] pub enum LayoutError { #[error("Invalid hierarchy")] diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -156,6 +168,8 @@ pub fn ui_layout_system( ); ui_surface.upsert_node(entity, &style, &layout_context); } + } else { + ui_surface.upsert_node(entity, &Style::default(), &LayoutContext::default()); } } scale_factor_events.clear();
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1000,4 +1014,65 @@ mod tests { } } } + + #[test] + fn no_camera_ui() { + let mut world = World::new(); + world.init_resource::<UiScale>(); + world.init_resource::<UiSurface>(); + world.init_resource::<Events<WindowScaleFactorChanged>>(); + world.init_resource::<Events<WindowResized>>(); + // Required for the camera system + world.init_resource::<Events<WindowCreated>>(); + world.init_resource::<Events<AssetEvent<Image>>>(); + world.init_resource::<Assets<Image>>(); + world.init_resource::<ManualTextureViews>(); + + // spawn a dummy primary window and camera + world.spawn(( + Window { + resolution: WindowResolution::new(WINDOW_WIDTH, WINDOW_HEIGHT), + ..default() + }, + PrimaryWindow, + )); + + let mut ui_schedule = Schedule::default(); + ui_schedule.add_systems( + ( + // UI is driven by calculated camera target info, so we need to run the camera system first + bevy_render::camera::camera_system::<OrthographicProjection>, + update_target_camera_system, + apply_deferred, + ui_layout_system, + ) + .chain(), + ); + + let ui_root = world + .spawn(NodeBundle { + style: Style { + width: Val::Percent(100.), + height: Val::Percent(100.), + ..default() + }, + ..default() + }) + .id(); + + let ui_child = world + .spawn(NodeBundle { + style: Style { + width: Val::Percent(100.), + height: Val::Percent(100.), + ..default() + }, + ..default() + }) + .id(); + + world.entity_mut(ui_root).add_child(ui_child); + + ui_schedule.run(&mut world); + } }
Panic with UI hierarchy when no camera is present ## Bevy version main, 0.13 bisected to #10559 ## Relevant system information ``` AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal } SystemInfo { os: "MacOS 14.2.1 ", kernel: "23.2.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" } ``` ## What you did I noticed this while writing some doc examples which were accidentally not `no_run`. This is the most minimal repro I can make, but I also see this panic in e.g. the `button` example modified with no camera. ```rust use bevy::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, setup) .run(); } fn setup(mut commands: Commands) { commands .spawn(NodeBundle::default()) .with_children(|parent| { parent.spawn(NodeBundle::default()); }); } ``` ## What went wrong Received a warning about a camera not being present, which I suppose makes sense. Received a warning about an "unstyled child in a UI entity hierarchy" which does not make sense as far as I can tell. Finally, panicked on an `unwrap` which doesn't seem desirable. ``` 2024-02-28T15:05:02.776557Z WARN bevy_ui::layout: No camera found to render UI to. To fix this, add at least one camera to the scene. 2024-02-28T15:05:02.776596Z WARN bevy_ui::layout: Unstyled child in a UI entity hierarchy. You are using an entity without UI components as a child of an entity with UI components, results may be unexpected. thread 'Compute Task Pool (0)' panicked at crates/bevy_ui/src/layout/mod.rs:131:60: called `Option::unwrap()` on a `None` value note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic in system `bevy_ui::layout::ui_layout_system`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! thread 'main' panicked at /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.11/src/platform_impl/macos/app_state.rs:387:33: called `Result::unwrap()` on an `Err` value: PoisonError { .. } ```
I want to work on this issue, if it's OK
2024-03-31T21:44:08Z
1.77
2024-04-22T16:56:20Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "layout::tests::no_camera_ui" ]
[ "geometry::tests::default_val_equals_const_default_val", "geometry::tests::test_uirect_axes", "geometry::tests::uirect_default_equals_const_default", "geometry::tests::uirect_px", "geometry::tests::uirect_percent", "geometry::tests::val_auto_is_non_resolveable", "geometry::tests::val_evaluate", "geometry::tests::val_arithmetic_error_messages", "geometry::tests::val_resolve_px", "geometry::tests::val_resolve_viewport_coords", "layout::convert::tests::test_into_length_percentage", "layout::convert::tests::test_convert_from", "layout::tests::round_layout_coords_must_round_ties_up", "ui_node::tests::grid_placement_accessors", "ui_node::tests::invalid_grid_placement_values", "stack::tests::test_ui_stack_system", "layout::tests::ui_node_should_be_set_to_its_content_size", "layout::tests::ui_surface_tracks_ui_entities", "layout::tests::measure_funcs_should_be_removed_on_content_size_removal", "layout::tests::ui_surface_tracks_camera_entities", "layout::tests::ui_root_node_should_act_like_position_absolute", "layout::tests::ui_nodes_with_percent_100_dimensions_should_fill_their_parent", "layout::tests::despawning_a_ui_entity_should_remove_its_corresponding_ui_node - should panic", "layout::tests::changes_to_children_of_a_ui_entity_change_its_corresponding_ui_nodes_children", "layout::tests::ui_node_should_properly_update_when_changing_target_camera", "layout::tests::ui_rounding_test", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 239)", "crates/bevy_ui/src/ui_node.rs - ui_node::BorderRadius (line 1825)", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 1677)", "crates/bevy_ui/src/ui_node.rs - ui_node::IsDefaultUiCamera (line 2136)", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 1656)", "crates/bevy_ui/src/ui_material.rs - ui_material::UiMaterial (line 23)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 224)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::vertical (line 411)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_top (line 582)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_left (line 544)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::px (line 341)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::right (line 479)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_bottom (line 601)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::axes (line 433)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_right (line 563)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::left (line 457)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::all (line 316)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 214)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::percent (line 365)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::horizontal (line 388)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::new (line 288)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::top (line 501)", "crates/bevy_ui/src/ui_node.rs - ui_node::Style::padding (line 323)", "crates/bevy_ui/src/ui_node.rs - ui_node::Style::margin (line 301)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::bottom (line 523)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,778
bevyengine__bevy-12778
[ "12746" ]
5b746d2b1934fbfc8ed4272befd05544bff6d9c4
diff --git a/crates/bevy_scene/src/bundle.rs b/crates/bevy_scene/src/bundle.rs --- a/crates/bevy_scene/src/bundle.rs +++ b/crates/bevy_scene/src/bundle.rs @@ -16,7 +16,7 @@ use crate::{DynamicScene, InstanceId, Scene, SceneSpawner}; /// [`InstanceId`] of a spawned scene. It can be used with the [`SceneSpawner`] to /// interact with the spawned scene. #[derive(Component, Deref, DerefMut)] -pub struct SceneInstance(InstanceId); +pub struct SceneInstance(pub(crate) InstanceId); /// A component bundle for a [`Scene`] root. /// diff --git a/crates/bevy_scene/src/lib.rs b/crates/bevy_scene/src/lib.rs --- a/crates/bevy_scene/src/lib.rs +++ b/crates/bevy_scene/src/lib.rs @@ -44,7 +44,7 @@ pub mod prelude { } use bevy_app::prelude::*; -use bevy_asset::AssetApp; +use bevy_asset::{AssetApp, Handle}; /// Plugin that provides scene functionality to an [`App`]. #[derive(Default)] diff --git a/crates/bevy_scene/src/lib.rs b/crates/bevy_scene/src/lib.rs --- a/crates/bevy_scene/src/lib.rs +++ b/crates/bevy_scene/src/lib.rs @@ -59,6 +59,37 @@ impl Plugin for ScenePlugin { .add_event::<SceneInstanceReady>() .init_resource::<SceneSpawner>() .add_systems(SpawnScene, (scene_spawner, scene_spawner_system).chain()); + + // Register component hooks for DynamicScene + app.world + .register_component_hooks::<Handle<DynamicScene>>() + .on_remove(|mut world, entity, _| { + let Some(handle) = world.get::<Handle<DynamicScene>>(entity) else { + return; + }; + let id = handle.id(); + if let Some(&SceneInstance(scene_instance)) = world.get::<SceneInstance>(entity) { + let Some(mut scene_spawner) = world.get_resource_mut::<SceneSpawner>() else { + return; + }; + if let Some(instance_ids) = scene_spawner.spawned_dynamic_scenes.get_mut(&id) { + instance_ids.remove(&scene_instance); + } + scene_spawner.despawn_instance(scene_instance); + } + }); + + // Register component hooks for Scene + app.world + .register_component_hooks::<Handle<Scene>>() + .on_remove(|mut world, entity, _| { + if let Some(&SceneInstance(scene_instance)) = world.get::<SceneInstance>(entity) { + let Some(mut scene_spawner) = world.get_resource_mut::<SceneSpawner>() else { + return; + }; + scene_spawner.despawn_instance(scene_instance); + } + }); } } 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 @@ -60,9 +60,8 @@ impl InstanceId { /// - [`despawn_instance`](Self::despawn_instance) #[derive(Default, Resource)] pub struct SceneSpawner { - spawned_scenes: HashMap<AssetId<Scene>, Vec<InstanceId>>, - spawned_dynamic_scenes: HashMap<AssetId<DynamicScene>, Vec<InstanceId>>, - spawned_instances: HashMap<InstanceId, InstanceInfo>, + pub(crate) spawned_dynamic_scenes: HashMap<AssetId<DynamicScene>, HashSet<InstanceId>>, + pub(crate) spawned_instances: HashMap<InstanceId, InstanceInfo>, scene_asset_event_reader: ManualEventReader<AssetEvent<DynamicScene>>, dynamic_scenes_to_spawn: Vec<(Handle<DynamicScene>, InstanceId)>, scenes_to_spawn: Vec<(Handle<Scene>, InstanceId)>, 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 @@ -210,7 +209,7 @@ impl SceneSpawner { self.spawned_instances .insert(instance_id, InstanceInfo { entity_map }); let spawned = self.spawned_dynamic_scenes.entry(id).or_default(); - spawned.push(instance_id); + spawned.insert(instance_id); Ok(instance_id) } 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 @@ -251,8 +250,6 @@ impl SceneSpawner { scene.write_to_world_with(world, &world.resource::<AppTypeRegistry>().clone())?; self.spawned_instances.insert(instance_id, instance_info); - let spawned = self.spawned_scenes.entry(id).or_default(); - spawned.push(instance_id); Ok(instance_id) }) } 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 @@ -310,8 +307,8 @@ impl SceneSpawner { let spawned = self .spawned_dynamic_scenes .entry(handle.id()) - .or_insert_with(Vec::new); - spawned.push(instance_id); + .or_insert_with(HashSet::new); + spawned.insert(instance_id); } Err(SceneSpawnError::NonExistentScene { .. }) => { self.dynamic_scenes_to_spawn.push((handle, instance_id));
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 @@ -443,17 +440,14 @@ pub fn scene_spawner_system(world: &mut World) { mod tests { use bevy_app::App; use bevy_asset::{AssetPlugin, AssetServer}; - use bevy_ecs::component::Component; - use bevy_ecs::entity::Entity; use bevy_ecs::event::EventReader; use bevy_ecs::prelude::ReflectComponent; use bevy_ecs::query::With; - use bevy_ecs::reflect::AppTypeRegistry; use bevy_ecs::system::{Commands, Res, ResMut, RunSystemOnce}; - use bevy_ecs::world::World; + use bevy_ecs::{component::Component, system::Query}; use bevy_reflect::Reflect; - use crate::{DynamicScene, DynamicSceneBuilder, SceneInstanceReady, ScenePlugin, SceneSpawner}; + use crate::{DynamicSceneBuilder, ScenePlugin}; use super::*; 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 @@ -554,4 +548,47 @@ mod tests { }, ); } + + #[test] + fn despawn_scene() { + let mut app = App::new(); + app.add_plugins((AssetPlugin::default(), ScenePlugin)); + app.register_type::<ComponentA>(); + + let asset_server = app.world.resource::<AssetServer>(); + + // Build scene. + let scene = asset_server.add(DynamicScene::default()); + let count = 10; + + // Checks the number of scene instances stored in `SceneSpawner`. + let check = |world: &mut World, expected_count: usize| { + let scene_spawner = world.resource::<SceneSpawner>(); + assert_eq!( + scene_spawner.spawned_dynamic_scenes[&scene.id()].len(), + expected_count + ); + assert_eq!(scene_spawner.spawned_instances.len(), expected_count); + }; + + // Spawn scene. + for _ in 0..count { + app.world.spawn((ComponentA, scene.clone())); + } + + app.update(); + check(&mut app.world, count); + + // Despawn scene. + app.world.run_system_once( + |mut commands: Commands, query: Query<Entity, With<ComponentA>>| { + for entity in query.iter() { + commands.entity(entity).despawn_recursive(); + } + }, + ); + + app.update(); + check(&mut app.world, 0); + } }
Memory Leak When Loading Scenes ## Bevy version bevy = "0.13.0" ## \[Optional\] Relevant system information - cargo 1.78.0-nightly (7065f0ef4 2024-03-12) - MacOS 14.4 (23E214) - Apple M1 CPU - `AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }` - Also tested on Wasm in Firefox with the same result. ## What you did I have been having a problem with a memory leak in my app. Here is a minimal example that reproduces the bug. ```rust use bevy::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .insert_resource(Objects::default()) .add_systems(Startup, setup) .add_systems(Update, update) .run(); } #[derive(Resource, Default)] struct Objects { mesh: Handle<Mesh>, material: Handle<StandardMaterial>, scene: Handle<Scene>, } #[derive(Component)] struct Piece; fn setup( mut commands: Commands, mut objects: ResMut<Objects>, mut meshes: ResMut<Assets<Mesh>>, mut materials: ResMut<Assets<StandardMaterial>>, asset_server: Res<AssetServer>, ) { commands.spawn(Camera3dBundle { transform: Transform::from_xyz(7., 15., -9.5).looking_at(Vec3::ZERO, Vec3::Y), camera: Camera { clear_color: ClearColorConfig::Custom(Color::rgb(0., 0.7, 0.89)), ..default() }, ..default() }); objects.mesh = meshes.add(Cuboid::new(1.0, 1.0, 1.0)); objects.material = materials.add(Color::rgb_u8(124, 144, 255)); objects.scene = asset_server.load(format!("tree_1.glb#Scene0")); } fn update(mut commands: Commands, objects: Res<Objects>, delete_query: Query<Entity, With<Piece>>) { for entity in delete_query.iter() { commands.entity(entity).despawn_recursive(); } for i in 1..1000 { commands .spawn(PbrBundle { mesh: objects.mesh.clone(), material: objects.material.clone(), transform: Transform::from_xyz(0.0, 0.0, i as f32), ..default() }) .insert(Piece); // The previous expression doesn't seem to have an effect // but the memory steadily increases when the following expression is included. commands .spawn(SceneBundle { scene: objects.scene.clone(), transform: Transform::from_xyz(0.0, 1., i as f32).with_scale(Vec3::splat(0.05)), ..Default::default() }) .insert(Piece); } } ``` In other words, entities are cleared and then added again, repeatedly. The problem still happens if there is some time between runs (e.g. once every second) but it just happens a bit slower. ## What went wrong The app memory usage steadily increases. ## Additional information It may be that some part of the loaded scene is not being properly deleted. I am not sure. Potentially related to #9035 but it seems to not be an exclusively MacOS issue, given that I tried it on Wasm as well.
Does the issue still occur if you're running headless without a renderer? The other mentioned issue seems to be related to rendering on MacOS. > Does the issue still occur if you're running headless without a renderer? The other mentioned issue seems to be related to rendering on MacOS. I will test it out. How do I run it headless? I encountered the same issue on Windows 11 with bevy version "0.13.1", which seems to be related to the `SceneSpawner` resource. I attempted to estimate the memory usage of `SceneSpawner` and found that its memory consumption continuously increased. When the program's memory usage reached 500MB, `SceneSpawner` accounted for more than 220MB of it. The following code can be used to reproduce this issue: ```rust use bevy::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .insert_resource(Objects::default()) .add_systems(Startup, setup) .add_systems(Update, update) .run(); } #[derive(Resource, Default)] struct Objects { scene: Handle<Scene>, } #[derive(Component)] struct Piece; fn setup(mut objects: ResMut<Objects>, asset_server: Res<AssetServer>) { objects.scene = asset_server.add(Scene::new(World::new())); } fn update(mut commands: Commands, objects: Res<Objects>, delete_query: Query<Entity, With<Piece>>) { for entity in delete_query.iter() { commands.entity(entity).despawn_recursive(); } for _ in 0..1000 { commands.spawn(( objects.scene.clone(), Piece, )); } } ``` I can confirm that this snippet has the same result. The memory leak stems from the `spawned_instances` field of the `SceneSpawner` never getting cleaned up. A full write-up of what's happening. - When a new scene handle is added to an entity the [`scene_spawner`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/bundle.rs#L70) system [schedules the spawning of the scene](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/bundle.rs#L83) with the `SceneSpawner` resource. - As a result an `InstanceId` is created and is pushed along with the necessary data into [`scenes_to_spawn` and `scenes_with_parent`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L158-L160) - Next the [`scene_spawner_system`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L390) [checks `scenes_with_parent` for despawned parent entities](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L394-L404) and marks down them down. Since our scene parent hasn't been despawned yet, this doesn't yet concern us. - Instead we move on to [spawning all the scene in `scenes_to_spawn`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L429-L431). - Since our scene is not a dynamic scene, it will eventually be spawned with [`spawn_sync_internal`](https://github.com/bevyengine/bevy/blob/main/crates/bevy_scene/src/scene_spawner.rs#L236). Importantly for us and our leak a [`InstanceInfo` is created and pushed into `spawned_instances`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L247-L250). - Moving on to the next time `scene_spawner_system` is triggered. Our code has decided to despawn our scene and the system is about to notice and [write it down](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L399-L401). - Problematically `dead_instances` is only used to [check if the scenes we're about to spawn still exist](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L405-L411) and nothing else. So leak found. Just add something like ```rust dead_instances.into_iter().for_each(|id| scene_spawner.despawn_instance(id)); ``` to `scene_spawner_system` and et voila leak fixed, right? No, you see I lied to you when I said the `scene_spawner_system` would notice our scene parent pair has despawned. The pair is not in `scenes_with_parent` anymore. Why? Let's go back in time to the first time `scene_spawner_system` ran and spawned our scene. - Our scene has [been spawned](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L429-L431) and we're about to run [`set_scene_instance_parent_sync`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L435) which is what breaks our original fix. - You see [`set_scene_instance_parent_sync`](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L335C19-L335C49) will [`mem::take` the `scenes_with_parent` vec](https://github.com/bevyengine/bevy/blob/c223fbb4c8a969991d22d73a33d54842f2495674/crates/bevy_scene/src/scene_spawner.rs#L336) leaving it empty. - So the next time `scene_spawner_system` runs `scenes_with_parent` won't contain our now despawned scene, its InstanceId won't be logged in `dead_instances` and our original fix won't remove anything. As things stand, the fix is unlikely to be trivial, requiring a good understanding of how scene data is passed around the `SceneSpawner`. This write-up took a while and it's getting pretty late here so if anybody wants to take a stab at it I wish you good luck. Do we know when the bug was introduced?
2024-03-29T10:26:14Z
1.77
2024-04-01T21:11:17Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "scene_spawner::tests::despawn_scene" ]
[ "dynamic_scene_builder::tests::extract_one_resource_twice", "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "serde::tests::should_roundtrip_postcard", "dynamic_scene_builder::tests::remove_componentless_entity", "dynamic_scene_builder::tests::should_extract_allowed_components", "scene_filter::tests::should_set_list_type_if_none", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::should_serialize", "dynamic_scene_builder::tests::should_not_extract_denied_resources", "dynamic_scene_builder::tests::should_extract_allowed_resources", "scene_filter::tests::should_remove_from_list", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "scene_filter::tests::should_add_to_list", "serde::tests::should_roundtrip_with_later_generations_and_obsolete_references", "scene_spawner::tests::clone_dynamic_entities", "serde::tests::should_deserialize", "serde::tests::should_roundtrip_bincode", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "bundle::tests::spawn_and_delete", "dynamic_scene_builder::tests::extract_query", "serde::tests::should_roundtrip_messagepack", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_entity", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::should_not_extract_denied_components", "scene_spawner::tests::event", "crates/bevy_scene/src/serde.rs - serde::SceneSerializer (line 38)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 220)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 297)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 40)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,738
bevyengine__bevy-12738
[ "12736" ]
221d925e9098ee3f0c83237e8b96e49b62cebcea
diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -194,14 +194,18 @@ pub fn calculate_bounds_2d( } } for (entity, sprite, texture_handle, atlas) in &sprites_to_recalculate_aabb { - if let Some(size) = sprite.custom_size.or_else(|| match atlas { - // We default to the texture size for regular sprites - None => images.get(texture_handle).map(|image| image.size_f32()), - // We default to the drawn rect for atlas sprites - Some(atlas) => atlas - .texture_rect(&atlases) - .map(|rect| rect.size().as_vec2()), - }) { + if let Some(size) = sprite + .custom_size + .or_else(|| sprite.rect.map(|rect| rect.size())) + .or_else(|| match atlas { + // We default to the texture size for regular sprites + None => images.get(texture_handle).map(|image| image.size_f32()), + // We default to the drawn rect for atlas sprites + Some(atlas) => atlas + .texture_rect(&atlases) + .map(|rect| rect.size().as_vec2()), + }) + { let aabb = Aabb { center: (-sprite.anchor.as_vec() * size).extend(0.0).into(), half_extents: (0.5 * size).extend(0.0).into(),
diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -226,7 +230,7 @@ impl ExtractComponent for SpriteSource { #[cfg(test)] mod test { - use bevy_math::Vec2; + use bevy_math::{Rect, Vec2, Vec3A}; use bevy_utils::default; use super::*; diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -336,4 +340,52 @@ mod test { // Check that the AABBs are not equal assert_ne!(first_aabb, second_aabb); } + + #[test] + fn calculate_bounds_2d_correct_aabb_for_sprite_with_custom_rect() { + // Setup app + let mut app = App::new(); + + // Add resources and get handle to image + let mut image_assets = Assets::<Image>::default(); + let image_handle = image_assets.add(Image::default()); + app.insert_resource(image_assets); + let mesh_assets = Assets::<Mesh>::default(); + app.insert_resource(mesh_assets); + let texture_atlas_assets = Assets::<TextureAtlasLayout>::default(); + app.insert_resource(texture_atlas_assets); + + // Add system + app.add_systems(Update, calculate_bounds_2d); + + // Add entities + let entity = app + .world_mut() + .spawn(( + Sprite { + rect: Some(Rect::new(0., 0., 0.5, 1.)), + anchor: Anchor::TopRight, + ..default() + }, + image_handle, + )) + .id(); + + // Create AABB + app.update(); + + // Get the AABB + let aabb = *app + .world_mut() + .get_entity(entity) + .expect("Could not find entity") + .get::<Aabb>() + .expect("Could not find AABB"); + + // Verify that the AABB is at the expected position + assert_eq!(aabb.center, Vec3A::new(-0.25, -0.5, 0.)); + + // Verify that the AABB has the expected size + assert_eq!(aabb.half_extents, Vec3A::new(0.25, 0.5, 0.)); + } }
Sprite with rect and custom anchor doesn't render when it should ## Bevy version 0.13.0 and b7ab1466c7ac2c6f20a37e47db9b8d889a940611 ## Relevant system information ```ignore `AdapterInfo { name: "Intel(R) Xe Graphics (TGL GT2)", vendor: 32902, device: 39497, device_type: Integrate dGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 22.2.5-0ubuntu0.1~22.04.3", backend: Vulkan }` ``` ## What you did I have a sprite that has both a custom anchor (outside of the range -0.5..0.5) and a rect. See this minimal example: ```rs use bevy::{prelude::*, sprite::Anchor}; fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, setup) .add_systems(Update, update_camera) .run(); } fn setup(mut commands: Commands, asset_server: Res<AssetServer>) { commands.spawn(Camera2dBundle::default()); commands.spawn(SpriteBundle { texture: asset_server.load("branding/bevy_bird_dark.png"), sprite: Sprite { anchor: Anchor::Custom(Vec2::new(1., 1.)), rect: Some(Rect::new(0.0, 0.0, 150., 150.)), ..default() }, ..default() }); } fn update_camera( keyboard: Res<ButtonInput<KeyCode>>, time: Res<Time>, mut listeners: Query<&mut Transform, With<Camera>>, ) { let mut transform = listeners.single_mut(); let speed = 200.; if keyboard.pressed(KeyCode::ArrowRight) { transform.translation.x += speed * time.delta_seconds(); } if keyboard.pressed(KeyCode::ArrowLeft) { transform.translation.x -= speed * time.delta_seconds(); } if keyboard.pressed(KeyCode::ArrowUp) { transform.translation.y += speed * time.delta_seconds(); } if keyboard.pressed(KeyCode::ArrowDown) { transform.translation.y -= speed * time.delta_seconds(); } } ``` ## What went wrong It doesn't render the sprite when the camera is almost out of view of the sprite.
2024-03-26T19:40:47Z
1.77
2024-04-16T16:50:34Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "test::calculate_bounds_2d_correct_aabb_for_sprite_with_custom_rect" ]
[ "test::calculate_bounds_2d_create_aabb_for_image_sprite_entity", "test::calculate_bounds_2d_update_aabb_when_sprite_custom_size_changes_to_some", "crates/bevy_sprite/src/mesh2d/material.rs - mesh2d::material::Material2d (line 54)", "crates/bevy_sprite/src/texture_atlas_builder.rs - texture_atlas_builder::TextureAtlasBuilder<'a>::finish (line 160)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,715
bevyengine__bevy-12715
[ "9520" ]
56bcbb097552b45e3ff48c48947ed8ee4e2c24b1
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 @@ -5,7 +5,7 @@ use bevy_ecs::{ reflect::{AppTypeRegistry, ReflectComponent, ReflectMapEntities}, world::World, }; -use bevy_reflect::{Reflect, TypePath, TypeRegistryArc}; +use bevy_reflect::{Reflect, TypePath, TypeRegistry}; use bevy_utils::TypeIdMap; #[cfg(feature = "serialize")] 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 @@ -171,9 +171,15 @@ impl DynamicScene { } // TODO: move to AssetSaver when it is implemented - /// Serialize this dynamic scene into rust object notation (ron). + /// Serialize this dynamic scene into the official Bevy scene format (`.scn` / `.scn.ron`). + /// + /// The Bevy scene format is based on [Rusty Object Notation (RON)]. It describes the scene + /// in a human-friendly format. To deserialize the scene, use the [`SceneLoader`]. + /// + /// [`SceneLoader`]: crate::SceneLoader + /// [Rusty Object Notation (RON)]: https://crates.io/crates/ron #[cfg(feature = "serialize")] - pub fn serialize_ron(&self, registry: &TypeRegistryArc) -> Result<String, ron::Error> { + pub fn serialize(&self, registry: &TypeRegistry) -> Result<String, ron::Error> { serialize_ron(SceneSerializer::new(self, registry)) } } diff --git a/crates/bevy_scene/src/scene_loader.rs b/crates/bevy_scene/src/scene_loader.rs --- a/crates/bevy_scene/src/scene_loader.rs +++ b/crates/bevy_scene/src/scene_loader.rs @@ -10,7 +10,9 @@ use bevy_reflect::TypeRegistryArc; use serde::de::DeserializeSeed; use thiserror::Error; -/// [`AssetLoader`] for loading serialized Bevy scene files as [`DynamicScene`]. +/// Asset loader for a Bevy dynamic scene (`.scn` / `.scn.ron`). +/// +/// The loader handles assets serialized with [`DynamicScene::serialize`]. #[derive(Debug)] pub struct SceneLoader { type_registry: TypeRegistryArc, diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -5,7 +5,7 @@ use bevy_ecs::entity::Entity; use bevy_reflect::serde::{TypedReflectDeserializer, TypedReflectSerializer}; use bevy_reflect::{ serde::{ReflectDeserializer, TypeRegistrationDeserializer}, - Reflect, TypeRegistry, TypeRegistryArc, + Reflect, TypeRegistry, }; use bevy_utils::HashSet; use serde::ser::SerializeMap; diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -114,7 +101,7 @@ pub struct EntitiesSerializer<'a> { /// The entities to serialize. pub entities: &'a [DynamicEntity], /// Type registry in which the component types used by the entities are registered. - pub registry: &'a TypeRegistryArc, + pub registry: &'a TypeRegistry, } impl<'a> Serialize for EntitiesSerializer<'a> { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -141,7 +128,7 @@ pub struct EntitySerializer<'a> { /// The entity to serialize. pub entity: &'a DynamicEntity, /// Type registry in which the component types used by the entity are registered. - pub registry: &'a TypeRegistryArc, + pub registry: &'a TypeRegistry, } impl<'a> Serialize for EntitySerializer<'a> { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -170,7 +157,7 @@ pub struct SceneMapSerializer<'a> { /// List of boxed values of unique type to serialize. pub entries: &'a [Box<dyn Reflect>], /// Type registry in which the types used in `entries` are registered. - pub registry: &'a TypeRegistryArc, + pub registry: &'a TypeRegistry, } impl<'a> Serialize for SceneMapSerializer<'a> { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -182,7 +169,7 @@ impl<'a> Serialize for SceneMapSerializer<'a> { for reflect in self.entries { state.serialize_entry( reflect.get_represented_type_info().unwrap().type_path(), - &TypedReflectSerializer::new(&**reflect, &self.registry.read()), + &TypedReflectSerializer::new(&**reflect, self.registry), )?; } state.end() diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -125,7 +125,8 @@ fn save_scene_system(world: &mut World) { // Scenes can be serialized like this: let type_registry = world.resource::<AppTypeRegistry>(); - let serialized_scene = scene.serialize_ron(type_registry).unwrap(); + let type_registry = type_registry.read(); + let serialized_scene = scene.serialize(&type_registry).unwrap(); // Showing the scene in the console info!("{}", serialized_scene);
diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -28,59 +28,46 @@ pub const ENTITY_STRUCT: &str = "Entity"; /// Name of the serialized component field in an entity struct. pub const ENTITY_FIELD_COMPONENTS: &str = "components"; -/// Handles serialization of a scene as a struct containing its entities and resources. +/// Serializer for a [`DynamicScene`]. /// -/// # Examples +/// Helper object defining Bevy's serialize format for a [`DynamicScene`] and implementing +/// the [`Serialize`] trait for use with Serde. /// -/// ``` -/// # use bevy_scene::{serde::SceneSerializer, DynamicScene}; -/// # use bevy_ecs::{ -/// # prelude::{Component, World}, -/// # reflect::{AppTypeRegistry, ReflectComponent}, -/// # }; -/// # use bevy_reflect::Reflect; -/// // Define an example component type. -/// #[derive(Component, Reflect, Default)] -/// #[reflect(Component)] -/// struct MyComponent { -/// foo: [usize; 3], -/// bar: (f32, f32), -/// baz: String, -/// } -/// -/// // Create our world, provide it with a type registry. -/// // Normally, [`App`] handles providing the type registry. -/// let mut world = World::new(); -/// let registry = AppTypeRegistry::default(); -/// { -/// let mut registry = registry.write(); -/// // Register our component. Primitives and String are registered by default. -/// // Sequence types are automatically handled. -/// registry.register::<MyComponent>(); -/// } -/// world.insert_resource(registry); -/// world.spawn(MyComponent { -/// foo: [1, 2, 3], -/// bar: (1.3, 3.7), -/// baz: String::from("test"), -/// }); +/// # Example /// -/// // Print out our serialized scene in the RON format. +/// ``` +/// # use bevy_ecs::prelude::*; +/// # use bevy_scene::{DynamicScene, serde::SceneSerializer}; +/// # let mut world = World::default(); +/// # world.insert_resource(AppTypeRegistry::default()); +/// // Get the type registry /// let registry = world.resource::<AppTypeRegistry>(); +/// let registry = registry.read(); +/// +/// // Get a DynamicScene to serialize, for example from the World itself /// let scene = DynamicScene::from_world(&world); -/// let scene_serializer = SceneSerializer::new(&scene, &registry.0); -/// println!("{}", bevy_scene::serialize_ron(scene_serializer).unwrap()); +/// +/// // Create a serializer for that DynamicScene, using the associated TypeRegistry +/// let scene_serializer = SceneSerializer::new(&scene, &registry); +/// +/// // Serialize through any serde-compatible Serializer +/// let ron_string = bevy_scene::ron::ser::to_string(&scene_serializer); /// ``` pub struct SceneSerializer<'a> { /// The scene to serialize. pub scene: &'a DynamicScene, - /// Type registry in which the components and resources types used in the scene are registered. - pub registry: &'a TypeRegistryArc, + /// The type registry containing the types present in the scene. + pub registry: &'a TypeRegistry, } impl<'a> SceneSerializer<'a> { - /// Creates a scene serializer. - pub fn new(scene: &'a DynamicScene, registry: &'a TypeRegistryArc) -> Self { + /// Create a new serializer from a [`DynamicScene`] and an associated [`TypeRegistry`]. + /// + /// The type registry must contain all types present in the scene. This is generally the case + /// if you obtain both the scene and the registry from the same [`World`]. + /// + /// [`World`]: bevy_ecs::world::World + pub fn new(scene: &'a DynamicScene, registry: &'a TypeRegistry) -> Self { SceneSerializer { scene, registry } } } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -624,7 +611,7 @@ mod tests { }, )"#; let output = scene - .serialize_ron(&world.resource::<AppTypeRegistry>().0) + .serialize(&world.resource::<AppTypeRegistry>().read()) .unwrap(); assert_eq!(expected, output); } diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -707,7 +694,7 @@ mod tests { let scene = DynamicScene::from_world(&world); let serialized = scene - .serialize_ron(&world.resource::<AppTypeRegistry>().0) + .serialize(&world.resource::<AppTypeRegistry>().read()) .unwrap(); let mut deserializer = ron::de::Deserializer::from_str(&serialized).unwrap(); let scene_deserializer = SceneDeserializer { diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -753,10 +740,11 @@ mod tests { }); let registry = world.resource::<AppTypeRegistry>(); + let registry = &registry.read(); let scene = DynamicScene::from_world(&world); - let scene_serializer = SceneSerializer::new(&scene, &registry.0); + let scene_serializer = SceneSerializer::new(&scene, registry); let serialized_scene = postcard::to_allocvec(&scene_serializer).unwrap(); assert_eq!( diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -770,7 +758,7 @@ mod tests { ); let scene_deserializer = SceneDeserializer { - type_registry: &registry.0.read(), + type_registry: registry, }; let deserialized_scene = scene_deserializer .deserialize(&mut postcard::Deserializer::from_bytes(&serialized_scene)) diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -791,10 +779,11 @@ mod tests { }); let registry = world.resource::<AppTypeRegistry>(); + let registry = &registry.read(); let scene = DynamicScene::from_world(&world); - let scene_serializer = SceneSerializer::new(&scene, &registry.0); + let scene_serializer = SceneSerializer::new(&scene, registry); let mut buf = Vec::new(); let mut ser = rmp_serde::Serializer::new(&mut buf); scene_serializer.serialize(&mut ser).unwrap(); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -811,7 +800,7 @@ mod tests { ); let scene_deserializer = SceneDeserializer { - type_registry: &registry.0.read(), + type_registry: registry, }; let mut reader = BufReader::new(buf.as_slice()); diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -834,10 +823,11 @@ mod tests { }); let registry = world.resource::<AppTypeRegistry>(); + let registry = &registry.read(); let scene = DynamicScene::from_world(&world); - let scene_serializer = SceneSerializer::new(&scene, &registry.0); + let scene_serializer = SceneSerializer::new(&scene, registry); let serialized_scene = bincode::serialize(&scene_serializer).unwrap(); assert_eq!( diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -853,7 +843,7 @@ mod tests { ); let scene_deserializer = SceneDeserializer { - type_registry: &registry.0.read(), + type_registry: registry, }; let deserialized_scene = bincode::DefaultOptions::new()
SceneSerializer needlessly uses specifically &TypeRegistryArc Present in Bevy 0.11.2, and current commit hash `d96933ad9cfc492767ce4f2a0fd239ee109e0375` This is more of a code API issue. I'm unsure what issue type to use, so I hope this suffices. I'm trying to implement my own functionality that abstracts over and does stuff with scene serializers and deserializers. In particular, right now I'm trying to reduce the amount of needless unlocks of the `RwLock` in the `TypeRegistryArc` type by passing around and using `&TypeRegistry` when relevant. However, I just ran into an issue. `SceneSerializer` type stores a `&TypeRegistryArc` specifically: https://github.com/bevyengine/bevy/blob/d96933ad9cfc492767ce4f2a0fd239ee109e0375/crates/bevy_scene/src/serde.rs#L25-L28 On serialization, this type is passed through all the other scene serializing types, and the only place where it appears to be actually used in this mechanism is in `SceneMapSerializer`, which then... reads it: https://github.com/bevyengine/bevy/blob/d96933ad9cfc492767ce4f2a0fd239ee109e0375/crates/bevy_scene/src/serde.rs#L120 If I'm reading the code right, this repeatedly acquires and then drops the RwLock read guard for every list of stuff in the scene. I imagine this is a fair bit inefficient, compared to acquiring it once for the entire serialization operation. Moreover, the code there does that acquire only to stuff the value into the next serializer in the chain, `TypedReflectSerializer`, which itself holds a `&TypeRegistry`. In the same source file, `SceneDeserializer` and its deserializing types instead hold a `&TypeRegistry` too, and you have to acquire the RwLock read guard to use it. Between the SceneSer- and SceneDe- types, this feels inconsistent. I don't imagine this is done to allow someone to write to the type registry inbetween two different scene maps being serialized, as I imagine it's rare that it would be edited during runtime. However if that is the intention, it may be worth making the `SceneDeserializer` types also do that, for consistency?
2024-03-25T19:40:47Z
1.77
2024-03-29T07:59:06Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "dynamic_scene_builder::tests::extract_one_resource", "dynamic_scene_builder::tests::extract_entity_order", "dynamic_scene_builder::tests::extract_one_resource_twice", "dynamic_scene_builder::tests::extract_one_entity_two_components", "dynamic_scene_builder::tests::extract_one_entity_twice", "dynamic_scene_builder::tests::extract_one_entity", "scene_filter::tests::should_add_to_list", "dynamic_scene_builder::tests::extract_query", "dynamic_scene::tests::components_not_defined_in_scene_should_not_be_affected_by_scene_entity_map", "dynamic_scene_builder::tests::should_extract_allowed_components", "scene_filter::tests::should_remove_from_list", "scene_filter::tests::should_set_list_type_if_none", "dynamic_scene_builder::tests::should_extract_allowed_resources", "dynamic_scene_builder::tests::should_not_extract_denied_components", "dynamic_scene_builder::tests::should_not_extract_denied_resources", "dynamic_scene_builder::tests::remove_componentless_entity", "scene_spawner::tests::clone_dynamic_entities", "serde::tests::assert_scene_eq_tests::should_panic_when_components_not_eq - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_missing_component - should panic", "serde::tests::assert_scene_eq_tests::should_panic_when_entity_count_not_eq - should panic", "serde::tests::should_roundtrip_messagepack", "serde::tests::should_roundtrip_postcard", "serde::tests::should_roundtrip_bincode", "serde::tests::should_serialize", "serde::tests::should_deserialize", "serde::tests::should_roundtrip_with_later_generations_and_obsolete_references", "scene_spawner::tests::event", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_entities (line 220)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder (line 40)", "crates/bevy_scene/src/dynamic_scene_builder.rs - dynamic_scene_builder::DynamicSceneBuilder<'w>::extract_resources (line 297)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,709
bevyengine__bevy-12709
[ "12667" ]
ba8d70288d178183f3e58aa010b4747490efd0fe
diff --git a/crates/bevy_asset/src/io/mod.rs b/crates/bevy_asset/src/io/mod.rs --- a/crates/bevy_asset/src/io/mod.rs +++ b/crates/bevy_asset/src/io/mod.rs @@ -49,6 +49,21 @@ pub enum AssetReaderError { HttpError(u16), } +impl PartialEq for AssetReaderError { + /// Equality comparison for `AssetReaderError::Io` is not full (only through `ErrorKind` of inner error) + #[inline] + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::NotFound(path), Self::NotFound(other_path)) => path == other_path, + (Self::Io(error), Self::Io(other_error)) => error.kind() == other_error.kind(), + (Self::HttpError(code), Self::HttpError(other_code)) => code == other_code, + _ => false, + } + } +} + +impl Eq for AssetReaderError {} + impl From<std::io::Error> for AssetReaderError { fn from(value: std::io::Error) -> Self { Self::Io(Arc::new(value)) diff --git a/crates/bevy_asset/src/io/source.rs b/crates/bevy_asset/src/io/source.rs --- a/crates/bevy_asset/src/io/source.rs +++ b/crates/bevy_asset/src/io/source.rs @@ -584,7 +584,7 @@ impl AssetSources { } /// An error returned when an [`AssetSource`] does not exist for a given id. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] #[error("Asset Source '{0}' does not exist")] pub struct MissingAssetSourceError(AssetSourceId<'static>); diff --git a/crates/bevy_asset/src/io/source.rs b/crates/bevy_asset/src/io/source.rs --- a/crates/bevy_asset/src/io/source.rs +++ b/crates/bevy_asset/src/io/source.rs @@ -594,7 +594,7 @@ pub struct MissingAssetSourceError(AssetSourceId<'static>); pub struct MissingAssetWriterError(AssetSourceId<'static>); /// An error returned when a processed [`AssetReader`] does not exist for a given id. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] #[error("Asset Source '{0}' does not have a processed AssetReader.")] pub struct MissingProcessedAssetReaderError(AssetSourceId<'static>); diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -257,7 +257,7 @@ pub struct LoadDirectError { } /// An error that occurs while deserializing [`AssetMeta`]. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum DeserializeMetaError { #[error("Failed to deserialize asset meta: {0:?}")] DeserializeSettings(#[from] SpannedError), diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -1203,10 +1203,8 @@ impl ProcessorAssetInfos { Err(err) => { error!("Failed to process asset {asset_path}: {err}"); // if this failed because a dependency could not be loaded, make sure it is reprocessed if that dependency is reprocessed - if let ProcessError::AssetLoadError(AssetLoadError::AssetLoaderError { - path: dependency, - .. - }) = err + if let ProcessError::AssetLoadError(AssetLoadError::AssetLoaderError(dependency)) = + err { let info = self.get_mut(&asset_path).expect("info should exist"); info.processed_info = Some(ProcessedInfo { diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -1214,7 +1212,7 @@ impl ProcessorAssetInfos { full_hash: AssetHash::default(), process_dependencies: vec![], }); - self.add_dependant(&dependency, asset_path.to_owned()); + self.add_dependant(dependency.path(), asset_path.to_owned()); } let info = self.get_mut(&asset_path).expect("info should exist"); diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -212,8 +212,7 @@ impl AssetInfos { let mut should_load = false; if loading_mode == HandleLoadingMode::Force || (loading_mode == HandleLoadingMode::Request - && (info.load_state == LoadState::NotLoaded - || info.load_state == LoadState::Failed)) + && matches!(info.load_state, LoadState::NotLoaded | LoadState::Failed(_))) { info.load_state = LoadState::Loading; info.dep_load_state = DependencyLoadState::Loading; diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -412,7 +411,7 @@ impl AssetInfos { // If dependency is loaded, reduce our count by one false } - LoadState::Failed => { + LoadState::Failed(_) => { failed_deps.insert(*dep_id); false } diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -582,12 +581,12 @@ impl AssetInfos { } } - pub(crate) fn process_asset_fail(&mut self, failed_id: UntypedAssetId) { + pub(crate) fn process_asset_fail(&mut self, failed_id: UntypedAssetId, error: AssetLoadError) { let (dependants_waiting_on_load, dependants_waiting_on_rec_load) = { let info = self .get_mut(failed_id) .expect("Asset info should always exist at this point"); - info.load_state = LoadState::Failed; + info.load_state = LoadState::Failed(Box::new(error)); info.dep_load_state = DependencyLoadState::Failed; info.rec_dep_load_state = RecursiveDependencyLoadState::Failed; ( diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -26,7 +26,7 @@ use futures_lite::StreamExt; use info::*; use loaders::*; use parking_lot::RwLock; -use std::path::PathBuf; +use std::{any::Any, path::PathBuf}; use std::{any::TypeId, path::Path, sync::Arc}; use thiserror::Error; diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -754,7 +754,7 @@ impl AssetServer { .infos .read() .get(id.into()) - .map(|i| (i.load_state, i.dep_load_state, i.rec_dep_load_state)) + .map(|i| (i.load_state.clone(), i.dep_load_state, i.rec_dep_load_state)) } /// Retrieves the main [`LoadState`] of a given asset `id`. diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -762,7 +762,11 @@ impl AssetServer { /// Note that this is "just" the root asset load state. To check if an asset _and_ its recursive /// dependencies have loaded, see [`AssetServer::is_loaded_with_dependencies`]. pub fn get_load_state(&self, id: impl Into<UntypedAssetId>) -> Option<LoadState> { - self.data.infos.read().get(id.into()).map(|i| i.load_state) + self.data + .infos + .read() + .get(id.into()) + .map(|i| i.load_state.clone()) } /// Retrieves the [`RecursiveDependencyLoadState`] of a given asset `id`. diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1041,11 +1045,11 @@ impl AssetServer { let load_context = LoadContext::new(self, asset_path.clone(), load_dependencies, populate_hashes); loader.load(reader, meta, load_context).await.map_err(|e| { - AssetLoadError::AssetLoaderError { + AssetLoadError::AssetLoaderError(AssetLoaderError { path: asset_path.clone_owned(), loader_name: loader.type_name(), error: e.into(), - } + }) }) } } diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1073,7 +1077,7 @@ pub fn handle_internal_asset_events(world: &mut World) { sender(world, id); } InternalAssetEvent::Failed { id, path, error } => { - infos.process_asset_fail(id); + infos.process_asset_fail(id, error.clone()); // Send untyped failure event untyped_failures.push(UntypedAssetLoadFailedEvent { diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1190,7 +1194,7 @@ pub(crate) enum InternalAssetEvent { } /// The load state of an asset. -#[derive(Component, Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Component, Clone, Debug, PartialEq, Eq)] pub enum LoadState { /// The asset has not started loading yet NotLoaded, diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1199,7 +1203,7 @@ pub enum LoadState { /// The asset has been loaded and has been added to the [`World`] Loaded, /// The asset failed to load. - Failed, + Failed(Box<AssetLoadError>), } /// The load state of an asset's dependencies. diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1229,7 +1233,7 @@ pub enum RecursiveDependencyLoadState { } /// An error that occurs during an [`Asset`] load. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum AssetLoadError { #[error("Requested handle of type {requested:?} for asset '{path}' does not match actual asset type '{actual_asset_name}', which used loader '{loader_name}'")] RequestedHandleTypeMismatch { diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1268,12 +1272,8 @@ pub enum AssetLoadError { CannotLoadProcessedAsset { path: AssetPath<'static> }, #[error("Asset '{path}' is configured to be ignored. It cannot be loaded.")] CannotLoadIgnoredAsset { path: AssetPath<'static> }, - #[error("Failed to load asset '{path}' with asset loader '{loader_name}': {error}")] - AssetLoaderError { - path: AssetPath<'static>, - loader_name: &'static str, - error: Arc<dyn std::error::Error + Send + Sync + 'static>, - }, + #[error(transparent)] + AssetLoaderError(#[from] AssetLoaderError), #[error("The file at '{}' does not contain the labeled asset '{}'; it contains the following {} assets: {}", base_path, label, diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1286,22 +1286,48 @@ pub enum AssetLoadError { }, } -/// An error that occurs when an [`AssetLoader`] is not registered for a given extension. #[derive(Error, Debug, Clone)] +#[error("Failed to load asset '{path}' with asset loader '{loader_name}': {error}")] +pub struct AssetLoaderError { + path: AssetPath<'static>, + loader_name: &'static str, + error: Arc<dyn std::error::Error + Send + Sync + 'static>, +} + +impl PartialEq for AssetLoaderError { + /// Equality comparison for `AssetLoaderError::error` is not full (only through `TypeId`) + #[inline] + fn eq(&self, other: &Self) -> bool { + self.path == other.path + && self.loader_name == other.loader_name + && self.error.type_id() == other.error.type_id() + } +} + +impl Eq for AssetLoaderError {} + +impl AssetLoaderError { + pub fn path(&self) -> &AssetPath<'static> { + &self.path + } +} + +/// An error that occurs when an [`AssetLoader`] is not registered for a given extension. +#[derive(Error, Debug, Clone, PartialEq, Eq)] #[error("no `AssetLoader` found{}", format_missing_asset_ext(.extensions))] pub struct MissingAssetLoaderForExtensionError { extensions: Vec<String>, } /// An error that occurs when an [`AssetLoader`] is not registered for a given [`std::any::type_name`]. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] #[error("no `AssetLoader` found with the name '{type_name}'")] pub struct MissingAssetLoaderForTypeNameError { type_name: String, } /// An error that occurs when an [`AssetLoader`] is not registered for a given [`Asset`] [`TypeId`]. -#[derive(Error, Debug, Clone)] +#[derive(Error, Debug, Clone, PartialEq, Eq)] #[error("no `AssetLoader` found with the ID '{type_id:?}'")] pub struct MissingAssetLoaderForTypeIdError { pub type_id: TypeId,
diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1067,13 +1067,13 @@ mod tests { let d_id = c_text.dependencies[0].id(); let d_text = get::<CoolText>(world, d_id); let (d_load, d_deps, d_rec_deps) = asset_server.get_load_states(d_id).unwrap(); - if d_load != LoadState::Failed { + if !matches!(d_load, LoadState::Failed(_)) { // wait until d has exited the loading state return None; } assert!(d_text.is_none()); - assert_eq!(d_load, LoadState::Failed); + assert!(matches!(d_load, LoadState::Failed(_))); assert_eq!(d_deps, DependencyLoadState::Failed); assert_eq!(d_rec_deps, RecursiveDependencyLoadState::Failed); diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1380,7 +1380,7 @@ mod tests { // Check what just failed for error in errors.read() { let (load_state, _, _) = server.get_load_states(error.id).unwrap(); - assert_eq!(load_state, LoadState::Failed); + assert!(matches!(load_state, LoadState::Failed(_))); assert_eq!(*error.path.source(), AssetSourceId::Name("unstable".into())); match &error.error { AssetLoadError::AssetReaderError(read_error) => match read_error {
bevy_asset `LoadState` should contain more useful information in its `Failed` arm ## What problem does this solve or what need does it fill? When checking if the required asset are loaded, I'll call `asset_server.get_load_state(handle)` to check if my assets are loaded yet. If it fails, I would like to report a detailed error to the user / developer, so they can troubleshoot the problem. Instead, I simply get `LoadState::Failed`, with no information. ## What solution would you like? Store [`AssetLoadError`](https://docs.rs/bevy/latest/bevy/asset/enum.AssetLoadError.html) inside of [`LoadState::Failed`](https://docs.rs/bevy/latest/bevy/asset/enum.LoadState.html). This may be wise to store as a `Box<AssetLoadError>` to avoid bloating the size of all variants of `LoadState`. ## What alternative(s) have you considered? I could listen to the `AssetLoadFailedEvent<A: Asset>`, and log those as they occurred. This is not as convenient (or easy to correlate), and won't work for untyped asset loading solutions.
2024-03-25T16:22:45Z
1.77
2024-06-03T20:35:54Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "assets::test::asset_index_round_trip", "handle::tests::conversion", "handle::tests::ordering", "handle::tests::equality", "id::tests::conversion", "id::tests::equality", "handle::tests::hashing", "id::tests::hashing", "id::tests::ordering", "io::embedded::tests::embedded_asset_path_from_external_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_is_ambiguous", "io::embedded::tests::embedded_asset_path_from_external_crate_root_src_path", "io::embedded::tests::embedded_asset_path_from_local_crate", "io::embedded::tests::embedded_asset_path_from_external_crate_extraneous_beginning_slashes - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_bad_src - should panic", "io::embedded::tests::embedded_asset_path_from_local_crate_blank_src_path_questionable", "io::embedded::tests::embedded_asset_path_from_local_example_crate", "path::tests::test_get_extension", "path::tests::parse_asset_path", "path::tests::test_parent", "path::tests::test_resolve_absolute", "path::tests::test_resolve_asset_source", "path::tests::test_resolve_canonicalize", "path::tests::test_resolve_canonicalize_base", "io::memory::test::memory_dir", "path::tests::test_resolve_explicit_relative", "path::tests::test_resolve_canonicalize_with_source", "path::tests::test_resolve_implicit_relative", "path::tests::test_resolve_full", "path::tests::test_resolve_insufficient_elements", "path::tests::test_resolve_label", "path::tests::test_resolve_trailing_slash", "path::tests::test_with_source", "path::tests::test_without_label", "server::loaders::tests::basic", "server::loaders::tests::ambiguity_resolution", "server::loaders::tests::extension_resolution", "server::loaders::tests::path_resolution", "server::loaders::tests::type_resolution", "server::loaders::tests::type_resolution_shadow", "server::loaders::tests::total_resolution", "tests::keep_gotten_strong_handles", "tests::manual_asset_management", "tests::load_folder", "tests::failure_load_states", "tests::load_dependencies", "crates/bevy_asset/src/reflect.rs - reflect::ReflectHandle (line 182) - compile", "crates/bevy_asset/src/io/embedded/mod.rs - io::embedded::embedded_asset (line 182) - compile", "crates/bevy_asset/src/reflect.rs - reflect::ReflectAsset::get_unchecked_mut (line 65) - compile", "crates/bevy_asset/src/loader.rs - loader::LoadContext<'a>::begin_labeled_asset (line 310) - compile", "crates/bevy_asset/src/path.rs - path::AssetPath (line 24) - compile", "crates/bevy_asset/src/server/mod.rs - server::AssetServer::load_untyped (line 332)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve (line 340)", "crates/bevy_asset/src/path.rs - path::AssetPath<'a>::resolve_embed (line 390)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,574
bevyengine__bevy-12574
[ "12570" ]
7c7d1e8a6442a4258896b6c605beb1bf50399396
diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -2,6 +2,7 @@ use std::{ fmt::Debug, + iter::once, ops::{Add, Div, Mul, Sub}, }; diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -172,7 +173,8 @@ impl<P: Point> CubicGenerator<P> for CubicHermite<P> { } /// A spline interpolated continuously across the nearest four control points, with the position of -/// the curve specified at every control point and the tangents computed automatically. +/// the curve specified at every control point and the tangents computed automatically. The associated [`CubicCurve`] +/// has one segment between each pair of adjacent control points. /// /// **Note** the Catmull-Rom spline is a special case of Cardinal spline where the tension is 0.5. /// diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -183,8 +185,8 @@ impl<P: Point> CubicGenerator<P> for CubicHermite<P> { /// Tangents are automatically computed based on the positions of control points. /// /// ### Continuity -/// The curve is at minimum C0 continuous, meaning it has no holes or jumps. It is also C1, meaning the -/// tangent vector has no sudden jumps. +/// The curve is at minimum C1, meaning that it is continuous (it has no holes or jumps), and its tangent +/// vector is also well-defined everywhere, without sudden jumps. /// /// ### Usage /// diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -232,10 +234,28 @@ impl<P: Point> CubicGenerator<P> for CubicCardinalSpline<P> { [-s, 2. - s, s - 2., s], ]; - let segments = self - .control_points + let length = self.control_points.len(); + + // Early return to avoid accessing an invalid index + if length < 2 { + return CubicCurve { segments: vec![] }; + } + + // Extend the list of control points by mirroring the last second-to-last control points on each end; + // this allows tangents for the endpoints to be provided, and the overall effect is that the tangent + // at an endpoint is proportional to twice the vector between it and its adjacent control point. + // + // The expression used here is P_{-1} := P_0 - (P_1 - P_0) = 2P_0 - P_1. (Analogously at the other end.) + let mirrored_first = self.control_points[0] * 2. - self.control_points[1]; + let mirrored_last = self.control_points[length - 1] * 2. - self.control_points[length - 2]; + let extended_control_points = once(&mirrored_first) + .chain(self.control_points.iter()) + .chain(once(&mirrored_last)) + .collect::<Vec<_>>(); + + let segments = extended_control_points .windows(4) - .map(|p| CubicSegment::coefficients([p[0], p[1], p[2], p[3]], char_matrix)) + .map(|p| CubicSegment::coefficients([*p[0], *p[1], *p[2], *p[3]], char_matrix)) .collect(); CubicCurve { segments }
diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -1275,6 +1295,37 @@ mod tests { assert_eq!(bezier.ease(1.0), 1.0); } + /// Test that a simple cardinal spline passes through all of its control points with + /// the correct tangents. + #[test] + fn cardinal_control_pts() { + use super::CubicCardinalSpline; + + let tension = 0.2; + let [p0, p1, p2, p3] = [vec2(-1., -2.), vec2(0., 1.), vec2(1., 2.), vec2(-2., 1.)]; + let curve = CubicCardinalSpline::new(tension, [p0, p1, p2, p3]).to_curve(); + + // Positions at segment endpoints + assert!(curve.position(0.).abs_diff_eq(p0, FLOAT_EQ)); + assert!(curve.position(1.).abs_diff_eq(p1, FLOAT_EQ)); + assert!(curve.position(2.).abs_diff_eq(p2, FLOAT_EQ)); + assert!(curve.position(3.).abs_diff_eq(p3, FLOAT_EQ)); + + // Tangents at segment endpoints + assert!(curve + .velocity(0.) + .abs_diff_eq((p1 - p0) * tension * 2., FLOAT_EQ)); + assert!(curve + .velocity(1.) + .abs_diff_eq((p2 - p0) * tension, FLOAT_EQ)); + assert!(curve + .velocity(2.) + .abs_diff_eq((p3 - p1) * tension, FLOAT_EQ)); + assert!(curve + .velocity(3.) + .abs_diff_eq((p3 - p2) * tension * 2., FLOAT_EQ)); + } + /// Test that [`RationalCurve`] properly generalizes [`CubicCurve`]. A Cubic upgraded to a rational /// should produce pretty much the same output. #[test]
Somethin' ain't right with cardinal splines ## The issue There is a mismatch between what the [documentation says](https://docs.rs/bevy/latest/bevy/math/cubic_splines/struct.CubicCardinalSpline.html) and how `CubicCardinalSpline` actually works. Namely, this: > ### Interpolation > > The curve passes through every control point. As implemented, this is not true. Instead, the curve passes through only the interior control points — that is, it doesn't actually go through the points at the ends. ## Example Here is a complete example (coutesy of @afonsolage): ```rust use bevy::math::prelude::*; use bevy::math::vec2; fn main() { let control_points = [ vec2(-1.0, 50.0), vec2(0.3, 100.0), vec2(0.4, 150.0), vec2(1.0, 150.0), ]; let curve = CubicCardinalSpline::new(0.1, control_points).to_curve(); for position in curve.iter_positions(10) { println!("Position: {position:?}"); } } ``` This produces the following output: ``` Position: Vec2(0.3, 100.0) Position: Vec2(0.31351003, 102.165) Position: Vec2(0.32608, 106.32) Position: Vec2(0.33777002, 111.955) Position: Vec2(0.34864, 118.56) Position: Vec2(0.35875, 125.625) Position: Vec2(0.36816, 132.64) Position: Vec2(0.37693, 139.095) Position: Vec2(0.38511997, 144.48) Position: Vec2(0.39279, 148.28499) Position: Vec2(0.39999998, 150.0) ``` As one can see, the curve only extends between 0.3 and 0.4, where the interior control points are defined. If you want it to actually pass through all those points, you need to extend your control sequence to a length of six, so that your desired endpoints become interior. ## Background Cardinal splines connect a series of points `P_i` with a sequence of cubic segments between `P_i` and `P_{i+1}` so that: 1. The curve segment `B_i` from `P_i` to `P_{i+1}` starts at `P_i` and ends at `P_{i+1}` 2. The derivatives of `B_i` and `B_{i+1}` at `P_{i+1}` coincide Property (1) happens by using `P_i` and `P_{i+1}` as the outermost control points of the Bézier curve `B_i`. Property (2) is ensured by making the third control point of `B_i`, the second control point of `B_{i+1}`, and `P_{i+1}` all collinear; the point of doing this is that it makes the union of cubic segments differentiable (i.e. it doesn't have "kinks"). The general construction is such that the derivative at `P_i` is given by the difference between `P_{i-1}` and `P_{i+1}` — i.e., the tangent to the curve at `P_i` is parallel to the line between the points preceding and following it. I believe this part is implemented at present; however, this aspect of the construction leaves one thing open: what do we do at the endpoints (where `P_{i+1}` or `P_{i-1}` doesn't exist)? A standard choice is to just use the line from `P_0` to `P_1` to determine the tangent at `P_0` (and analogously for the other endpoint). Of course, there are other choices that one could make as well (e.g. just requiring the tangents for those to be specified manually). Presently, either by accident or on purpose, we just exclude those points. Either way, we are currently misleading about it. ## Which way, spline implementor? There are basically two paths forward here: 1. Update the documentation so that it is truthful about how the endpoints are only used to determined the tangents for the interior points. 2. Update the cardinal spline implementation so that it actually passes through all the control points. I think it's pretty clear that I would have not written such a long issue if I did not prefer (2) (which I believe does a good job of meeting expectations and providing ergonomics for curve interpolation between a number of points), but there is a downside: in principle, the current implementation allows the user to indirectly specify the tangent at the endpoints by choosing their control points carefully. (2) is also a breaking change. I am unsure if this is a bug or if the implementation is this way intentionally, so I have written it as a docs issue.
Additional context which originated the issue: [on discord help channel](https://discordapp.com/channels/691052431525675048/1219580704824889424/1219580704824889424). Looks like a bug to me. Docs state the classic properties of cardinals. I will need to review the history to see if this issue existed before I reworded the spline docs, it's possible I introduced this. Let's fix the implementation.
2024-03-19T16:25:28Z
1.76
2024-03-22T10:50:53Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "cubic_splines::tests::cardinal_control_pts" ]
[ "bounding::bounded2d::aabb2d_tests::area", "bounding::bounded2d::aabb2d_tests::center", "bounding::bounded2d::aabb2d_tests::contains", "bounding::bounded2d::aabb2d_tests::closest_point", "bounding::bounded2d::aabb2d_tests::grow", "bounding::bounded2d::aabb2d_tests::half_size", "bounding::bounded2d::aabb2d_tests::intersect_aabb", "bounding::bounded2d::aabb2d_tests::intersect_bounding_circle", "bounding::bounded2d::aabb2d_tests::merge", "bounding::bounded2d::aabb2d_tests::scale_around_center", "bounding::bounded2d::aabb2d_tests::shrink", "bounding::bounded2d::aabb2d_tests::transform", "bounding::bounded2d::bounding_circle_tests::area", "bounding::bounded2d::bounding_circle_tests::closest_point", "bounding::bounded2d::bounding_circle_tests::contains", "bounding::bounded2d::bounding_circle_tests::contains_identical", "bounding::bounded2d::bounding_circle_tests::grow", "bounding::bounded2d::bounding_circle_tests::intersect_bounding_circle", "bounding::bounded2d::bounding_circle_tests::merge", "bounding::bounded2d::bounding_circle_tests::merge_identical", "bounding::bounded2d::bounding_circle_tests::scale_around_center", "bounding::bounded2d::bounding_circle_tests::shrink", "bounding::bounded2d::bounding_circle_tests::transform", "bounding::bounded2d::primitive_impls::tests::acute_triangle", "bounding::bounded2d::primitive_impls::tests::capsule", "bounding::bounded2d::primitive_impls::tests::circle", "bounding::bounded2d::primitive_impls::tests::ellipse", "bounding::bounded2d::primitive_impls::tests::line", "bounding::bounded2d::primitive_impls::tests::obtuse_triangle", "bounding::bounded2d::primitive_impls::tests::plane", "bounding::bounded2d::primitive_impls::tests::polygon", "bounding::bounded2d::primitive_impls::tests::polyline", "bounding::bounded2d::primitive_impls::tests::rectangle", "bounding::bounded2d::primitive_impls::tests::regular_polygon", "bounding::bounded2d::primitive_impls::tests::segment", "bounding::bounded3d::aabb3d_tests::area", "bounding::bounded3d::aabb3d_tests::center", "bounding::bounded3d::aabb3d_tests::closest_point", "bounding::bounded3d::aabb3d_tests::contains", "bounding::bounded3d::aabb3d_tests::grow", "bounding::bounded3d::aabb3d_tests::half_size", "bounding::bounded3d::aabb3d_tests::intersect_aabb", "bounding::bounded3d::aabb3d_tests::intersect_bounding_sphere", "bounding::bounded3d::aabb3d_tests::merge", "bounding::bounded3d::aabb3d_tests::scale_around_center", "bounding::bounded3d::aabb3d_tests::shrink", "bounding::bounded3d::aabb3d_tests::transform", "bounding::bounded3d::bounding_sphere_tests::area", "bounding::bounded3d::bounding_sphere_tests::closest_point", "bounding::bounded3d::bounding_sphere_tests::contains", "bounding::bounded3d::bounding_sphere_tests::contains_identical", "bounding::bounded3d::bounding_sphere_tests::grow", "bounding::bounded3d::bounding_sphere_tests::intersect_bounding_sphere", "bounding::bounded3d::bounding_sphere_tests::merge", "bounding::bounded3d::bounding_sphere_tests::merge_identical", "bounding::bounded3d::bounding_sphere_tests::scale_around_center", "bounding::bounded3d::bounding_sphere_tests::shrink", "bounding::bounded3d::bounding_sphere_tests::transform", "bounding::bounded3d::primitive_impls::tests::capsule", "bounding::bounded3d::primitive_impls::tests::cone", "bounding::bounded3d::primitive_impls::tests::conical_frustum", "bounding::bounded3d::primitive_impls::tests::cuboid", "bounding::bounded3d::primitive_impls::tests::cylinder", "bounding::bounded3d::primitive_impls::tests::line", "bounding::bounded3d::primitive_impls::tests::plane", "bounding::bounded3d::primitive_impls::tests::polyline", "bounding::bounded3d::primitive_impls::tests::segment", "bounding::bounded3d::primitive_impls::tests::sphere", "bounding::bounded3d::primitive_impls::tests::torus", "bounding::bounded3d::primitive_impls::tests::wide_conical_frustum", "bounding::raycast2d::tests::test_aabb_cast_hits", "bounding::raycast2d::tests::test_circle_cast_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_inside", "bounding::raycast2d::tests::test_ray_intersection_aabb_misses", "bounding::raycast2d::tests::test_ray_intersection_circle_hits", "bounding::raycast2d::tests::test_ray_intersection_circle_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_misses", "bounding::raycast3d::tests::test_aabb_cast_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_inside", "bounding::raycast3d::tests::test_ray_intersection_sphere_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_inside", "bounding::raycast3d::tests::test_sphere_cast_hits", "cubic_splines::tests::cubic_to_rational", "cubic_splines::tests::easing_overshoot", "cubic_splines::tests::easing_simple", "cubic_splines::tests::easing_undershoot", "cubic_splines::tests::cubic", "cubic_splines::tests::nurbs_circular_arc", "direction::tests::dir2_creation", "direction::tests::dir3_creation", "direction::tests::dir3a_creation", "primitives::dim2::tests::circle_closest_point", "primitives::dim2::tests::circle_math", "primitives::dim2::tests::ellipse_math", "primitives::dim2::tests::rectangle_closest_point", "primitives::dim2::tests::rectangle_math", "primitives::dim2::tests::regular_polygon_math", "primitives::dim2::tests::regular_polygon_vertices", "primitives::dim2::tests::triangle_circumcenter", "primitives::dim2::tests::triangle_math", "primitives::dim2::tests::triangle_winding_order", "primitives::dim3::tests::capsule_math", "primitives::dim3::tests::cone_math", "primitives::dim3::tests::cuboid_closest_point", "primitives::dim3::tests::cuboid_math", "primitives::dim3::tests::cylinder_math", "primitives::dim3::tests::direction_creation", "primitives::dim3::tests::plane_from_points", "primitives::dim3::tests::sphere_closest_point", "primitives::dim3::tests::sphere_math", "primitives::dim3::tests::torus_math", "ray::tests::intersect_plane_2d", "ray::tests::intersect_plane_3d", "rects::irect::tests::rect_inset", "rects::irect::tests::rect_intersect", "rects::irect::tests::rect_union", "rects::irect::tests::rect_union_pt", "rects::irect::tests::well_formed", "rects::rect::tests::rect_inset", "rects::rect::tests::rect_intersect", "rects::rect::tests::rect_union", "rects::rect::tests::rect_union_pt", "rects::rect::tests::well_formed", "rects::urect::tests::rect_inset", "rects::urect::tests::rect_intersect", "rects::urect::tests::rect_union", "rects::urect::tests::rect_union_pt", "rects::urect::tests::well_formed", "rotation2d::tests::add", "rotation2d::tests::creation", "rotation2d::tests::is_near_identity", "rotation2d::tests::length", "rotation2d::tests::nlerp", "rotation2d::tests::normalize", "rotation2d::tests::rotate", "rotation2d::tests::slerp", "rotation2d::tests::subtract", "rotation2d::tests::try_normalize", "shape_sampling::tests::circle_boundary_sampling", "shape_sampling::tests::circle_interior_sampling", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::width (line 126)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::intersect (line 260)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::is_empty (line 112)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_corners (line 46)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::width (line 127)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_size (line 69)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::contains (line 208)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::width (line 130)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_corners (line 46)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::height (line 140)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::contains (line 196)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::height (line 141)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::inset (line 288)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union (line 214)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_half_size (line 90)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::contains (line 205)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::half_size (line 168)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::is_empty (line 116)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::center (line 182)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union_point (line 237)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::is_empty (line 113)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::normalize (line 317)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::size (line 154)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union (line 223)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::size (line 158)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::center (line 194)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union_point (line 249)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::height (line 144)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::inset (line 297)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::half_size (line 173)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::center (line 191)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d (line 11)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union_point (line 246)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_size (line 73)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::size (line 155)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::nlerp (line 290)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::half_size (line 176)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union (line 226)", "crates/bevy_math/src/shape_sampling.rs - shape_sampling::ShapeSample::sample_interior (line 19)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::intersect (line 269)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_size (line 73)", "crates/bevy_math/src/shape_sampling.rs - shape_sampling::ShapeSample::sample_boundary (line 33)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::intersect (line 272)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::slerp (line 328)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::inset (line 300)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,556
bevyengine__bevy-12556
[ "12442" ]
5cf7d9213e77f17f0621c5f432c38a3c4697a409
diff --git a/crates/bevy_input/src/touch.rs b/crates/bevy_input/src/touch.rs --- a/crates/bevy_input/src/touch.rs +++ b/crates/bevy_input/src/touch.rs @@ -373,8 +373,9 @@ impl Touches { } TouchPhase::Moved => { if let Some(mut new_touch) = self.pressed.get(&event.id).cloned() { - new_touch.previous_position = new_touch.position; - new_touch.previous_force = new_touch.force; + // NOTE: This does not update the previous_force / previous_position field; + // they should be updated once per frame, not once per event + // See https://github.com/bevyengine/bevy/issues/12442 new_touch.position = event.position; new_touch.force = event.force; self.pressed.insert(event.id, new_touch); diff --git a/crates/bevy_input/src/touch.rs b/crates/bevy_input/src/touch.rs --- a/crates/bevy_input/src/touch.rs +++ b/crates/bevy_input/src/touch.rs @@ -427,8 +428,15 @@ pub fn touch_screen_input_system( touch_state.just_canceled.clear(); } - for event in touch_input_events.read() { - touch_state.process_touch_event(event); + if !touch_input_events.is_empty() { + for touch in touch_state.pressed.values_mut() { + touch.previous_position = touch.position; + touch.previous_force = touch.force; + } + + for event in touch_input_events.read() { + touch_state.process_touch_event(event); + } } }
diff --git a/crates/bevy_input/src/touch.rs b/crates/bevy_input/src/touch.rs --- a/crates/bevy_input/src/touch.rs +++ b/crates/bevy_input/src/touch.rs @@ -551,6 +559,69 @@ mod test { assert_ne!(touch.previous_position, touch.position); } + // See https://github.com/bevyengine/bevy/issues/12442 + #[test] + fn touch_process_multi_event() { + use crate::{touch::TouchPhase, TouchInput, Touches}; + use bevy_ecs::entity::Entity; + use bevy_math::Vec2; + + let mut touches = Touches::default(); + + let started_touch_event = TouchInput { + phase: TouchPhase::Started, + position: Vec2::splat(4.0), + window: Entity::PLACEHOLDER, + force: None, + id: 4, + }; + + let moved_touch_event1 = TouchInput { + phase: TouchPhase::Moved, + position: Vec2::splat(5.0), + window: Entity::PLACEHOLDER, + force: None, + id: started_touch_event.id, + }; + + let moved_touch_event2 = TouchInput { + phase: TouchPhase::Moved, + position: Vec2::splat(6.0), + window: Entity::PLACEHOLDER, + force: None, + id: started_touch_event.id, + }; + + // tick 1: touch is started during frame + for touch in touches.pressed.values_mut() { + // update ONCE, at start of frame + touch.previous_position = touch.position; + } + touches.process_touch_event(&started_touch_event); + touches.process_touch_event(&moved_touch_event1); + touches.process_touch_event(&moved_touch_event2); + + { + let touch = touches.get_pressed(started_touch_event.id).unwrap(); + assert_eq!(touch.previous_position, started_touch_event.position); + assert_eq!(touch.position, moved_touch_event2.position); + } + + // tick 2: touch was started before frame + for touch in touches.pressed.values_mut() { + touch.previous_position = touch.position; + } + touches.process_touch_event(&moved_touch_event1); + touches.process_touch_event(&moved_touch_event2); + touches.process_touch_event(&moved_touch_event1); + + { + let touch = touches.get_pressed(started_touch_event.id).unwrap(); + assert_eq!(touch.previous_position, moved_touch_event2.position); + assert_eq!(touch.position, moved_touch_event1.position); + } + } + #[test] fn touch_pressed() { use crate::{touch::TouchPhase, TouchInput, Touches};
`Touches` resource is discarding previous_position too eagerly ## Bevy version 0.13 ## Relevant system information App running in WASM on iOS browser. ## What you did I am implementing a scrolling view in WASM, using the [`Touches`](https://docs.rs/bevy_input/latest/bevy_input/touch/struct.Touches.html#) resource to get touch input and move the camera accordingly. To do this, I capture the first touch input detected and store its `id` somewhere. I then use `touch = touches.get_pressed(id)`, and then `touch.delta()` to figure out how much the finger has moved since the last frame. ## What went wrong I was expecting smooth scrolling behaviour, but the actual movement was jittery and lagging behind the finger. ## Cause of bug After investigating, this is caused by the implementation of [`touch_screen_input_system`](https://docs.rs/bevy_input/latest/bevy_input/touch/fn.touch_screen_input_system.html#), which treats each `TouchInput` event separately, and thus discards the previous position with each event instead of per frame. The `delta` position is wrong at the end of the frame if several `TouchInput` events arrived. The system that updates the `Touches` resource should update the previous position once, at the start, and not with every event. ## Workaround used I stored the previous position in another resource, but only for my "captured" touch id. For someone tracking the movement of several touches, it would need to be a HashMap of positions keyed by touch id.
2024-03-18T15:20:33Z
1.76
2024-04-02T01:57:23Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "touch::test::touch_process_multi_event" ]
[ "axis::tests::test_axis_devices", "axis::tests::test_axis_set", "axis::tests::test_axis_remove", "button_input::test::test_all_pressed", "button_input::test::test_any_just_pressed", "button_input::test::test_clear", "button_input::test::test_any_just_released", "button_input::test::test_any_pressed", "button_input::test::test_clear_just_pressed", "button_input::test::test_clear_just_released", "button_input::test::test_general_input_handling", "button_input::test::test_get_just_pressed", "button_input::test::test_get_just_released", "button_input::test::test_get_pressed", "button_input::test::test_just_pressed", "button_input::test::test_just_released", "button_input::test::test_press", "button_input::test::test_pressed", "button_input::test::test_release", "button_input::test::test_release_all", "button_input::test::test_reset", "button_input::test::test_reset_all", "gamepad::tests::test_axis_settings_default_filter", "gamepad::tests::test_axis_settings_default_filter_with_old_values", "gamepad::tests::test_button_axis_settings_default_filter", "gamepad::tests::test_button_axis_settings_default_filter_with_old_value", "gamepad::tests::test_button_settings_default_is_pressed", "gamepad::tests::test_button_settings_default_is_released", "common_conditions::tests::distributive_run_if_compiles", "gamepad::tests::test_new_button_settings_given_invalid_parameters", "gamepad::tests::test_new_button_settings_given_valid_parameters", "gamepad::tests::test_try_out_of_range_axis_settings", "touch::test::clear_touches", "touch::test::release_all_touches", "touch::test::release_touch", "touch::test::reset_all_touches", "touch::test::touch_canceled", "touch::test::touch_pressed", "touch::test::touch_process", "touch::test::touch_update", "touch::test::touch_released", "crates/bevy_input/src/common_conditions.rs - common_conditions::input_toggle_active (line 7) - compile", "crates/bevy_input/src/common_conditions.rs - common_conditions::input_just_pressed (line 76) - compile", "crates/bevy_input/src/common_conditions.rs - common_conditions::input_toggle_active (line 26) - compile", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadRumbleRequest (line 1376)", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadSettings::get_button_axis_settings (line 435)", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadSettings::get_button_settings (line 397)", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadAxis::new (line 347)", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadSettings::get_axis_settings (line 416)", "crates/bevy_input/src/gamepad.rs - gamepad::GamepadButton::new (line 254)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,554
bevyengine__bevy-12554
[ "10766" ]
6003a317b854fa3f61f395d147e3bb0890815991
diff --git /dev/null b/crates/bevy_ecs/src/batching.rs new file mode 100644 --- /dev/null +++ b/crates/bevy_ecs/src/batching.rs @@ -0,0 +1,108 @@ +//! Types for controlling batching behavior during parallel processing. + +use std::ops::Range; + +/// Dictates how a parallel operation chunks up large quantities +/// during iteration. +/// +/// A parallel query will chunk up large tables and archetypes into +/// chunks of at most a certain batch size. Similarly, a parallel event +/// reader will chunk up the remaining events. +/// +/// By default, this batch size is automatically determined by dividing +/// the size of the largest matched archetype by the number +/// of threads (rounded up). This attempts to minimize the overhead of scheduling +/// tasks onto multiple threads, but assumes each entity has roughly the +/// same amount of work to be done, which may not hold true in every +/// workload. +/// +/// See [`Query::par_iter`], [`EventReader::par_read`] for more information. +/// +/// [`Query::par_iter`]: crate::system::Query::par_iter +/// [`EventReader::par_read`]: crate::event::EventReader::par_read +#[derive(Clone, Debug)] +pub struct BatchingStrategy { + /// The upper and lower limits for a batch of entities. + /// + /// Setting the bounds to the same value will result in a fixed + /// batch size. + /// + /// Defaults to `[1, usize::MAX]`. + pub batch_size_limits: Range<usize>, + /// The number of batches per thread in the [`ComputeTaskPool`]. + /// Increasing this value will decrease the batch size, which may + /// increase the scheduling overhead for the iteration. + /// + /// Defaults to 1. + /// + /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool + pub batches_per_thread: usize, +} + +impl Default for BatchingStrategy { + fn default() -> Self { + Self::new() + } +} + +impl BatchingStrategy { + /// Creates a new unconstrained default batching strategy. + pub const fn new() -> Self { + Self { + batch_size_limits: 1..usize::MAX, + batches_per_thread: 1, + } + } + + /// Declares a batching strategy with a fixed batch size. + pub const fn fixed(batch_size: usize) -> Self { + Self { + batch_size_limits: batch_size..batch_size, + batches_per_thread: 1, + } + } + + /// Configures the minimum allowed batch size of this instance. + pub const fn min_batch_size(mut self, batch_size: usize) -> Self { + self.batch_size_limits.start = batch_size; + self + } + + /// Configures the maximum allowed batch size of this instance. + pub const fn max_batch_size(mut self, batch_size: usize) -> Self { + self.batch_size_limits.end = batch_size; + self + } + + /// Configures the number of batches to assign to each thread for this instance. + pub fn batches_per_thread(mut self, batches_per_thread: usize) -> Self { + assert!( + batches_per_thread > 0, + "The number of batches per thread must be non-zero." + ); + self.batches_per_thread = batches_per_thread; + self + } + + /// Calculate the batch size according to the given thread count and max item count. + /// The count is provided as a closure so that it can be calculated only if needed. + /// + /// # Panics + /// + /// Panics if `thread_count` is 0. + /// + #[inline] + pub fn calc_batch_size(&self, max_items: impl FnOnce() -> usize, thread_count: usize) -> usize { + if self.batch_size_limits.is_empty() { + return self.batch_size_limits.start; + } + assert!( + thread_count > 0, + "Attempted to run parallel iteration with an empty TaskPool" + ); + let batches = thread_count * self.batches_per_thread; + // Round up to the nearest batch size. + let batch_size = (max_items() + batches - 1) / batches; + batch_size.clamp(self.batch_size_limits.start, self.batch_size_limits.end) + } +} diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -1,6 +1,7 @@ //! Event handling types. use crate as bevy_ecs; +use crate::batching::BatchingStrategy; use crate::change_detection::MutUntyped; use crate::{ change_detection::{DetectChangesMut, Mut}, diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -30,7 +31,7 @@ pub trait Event: Send + Sync + 'static {} /// An `EventId` uniquely identifies an event stored in a specific [`World`]. /// /// An `EventId` can among other things be used to trace the flow of an event from the point it was -/// sent to the point it was processed. +/// sent to the point it was processed. `EventId`s increase montonically by send order. /// /// [`World`]: crate::world::World pub struct EventId<E: Event> { diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -446,6 +447,46 @@ impl<'w, 's, E: Event> EventReader<'w, 's, E> { self.reader.read_with_id(&self.events) } + /// Returns a parallel iterator over the events this [`EventReader`] has not seen yet. + /// See also [`for_each`](EventParIter::for_each). + /// + /// # Example + /// ``` + /// # use bevy_ecs::prelude::*; + /// # use std::sync::atomic::{AtomicUsize, Ordering}; + /// + /// #[derive(Event)] + /// struct MyEvent { + /// value: usize, + /// } + /// + /// #[derive(Resource, Default)] + /// struct Counter(AtomicUsize); + /// + /// // setup + /// let mut world = World::new(); + /// world.init_resource::<Events<MyEvent>>(); + /// world.insert_resource(Counter::default()); + /// + /// let mut schedule = Schedule::default(); + /// schedule.add_systems(|mut events: EventReader<MyEvent>, counter: Res<Counter>| { + /// events.par_read().for_each(|MyEvent { value }| { + /// counter.0.fetch_add(*value, Ordering::Relaxed); + /// }); + /// }); + /// for value in 0..100 { + /// world.send_event(MyEvent { value }); + /// } + /// schedule.run(&mut world); + /// let Counter(counter) = world.remove_resource::<Counter>().unwrap(); + /// // all events were processed + /// assert_eq!(counter.into_inner(), 4950); + /// ``` + /// + pub fn par_read(&mut self) -> EventParIter<'_, E> { + self.reader.par_read(&self.events) + } + /// Determines the number of events available to be read from this [`EventReader`] without consuming any. pub fn len(&self) -> usize { self.reader.len(&self.events) diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -647,6 +688,11 @@ impl<E: Event> ManualEventReader<E> { EventIteratorWithId::new(self, events) } + /// See [`EventReader::par_read`] + pub fn par_read<'a>(&'a mut self, events: &'a Events<E>) -> EventParIter<'a, E> { + EventParIter::new(self, events) + } + /// See [`EventReader::len`] pub fn len(&self, events: &Events<E>) -> usize { // The number of events in this reader is the difference between the most recent event diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -810,6 +856,135 @@ impl<'a, E: Event> ExactSizeIterator for EventIteratorWithId<'a, E> { } } +/// A parallel iterator over `Event`s. +#[derive(Debug)] +pub struct EventParIter<'a, E: Event> { + reader: &'a mut ManualEventReader<E>, + slices: [&'a [EventInstance<E>]; 2], + batching_strategy: BatchingStrategy, +} + +impl<'a, E: Event> EventParIter<'a, E> { + /// Creates a new parallel iterator over `events` that have not yet been seen by `reader`. + pub fn new(reader: &'a mut ManualEventReader<E>, events: &'a Events<E>) -> Self { + let a_index = reader + .last_event_count + .saturating_sub(events.events_a.start_event_count); + let b_index = reader + .last_event_count + .saturating_sub(events.events_b.start_event_count); + let a = events.events_a.get(a_index..).unwrap_or_default(); + let b = events.events_b.get(b_index..).unwrap_or_default(); + + let unread_count = a.len() + b.len(); + // Ensure `len` is implemented correctly + debug_assert_eq!(unread_count, reader.len(events)); + reader.last_event_count = events.event_count - unread_count; + + Self { + reader, + slices: [a, b], + batching_strategy: BatchingStrategy::default(), + } + } + + /// Changes the batching strategy used when iterating. + /// + /// For more information on how this affects the resultant iteration, see + /// [`BatchingStrategy`]. + pub fn batching_strategy(mut self, strategy: BatchingStrategy) -> Self { + self.batching_strategy = strategy; + self + } + + /// Runs the provided closure for each unread event in parallel. + /// + /// Unlike normal iteration, the event order is not guaranteed in any form. + /// + /// # Panics + /// If the [`ComputeTaskPool`] is not initialized. If using this from an event reader that is being + /// initialized and run from the ECS scheduler, this should never panic. + /// + /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool + pub fn for_each<FN: Fn(&'a E) + Send + Sync + Clone>(self, func: FN) { + self.for_each_with_id(move |e, _| func(e)); + } + + /// Runs the provided closure for each unread event in parallel, like [`for_each`](Self::for_each), + /// but additionally provides the `EventId` to the closure. + /// + /// Note that the order of iteration is not guaranteed, but `EventId`s are ordered by send order. + /// + /// # Panics + /// If the [`ComputeTaskPool`] is not initialized. If using this from an event reader that is being + /// initialized and run from the ECS scheduler, this should never panic. + /// + /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool + pub fn for_each_with_id<FN: Fn(&'a E, EventId<E>) + Send + Sync + Clone>(self, func: FN) { + #[cfg(any(target_arch = "wasm32", not(feature = "multi-threaded")))] + { + self.into_iter().for_each(|(e, i)| func(e, i)); + } + + #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] + { + let pool = bevy_tasks::ComputeTaskPool::get(); + let thread_count = pool.thread_num(); + if thread_count <= 1 { + return self.into_iter().for_each(|(e, i)| func(e, i)); + } + + let batch_size = self + .batching_strategy + .calc_batch_size(|| self.len(), thread_count); + let chunks = self.slices.map(|s| s.chunks_exact(batch_size)); + let remainders = chunks.each_ref().map(|c| c.remainder()); + + pool.scope(|scope| { + for batch in chunks.into_iter().flatten().chain(remainders) { + let func = func.clone(); + scope.spawn(async move { + for event in batch { + func(&event.event, event.event_id); + } + }); + } + }); + } + } + + /// Returns the number of [`Event`]s to be iterated. + pub fn len(&self) -> usize { + self.slices.iter().map(|s| s.len()).sum() + } + + /// Returns [`true`] if there are no events remaining in this iterator. + pub fn is_empty(&self) -> bool { + self.slices.iter().all(|x| x.is_empty()) + } +} + +impl<'a, E: Event> IntoIterator for EventParIter<'a, E> { + type IntoIter = EventIteratorWithId<'a, E>; + type Item = <Self::IntoIter as Iterator>::Item; + + fn into_iter(self) -> Self::IntoIter { + let EventParIter { + reader, + slices: [a, b], + .. + } = self; + let unread = a.len() + b.len(); + let chain = a.iter().chain(b); + EventIteratorWithId { + reader, + chain, + unread, + } + } +} + +#[doc(hidden)] struct RegisteredEvent { component_id: ComponentId, // Required to flush the secondary buffer and drop events even if left unchanged. diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -12,6 +12,7 @@ compile_error!("bevy_ecs cannot safely compile for a 16-bit platform."); pub mod archetype; +pub mod batching; pub mod bundle; pub mod change_detection; pub mod component; diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -1,89 +1,9 @@ -use crate::{component::Tick, world::unsafe_world_cell::UnsafeWorldCell}; -use std::ops::Range; +use crate::{ + batching::BatchingStrategy, component::Tick, world::unsafe_world_cell::UnsafeWorldCell, +}; use super::{QueryData, QueryFilter, QueryItem, QueryState}; -/// Dictates how a parallel query chunks up large tables/archetypes -/// during iteration. -/// -/// A parallel query will chunk up large tables and archetypes into -/// chunks of at most a certain batch size. -/// -/// By default, this batch size is automatically determined by dividing -/// the size of the largest matched archetype by the number -/// of threads (rounded up). This attempts to minimize the overhead of scheduling -/// tasks onto multiple threads, but assumes each entity has roughly the -/// same amount of work to be done, which may not hold true in every -/// workload. -/// -/// See [`Query::par_iter`] for more information. -/// -/// [`Query::par_iter`]: crate::system::Query::par_iter -#[derive(Clone)] -pub struct BatchingStrategy { - /// The upper and lower limits for how large a batch of entities. - /// - /// Setting the bounds to the same value will result in a fixed - /// batch size. - /// - /// Defaults to `[1, usize::MAX]`. - pub batch_size_limits: Range<usize>, - /// The number of batches per thread in the [`ComputeTaskPool`]. - /// Increasing this value will decrease the batch size, which may - /// increase the scheduling overhead for the iteration. - /// - /// Defaults to 1. - /// - /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool - pub batches_per_thread: usize, -} - -impl BatchingStrategy { - /// Creates a new unconstrained default batching strategy. - pub const fn new() -> Self { - Self { - batch_size_limits: 1..usize::MAX, - batches_per_thread: 1, - } - } - - /// Declares a batching strategy with a fixed batch size. - pub const fn fixed(batch_size: usize) -> Self { - Self { - batch_size_limits: batch_size..batch_size, - batches_per_thread: 1, - } - } - - /// Configures the minimum allowed batch size of this instance. - pub const fn min_batch_size(mut self, batch_size: usize) -> Self { - self.batch_size_limits.start = batch_size; - self - } - - /// Configures the maximum allowed batch size of this instance. - pub const fn max_batch_size(mut self, batch_size: usize) -> Self { - self.batch_size_limits.end = batch_size; - self - } - - /// Configures the number of batches to assign to each thread for this instance. - pub fn batches_per_thread(mut self, batches_per_thread: usize) -> Self { - assert!( - batches_per_thread > 0, - "The number of batches per thread must be non-zero." - ); - self.batches_per_thread = batches_per_thread; - self - } -} - -impl Default for BatchingStrategy { - fn default() -> Self { - Self::new() - } -} - /// A parallel iterator over query results of a [`Query`](crate::system::Query). /// /// This struct is created by the [`Query::par_iter`](crate::system::Query::par_iter) and diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -158,37 +78,25 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { #[cfg(all(not(target_arch = "wasm32"), feature = "multi-threaded"))] fn get_batch_size(&self, thread_count: usize) -> usize { - if self.batching_strategy.batch_size_limits.is_empty() { - return self.batching_strategy.batch_size_limits.start; - } - - assert!( - thread_count > 0, - "Attempted to run parallel iteration over a query with an empty TaskPool" - ); - let id_iter = self.state.matched_storage_ids.iter(); - let max_size = if D::IS_DENSE && F::IS_DENSE { - // SAFETY: We only access table metadata. - let tables = unsafe { &self.world.world_metadata().storages().tables }; - id_iter - // SAFETY: The if check ensures that matched_storage_ids stores TableIds - .map(|id| unsafe { tables[id.table_id].entity_count() }) - .max() - } else { - let archetypes = &self.world.archetypes(); - id_iter - // SAFETY: The if check ensures that matched_storage_ids stores ArchetypeIds - .map(|id| unsafe { archetypes[id.archetype_id].len() }) - .max() + let max_items = || { + let id_iter = self.state.matched_storage_ids.iter(); + if D::IS_DENSE && F::IS_DENSE { + // SAFETY: We only access table metadata. + let tables = unsafe { &self.world.world_metadata().storages().tables }; + id_iter + // SAFETY: The if check ensures that matched_storage_ids stores TableIds + .map(|id| unsafe { tables[id.table_id].entity_count() }) + .max() + } else { + let archetypes = &self.world.archetypes(); + id_iter + // SAFETY: The if check ensures that matched_storage_ids stores ArchetypeIds + .map(|id| unsafe { archetypes[id.archetype_id].len() }) + .max() + } + .unwrap_or(0) }; - let max_size = max_size.unwrap_or(0); - - let batches = thread_count * self.batching_strategy.batches_per_thread; - // Round up to the nearest batch size. - let batch_size = (max_size + batches - 1) / batches; - batch_size.clamp( - self.batching_strategy.batch_size_limits.start, - self.batching_strategy.batch_size_limits.end, - ) + self.batching_strategy + .calc_batch_size(max_items, thread_count) } } diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1,11 +1,11 @@ use crate::{ archetype::{Archetype, ArchetypeComponentId, ArchetypeGeneration, ArchetypeId}, + batching::BatchingStrategy, component::{ComponentId, Tick}, entity::Entity, prelude::FromWorld, query::{ - Access, BatchingStrategy, DebugCheckedUnwrap, FilteredAccess, QueryCombinationIter, - QueryIter, QueryParIter, + Access, DebugCheckedUnwrap, FilteredAccess, QueryCombinationIter, QueryIter, QueryParIter, }, storage::{SparseSetIndex, TableId}, world::{unsafe_world_cell::UnsafeWorldCell, World, WorldId}, diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1,10 +1,10 @@ use crate::{ + batching::BatchingStrategy, component::Tick, entity::Entity, query::{ - BatchingStrategy, QueryCombinationIter, QueryData, QueryEntityError, QueryFilter, - QueryIter, QueryManyIter, QueryParIter, QuerySingleError, QueryState, ROQueryItem, - ReadOnlyQueryData, + QueryCombinationIter, QueryData, QueryEntityError, QueryFilter, QueryIter, QueryManyIter, + QueryParIter, QuerySingleError, QueryState, ROQueryItem, ReadOnlyQueryData, }, world::unsafe_world_cell::UnsafeWorldCell, }; diff --git a/examples/ecs/parallel_query.rs b/examples/ecs/parallel_query.rs --- a/examples/ecs/parallel_query.rs +++ b/examples/ecs/parallel_query.rs @@ -1,6 +1,6 @@ //! Illustrates parallel queries with `ParallelIterator`. -use bevy::ecs::query::BatchingStrategy; +use bevy::ecs::batching::BatchingStrategy; use bevy::prelude::*; use rand::{Rng, SeedableRng}; use rand_chacha::ChaCha8Rng;
diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -1326,4 +1501,32 @@ mod tests { "Only sent two events; got more than two IDs" ); } + + #[cfg(feature = "multi-threaded")] + #[test] + fn test_events_par_iter() { + use std::{collections::HashSet, sync::mpsc}; + + use crate::prelude::*; + + let mut world = World::new(); + world.init_resource::<Events<TestEvent>>(); + for i in 0..100 { + world.send_event(TestEvent { i }); + } + + let mut schedule = Schedule::default(); + + schedule.add_systems(|mut events: EventReader<TestEvent>| { + let (tx, rx) = mpsc::channel(); + events.par_read().for_each(|event| { + tx.send(event.i).unwrap(); + }); + drop(tx); + + let observed: HashSet<_> = rx.into_iter().collect(); + assert_eq!(observed, HashSet::from_iter(0..100)); + }); + schedule.run(&mut world); + } }
Support parallel iteration over events ## What problem does this solve or what need does it fill? Parallel iteration over events would open up more performance tuning options for bevy developers, inspired by `query.par_iter`. ## What solution would you like? Expose the ability to perform work in parallel over events, similar to [`Query::par_iter`](https://docs.rs/bevy_ecs/0.12.0/bevy_ecs/system/struct.Query.html#method.par_iter). ## What alternative(s) have you considered? I tried rayon but it wasn't able to `par_iter` the event reader. Another option is to collect the events into a `Vec` before using rayon, but it would require cloning each event. Using a vanilla `Vec` in a resource as opposed to the event system. `ResMut<Events<SendServerMessageEvent>>::drain()` is a possibility, but it requires use of [`ParallelBridge`](https://docs.rs/rayon/1.8.0/rayon/index.html) in rayon which harms performance. ## Additional context I'm creating events all over my app that need to be sent over the network. Message serialisation of these events is compute-bound and represents a blocking, non-trivial workload that takes place at the end of the schedule. I would like to test with a parallel version of event reader for performance reasons.
I think this should be fairly straightforward to implement: we just don't expose a method for it.
2024-03-18T14:59:09Z
1.77
2024-04-22T16:52:36Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "change_detection::tests::map_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::change_tick_wraparound", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_recursive", "change_detection::tests::mut_untyped_from_mut", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_firing_empty_event", "event::tests::test_send_events_ids", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_static_components", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_or", "query::builder::tests::builder_transmute", "query::builder::tests::builder_with_without_dynamic", "query::builder::tests::builder_with_without_static", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::join_with_get", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::join", "query::state::tests::can_transmute_to_more_general", "query::tests::multi_storage_query", "query::tests::has_query", "query::tests::any_query", "query::tests::query", "query::tests::many_entities", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::insert_reflected", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::tests::query_iter_combinations", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::state::tests::right_world_get - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "schedule::set::tests::test_derive_system_set", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::remove_reflected", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::schedules", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::system_ambiguity::components", "schedule::stepping::tests::step_breakpoint", "schedule::tests::system_ambiguity::events", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::waiting_never_run", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::stepping_disabled", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resources", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::stepping::tests::waiting_breakpoint", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_always_run", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::system_ambiguity::read_world", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::aligned_zst", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::blob_vec::tests::resize_test", "system::commands::tests::append", "storage::table::tests::table", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::commands", "system::commands::tests::remove_resources", "system::function_system::tests::into_system_type_id_consistency", "system::system::tests::command_processing", "system::commands::tests::remove_components", "system::commands::tests::remove_components_by_id", "system::system::tests::non_send_resources", "schedule::tests::system_ambiguity::read_only", "system::system::tests::run_two_systems", "system::system::tests::run_system_once", "schedule::stepping::tests::verify_cursor", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_flexibility", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::stepping::multi_threaded_executor", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::system_registry::tests::change_detection", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system_param::tests::param_set_non_send_second", "schedule::tests::system_ordering::order_exclusive_systems", "system::system_registry::tests::exclusive_system", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::local_variables", "schedule::schedule::tests::disable_auto_sync_points", "system::system_registry::tests::output_values", "system::system_registry::tests::input_values", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::system_registry::tests::nested_systems", "event::tests::test_event_iter_nth", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::tests::conditions::system_set_conditions_and_change_detection", "system::system_param::tests::non_sync_local", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::conditions::system_with_condition", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_and_without", "schedule::condition::tests::multiple_run_conditions", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::inserts_a_sync_point", "schedule::tests::system_execution::run_system", "system::tests::assert_system_does_not_conflict - should panic", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::set::tests::test_schedule_label", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::condition::tests::run_condition_combinators", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::tests::conditions::system_conditions_and_change_detection", "system::tests::assert_systems", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::condition::tests::run_condition", "system::tests::commands_param_set", "system::tests::disjoint_query_mut_system", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::get_system_conflicts", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::tests::disjoint_query_mut_read_component_system", "system::tests::immutable_mut_test", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::long_life_test", "system::tests::convert_mut_to_immut", "system::tests::local_system", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::changed_resource_system", "system::tests::or_expanded_nested_with_and_without_common", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::non_send_system", "system::tests::can_have_16_parameters", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "schedule::tests::system_ordering::order_systems", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::query_validates_world_id - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::read_system_state", "system::tests::simple_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::into_iter_impl", "system::tests::non_send_option_system", "system::tests::panic_inside_system - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_has_filter_with", "system::tests::nonconflicting_system_resources", "system::tests::or_with_without_and_compatible_with_without", "system::tests::or_has_no_filter_with - should panic", "system::tests::query_is_empty", "system::tests::system_state_change_detection", "system::tests::pipe_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::or_param_set_system", "system::tests::write_system_state", "system::tests::query_set_system", "query::tests::par_iter_mut_change_detection", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::update_archetype_component_access_works", "tests::added_queries", "tests::add_remove_components", "tests::added_tracking", "tests::changed_query", "system::tests::test_combinator_clone", "system::tests::world_collections_system", "tests::clear_entities", "tests::bundle_derive", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::duplicate_components_panic - should panic", "tests::empty_spawn", "tests::entity_ref_and_mut_query_panic - should panic", "system::tests::removal_tracking", "tests::changed_trackers_sparse", "tests::changed_trackers", "tests::filtered_query_access", "tests::exact_size_query", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_filter_with_sparse", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_filters_dont_collide_with_fetches", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_single_component", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_optional_component_sparse_no_match", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove", "tests::remove_missing", "tests::reserve_and_spawn", "tests::resource", "tests::remove_tracking", "tests::resource_scope", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "tests::take", "world::command_queue::test::test_command_queue_inner", "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_panic_safe", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::disjoint_access", "tests::test_is_archetypal_size_hints", "query::tests::query_filtered_exactsizeiterator_len", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "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::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_dense_updates_table_row", "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::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_mut_by_id", "world::tests::get_resource_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::inspect_entity_components", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "world::tests::iter_resources", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 876) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 884) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 239) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 910) - 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/lib.rs - (line 77)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 926)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 197)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 222)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 744)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 538)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 58)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 461)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 122)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 647)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 166)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 447)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::State (line 78)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::States (line 33)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 101)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::NextState (line 146)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 56)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 27)", "crates/bevy_ecs/src/label.rs - label::define_label (line 65)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 103)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 65)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 562)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1520)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 329)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 812)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 252)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 710)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 287) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 769)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 144)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 652)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 142)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 425)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 259)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1543)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 255)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 382)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 598)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 923)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 109)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 38)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 690)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 352)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 198)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 832)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 257)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 310)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 217)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 479)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 375)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 123)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 294)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 651)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 332)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 349)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 452)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 917)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 890) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 200)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 176)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 631)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1000) - compile", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 723)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 214)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 190)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 479)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 610)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 404) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1435) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 876)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_one_shot_system (line 538)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 760)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 940)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 271)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 596)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 725)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1308)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1411)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 41)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 415)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 859)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 779)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 632)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 426)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 55)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 813)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 665)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 540)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 225)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 254)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 140)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 579)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 963)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1108)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 41)", "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>::contains (line 1261)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 822)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1512)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1155)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1226)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 219)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 112) - compile", "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_single_mut (line 1185)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 670)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 170)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1555)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 174)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 327)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1547)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 693)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1080)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1403)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1355)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 273)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 187)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 258)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 942)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 263)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1607)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1302)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1514)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 232)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1488)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1574)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 292)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1429)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 252)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 75)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 299)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 333)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1395)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1304)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 375)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 916)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1631)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1686)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 654)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 799)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 187)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1459)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 863)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1654)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 372)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 500)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1711)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 381)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 623)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1024)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 211)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 535)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2170)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 958)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 2148)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 2247)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1561)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 1925)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 988)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2505)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 415)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 884)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1055)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 426)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 746)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1673)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 713)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 837)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,525
bevyengine__bevy-12525
[ "12463" ]
16107385afa710cc9ac706a724773b34fc5d1190
diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -61,3 +61,20 @@ pub trait Alpha: Sized { self.alpha() >= 1.0 } } + +/// Trait with methods for asserting a colorspace is within bounds. +/// +/// During ordinary usage (e.g. reading images from disk, rendering images, picking colors for UI), colors should always be within their ordinary bounds (such as 0 to 1 for RGB colors). +/// However, some applications, such as high dynamic range rendering or bloom rely on unbounded colors to naturally represent a wider array of choices. +pub trait ClampColor: Sized { + /// Return a new version of this color clamped, with all fields in bounds. + fn clamped(&self) -> Self; + + /// Changes all the fields of this color to ensure they are within bounds. + fn clamp(&mut self) { + *self = self.clamped(); + } + + /// Are all the fields of this color in bounds? + fn is_within_bounds(&self) -> bool; +} diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -1,4 +1,6 @@ -use crate::{Alpha, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza}; +use crate::{ + Alpha, ClampColor, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, +}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -166,6 +168,24 @@ impl Luminance for Hsla { } } +impl ClampColor for Hsla { + fn clamped(&self) -> Self { + Self { + hue: self.hue.rem_euclid(360.), + saturation: self.saturation.clamp(0., 1.), + lightness: self.lightness.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=360.).contains(&self.hue) + && (0. ..=1.).contains(&self.saturation) + && (0. ..=1.).contains(&self.lightness) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<Hsla> for Hsva { fn from( Hsla { diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -1,4 +1,4 @@ -use crate::{Alpha, Hwba, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Hwba, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -91,6 +91,24 @@ impl Alpha for Hsva { } } +impl ClampColor for Hsva { + fn clamped(&self) -> Self { + Self { + hue: self.hue.rem_euclid(360.), + saturation: self.saturation.clamp(0., 1.), + value: self.value.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=360.).contains(&self.hue) + && (0. ..=1.).contains(&self.saturation) + && (0. ..=1.).contains(&self.value) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<Hsva> for Hwba { fn from( Hsva { diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -2,7 +2,7 @@ //! in [_HWB - A More Intuitive Hue-Based Color Model_] by _Smith et al_. //! //! [_HWB - A More Intuitive Hue-Based Color Model_]: https://web.archive.org/web/20240226005220/http://alvyray.com/Papers/CG/HWB_JGTv208.pdf -use crate::{Alpha, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -95,6 +95,24 @@ impl Alpha for Hwba { } } +impl ClampColor for Hwba { + fn clamped(&self) -> Self { + Self { + hue: self.hue.rem_euclid(360.), + whiteness: self.whiteness.clamp(0., 1.), + blackness: self.blackness.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=360.).contains(&self.hue) + && (0. ..=1.).contains(&self.whiteness) + && (0. ..=1.).contains(&self.blackness) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<Srgba> for Hwba { fn from( Srgba { diff --git a/crates/bevy_color/src/laba.rs b/crates/bevy_color/src/laba.rs --- a/crates/bevy_color/src/laba.rs +++ b/crates/bevy_color/src/laba.rs @@ -1,5 +1,6 @@ use crate::{ - Alpha, Hsla, Hsva, Hwba, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, + Alpha, ClampColor, Hsla, Hsva, Hwba, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, + Xyza, }; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/laba.rs b/crates/bevy_color/src/laba.rs --- a/crates/bevy_color/src/laba.rs +++ b/crates/bevy_color/src/laba.rs @@ -110,6 +111,24 @@ impl Alpha for Laba { } } +impl ClampColor for Laba { + fn clamped(&self) -> Self { + Self { + lightness: self.lightness.clamp(0., 1.5), + a: self.a.clamp(-1.5, 1.5), + b: self.b.clamp(-1.5, 1.5), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.5).contains(&self.lightness) + && (-1.5..=1.5).contains(&self.a) + && (-1.5..=1.5).contains(&self.b) + && (0. ..=1.).contains(&self.alpha) + } +} + impl Luminance for Laba { #[inline] fn with_luminance(&self, lightness: f32) -> Self { diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -1,4 +1,4 @@ -use crate::{Alpha, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -166,6 +166,24 @@ impl Luminance for Lcha { } } +impl ClampColor for Lcha { + fn clamped(&self) -> Self { + Self { + lightness: self.lightness.clamp(0., 1.5), + chroma: self.chroma.clamp(0., 1.5), + hue: self.hue.rem_euclid(360.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.5).contains(&self.lightness) + && (0. ..=1.5).contains(&self.chroma) + && (0. ..=360.).contains(&self.hue) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<Lcha> for Laba { fn from( Lcha { diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -1,6 +1,8 @@ use std::ops::{Div, Mul}; -use crate::{color_difference::EuclideanDistance, Alpha, Luminance, Mix, StandardColor}; +use crate::{ + color_difference::EuclideanDistance, Alpha, ClampColor, Luminance, Mix, StandardColor, +}; use bevy_math::Vec4; use bevy_reflect::prelude::*; use bytemuck::{Pod, Zeroable}; diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -256,6 +258,24 @@ impl EuclideanDistance for LinearRgba { } } +impl ClampColor for LinearRgba { + fn clamped(&self) -> Self { + Self { + red: self.red.clamp(0., 1.), + green: self.green.clamp(0., 1.), + blue: self.blue.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.).contains(&self.red) + && (0. ..=1.).contains(&self.green) + && (0. ..=1.).contains(&self.blue) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<LinearRgba> for [f32; 4] { fn from(color: LinearRgba) -> Self { [color.red, color.green, color.blue, color.alpha] diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -1,6 +1,6 @@ use crate::{ - color_difference::EuclideanDistance, Alpha, Hsla, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, - Srgba, StandardColor, Xyza, + color_difference::EuclideanDistance, Alpha, ClampColor, Hsla, Hsva, Hwba, Lcha, LinearRgba, + Luminance, Mix, Srgba, StandardColor, Xyza, }; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -149,6 +149,24 @@ impl EuclideanDistance for Oklaba { } } +impl ClampColor for Oklaba { + fn clamped(&self) -> Self { + Self { + lightness: self.lightness.clamp(0., 1.), + a: self.a.clamp(-1., 1.), + b: self.b.clamp(-1., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.).contains(&self.lightness) + && (-1. ..=1.).contains(&self.a) + && (-1. ..=1.).contains(&self.b) + && (0. ..=1.).contains(&self.alpha) + } +} + #[allow(clippy::excessive_precision)] impl From<LinearRgba> for Oklaba { fn from(value: LinearRgba) -> Self { diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -1,6 +1,6 @@ use crate::{ - color_difference::EuclideanDistance, Alpha, Hsla, Hsva, Hwba, Laba, Lcha, LinearRgba, - Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, + color_difference::EuclideanDistance, Alpha, ClampColor, Hsla, Hsva, Hwba, Laba, Lcha, + LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, }; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -209,6 +209,24 @@ impl From<Oklcha> for Oklaba { } } +impl ClampColor for Oklcha { + fn clamped(&self) -> Self { + Self { + lightness: self.lightness.clamp(0., 1.), + chroma: self.chroma.clamp(0., 1.), + hue: self.hue.rem_euclid(360.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.).contains(&self.lightness) + && (0. ..=1.).contains(&self.chroma) + && (0. ..=360.).contains(&self.hue) + && (0. ..=1.).contains(&self.alpha) + } +} + // Derived Conversions impl From<Hsla> for Oklcha { diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -1,7 +1,7 @@ use std::ops::{Div, Mul}; use crate::color_difference::EuclideanDistance; -use crate::{Alpha, LinearRgba, Luminance, Mix, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, LinearRgba, Luminance, Mix, StandardColor, Xyza}; use bevy_math::Vec4; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -307,6 +307,24 @@ impl EuclideanDistance for Srgba { } } +impl ClampColor for Srgba { + fn clamped(&self) -> Self { + Self { + red: self.red.clamp(0., 1.), + green: self.green.clamp(0., 1.), + blue: self.blue.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.).contains(&self.red) + && (0. ..=1.).contains(&self.green) + && (0. ..=1.).contains(&self.blue) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<LinearRgba> for Srgba { #[inline] fn from(value: LinearRgba) -> Self { diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -1,4 +1,4 @@ -use crate::{Alpha, LinearRgba, Luminance, Mix, StandardColor}; +use crate::{Alpha, ClampColor, LinearRgba, Luminance, Mix, StandardColor}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -134,6 +134,24 @@ impl Mix for Xyza { } } +impl ClampColor for Xyza { + fn clamped(&self) -> Self { + Self { + x: self.x.clamp(0., 1.), + y: self.y.clamp(0., 1.), + z: self.z.clamp(0., 1.), + alpha: self.alpha.clamp(0., 1.), + } + } + + fn is_within_bounds(&self) -> bool { + (0. ..=1.).contains(&self.x) + && (0. ..=1.).contains(&self.y) + && (0. ..=1.).contains(&self.z) + && (0. ..=1.).contains(&self.alpha) + } +} + impl From<LinearRgba> for Xyza { fn from( LinearRgba {
diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -357,4 +377,21 @@ mod tests { assert_approx_eq!(color.hue, reference.hue, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Hsla::hsl(361., 2., -1.); + let color_2 = Hsla::hsl(250.2762, 1., 0.67); + let mut color_3 = Hsla::hsl(-50., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Hsla::hsl(1., 1., 0.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Hsla::hsl(310., 1., 1.)); + } } diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -212,4 +230,21 @@ mod tests { assert_approx_eq!(color.hsv.alpha, hsv2.alpha, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Hsva::hsv(361., 2., -1.); + let color_2 = Hsva::hsv(250.2762, 1., 0.67); + let mut color_3 = Hsva::hsv(-50., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Hsva::hsv(1., 1., 0.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Hsva::hsv(310., 1., 1.)); + } } diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -245,4 +263,21 @@ mod tests { assert_approx_eq!(color.hwb.alpha, hwb2.alpha, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Hwba::hwb(361., 2., -1.); + let color_2 = Hwba::hwb(250.2762, 1., 0.67); + let mut color_3 = Hwba::hwb(-50., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Hwba::hwb(1., 1., 0.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Hwba::hwb(310., 1., 1.)); + } } diff --git a/crates/bevy_color/src/laba.rs b/crates/bevy_color/src/laba.rs --- a/crates/bevy_color/src/laba.rs +++ b/crates/bevy_color/src/laba.rs @@ -353,4 +372,21 @@ mod tests { assert_approx_eq!(color.lab.alpha, laba.alpha, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Laba::lab(-1., 2., -2.); + let color_2 = Laba::lab(1., 1.5, -1.2); + let mut color_3 = Laba::lab(-0.4, 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Laba::lab(0., 1.5, -1.5)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Laba::lab(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -313,4 +331,21 @@ mod tests { assert_approx_eq!(color.lch.alpha, lcha.alpha, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Lcha::lch(-1., 2., 400.); + let color_2 = Lcha::lch(1., 1.5, 249.54); + let mut color_3 = Lcha::lch(-0.4, 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Lcha::lch(0., 1.5, 40.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Lcha::lch(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -455,4 +475,21 @@ mod tests { let twice_as_light = color.lighter(0.2); assert!(lighter2.distance_squared(&twice_as_light) < 0.0001); } + + #[test] + fn test_clamp() { + let color_1 = LinearRgba::rgb(2., -1., 0.4); + let color_2 = LinearRgba::rgb(0.031, 0.749, 1.); + let mut color_3 = LinearRgba::rgb(-1., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), LinearRgba::rgb(1., 0., 0.4)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, LinearRgba::rgb(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -326,4 +344,21 @@ mod tests { assert_approx_eq!(oklaba.b, oklaba2.b, 0.001); assert_approx_eq!(oklaba.alpha, oklaba2.alpha, 0.001); } + + #[test] + fn test_clamp() { + let color_1 = Oklaba::lab(-1., 2., -2.); + let color_2 = Oklaba::lab(1., 0.42, -0.4); + let mut color_3 = Oklaba::lab(-0.4, 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Oklaba::lab(0., 1., -1.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Oklaba::lab(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -355,4 +373,21 @@ mod tests { assert_approx_eq!(oklcha.hue, oklcha2.hue, 0.001); assert_approx_eq!(oklcha.alpha, oklcha2.alpha, 0.001); } + + #[test] + fn test_clamp() { + let color_1 = Oklcha::lch(-1., 2., 400.); + let color_2 = Oklcha::lch(1., 1., 249.54); + let mut color_3 = Oklcha::lch(-0.4, 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Oklcha::lch(0., 1., 40.)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Oklcha::lch(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -490,4 +508,21 @@ mod tests { assert!(matches!(Srgba::hex("yyy"), Err(HexColorError::Parse(_)))); assert!(matches!(Srgba::hex("##fff"), Err(HexColorError::Parse(_)))); } + + #[test] + fn test_clamp() { + let color_1 = Srgba::rgb(2., -1., 0.4); + let color_2 = Srgba::rgb(0.031, 0.749, 1.); + let mut color_3 = Srgba::rgb(-1., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Srgba::rgb(1., 0., 0.4)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Srgba::rgb(0., 1., 1.)); + } } diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -208,4 +226,21 @@ mod tests { assert_approx_eq!(color.xyz.alpha, xyz2.alpha, 0.001); } } + + #[test] + fn test_clamp() { + let color_1 = Xyza::xyz(2., -1., 0.4); + let color_2 = Xyza::xyz(0.031, 0.749, 1.); + let mut color_3 = Xyza::xyz(-1., 1., 1.); + + assert!(!color_1.is_within_bounds()); + assert_eq!(color_1.clamped(), Xyza::xyz(1., 0., 0.4)); + + assert!(color_2.is_within_bounds()); + assert_eq!(color_2, color_2.clamped()); + + color_3.clamp(); + assert!(color_3.is_within_bounds()); + assert_eq!(color_3, Xyza::xyz(0., 1., 1.)); + } }
Clamp and Bounds for colors ## What problem does this solve or what need does it fill? Colors should implement a `Clamp`-like trait with a function `clamp` which clamps the color channels into their allowed ranges and a `WithinBounds` trait with a method which checks whether each channel of the color is within its allowed range. These methods could use the gamut, optimally obtained from `wgpu`. ## Additional context Originally proposed [in this comment](https://github.com/bevyengine/bevy/pull/12460#discussion_r1523942720)
2024-03-17T00:41:06Z
1.76
2024-03-17T20:51:02Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "color_range::tests::test_color_range", "hsla::tests::test_from_index", "hsla::tests::test_mix_wrap", "hsla::tests::test_to_from_srgba", "hsla::tests::test_to_from_linear", "hsla::tests::test_to_from_srgba_2", "hsva::tests::test_to_from_srgba_2", "hsva::tests::test_to_from_srgba", "hwba::tests::test_to_from_srgba", "hwba::tests::test_to_from_srgba_2", "laba::tests::test_to_from_linear", "laba::tests::test_to_from_srgba", "lcha::tests::test_to_from_linear", "lcha::tests::test_to_from_srgba", "linear_rgba::tests::darker_lighter", "linear_rgba::tests::euclidean_distance", "oklaba::tests::test_to_from_linear", "oklaba::tests::test_to_from_srgba", "oklaba::tests::test_to_from_srgba_2", "oklcha::tests::test_to_from_linear", "oklcha::tests::test_to_from_srgba", "oklcha::tests::test_to_from_srgba_2", "srgba::tests::darker_lighter", "srgba::tests::euclidean_distance", "srgba::tests::hex_color", "srgba::tests::test_to_from_linear", "xyza::tests::test_to_from_srgba", "xyza::tests::test_to_from_srgba_2", "crates/bevy_color/src/lib.rs - (line 58)", "crates/bevy_color/src/lib.rs - (line 85)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha (line 13)", "crates/bevy_color/src/lcha.rs - lcha::Lcha (line 10)", "crates/bevy_color/src/color.rs - color::Color (line 15)", "crates/bevy_color/src/srgba.rs - srgba::Srgba (line 15)", "crates/bevy_color/src/oklaba.rs - oklaba::Oklaba (line 13)", "crates/bevy_color/src/srgba.rs - srgba::Srgba::hex (line 118)", "crates/bevy_color/src/xyza.rs - xyza::Xyza (line 10)", "crates/bevy_color/src/hwba.rs - hwba::Hwba (line 15)", "crates/bevy_color/src/lcha.rs - lcha::Lcha::sequential_dispersed (line 81)", "crates/bevy_color/src/hsva.rs - hsva::Hsva (line 11)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha::sequential_dispersed (line 80)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,469
bevyengine__bevy-12469
[ "12139", "12139" ]
4b64d1d1d721a6974a6a06e57749227806f6835c
diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -139,7 +139,7 @@ type IdCursor = isize; /// [`Query::get`]: crate::system::Query::get /// [`World`]: crate::world::World /// [SemVer]: https://semver.org/ -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "bevy_reflect", derive(Reflect))] #[cfg_attr( feature = "bevy_reflect", diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -384,9 +384,15 @@ impl<'de> Deserialize<'de> for Entity { } } -impl fmt::Debug for Entity { +impl fmt::Display for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}v{}", self.index(), self.generation()) + write!( + f, + "{}v{}|{}", + self.index(), + self.generation(), + self.to_bits() + ) } }
diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -1147,4 +1153,14 @@ mod tests { assert_ne!(hash, first_hash); } } + + #[test] + fn entity_display() { + let entity = Entity::from_raw(42); + let string = format!("{}", entity); + let bits = entity.to_bits().to_string(); + assert!(string.contains("42")); + assert!(string.contains("v1")); + assert!(string.contains(&bits)); + } }
Inconsistency between `Debug` and serialized representation of `Entity` ## Bevy version 0.13 ## What went wrong There is an inconsistency between the `Debug` representation of an `Entity`: ```rust impl fmt::Debug for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}v{}", self.index(), self.generation()) } } ``` And its `Serialize` representation: ```rust impl Serialize for Entity { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: serde::Serializer, { serializer.serialize_u64(self.to_bits()) } } ``` This makes it difficult to debug serialized outputs, since the serialized entity IDs cannot be easily mapped to runtime entities via human inspection. Ideally, these representations should be consistent for easier debugging. ## Additional information I wanted to just open a PR on this, but I think the issue warrants some discussion. Mainly on two points: - Which representation is "correct"? - If we swap to #v# format for serialized data, are we ok with invalidating existing scenes? Inconsistency between `Debug` and serialized representation of `Entity` ## Bevy version 0.13 ## What went wrong There is an inconsistency between the `Debug` representation of an `Entity`: ```rust impl fmt::Debug for Entity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}v{}", self.index(), self.generation()) } } ``` And its `Serialize` representation: ```rust impl Serialize for Entity { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: serde::Serializer, { serializer.serialize_u64(self.to_bits()) } } ``` This makes it difficult to debug serialized outputs, since the serialized entity IDs cannot be easily mapped to runtime entities via human inspection. Ideally, these representations should be consistent for easier debugging. ## Additional information I wanted to just open a PR on this, but I think the issue warrants some discussion. Mainly on two points: - Which representation is "correct"? - If we swap to #v# format for serialized data, are we ok with invalidating existing scenes?
Ah: I know what we should do. The serialized representation should stay the same, optimized for information density. This is just an opaque identifier. However, we should make the debug representation more verbose, and report `index`, `generation` and `raw_bits` separately. In the future, we will be packing more information into here (e.g. entity disabling) that we want to add to the debug output, but we should avoid adding bloat (or semantic meaning) to the serialized representation. Displaying the raw bits separately gives us the best of both worlds, as users will be able to make this correspondence themselves. I like that idea. My only concern there is that the current "#v#" format for `Debug` is very compact. This makes it very useful for log messages, since the user can just do `info!("{entity:?} is a cool entity!")`. This would output something like: "2v2 is a cool entity" I'm concerned if we make the `Debug` more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. > I'm concerned if we make the Debug more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. That seems like a prime case for a `Display` impl then: "pretty, humand-readable output" is what belongs there. `Debug` should be maximally clear and helpful IMO. Just a random idea I had on this topic: If we take this approach, we could make the `Debug` impl compact as well. Maybe if we pick a format like: `#v#[raw_bits]` So then `Display` could look like `12v7`. And `Debug` could look like `12v7[12345678]` or `12v7.12345678` Alternatively, we could make `Display` use the `12v7.12345678` format, and `Debug` to be even more verbose with field names as needed. I like `12v7[12345678]` for the display impl, and then a properly verbose Debug impl :) Ah: I know what we should do. The serialized representation should stay the same, optimized for information density. This is just an opaque identifier. However, we should make the debug representation more verbose, and report `index`, `generation` and `raw_bits` separately. In the future, we will be packing more information into here (e.g. entity disabling) that we want to add to the debug output, but we should avoid adding bloat (or semantic meaning) to the serialized representation. Displaying the raw bits separately gives us the best of both worlds, as users will be able to make this correspondence themselves. I like that idea. My only concern there is that the current "#v#" format for `Debug` is very compact. This makes it very useful for log messages, since the user can just do `info!("{entity:?} is a cool entity!")`. This would output something like: "2v2 is a cool entity" I'm concerned if we make the `Debug` more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. > I'm concerned if we make the Debug more verbose, we'd lose this feature. This would open the door to people using either the entity index/generation or the raw bits in log messages, which would produce highly inconsistent log outputs overall. That seems like a prime case for a `Display` impl then: "pretty, humand-readable output" is what belongs there. `Debug` should be maximally clear and helpful IMO. Just a random idea I had on this topic: If we take this approach, we could make the `Debug` impl compact as well. Maybe if we pick a format like: `#v#[raw_bits]` So then `Display` could look like `12v7`. And `Debug` could look like `12v7[12345678]` or `12v7.12345678` Alternatively, we could make `Display` use the `12v7.12345678` format, and `Debug` to be even more verbose with field names as needed. I like `12v7[12345678]` for the display impl, and then a properly verbose Debug impl :)
2024-03-14T04:35:47Z
1.76
2024-03-14T23:54:21Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::as_deref_mut", "bundle::tests::component_hook_order_spawn_despawn", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_insert_remove", "change_detection::tests::mut_new", "bundle::tests::component_hook_order_recursive", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::change_tick_wraparound", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_tick_scan", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_bits_roundtrip", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::tests::ensure_reader_readonly", "event::tests::test_event_iter_len_updated", "event::tests::test_event_iter_last", "event::tests::test_event_reader_len_empty", "event::tests::test_event_reader_clear", "event::tests::test_event_reader_len_current", "event::tests::test_event_reader_len_filled", "event::tests::test_event_reader_len_update", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_send_events_ids", "event::tests::test_firing_empty_event", "event::tests::test_update_drain", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::id_comparison", "identifier::tests::from_bits", "query::access::tests::filtered_access_extend", "identifier::tests::id_construction", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "query::access::tests::read_all_access_conflicts", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_components", "query::builder::tests::builder_transmute", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_static", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::read_only_field_visibility", "query::fetch::tests::world_query_phantom_data", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_struct_variants", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_entity_mut", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_to_more_general", "query::state::tests::cannot_get_data_not_in_original_query", "query::tests::has_query", "query::tests::any_query", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::join_with_get", "query::state::tests::join", "query::tests::many_entities", "query::tests::multi_storage_query", "query::tests::query", "query::state::tests::right_world_get_many - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::tests::derived_worldqueries", "reflect::entity_commands::tests::remove_reflected", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::tests::self_conflicting_worldquery - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::tests::query_filtered_iter_combinations", "query::tests::query_iter_combinations_sparse", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::insert_reflected_with_registry", "schedule::condition::tests::distributive_run_if_compiles", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::clear_system", "schedule::tests::schedule_build_errors::ambiguity", "schedule::stepping::tests::continue_breakpoint", "schedule::tests::stepping::simple_executor", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::schedules", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::stepping::tests::remove_schedule", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::system_ambiguity::read_world", "schedule::stepping::tests::step_breakpoint", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::events", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "storage::blob_vec::tests::aligned_zst", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::before_and_after", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::resize_test", "system::commands::tests::append", "schedule::tests::system_ambiguity::correct_ambiguities", "storage::table::tests::table", "schedule::tests::system_ambiguity::read_only", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_resources", "system::commands::tests::commands", "system::function_system::tests::into_system_type_id_consistency", "schedule::stepping::tests::verify_cursor", "system::commands::tests::remove_components", "system::system::tests::command_processing", "system::system::tests::run_system_once", "system::system::tests::non_send_resources", "system::system::tests::run_two_systems", "system::system_name::tests::test_system_name_exclusive_param", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_param::tests::system_param_flexibility", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_invariant_lifetime", "schedule::tests::stepping::multi_threaded_executor", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "system::system_param::tests::system_param_phantom_data", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_param::tests::system_param_where_clause", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ordering::order_exclusive_systems", "schedule::tests::conditions::run_exclusive_system_with_condition", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_registry::tests::change_detection", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "system::system_registry::tests::exclusive_system", "system::system_param::tests::system_param_generic_bounds", "system::system_registry::tests::output_values", "system::system_registry::tests::nested_systems_with_inputs", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "system::system_param::tests::system_param_field_limit", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "system::system_param::tests::param_set_non_send_first", "schedule::tests::conditions::system_with_condition", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::tests::conditions::system_conditions_and_change_detection", "system::system_param::tests::param_set_non_send_second", "schedule::set::tests::test_schedule_label", "schedule::stepping::tests::step_run_if_false", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::schedule::tests::inserts_a_sync_point", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::tests::system_execution::run_system", "schedule::schedule::tests::disable_auto_sync_points", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::conditions::systems_with_distributive_condition", "system::tests::any_of_has_no_filter_with - should panic", "schedule::condition::tests::run_condition_combinators", "system::tests::assert_system_does_not_conflict - should panic", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::system_ordering::add_systems_correct_order", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "system::tests::any_of_has_filter_with_when_both_have_it", "event::tests::test_event_iter_nth", "system::tests::any_of_and_without", "system::tests::assert_systems", "system::tests::commands_param_set", "system::system_param::tests::non_sync_local", "system::system_registry::tests::nested_systems", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::condition::tests::run_condition", "system::tests::conflicting_query_immut_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_system_resources - should panic", "system::tests::get_system_conflicts", "schedule::tests::system_ordering::order_systems", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::long_life_test", "system::tests::conflicting_query_mut_system - should panic", "schedule::schedule::tests::no_sync_chain::chain_first", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::conflicting_query_sets_system - should panic", "system::tests::immutable_mut_test", "query::tests::par_iter_mut_change_detection", "system::tests::disjoint_query_mut_system", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::convert_mut_to_immut", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "system::tests::changed_resource_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_option_system", "schedule::schedule::tests::no_sync_chain::chain_second", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::into_iter_impl", "system::tests::local_system", "schedule::schedule::tests::no_sync_chain::chain_all", "system::tests::nonconflicting_system_resources", "schedule::schedule::tests::merges_sync_points_into_one", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::non_send_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_expanded_with_and_without_common", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::pipe_change_detection", "system::tests::or_has_filter_with", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_with_without_and_compatible_with_without", "system::tests::query_is_empty", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::read_system_state", "system::tests::simple_system", "system::tests::query_set_system", "system::tests::system_state_change_detection", "system::tests::system_state_invalid_world - should panic", "system::tests::panic_inside_system - should panic", "system::tests::or_param_set_system", "system::tests::system_state_archetype_update", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "system::tests::with_and_disjoint_or_empty_without - should panic", "tests::changed_query", "system::tests::removal_tracking", "tests::added_tracking", "system::tests::world_collections_system", "tests::despawn_mixed_storage", "tests::bundle_derive", "tests::added_queries", "tests::clear_entities", "tests::despawn_table_storage", "tests::empty_spawn", "tests::add_remove_components", "tests::changed_trackers", "tests::changed_trackers_sparse", "tests::entity_ref_and_mut_query_panic - should panic", "tests::duplicate_components_panic - should panic", "system::tests::test_combinator_clone", "tests::filtered_query_access", "tests::exact_size_query", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop_sparse", "tests::multiple_worlds_same_query_get - should panic", "tests::insert_or_spawn_batch_invalid", "tests::multiple_worlds_same_query_for_each - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::non_send_resource", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_panic - should panic", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all", "tests::query_all_for_each", "tests::query_filter_with", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::par_for_each_dense", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::par_for_each_sparse", "tests::query_missing_component", "tests::query_optional_component_sparse", "tests::remove", "tests::query_optional_component_sparse_no_match", "tests::remove_missing", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::reserve_and_spawn", "tests::query_sparse_component", "tests::query_single_component", "tests::resource", "tests::resource_scope", "tests::random_access", "tests::remove_tracking", "tests::reserve_entities_across_worlds", "tests::sparse_set_add_remove_many", "tests::spawn_batch", "tests::ref_and_mut_query_panic - should panic", "query::tests::query_filtered_exactsizeiterator_len", "tests::stateful_query_handles_new_archetype", "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::command_queue::test::test_command_queue_inner_drop_early", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::despawning_entity_updates_table_row", "tests::test_is_archetypal_size_hints", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "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::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_ids_unique", "world::identifier::tests::world_id_exclusive_system_param", "world::tests::custom_resource_with_layout", "world::tests::get_resource_by_id", "world::identifier::tests::world_id_system_param", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::tests::init_resource_does_not_overwrite", "world::tests::spawn_empty_bundle", "world::world_cell::tests::world_access_reused", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::world_cell::tests::world_cell", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "world::world_cell::tests::world_cell_double_mut - should panic", "world::world_cell::tests::world_cell_ref_and_ref", "world::world_cell::tests::world_cell_mut_and_ref - should panic", "world::world_cell::tests::world_cell_ref_and_mut - should panic", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 910) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 129) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 866) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 235) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 98) - compile fail", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 858) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 245) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 83)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 34)", "crates/bevy_ecs/src/component.rs - component::Component (line 104)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 23)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 58)", "crates/bevy_ecs/src/lib.rs - (line 290)", "crates/bevy_ecs/src/component.rs - component::Component (line 139)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 24)", "crates/bevy_ecs/src/lib.rs - (line 77)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 635)", "crates/bevy_ecs/src/lib.rs - (line 33)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 189)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 114)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 926)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 449)", "crates/bevy_ecs/src/component.rs - component::Component (line 39)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/component.rs - component::Component (line 85)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 506)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 31)", "crates/bevy_ecs/src/lib.rs - (line 242)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 166)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 101)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 214)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::States (line 33)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 463)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::State (line 78)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 55)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 738)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 532)", "crates/bevy_ecs/src/schedule/state.rs - schedule::state::NextState (line 146)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 100)", "crates/bevy_ecs/src/lib.rs - (line 94)", "crates/bevy_ecs/src/event.rs - event::Events (line 118)", "crates/bevy_ecs/src/event.rs - event::ManualEventReader (line 573)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 124)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 180)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 134)", "crates/bevy_ecs/src/lib.rs - (line 44)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 259)", "crates/bevy_ecs/src/lib.rs - (line 54)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1388)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 34)", "crates/bevy_ecs/src/event.rs - event::EventReader<'w,'s,E>::is_empty (line 449)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 690)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 103)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 586)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 100)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 58)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 287) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 256)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 255)", "crates/bevy_ecs/src/lib.rs - (line 257)", "crates/bevy_ecs/src/event.rs - event::EventWriter (line 483)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 652)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 556)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 244)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 540)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 82)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_exists (line 665)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 620)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1365)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 120)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 294)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 133)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 132)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::add (line 868)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 425)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::retain (line 891)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 214)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 188)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1197)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 619)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 888) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 996) - compile", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 349)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 832)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::state_changed (line 779)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 488)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 451)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 526)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 57)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 923)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 10)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 351)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 800)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 138)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 382)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 14)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 410) - compile fail", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 550)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1441) - compile fail", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 323)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 140)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1500)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::add (line 529)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 196)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 309)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 37)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 1417)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 375)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::try_insert (line 746)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 421)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 197)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 479)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::remove (line 792)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 820)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 176)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 763)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 9)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 785)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 876)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1543)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 211)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 478)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 41)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 579)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::id (line 658)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 938)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 57)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 559)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 190)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 144)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 425)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 102)", "crates/bevy_ecs/src/system/mod.rs - system::In (line 225)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 295)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1102)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 616)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 62)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 174)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 699)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 232)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1296)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 252)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::despawn (line 845)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1074)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 610)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 118)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 333)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 187)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 221)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 112) - compile", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 1410)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 101)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 22)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1220)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 114)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1149)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 82)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 45)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 147)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1253)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 676)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 417)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1383)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 805)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 1494)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 269)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 298)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 254)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 219)", "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>::get_single_mut (line 1179)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 455)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'_>::insert (line 693)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 211)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::in_state (line 710)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 1437)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 167)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 271)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 345)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 255)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 1292)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1165)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 24)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 1685)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1067)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 393)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 332)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 1218)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1036)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 438)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 1351)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 1266)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 970)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 758)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 849)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 1470)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 1517)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 254)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 1377)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 184)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 1322)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert_entry (line 1574)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 565)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 311)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity (line 512)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 1937)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 167)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 285)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 208)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 381)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 875)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1000)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 896)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 1573)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 2300)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 547)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 666)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 384)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 928)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_entity_mut (line 635)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 427)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 75)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 725)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 1549)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,426
bevyengine__bevy-12426
[ "12388" ]
2ee69807b11630a2564aa4c05153958cb5dec7d4
diff --git a/crates/bevy_gizmos/src/primitives/dim3.rs b/crates/bevy_gizmos/src/primitives/dim3.rs --- a/crates/bevy_gizmos/src/primitives/dim3.rs +++ b/crates/bevy_gizmos/src/primitives/dim3.rs @@ -134,18 +134,18 @@ impl<T: GizmoConfigGroup> Drop for SphereBuilder<'_, '_, '_, T> { // plane 3d -/// Builder for configuring the drawing options of [`Sphere`]. +/// Builder for configuring the drawing options of [`Plane3d`]. pub struct Plane3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> { gizmos: &'a mut Gizmos<'w, 's, T>, // direction of the normal orthogonal to the plane normal: Dir3, - // Rotation of the sphere around the origin in 3D space + // Rotation of the plane around the origin in 3D space rotation: Quat, - // Center position of the sphere in 3D space + // Center position of the plane in 3D space position: Vec3, - // Color of the sphere + // Color of the plane color: Color, // Number of axis to hint the plane diff --git a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs --- a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs +++ b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs @@ -3,8 +3,8 @@ use crate::{ bounding::{Bounded2d, BoundingCircle}, primitives::{ - BoxedPolyline3d, Capsule3d, Cone, ConicalFrustum, Cuboid, Cylinder, Line3d, Plane3d, - Polyline3d, Segment3d, Sphere, Torus, Triangle2d, + BoxedPolyline3d, Capsule3d, Cone, ConicalFrustum, Cuboid, Cylinder, InfinitePlane3d, + Line3d, Polyline3d, Segment3d, Sphere, Torus, Triangle2d, }, Dir3, Mat3, Quat, Vec2, Vec3, }; diff --git a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs --- a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs +++ b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs @@ -21,7 +21,7 @@ impl Bounded3d for Sphere { } } -impl Bounded3d for Plane3d { +impl Bounded3d for InfinitePlane3d { fn aabb_3d(&self, translation: Vec3, rotation: Quat) -> Aabb3d { let normal = rotation * *self.normal; let facing_x = normal == Vec3::X || normal == Vec3::NEG_X; diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -3,7 +3,7 @@ use std::f32::consts::{FRAC_PI_3, PI}; use super::{Circle, Primitive3d}; use crate::{ bounding::{Aabb3d, Bounded3d, BoundingSphere}, - Dir3, InvalidDirectionError, Mat3, Quat, Vec3, + Dir3, InvalidDirectionError, Mat3, Quat, Vec2, Vec3, }; /// A sphere primitive diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -67,33 +67,38 @@ impl Sphere { } } -/// An unbounded plane in 3D space. It forms a separating surface through the origin, -/// stretching infinitely far +/// A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. #[derive(Clone, Copy, Debug, PartialEq)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub struct Plane3d { /// The normal of the plane. The plane will be placed perpendicular to this direction pub normal: Dir3, + /// Half of the width and height of the plane + pub half_size: Vec2, } impl Primitive3d for Plane3d {} impl Default for Plane3d { - /// Returns the default [`Plane3d`] with a normal pointing in the `+Y` direction. + /// Returns the default [`Plane3d`] with a normal pointing in the `+Y` direction, width and height of `1.0`. fn default() -> Self { - Self { normal: Dir3::Y } + Self { + normal: Dir3::Y, + half_size: Vec2::splat(0.5), + } } } impl Plane3d { - /// Create a new `Plane3d` from a normal + /// Create a new `Plane3d` from a normal and a half size /// /// # Panics /// /// Panics if the given `normal` is zero (or very close to zero), or non-finite. #[inline(always)] - pub fn new(normal: Vec3) -> Self { + pub fn new(normal: Vec3, half_size: Vec2) -> Self { Self { normal: Dir3::new(normal).expect("normal must be nonzero and finite"), + half_size, } } diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -109,8 +114,71 @@ impl Plane3d { /// are *collinear* and lie on the same line. #[inline(always)] pub fn from_points(a: Vec3, b: Vec3, c: Vec3) -> (Self, Vec3) { - let normal = Dir3::new((b - a).cross(c - a)) - .expect("plane must be defined by three finite points that don't lie on the same line"); + let normal = Dir3::new((b - a).cross(c - a)).expect( + "finite plane must be defined by three finite points that don't lie on the same line", + ); + let translation = (a + b + c) / 3.0; + + ( + Self { + normal, + ..Default::default() + }, + translation, + ) + } +} + +/// An unbounded plane in 3D space. It forms a separating surface through the origin, +/// stretching infinitely far +#[derive(Clone, Copy, Debug, PartialEq)] +#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] +pub struct InfinitePlane3d { + /// The normal of the plane. The plane will be placed perpendicular to this direction + pub normal: Dir3, +} +impl Primitive3d for InfinitePlane3d {} + +impl Default for InfinitePlane3d { + /// Returns the default [`InfinitePlane3d`] with a normal pointing in the `+Y` direction. + fn default() -> Self { + Self { normal: Dir3::Y } + } +} + +impl InfinitePlane3d { + /// Create a new `InfinitePlane3d` from a normal + /// + /// # Panics + /// + /// Panics if the given `normal` is zero (or very close to zero), or non-finite. + #[inline(always)] + pub fn new<T: TryInto<Dir3>>(normal: T) -> Self + where + <T as TryInto<Dir3>>::Error: std::fmt::Debug, + { + Self { + normal: normal + .try_into() + .expect("normal must be nonzero and finite"), + } + } + + /// Create a new `InfinitePlane3d` based on three points and compute the geometric center + /// of those points. + /// + /// The direction of the plane normal is determined by the winding order + /// of the triangular shape formed by the points. + /// + /// # Panics + /// + /// Panics if a valid normal can not be computed, for example when the points + /// are *collinear* and lie on the same line. + #[inline(always)] + pub fn from_points(a: Vec3, b: Vec3, c: Vec3) -> (Self, Vec3) { + let normal = Dir3::new((b - a).cross(c - a)).expect( + "infinite plane must be defined by three finite points that don't lie on the same line", + ); let translation = (a + b + c) / 3.0; (Self { normal }, translation) diff --git a/crates/bevy_math/src/ray.rs b/crates/bevy_math/src/ray.rs --- a/crates/bevy_math/src/ray.rs +++ b/crates/bevy_math/src/ray.rs @@ -1,5 +1,5 @@ use crate::{ - primitives::{Plane2d, Plane3d}, + primitives::{InfinitePlane3d, Plane2d}, Dir2, Dir3, Vec2, Vec3, }; diff --git a/crates/bevy_math/src/ray.rs b/crates/bevy_math/src/ray.rs --- a/crates/bevy_math/src/ray.rs +++ b/crates/bevy_math/src/ray.rs @@ -79,7 +79,7 @@ impl Ray3d { /// Get the distance to a plane if the ray intersects it #[inline] - pub fn intersect_plane(&self, plane_origin: Vec3, plane: Plane3d) -> Option<f32> { + pub fn intersect_plane(&self, plane_origin: Vec3, plane: InfinitePlane3d) -> Option<f32> { let denominator = plane.normal.dot(*self.direction); if denominator.abs() > f32::EPSILON { let distance = (plane_origin - self.origin).dot(*plane.normal) / denominator; diff --git a/crates/bevy_reflect/src/impls/math/primitives3d.rs b/crates/bevy_reflect/src/impls/math/primitives3d.rs --- a/crates/bevy_reflect/src/impls/math/primitives3d.rs +++ b/crates/bevy_reflect/src/impls/math/primitives3d.rs @@ -1,6 +1,6 @@ use crate as bevy_reflect; use crate::{ReflectDeserialize, ReflectSerialize}; -use bevy_math::{primitives::*, Dir3, Vec3}; +use bevy_math::{primitives::*, Dir3, Vec2, Vec3}; use bevy_reflect_derive::impl_reflect; impl_reflect!( diff --git a/crates/bevy_reflect/src/impls/math/primitives3d.rs b/crates/bevy_reflect/src/impls/math/primitives3d.rs --- a/crates/bevy_reflect/src/impls/math/primitives3d.rs +++ b/crates/bevy_reflect/src/impls/math/primitives3d.rs @@ -16,6 +16,15 @@ impl_reflect!( #[type_path = "bevy_math::primitives"] struct Plane3d { normal: Dir3, + half_size: Vec2, + } +); + +impl_reflect!( + #[reflect(Debug, PartialEq, Serialize, Deserialize)] + #[type_path = "bevy_math::primitives"] + struct InfinitePlane3d { + normal: Dir3, } ); diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -7,21 +7,10 @@ use crate::{ }; /// A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Default)] pub struct PlaneMeshBuilder { /// The [`Plane3d`] shape. pub plane: Plane3d, - /// Half the size of the plane mesh. - pub half_size: Vec2, -} - -impl Default for PlaneMeshBuilder { - fn default() -> Self { - Self { - plane: Plane3d::default(), - half_size: Vec2::ONE, - } - } } impl PlaneMeshBuilder { diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -29,8 +18,10 @@ impl PlaneMeshBuilder { #[inline] pub fn new(normal: Dir3, size: Vec2) -> Self { Self { - plane: Plane3d { normal }, - half_size: size / 2.0, + plane: Plane3d { + normal, + half_size: size / 2.0, + }, } } diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -38,8 +29,10 @@ impl PlaneMeshBuilder { #[inline] pub fn from_size(size: Vec2) -> Self { Self { - half_size: size / 2.0, - ..Default::default() + plane: Plane3d { + half_size: size / 2.0, + ..Default::default() + }, } } diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -48,8 +41,10 @@ impl PlaneMeshBuilder { #[inline] pub fn from_length(length: f32) -> Self { Self { - half_size: Vec2::splat(length) / 2.0, - ..Default::default() + plane: Plane3d { + half_size: Vec2::splat(length) / 2.0, + ..Default::default() + }, } } diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -57,14 +52,17 @@ impl PlaneMeshBuilder { #[inline] #[doc(alias = "facing")] pub fn normal(mut self, normal: Dir3) -> Self { - self.plane = Plane3d { normal }; + self.plane = Plane3d { + normal, + ..self.plane + }; self } /// Sets the size of the plane mesh. #[inline] pub fn size(mut self, width: f32, height: f32) -> Self { - self.half_size = Vec2::new(width, height) / 2.0; + self.plane.half_size = Vec2::new(width, height) / 2.0; self } diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -72,10 +70,10 @@ impl PlaneMeshBuilder { pub fn build(&self) -> Mesh { let rotation = Quat::from_rotation_arc(Vec3::Y, *self.plane.normal); let positions = vec![ - rotation * Vec3::new(self.half_size.x, 0.0, -self.half_size.y), - rotation * Vec3::new(-self.half_size.x, 0.0, -self.half_size.y), - rotation * Vec3::new(-self.half_size.x, 0.0, self.half_size.y), - rotation * Vec3::new(self.half_size.x, 0.0, self.half_size.y), + rotation * Vec3::new(self.plane.half_size.x, 0.0, -self.plane.half_size.y), + rotation * Vec3::new(-self.plane.half_size.x, 0.0, -self.plane.half_size.y), + rotation * Vec3::new(-self.plane.half_size.x, 0.0, self.plane.half_size.y), + rotation * Vec3::new(self.plane.half_size.x, 0.0, self.plane.half_size.y), ]; let normals = vec![self.plane.normal.to_array(); 4]; diff --git a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs --- a/crates/bevy_render/src/mesh/primitives/dim3/plane.rs +++ b/crates/bevy_render/src/mesh/primitives/dim3/plane.rs @@ -97,10 +95,7 @@ impl Meshable for Plane3d { type Output = PlaneMeshBuilder; fn mesh(&self) -> Self::Output { - PlaneMeshBuilder { - plane: *self, - ..Default::default() - } + PlaneMeshBuilder { plane: *self } } } diff --git a/examples/3d/3d_viewport_to_world.rs b/examples/3d/3d_viewport_to_world.rs --- a/examples/3d/3d_viewport_to_world.rs +++ b/examples/3d/3d_viewport_to_world.rs @@ -29,7 +29,8 @@ fn draw_cursor( }; // Calculate if and where the ray is hitting the ground plane. - let Some(distance) = ray.intersect_plane(ground.translation(), Plane3d::new(ground.up())) + let Some(distance) = + ray.intersect_plane(ground.translation(), InfinitePlane3d::new(ground.up())) else { return; }; diff --git a/examples/3d/irradiance_volumes.rs b/examples/3d/irradiance_volumes.rs --- a/examples/3d/irradiance_volumes.rs +++ b/examples/3d/irradiance_volumes.rs @@ -499,7 +499,7 @@ fn handle_mouse_clicks( let Some(ray) = camera.viewport_to_world(camera_transform, mouse_position) else { return; }; - let Some(ray_distance) = ray.intersect_plane(Vec3::ZERO, Plane3d::new(Vec3::Y)) else { + let Some(ray_distance) = ray.intersect_plane(Vec3::ZERO, InfinitePlane3d::new(Vec3::Y)) else { return; }; let plane_intersection = ray.origin + ray.direction.normalize() * ray_distance; diff --git a/examples/math/render_primitives.rs b/examples/math/render_primitives.rs --- a/examples/math/render_primitives.rs +++ b/examples/math/render_primitives.rs @@ -166,7 +166,10 @@ const TRIANGLE: Triangle2d = Triangle2d { }; const PLANE_2D: Plane2d = Plane2d { normal: Dir2::Y }; -const PLANE_3D: Plane3d = Plane3d { normal: Dir3::Y }; +const PLANE_3D: Plane3d = Plane3d { + normal: Dir3::Y, + half_size: Vec2::new(BIG_3D, BIG_3D), +}; const LINE2D: Line2d = Line2d { direction: Dir2::X }; const LINE3D: Line3d = Line3d { direction: Dir3::X };
diff --git a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs --- a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs +++ b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs @@ -310,7 +310,7 @@ mod tests { use crate::{ bounding::Bounded3d, primitives::{ - Capsule3d, Cone, ConicalFrustum, Cuboid, Cylinder, Line3d, Plane3d, Polyline3d, + Capsule3d, Cone, ConicalFrustum, Cuboid, Cylinder, InfinitePlane3d, Line3d, Polyline3d, Segment3d, Sphere, Torus, }, Dir3, diff --git a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs --- a/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs +++ b/crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs @@ -334,23 +334,24 @@ mod tests { fn plane() { let translation = Vec3::new(2.0, 1.0, 0.0); - let aabb1 = Plane3d::new(Vec3::X).aabb_3d(translation, Quat::IDENTITY); + let aabb1 = InfinitePlane3d::new(Vec3::X).aabb_3d(translation, Quat::IDENTITY); assert_eq!(aabb1.min, Vec3::new(2.0, -f32::MAX / 2.0, -f32::MAX / 2.0)); assert_eq!(aabb1.max, Vec3::new(2.0, f32::MAX / 2.0, f32::MAX / 2.0)); - let aabb2 = Plane3d::new(Vec3::Y).aabb_3d(translation, Quat::IDENTITY); + let aabb2 = InfinitePlane3d::new(Vec3::Y).aabb_3d(translation, Quat::IDENTITY); assert_eq!(aabb2.min, Vec3::new(-f32::MAX / 2.0, 1.0, -f32::MAX / 2.0)); assert_eq!(aabb2.max, Vec3::new(f32::MAX / 2.0, 1.0, f32::MAX / 2.0)); - let aabb3 = Plane3d::new(Vec3::Z).aabb_3d(translation, Quat::IDENTITY); + let aabb3 = InfinitePlane3d::new(Vec3::Z).aabb_3d(translation, Quat::IDENTITY); assert_eq!(aabb3.min, Vec3::new(-f32::MAX / 2.0, -f32::MAX / 2.0, 0.0)); assert_eq!(aabb3.max, Vec3::new(f32::MAX / 2.0, f32::MAX / 2.0, 0.0)); - let aabb4 = Plane3d::new(Vec3::ONE).aabb_3d(translation, Quat::IDENTITY); + let aabb4 = InfinitePlane3d::new(Vec3::ONE).aabb_3d(translation, Quat::IDENTITY); assert_eq!(aabb4.min, Vec3::splat(-f32::MAX / 2.0)); assert_eq!(aabb4.max, Vec3::splat(f32::MAX / 2.0)); - let bounding_sphere = Plane3d::new(Vec3::Y).bounding_sphere(translation, Quat::IDENTITY); + let bounding_sphere = + InfinitePlane3d::new(Vec3::Y).bounding_sphere(translation, Quat::IDENTITY); assert_eq!(bounding_sphere.center, translation); assert_eq!(bounding_sphere.radius(), f32::MAX / 2.0); } diff --git a/crates/bevy_math/src/primitives/dim3.rs b/crates/bevy_math/src/primitives/dim3.rs --- a/crates/bevy_math/src/primitives/dim3.rs +++ b/crates/bevy_math/src/primitives/dim3.rs @@ -975,6 +1043,14 @@ mod tests { fn plane_from_points() { let (plane, translation) = Plane3d::from_points(Vec3::X, Vec3::Z, Vec3::NEG_X); assert_eq!(*plane.normal, Vec3::NEG_Y, "incorrect normal"); + assert_eq!(plane.half_size, Vec2::new(0.5, 0.5), "incorrect half size"); + assert_eq!(translation, Vec3::Z * 0.33333334, "incorrect translation"); + } + + #[test] + fn infinite_plane_from_points() { + let (plane, translation) = InfinitePlane3d::from_points(Vec3::X, Vec3::Z, Vec3::NEG_X); + assert_eq!(*plane.normal, Vec3::NEG_Y, "incorrect normal"); assert_eq!(translation, Vec3::Z * 0.33333334, "incorrect translation"); } diff --git a/crates/bevy_math/src/ray.rs b/crates/bevy_math/src/ray.rs --- a/crates/bevy_math/src/ray.rs +++ b/crates/bevy_math/src/ray.rs @@ -141,37 +141,40 @@ mod tests { // Orthogonal, and test that an inverse plane_normal has the same result assert_eq!( - ray.intersect_plane(Vec3::Z, Plane3d::new(Vec3::Z)), + ray.intersect_plane(Vec3::Z, InfinitePlane3d::new(Vec3::Z)), Some(1.0) ); assert_eq!( - ray.intersect_plane(Vec3::Z, Plane3d::new(Vec3::NEG_Z)), + ray.intersect_plane(Vec3::Z, InfinitePlane3d::new(Vec3::NEG_Z)), Some(1.0) ); assert!(ray - .intersect_plane(Vec3::NEG_Z, Plane3d::new(Vec3::Z)) + .intersect_plane(Vec3::NEG_Z, InfinitePlane3d::new(Vec3::Z)) .is_none()); assert!(ray - .intersect_plane(Vec3::NEG_Z, Plane3d::new(Vec3::NEG_Z)) + .intersect_plane(Vec3::NEG_Z, InfinitePlane3d::new(Vec3::NEG_Z)) .is_none()); // Diagonal assert_eq!( - ray.intersect_plane(Vec3::Z, Plane3d::new(Vec3::ONE)), + ray.intersect_plane(Vec3::Z, InfinitePlane3d::new(Vec3::ONE)), Some(1.0) ); assert!(ray - .intersect_plane(Vec3::NEG_Z, Plane3d::new(Vec3::ONE)) + .intersect_plane(Vec3::NEG_Z, InfinitePlane3d::new(Vec3::ONE)) .is_none()); // Parallel assert!(ray - .intersect_plane(Vec3::X, Plane3d::new(Vec3::X)) + .intersect_plane(Vec3::X, InfinitePlane3d::new(Vec3::X)) .is_none()); // Parallel with simulated rounding error assert!(ray - .intersect_plane(Vec3::X, Plane3d::new(Vec3::X + Vec3::Z * f32::EPSILON)) + .intersect_plane( + Vec3::X, + InfinitePlane3d::new(Vec3::X + Vec3::Z * f32::EPSILON) + ) .is_none()); } } diff --git a/examples/stress_tests/many_cubes.rs b/examples/stress_tests/many_cubes.rs --- a/examples/stress_tests/many_cubes.rs +++ b/examples/stress_tests/many_cubes.rs @@ -388,6 +388,7 @@ fn init_meshes(args: &Args, assets: &mut Assets<Mesh>) -> Vec<(Handle<Mesh>, Tra assets.add( Plane3d { normal: Dir3::NEG_Z, + half_size: Vec2::splat(0.5), } .mesh() .size(radius, radius),
Adding a `FlatSurface` or `Rect3d` ## What problem does this solve or what need does it fill? First of there are many names which describe this structure such as finite plane, bounded plane, flat surface or rect(3d). I'll go with rect3d for this post since it is the most intuitive to me. Currently, there is no primitive buildin to express a rect in 3d space. There are however usecases, such as: * Using the rect3d to for raycasting/collision detection (imagine looking through a portal) * Using the rect3d to describe a surface, such as a water surface * Using the rect3d to create meshes. The current alternative would be the [`Plane3d`](https://docs.rs/bevy/0.13.0/bevy/math/prelude/struct.Plane3d.html) which is describes a unbounded plane. Not quite what we need her but close. I also believe that separating the abstraction of a infinite and finite plane is necessary to avoid confusion and unwanted sideeffects down the line. This topic has already been raised by @alice-i-cecile in this issue https://github.com/bevyengine/bevy/issues/12243 ## What solution would you like? A struct `Rect3d` implementing `Meshable` and being a Bounding volume The actual name of the struct is open to debate
This is both for the mesh and the math primitive, correct? Correct :) Looking into this! I started working on this but I am a tad bit confused. In #12243, it is said that we currently have plane as a finite plane, which is true, in our 3d primitives, the plane is defined with a size of vec2. _Unless I missunderstood something_, we do miss a finite math primitive but not an actual mesh, because that one is derived from our current infinite 2d plane math primitive, so if I add a rect3d mesh and math primitive, we will end up having two finite ended plane primitive meshes. (plane3d and rect3d) So I guess this work is a precursor to making plane3d to be an infinite plane primitive mesh, which would come later down the line? Want to make sure our intention is to end up with 2 finite primitive plane meshes at the end of this PR.
2024-03-11T22:07:29Z
1.77
2024-07-06T02:00:28Z
257fec996fedfe8e3757b11720eb2ab8a21fbbb5
[ "bounding::bounded2d::aabb2d_tests::area", "bounding::bounded2d::aabb2d_tests::center", "bounding::bounded2d::aabb2d_tests::contains", "bounding::bounded2d::aabb2d_tests::grow", "bounding::bounded2d::aabb2d_tests::closest_point", "bounding::bounded2d::aabb2d_tests::half_size", "bounding::bounded2d::aabb2d_tests::intersect_aabb", "bounding::bounded2d::aabb2d_tests::intersect_bounding_circle", "bounding::bounded2d::aabb2d_tests::merge", "bounding::bounded2d::aabb2d_tests::scale_around_center", "bounding::bounded2d::aabb2d_tests::shrink", "bounding::bounded2d::aabb2d_tests::transform", "bounding::bounded2d::bounding_circle_tests::area", "bounding::bounded2d::bounding_circle_tests::closest_point", "bounding::bounded2d::bounding_circle_tests::contains", "bounding::bounded2d::bounding_circle_tests::contains_identical", "bounding::bounded2d::bounding_circle_tests::grow", "bounding::bounded2d::bounding_circle_tests::intersect_bounding_circle", "bounding::bounded2d::bounding_circle_tests::merge", "bounding::bounded2d::bounding_circle_tests::merge_identical", "bounding::bounded2d::bounding_circle_tests::scale_around_center", "bounding::bounded2d::bounding_circle_tests::shrink", "bounding::bounded2d::bounding_circle_tests::transform", "bounding::bounded2d::primitive_impls::tests::acute_triangle", "bounding::bounded2d::primitive_impls::tests::capsule", "bounding::bounded2d::primitive_impls::tests::circle", "bounding::bounded2d::primitive_impls::tests::ellipse", "bounding::bounded2d::primitive_impls::tests::line", "bounding::bounded2d::primitive_impls::tests::obtuse_triangle", "bounding::bounded2d::primitive_impls::tests::plane", "bounding::bounded2d::primitive_impls::tests::polygon", "bounding::bounded2d::primitive_impls::tests::polyline", "bounding::bounded2d::primitive_impls::tests::rectangle", "bounding::bounded2d::primitive_impls::tests::regular_polygon", "bounding::bounded2d::primitive_impls::tests::segment", "bounding::bounded3d::aabb3d_tests::area", "bounding::bounded3d::aabb3d_tests::center", "bounding::bounded3d::aabb3d_tests::closest_point", "bounding::bounded3d::aabb3d_tests::contains", "bounding::bounded3d::aabb3d_tests::grow", "bounding::bounded3d::aabb3d_tests::half_size", "bounding::bounded3d::aabb3d_tests::intersect_aabb", "bounding::bounded3d::aabb3d_tests::intersect_bounding_sphere", "bounding::bounded3d::aabb3d_tests::merge", "bounding::bounded3d::aabb3d_tests::scale_around_center", "bounding::bounded3d::aabb3d_tests::shrink", "bounding::bounded3d::aabb3d_tests::transform", "bounding::bounded3d::bounding_sphere_tests::area", "bounding::bounded3d::bounding_sphere_tests::closest_point", "bounding::bounded3d::bounding_sphere_tests::contains", "bounding::bounded3d::bounding_sphere_tests::contains_identical", "bounding::bounded3d::bounding_sphere_tests::grow", "bounding::bounded3d::bounding_sphere_tests::intersect_bounding_sphere", "bounding::bounded3d::bounding_sphere_tests::merge", "bounding::bounded3d::bounding_sphere_tests::merge_identical", "bounding::bounded3d::bounding_sphere_tests::scale_around_center", "bounding::bounded3d::bounding_sphere_tests::shrink", "bounding::bounded3d::bounding_sphere_tests::transform", "bounding::bounded3d::primitive_impls::tests::capsule", "bounding::bounded3d::primitive_impls::tests::cone", "bounding::bounded3d::primitive_impls::tests::conical_frustum", "bounding::bounded3d::primitive_impls::tests::cuboid", "bounding::bounded3d::primitive_impls::tests::cylinder", "bounding::bounded3d::primitive_impls::tests::line", "bounding::bounded3d::primitive_impls::tests::plane", "bounding::bounded3d::primitive_impls::tests::polyline", "bounding::bounded3d::primitive_impls::tests::segment", "bounding::bounded3d::primitive_impls::tests::sphere", "bounding::bounded3d::primitive_impls::tests::torus", "bounding::bounded3d::primitive_impls::tests::wide_conical_frustum", "bounding::raycast2d::tests::test_aabb_cast_hits", "bounding::raycast2d::tests::test_circle_cast_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_misses", "bounding::raycast2d::tests::test_ray_intersection_aabb_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_hits", "bounding::raycast2d::tests::test_ray_intersection_circle_misses", "bounding::raycast2d::tests::test_ray_intersection_circle_inside", "bounding::raycast3d::tests::test_aabb_cast_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_inside", "bounding::raycast3d::tests::test_ray_intersection_sphere_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_inside", "bounding::raycast3d::tests::test_sphere_cast_hits", "cubic_splines::tests::cardinal_control_pts", "cubic_splines::tests::easing_overshoot", "cubic_splines::tests::cubic_to_rational", "cubic_splines::tests::easing_simple", "cubic_splines::tests::easing_undershoot", "cubic_splines::tests::nurbs_circular_arc", "direction::tests::dir2_creation", "direction::tests::dir3_creation", "direction::tests::dir3a_creation", "float_ord::tests::float_ord_cmp", "cubic_splines::tests::cubic", "float_ord::tests::float_ord_cmp_operators", "float_ord::tests::float_ord_eq", "float_ord::tests::float_ord_hash", "primitives::dim2::tests::annulus_closest_point", "primitives::dim2::tests::annulus_math", "primitives::dim2::tests::circle_closest_point", "primitives::dim2::tests::circle_math", "primitives::dim2::tests::ellipse_math", "primitives::dim2::tests::rectangle_closest_point", "primitives::dim2::tests::rectangle_math", "primitives::dim2::tests::regular_polygon_math", "primitives::dim2::tests::triangle_circumcenter", "primitives::dim2::tests::regular_polygon_vertices", "primitives::dim2::tests::triangle_math", "primitives::dim2::tests::triangle_winding_order", "primitives::dim3::tests::capsule_math", "primitives::dim3::tests::cone_math", "primitives::dim3::tests::cuboid_closest_point", "primitives::dim3::tests::cuboid_math", "primitives::dim3::tests::cylinder_math", "primitives::dim3::tests::direction_creation", "primitives::dim3::tests::plane_from_points", "primitives::dim3::tests::sphere_closest_point", "primitives::dim3::tests::sphere_math", "primitives::dim3::tests::tetrahedron_math", "primitives::dim3::tests::torus_math", "ray::tests::intersect_plane_2d", "ray::tests::intersect_plane_3d", "rects::irect::tests::rect_inset", "rects::irect::tests::rect_intersect", "rects::irect::tests::rect_union", "rects::irect::tests::rect_union_pt", "rects::irect::tests::well_formed", "rects::rect::tests::rect_inset", "rects::rect::tests::rect_union", "rects::rect::tests::rect_intersect", "rects::rect::tests::rect_union_pt", "rects::rect::tests::well_formed", "rects::urect::tests::rect_inset", "rects::urect::tests::rect_intersect", "rects::urect::tests::rect_union", "rects::urect::tests::rect_union_pt", "rects::urect::tests::well_formed", "rotation2d::tests::add", "rotation2d::tests::creation", "rotation2d::tests::is_near_identity", "rotation2d::tests::length", "rotation2d::tests::nlerp", "rotation2d::tests::normalize", "rotation2d::tests::rotate", "rotation2d::tests::slerp", "rotation2d::tests::subtract", "rotation2d::tests::try_normalize", "sampling::shape_sampling::tests::circle_boundary_sampling", "sampling::shape_sampling::tests::circle_interior_sampling", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::width (line 126)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::intersect (line 260)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::new (line 29)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::new (line 29)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::contains (line 208)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::size (line 158)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_corners (line 46)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union (line 226)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_size (line 69)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::normalize (line 317)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union (line 214)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::contains (line 196)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::is_empty (line 113)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::height (line 141)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::height (line 140)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::size (line 154)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::width (line 130)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::center (line 191)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_corners (line 46)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::inset (line 288)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::width (line 127)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_half_size (line 90)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::new (line 29)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::height (line 144)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::is_empty (line 116)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::center (line 182)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union_point (line 249)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::nlerp (line 290)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicSegment<Vec2>::ease (line 701)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::contains (line 205)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union_point (line 246)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::center (line 194)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::is_empty (line 112)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::size (line 155)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_size (line 73)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBezier (line 32)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_size (line 73)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicBSpline (line 256)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicCardinalSpline (line 169)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::intersect (line 269)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union (line 223)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::half_size (line 176)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::intersect (line 272)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicHermite (line 97)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_half_size (line 94)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union_point (line 237)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::inset (line 297)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::half_size (line 173)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_boundary (line 33)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard (line 7)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d::slerp (line 328)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::half_size (line 168)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::inset (line 300)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard::FromRng (line 37)", "crates/bevy_math/src/cubic_splines.rs - cubic_splines::CubicNurbs (line 369)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rotation2d (line 11)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_interior (line 19)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,399
bevyengine__bevy-12399
[ "12200" ]
ba0f033e8f9dfed3d3a37aea97fbe6481dd2f905
diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -62,6 +62,24 @@ pub trait Alpha: Sized { } } +/// Trait for manipulating the hue of a color. +pub trait Hue: Sized { + /// Return a new version of this color with the hue channel set to the given value. + fn with_hue(&self, hue: f32) -> Self; + + /// Return the hue of this color [0.0, 360.0]. + fn hue(&self) -> f32; + + /// Sets the hue of this color. + fn set_hue(&mut self, hue: f32); + + /// Return a new version of this color with the hue channel rotated by the given degrees. + fn rotate_hue(&self, degrees: f32) -> Self { + let rotated_hue = (self.hue() + degrees).rem_euclid(360.); + self.with_hue(rotated_hue) + } +} + /// Trait with methods for asserting a colorspace is within bounds. /// /// During ordinary usage (e.g. reading images from disk, rendering images, picking colors for UI), colors should always be within their ordinary bounds (such as 0 to 1 for RGB colors). diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -1,5 +1,6 @@ use crate::{ - Alpha, ClampColor, Hsva, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza, + Alpha, ClampColor, Hsva, Hue, Hwba, Lcha, LinearRgba, Luminance, Mix, Srgba, StandardColor, + Xyza, }; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -54,11 +55,6 @@ impl Hsla { Self::new(hue, saturation, lightness, 1.0) } - /// Return a copy of this color with the hue channel set to the given value. - pub const fn with_hue(self, hue: f32) -> Self { - Self { hue, ..self } - } - /// Return a copy of this color with the saturation channel set to the given value. pub const fn with_saturation(self, saturation: f32) -> Self { Self { saturation, ..self } diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -143,6 +139,23 @@ impl Alpha for Hsla { } } +impl Hue for Hsla { + #[inline] + fn with_hue(&self, hue: f32) -> Self { + Self { hue, ..*self } + } + + #[inline] + fn hue(&self) -> f32 { + self.hue + } + + #[inline] + fn set_hue(&mut self, hue: f32) { + self.hue = hue; + } +} + impl Luminance for Hsla { #[inline] fn with_luminance(&self, lightness: f32) -> Self { diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -1,4 +1,4 @@ -use crate::{Alpha, ClampColor, Hwba, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Hue, Hwba, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -52,11 +52,6 @@ impl Hsva { Self::new(hue, saturation, value, 1.0) } - /// Return a copy of this color with the hue channel set to the given value. - pub const fn with_hue(self, hue: f32) -> Self { - Self { hue, ..self } - } - /// Return a copy of this color with the saturation channel set to the given value. pub const fn with_saturation(self, saturation: f32) -> Self { Self { saturation, ..self } diff --git a/crates/bevy_color/src/hsva.rs b/crates/bevy_color/src/hsva.rs --- a/crates/bevy_color/src/hsva.rs +++ b/crates/bevy_color/src/hsva.rs @@ -91,6 +86,23 @@ impl Alpha for Hsva { } } +impl Hue for Hsva { + #[inline] + fn with_hue(&self, hue: f32) -> Self { + Self { hue, ..*self } + } + + #[inline] + fn hue(&self) -> f32 { + self.hue + } + + #[inline] + fn set_hue(&mut self, hue: f32) { + self.hue = hue; + } +} + impl ClampColor for Hsva { fn clamped(&self) -> Self { Self { diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -2,7 +2,7 @@ //! in [_HWB - A More Intuitive Hue-Based Color Model_] by _Smith et al_. //! //! [_HWB - A More Intuitive Hue-Based Color Model_]: https://web.archive.org/web/20240226005220/http://alvyray.com/Papers/CG/HWB_JGTv208.pdf -use crate::{Alpha, ClampColor, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Hue, Lcha, LinearRgba, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -56,11 +56,6 @@ impl Hwba { Self::new(hue, whiteness, blackness, 1.0) } - /// Return a copy of this color with the hue channel set to the given value. - pub const fn with_hue(self, hue: f32) -> Self { - Self { hue, ..self } - } - /// Return a copy of this color with the whiteness channel set to the given value. pub const fn with_whiteness(self, whiteness: f32) -> Self { Self { whiteness, ..self } diff --git a/crates/bevy_color/src/hwba.rs b/crates/bevy_color/src/hwba.rs --- a/crates/bevy_color/src/hwba.rs +++ b/crates/bevy_color/src/hwba.rs @@ -95,6 +90,23 @@ impl Alpha for Hwba { } } +impl Hue for Hwba { + #[inline] + fn with_hue(&self, hue: f32) -> Self { + Self { hue, ..*self } + } + + #[inline] + fn hue(&self) -> f32 { + self.hue + } + + #[inline] + fn set_hue(&mut self, hue: f32) { + self.hue = hue; + } +} + impl ClampColor for Hwba { fn clamped(&self) -> Self { Self { diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -1,4 +1,4 @@ -use crate::{Alpha, ClampColor, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza}; +use crate::{Alpha, ClampColor, Hue, Laba, LinearRgba, Luminance, Mix, Srgba, StandardColor, Xyza}; use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -56,11 +56,6 @@ impl Lcha { } } - /// Return a copy of this color with the hue channel set to the given value. - pub const fn with_hue(self, hue: f32) -> Self { - Self { hue, ..self } - } - /// Return a copy of this color with the chroma channel set to the given value. pub const fn with_chroma(self, chroma: f32) -> Self { Self { chroma, ..self } diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -137,6 +132,23 @@ impl Alpha for Lcha { } } +impl Hue for Lcha { + #[inline] + fn with_hue(&self, hue: f32) -> Self { + Self { hue, ..*self } + } + + #[inline] + fn hue(&self) -> f32 { + self.hue + } + + #[inline] + fn set_hue(&mut self, hue: f32) { + self.hue = hue; + } +} + impl Luminance for Lcha { #[inline] fn with_luminance(&self, lightness: f32) -> Self { diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -1,5 +1,5 @@ use crate::{ - color_difference::EuclideanDistance, Alpha, ClampColor, Hsla, Hsva, Hwba, Laba, Lcha, + color_difference::EuclideanDistance, Alpha, ClampColor, Hsla, Hsva, Hue, Hwba, Laba, Lcha, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza, }; use bevy_reflect::prelude::*; diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -65,11 +65,6 @@ impl Oklcha { Self { chroma, ..self } } - /// Return a copy of this color with the 'hue' channel set to the given value. - pub const fn with_hue(self, hue: f32) -> Self { - Self { hue, ..self } - } - /// Generate a deterministic but [quasi-randomly distributed](https://en.wikipedia.org/wiki/Low-discrepancy_sequence) /// color from a provided `index`. /// diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -136,6 +131,23 @@ impl Alpha for Oklcha { } } +impl Hue for Oklcha { + #[inline] + fn with_hue(&self, hue: f32) -> Self { + Self { hue, ..*self } + } + + #[inline] + fn hue(&self) -> f32 { + self.hue + } + + #[inline] + fn set_hue(&mut self, hue: f32) { + self.hue = hue; + } +} + impl Luminance for Oklcha { #[inline] fn with_luminance(&self, lightness: f32) -> Self { diff --git a/examples/3d/animated_material.rs b/examples/3d/animated_material.rs --- a/examples/3d/animated_material.rs +++ b/examples/3d/animated_material.rs @@ -30,14 +30,19 @@ fn setup( )); let cube = meshes.add(Cuboid::new(0.5, 0.5, 0.5)); + + const GOLDEN_ANGLE: f32 = 137.507_77; + + let mut hsla = Hsla::hsl(0.0, 1.0, 0.5); for x in -1..2 { for z in -1..2 { commands.spawn(PbrBundle { mesh: cube.clone(), - material: materials.add(Color::WHITE), + material: materials.add(Color::from(hsla)), transform: Transform::from_translation(Vec3::new(x as f32, 0.0, z as f32)), ..default() }); + hsla = hsla.rotate_hue(GOLDEN_ANGLE); } } } diff --git a/examples/3d/animated_material.rs b/examples/3d/animated_material.rs --- a/examples/3d/animated_material.rs +++ b/examples/3d/animated_material.rs @@ -47,13 +52,11 @@ fn animate_materials( time: Res<Time>, mut materials: ResMut<Assets<StandardMaterial>>, ) { - for (i, material_handle) in material_handles.iter().enumerate() { + for material_handle in material_handles.iter() { if let Some(material) = materials.get_mut(material_handle) { - material.base_color = Color::hsl( - ((i as f32 * 2.345 + time.elapsed_seconds_wrapped()) * 100.0) % 360.0, - 1.0, - 0.5, - ); + if let Color::Hsla(ref mut hsla) = material.base_color { + *hsla = hsla.rotate_hue(time.delta_seconds() * 100.0); + } } } }
diff --git a/crates/bevy_color/src/color_ops.rs b/crates/bevy_color/src/color_ops.rs --- a/crates/bevy_color/src/color_ops.rs +++ b/crates/bevy_color/src/color_ops.rs @@ -78,3 +96,21 @@ pub trait ClampColor: Sized { /// Are all the fields of this color in bounds? fn is_within_bounds(&self) -> bool; } + +#[cfg(test)] +mod tests { + use super::*; + use crate::Hsla; + + #[test] + fn test_rotate_hue() { + let hsla = Hsla::hsl(180.0, 1.0, 0.5); + assert_eq!(hsla.rotate_hue(90.0), Hsla::hsl(270.0, 1.0, 0.5)); + assert_eq!(hsla.rotate_hue(-90.0), Hsla::hsl(90.0, 1.0, 0.5)); + assert_eq!(hsla.rotate_hue(180.0), Hsla::hsl(0.0, 1.0, 0.5)); + assert_eq!(hsla.rotate_hue(-180.0), Hsla::hsl(0.0, 1.0, 0.5)); + assert_eq!(hsla.rotate_hue(0.0), hsla); + assert_eq!(hsla.rotate_hue(360.0), hsla); + assert_eq!(hsla.rotate_hue(-360.0), hsla); + } +}
Add hue rotation traits Nit for future PR: We should add hue rotation traits to make this cleaner. _Originally posted by @bushrat011899 in https://github.com/bevyengine/bevy/pull/12163#discussion_r1506997793_ Much like the `Alpha` trait, we should provide easy ways to "rotate" the hue of colors: shifting them by a provided number of degrees to rotate the metaphorical color wheel. This trait should only be implemented for the color models (types) with an explicit hue element: other color types should be converted to one of those spaces first. Once basic hue rotation is added, we can add nice color theory options: things like "complementary colors" (rotate by 180 degrees), "triadic colors" (rotate by 120 degrees), analogous colors and so on.
If nobody is working on it, I'll give it a try. That would be lovely :) Feel free to open a draft PR and ping me if you run into difficulties.
2024-03-10T05:51:01Z
1.76
2024-05-03T20:25:31Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "hsla::tests::test_from_index", "color_range::tests::test_color_range", "hsla::tests::test_mix_wrap", "hsla::tests::test_clamp", "hsla::tests::test_to_from_srgba", "hsla::tests::test_to_from_linear", "hsla::tests::test_to_from_srgba_2", "hsva::tests::test_clamp", "hsva::tests::test_to_from_srgba", "hsva::tests::test_to_from_srgba_2", "hwba::tests::test_clamp", "hwba::tests::test_to_from_srgba", "hwba::tests::test_to_from_srgba_2", "laba::tests::test_clamp", "laba::tests::test_to_from_linear", "laba::tests::test_to_from_srgba", "lcha::tests::test_clamp", "lcha::tests::test_to_from_linear", "lcha::tests::test_to_from_srgba", "linear_rgba::tests::darker_lighter", "linear_rgba::tests::euclidean_distance", "linear_rgba::tests::test_clamp", "oklaba::tests::test_clamp", "oklaba::tests::test_to_from_linear", "oklaba::tests::test_to_from_srgba", "oklaba::tests::test_to_from_srgba_2", "oklcha::tests::test_clamp", "oklcha::tests::test_to_from_linear", "oklcha::tests::test_to_from_srgba", "srgba::tests::darker_lighter", "oklcha::tests::test_to_from_srgba_2", "srgba::tests::euclidean_distance", "srgba::tests::hex_color", "srgba::tests::test_clamp", "srgba::tests::test_to_from_linear", "xyza::tests::test_clamp", "xyza::tests::test_to_from_srgba", "xyza::tests::test_to_from_srgba_2", "crates/bevy_color/src/linear_rgba.rs - linear_rgba::LinearRgba (line 15)", "crates/bevy_color/src/srgba.rs - srgba::Srgba::hex (line 118)", "crates/bevy_color/src/xyza.rs - xyza::Xyza (line 12)", "crates/bevy_color/src/laba.rs - laba::Laba (line 13)", "crates/bevy_color/src/srgba.rs - srgba::Srgba (line 15)", "crates/bevy_color/src/color.rs - color::Color (line 15)", "crates/bevy_color/src/lib.rs - (line 58)", "crates/bevy_color/src/hsva.rs - hsva::Hsva (line 11)", "crates/bevy_color/src/lib.rs - (line 91)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha (line 13)", "crates/bevy_color/src/hwba.rs - hwba::Hwba (line 15)", "crates/bevy_color/src/lcha.rs - lcha::Lcha (line 10)", "crates/bevy_color/src/oklaba.rs - oklaba::Oklaba (line 13)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,268
bevyengine__bevy-12268
[ "12255", "12255", "12255" ]
13cbb9cf10001fe07f20b3bc51753a55f3211728
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -2,14 +2,13 @@ mod convert; pub mod debug; use crate::{ContentSize, DefaultUiCamera, Node, Outline, Style, TargetCamera, UiScale}; -use bevy_ecs::entity::EntityHashMap; use bevy_ecs::{ change_detection::{DetectChanges, DetectChangesMut}, - entity::Entity, + entity::{Entity, EntityHashMap}, event::EventReader, query::{With, Without}, removal_detection::RemovedComponents, - system::{Query, Res, ResMut, Resource}, + system::{Query, Res, ResMut, Resource, SystemParam}, world::Ref, }; use bevy_hierarchy::{Children, Parent}; diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -53,6 +52,7 @@ struct RootNodePair { #[derive(Resource)] pub struct UiSurface { entity_to_taffy: EntityHashMap<taffy::node::Node>, + camera_entity_to_taffy: EntityHashMap<taffy::node::Node>, camera_roots: EntityHashMap<Vec<RootNodePair>>, taffy: Taffy, } diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -79,6 +79,7 @@ impl Default for UiSurface { taffy.disable_rounding(); Self { entity_to_taffy: Default::default(), + camera_entity_to_taffy: Default::default(), camera_roots: Default::default(), taffy, } diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -167,6 +168,10 @@ without UI components as a child of an entity with UI components, results may be ..default() }; + let camera_node = *self + .camera_entity_to_taffy + .entry(camera_id) + .or_insert_with(|| self.taffy.new_leaf(viewport_style.clone()).unwrap()); let existing_roots = self.camera_roots.entry(camera_id).or_default(); let mut new_roots = Vec::new(); for entity in children { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -181,24 +186,16 @@ without UI components as a child of an entity with UI components, results may be self.taffy.remove_child(previous_parent, node).unwrap(); } + self.taffy.add_child(camera_node, node).unwrap(); + RootNodePair { - implicit_viewport_node: self - .taffy - .new_with_children(viewport_style.clone(), &[node]) - .unwrap(), + implicit_viewport_node: camera_node, user_root_node: node, } }); new_roots.push(root_node); } - // Cleanup the implicit root nodes of any user root nodes that have been removed - for old_root in existing_roots { - if !new_roots.contains(old_root) { - self.taffy.remove(old_root.implicit_viewport_node).unwrap(); - } - } - self.camera_roots.insert(camera_id, new_roots); } diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -219,6 +216,15 @@ without UI components as a child of an entity with UI components, results may be } } + /// Removes each camera entity from the internal map and then removes their associated node from taffy + pub fn remove_camera_entities(&mut self, entities: impl IntoIterator<Item = Entity>) { + for entity in entities { + if let Some(node) = self.camera_entity_to_taffy.remove(&entity) { + self.taffy.remove(node).unwrap(); + } + } + } + /// Removes each entity from the internal map and then removes their associated node from taffy pub fn remove_entities(&mut self, entities: impl IntoIterator<Item = Entity>) { for entity in entities { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -253,6 +259,14 @@ pub enum LayoutError { TaffyError(#[from] taffy::error::TaffyError), } +#[derive(SystemParam)] +pub struct UiLayoutSystemRemovedComponentParam<'w, 's> { + removed_cameras: RemovedComponents<'w, 's, Camera>, + removed_children: RemovedComponents<'w, 's, Children>, + removed_content_sizes: RemovedComponents<'w, 's, ContentSize>, + removed_nodes: RemovedComponents<'w, 's, Node>, +} + /// Updates the UI's layout tree, computes the new layout geometry and then updates the sizes and transforms of all the UI nodes. #[allow(clippy::too_many_arguments)] pub fn ui_layout_system( diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -268,9 +282,7 @@ pub fn ui_layout_system( mut measure_query: Query<(Entity, &mut ContentSize)>, children_query: Query<(Entity, Ref<Children>), With<Node>>, just_children_query: Query<&Children>, - mut removed_children: RemovedComponents<Children>, - mut removed_content_sizes: RemovedComponents<ContentSize>, - mut removed_nodes: RemovedComponents<Node>, + mut removed_components: UiLayoutSystemRemovedComponentParam, mut node_transform_query: Query<(&mut Node, &mut Transform)>, ) { struct CameraLayoutInfo { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -357,7 +369,7 @@ pub fn ui_layout_system( scale_factor_events.clear(); // When a `ContentSize` component is removed from an entity, we need to remove the measure from the corresponding taffy node. - for entity in removed_content_sizes.read() { + for entity in removed_components.removed_content_sizes.read() { ui_surface.try_remove_measure(entity); } for (entity, mut content_size) in &mut measure_query { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -367,15 +379,24 @@ pub fn ui_layout_system( } // clean up removed nodes - ui_surface.remove_entities(removed_nodes.read()); + ui_surface.remove_entities(removed_components.removed_nodes.read()); + + // clean up removed cameras + ui_surface.remove_camera_entities(removed_components.removed_cameras.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = + if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children - for entity in removed_children.read() { + for entity in removed_components.removed_children.read() { ui_surface.try_remove_children(entity); } for (entity, children) in &children_query {
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -521,17 +542,20 @@ mod tests { use bevy_core_pipeline::core_2d::Camera2dBundle; use bevy_ecs::entity::Entity; use bevy_ecs::event::Events; + use bevy_ecs::prelude::{Commands, Component, In, Query, With}; use bevy_ecs::schedule::apply_deferred; use bevy_ecs::schedule::IntoSystemConfigs; use bevy_ecs::schedule::Schedule; + use bevy_ecs::system::RunSystemOnce; use bevy_ecs::world::World; use bevy_hierarchy::despawn_with_children_recursive; use bevy_hierarchy::BuildWorldChildren; use bevy_hierarchy::Children; - use bevy_math::vec2; use bevy_math::Vec2; + use bevy_math::{vec2, UVec2}; use bevy_render::camera::ManualTextureViews; use bevy_render::camera::OrthographicProjection; + use bevy_render::prelude::Camera; use bevy_render::texture::Image; use bevy_utils::prelude::default; use bevy_utils::HashMap; diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -657,6 +681,54 @@ mod tests { assert!(ui_surface.entity_to_taffy.is_empty()); } + #[test] + fn ui_surface_tracks_camera_entities() { + let (mut world, mut ui_schedule) = setup_ui_test_world(); + + // despawn all cameras so we can reset ui_surface back to a fresh state + let camera_entities = world + .query_filtered::<Entity, With<Camera>>() + .iter(&world) + .collect::<Vec<_>>(); + for camera_entity in camera_entities { + world.despawn(camera_entity); + } + + ui_schedule.run(&mut world); + + // no UI entities in world, none in UiSurface + let ui_surface = world.resource::<UiSurface>(); + assert!(ui_surface.camera_entity_to_taffy.is_empty()); + + // respawn camera + let camera_entity = world.spawn(Camera2dBundle::default()).id(); + + let ui_entity = world + .spawn((NodeBundle::default(), TargetCamera(camera_entity))) + .id(); + + // `ui_layout_system` should map `camera_entity` to a ui node in `UiSurface::camera_entity_to_taffy` + ui_schedule.run(&mut world); + + let ui_surface = world.resource::<UiSurface>(); + assert!(ui_surface + .camera_entity_to_taffy + .contains_key(&camera_entity)); + assert_eq!(ui_surface.camera_entity_to_taffy.len(), 1); + + world.despawn(ui_entity); + world.despawn(camera_entity); + + // `ui_layout_system` should remove `camera_entity` from `UiSurface::camera_entity_to_taffy` + ui_schedule.run(&mut world); + + let ui_surface = world.resource::<UiSurface>(); + assert!(!ui_surface + .camera_entity_to_taffy + .contains_key(&camera_entity)); + assert!(ui_surface.camera_entity_to_taffy.is_empty()); + } + #[test] #[should_panic] fn despawning_a_ui_entity_should_remove_its_corresponding_ui_node() { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -785,6 +857,149 @@ mod tests { assert!(ui_surface.entity_to_taffy.is_empty()); } + #[test] + fn ui_node_should_properly_update_when_changing_target_camera() { + #[derive(Component)] + struct MovingUiNode; + + fn update_camera_viewports( + primary_window_query: Query<&Window, With<PrimaryWindow>>, + mut cameras: Query<&mut Camera>, + ) { + let primary_window = primary_window_query + .get_single() + .expect("missing primary window"); + let camera_count = cameras.iter().len(); + for (camera_index, mut camera) in cameras.iter_mut().enumerate() { + let viewport_width = + primary_window.resolution.physical_width() / camera_count as u32; + let viewport_height = primary_window.resolution.physical_height(); + let physical_position = UVec2::new(viewport_width * camera_index as u32, 0); + let physical_size = UVec2::new(viewport_width, viewport_height); + camera.viewport = Some(bevy_render::camera::Viewport { + physical_position, + physical_size, + ..default() + }); + } + } + + fn move_ui_node( + In(pos): In<Vec2>, + mut commands: Commands, + cameras: Query<(Entity, &Camera)>, + moving_ui_query: Query<Entity, With<MovingUiNode>>, + ) { + let (target_camera_entity, _) = cameras + .iter() + .find(|(_, camera)| { + let Some(logical_viewport_rect) = camera.logical_viewport_rect() else { + panic!("missing logical viewport") + }; + // make sure cursor is in viewport and that viewport has at least 1px of size + logical_viewport_rect.contains(pos) + && logical_viewport_rect.max.cmpge(Vec2::splat(0.)).any() + }) + .expect("cursor position outside of camera viewport"); + for moving_ui_entity in moving_ui_query.iter() { + commands + .entity(moving_ui_entity) + .insert(TargetCamera(target_camera_entity)) + .insert(Style { + position_type: PositionType::Absolute, + top: Val::Px(pos.y), + left: Val::Px(pos.x), + ..default() + }); + } + } + + fn do_move_and_test( + world: &mut World, + ui_schedule: &mut Schedule, + new_pos: Vec2, + expected_camera_entity: &Entity, + ) { + world.run_system_once_with(new_pos, move_ui_node); + ui_schedule.run(world); + let (ui_node_entity, TargetCamera(target_camera_entity)) = world + .query_filtered::<(Entity, &TargetCamera), With<MovingUiNode>>() + .get_single(world) + .expect("missing MovingUiNode"); + assert_eq!(expected_camera_entity, target_camera_entity); + let ui_surface = world.resource::<UiSurface>(); + + let layout = ui_surface + .get_layout(ui_node_entity) + .expect("failed to get layout"); + + // negative test for #12255 + assert_eq!(Vec2::new(layout.location.x, layout.location.y), new_pos); + } + + fn get_taffy_node_count(world: &World) -> usize { + world.resource::<UiSurface>().taffy.total_node_count() + } + + let (mut world, mut ui_schedule) = setup_ui_test_world(); + + world.spawn(Camera2dBundle { + camera: Camera { + order: 1, + ..default() + }, + ..default() + }); + + world.spawn(( + NodeBundle { + style: Style { + position_type: PositionType::Absolute, + top: Val::Px(0.), + left: Val::Px(0.), + ..default() + }, + ..default() + }, + MovingUiNode, + )); + + ui_schedule.run(&mut world); + + let pos_inc = Vec2::splat(1.); + let total_cameras = world.query::<&Camera>().iter(&world).len(); + // add total cameras - 1 (the assumed default) to get an idea for how many nodes we should expect + let expected_max_taffy_node_count = get_taffy_node_count(&world) + total_cameras - 1; + + world.run_system_once(update_camera_viewports); + + ui_schedule.run(&mut world); + + let viewport_rects = world + .query::<(Entity, &Camera)>() + .iter(&world) + .map(|(e, c)| (e, c.logical_viewport_rect().expect("missing viewport"))) + .collect::<Vec<_>>(); + + for (camera_entity, viewport) in viewport_rects.iter() { + let target_pos = viewport.min + pos_inc; + do_move_and_test(&mut world, &mut ui_schedule, target_pos, camera_entity); + } + + // reverse direction + let mut viewport_rects = viewport_rects.clone(); + viewport_rects.reverse(); + for (camera_entity, viewport) in viewport_rects.iter() { + let target_pos = viewport.max - pos_inc; + do_move_and_test(&mut world, &mut ui_schedule, target_pos, camera_entity); + } + + let current_taffy_node_count = get_taffy_node_count(&world); + if current_taffy_node_count > expected_max_taffy_node_count { + panic!("extra taffy nodes detected: current: {current_taffy_node_count} max expected: {expected_max_taffy_node_count}"); + } + } + #[test] fn ui_node_should_be_set_to_its_content_size() { let (mut world, mut ui_schedule) = setup_ui_test_world();
UI element positioning bug updating TargetCamera on cursor transition between Viewports in multi-camera setup ## Bevy version 0.13 ## What you did From [trying to upgrade bevy_mod_picking to support bevy 0.13](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) I noticed some odd behavior when using multiple active cameras and updating the `TargetCamera` for some text that follows the cursor. clean room example: https://github.com/StrikeForceZero/bevy-cleanroom/blob/example/multi_camera_target_camera_update/src/main.rs ## What went wrong - what were you expecting? The text to continue follow the cursor after changing TargetCamera when entering a new viewport - what actually happened? The text gets stuck at an arbitrary location and stops updating until moving back into the other viewport ## Additional information The workaround I have proposed in that PR for now is just maintaining a UI node for each camera and toggling their visibility when the cursor enters or leaves the viewport. [See this comment for observation details](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) Here is a video show casing the cleanroom example. 2 cameras split vertically. https://github.com/bevyengine/bevy/assets/983413/6e7e5978-0a36-49fd-85b8-6822d14a20d7 UI element positioning bug updating TargetCamera on cursor transition between Viewports in multi-camera setup ## Bevy version 0.13 ## What you did From [trying to upgrade bevy_mod_picking to support bevy 0.13](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) I noticed some odd behavior when using multiple active cameras and updating the `TargetCamera` for some text that follows the cursor. clean room example: https://github.com/StrikeForceZero/bevy-cleanroom/blob/example/multi_camera_target_camera_update/src/main.rs ## What went wrong - what were you expecting? The text to continue follow the cursor after changing TargetCamera when entering a new viewport - what actually happened? The text gets stuck at an arbitrary location and stops updating until moving back into the other viewport ## Additional information The workaround I have proposed in that PR for now is just maintaining a UI node for each camera and toggling their visibility when the cursor enters or leaves the viewport. [See this comment for observation details](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) Here is a video show casing the cleanroom example. 2 cameras split vertically. https://github.com/bevyengine/bevy/assets/983413/6e7e5978-0a36-49fd-85b8-6822d14a20d7 UI element positioning bug updating TargetCamera on cursor transition between Viewports in multi-camera setup ## Bevy version 0.13 ## What you did From [trying to upgrade bevy_mod_picking to support bevy 0.13](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) I noticed some odd behavior when using multiple active cameras and updating the `TargetCamera` for some text that follows the cursor. clean room example: https://github.com/StrikeForceZero/bevy-cleanroom/blob/example/multi_camera_target_camera_update/src/main.rs ## What went wrong - what were you expecting? The text to continue follow the cursor after changing TargetCamera when entering a new viewport - what actually happened? The text gets stuck at an arbitrary location and stops updating until moving back into the other viewport ## Additional information The workaround I have proposed in that PR for now is just maintaining a UI node for each camera and toggling their visibility when the cursor enters or leaves the viewport. [See this comment for observation details](https://github.com/aevyrie/bevy_mod_picking/pull/314#issuecomment-1974034094) Here is a video show casing the cleanroom example. 2 cameras split vertically. https://github.com/bevyengine/bevy/assets/983413/6e7e5978-0a36-49fd-85b8-6822d14a20d7
Poking at the engine source it might be related to somewhere near here https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L420-L420 Logging `absolute_location` I can see it update normally as I move the mouse cursor around. Once I back to the side that it breaks for the value stops updating until I move back to the other viewport. ## Edit: it appears as if `layout_location` is whats not updating. ## Edit 2: Might be due to this not running? https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L178-L191 ```rust // .find(|n| n.user_root_node == node) .find(|n| false) ``` if you replace the find above it to never find and always execute the `unwrap_or_else` it appears to prevent the bug from happening at the expense of other side effects. Taking a guess here but I think since the `ui_surface.get_layout` call fails to provide a useful value there might be an issue with reassigning the ui node to a new parent? ## Edit 3: ~~this might be because `RootNodePair.user_root_node` is always set to the first entity spawned in `1v1`~~ nvm thats the taffy node id This partially fixes it, but at the cost of incrementing the taffy ids each time the `TargetCamera` is updated. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -370,8 +370,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Ok, I think this fixes it without extraneously incrementing the taffy ids. Not sure if there's any consequences to having the camera taffy nodes living on root of the tree along with the UI nodes, but for my clean room example it works. I'm gonna try to figure out how to run the tests and if they pass I'll make a PR. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -167,6 +167,7 @@ ..default() }; + let camera_node = *self.entity_to_taffy.entry(camera_id).or_insert(self.taffy.new_leaf(viewport_style.clone()).unwrap()); let existing_roots = self.camera_roots.entry(camera_id).or_default(); let mut new_roots = Vec::new(); for entity in children { @@ -181,24 +182,16 @@ self.taffy.remove_child(previous_parent, node).unwrap(); } + self.taffy.add_child(camera_node, node).unwrap(); + RootNodePair { - implicit_viewport_node: self - .taffy - .new_with_children(viewport_style.clone(), &[node]) - .unwrap(), + implicit_viewport_node: camera_node, user_root_node: node, } }); new_roots.push(root_node); } - // Cleanup the implicit root nodes of any user root nodes that have been removed - for old_root in existing_roots { - if !new_roots.contains(old_root) { - self.taffy.remove(old_root.implicit_viewport_node).unwrap(); - } - } - self.camera_roots.insert(camera_id, new_roots); } @@ -370,8 +363,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Please ping me on the PR: I'm keen to get this fixed. > Ok, I think this fixes it without extraneously incrementing the taffy ids. @StrikeForceZero Hmm... this seems to be creating one "implicit viewport node" per camera (viewport) rather than one for each direct child of the camera (viewport). I think this will break the case when there are multiple ui trees as children of a camera which are currently laid out independently (but I think the proposed patch will cause them to be laid out in a grid). Poking at the engine source it might be related to somewhere near here https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L420-L420 Logging `absolute_location` I can see it update normally as I move the mouse cursor around. Once I back to the side that it breaks for the value stops updating until I move back to the other viewport. ## Edit: it appears as if `layout_location` is whats not updating. ## Edit 2: Might be due to this not running? https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L178-L191 ```rust // .find(|n| n.user_root_node == node) .find(|n| false) ``` if you replace the find above it to never find and always execute the `unwrap_or_else` it appears to prevent the bug from happening at the expense of other side effects. Taking a guess here but I think since the `ui_surface.get_layout` call fails to provide a useful value there might be an issue with reassigning the ui node to a new parent? ## Edit 3: ~~this might be because `RootNodePair.user_root_node` is always set to the first entity spawned in `1v1`~~ nvm thats the taffy node id This partially fixes it, but at the cost of incrementing the taffy ids each time the `TargetCamera` is updated. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -370,8 +370,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Ok, I think this fixes it without extraneously incrementing the taffy ids. Not sure if there's any consequences to having the camera taffy nodes living on root of the tree along with the UI nodes, but for my clean room example it works. I'm gonna try to figure out how to run the tests and if they pass I'll make a PR. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -167,6 +167,7 @@ ..default() }; + let camera_node = *self.entity_to_taffy.entry(camera_id).or_insert(self.taffy.new_leaf(viewport_style.clone()).unwrap()); let existing_roots = self.camera_roots.entry(camera_id).or_default(); let mut new_roots = Vec::new(); for entity in children { @@ -181,24 +182,16 @@ self.taffy.remove_child(previous_parent, node).unwrap(); } + self.taffy.add_child(camera_node, node).unwrap(); + RootNodePair { - implicit_viewport_node: self - .taffy - .new_with_children(viewport_style.clone(), &[node]) - .unwrap(), + implicit_viewport_node: camera_node, user_root_node: node, } }); new_roots.push(root_node); } - // Cleanup the implicit root nodes of any user root nodes that have been removed - for old_root in existing_roots { - if !new_roots.contains(old_root) { - self.taffy.remove(old_root.implicit_viewport_node).unwrap(); - } - } - self.camera_roots.insert(camera_id, new_roots); } @@ -370,8 +363,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Please ping me on the PR: I'm keen to get this fixed. > Ok, I think this fixes it without extraneously incrementing the taffy ids. @StrikeForceZero Hmm... this seems to be creating one "implicit viewport node" per camera (viewport) rather than one for each direct child of the camera (viewport). I think this will break the case when there are multiple ui trees as children of a camera which are currently laid out independently (but I think the proposed patch will cause them to be laid out in a grid). Poking at the engine source it might be related to somewhere near here https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L420-L420 Logging `absolute_location` I can see it update normally as I move the mouse cursor around. Once I back to the side that it breaks for the value stops updating until I move back to the other viewport. ## Edit: it appears as if `layout_location` is whats not updating. ## Edit 2: Might be due to this not running? https://github.com/bevyengine/bevy/blob/dedf66f72bd8659b744e12b341a7f8de4ed8ba17/crates/bevy_ui/src/layout/mod.rs#L178-L191 ```rust // .find(|n| n.user_root_node == node) .find(|n| false) ``` if you replace the find above it to never find and always execute the `unwrap_or_else` it appears to prevent the bug from happening at the expense of other side effects. Taking a guess here but I think since the `ui_surface.get_layout` call fails to provide a useful value there might be an issue with reassigning the ui node to a new parent? ## Edit 3: ~~this might be because `RootNodePair.user_root_node` is always set to the first entity spawned in `1v1`~~ nvm thats the taffy node id This partially fixes it, but at the cost of incrementing the taffy ids each time the `TargetCamera` is updated. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -370,8 +370,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Ok, I think this fixes it without extraneously incrementing the taffy ids. Not sure if there's any consequences to having the camera taffy nodes living on root of the tree along with the UI nodes, but for my clean room example it works. I'm gonna try to figure out how to run the tests and if they pass I'll make a PR. ```diff Index: crates/bevy_ui/src/layout/mod.rs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs (revision HEAD) +++ b/crates/bevy_ui/src/layout/mod.rs (revision Staged) @@ -167,6 +167,7 @@ ..default() }; + let camera_node = *self.entity_to_taffy.entry(camera_id).or_insert(self.taffy.new_leaf(viewport_style.clone()).unwrap()); let existing_roots = self.camera_roots.entry(camera_id).or_default(); let mut new_roots = Vec::new(); for entity in children { @@ -181,24 +182,16 @@ self.taffy.remove_child(previous_parent, node).unwrap(); } + self.taffy.add_child(camera_node, node).unwrap(); + RootNodePair { - implicit_viewport_node: self - .taffy - .new_with_children(viewport_style.clone(), &[node]) - .unwrap(), + implicit_viewport_node: camera_node, user_root_node: node, } }); new_roots.push(root_node); } - // Cleanup the implicit root nodes of any user root nodes that have been removed - for old_root in existing_roots { - if !new_roots.contains(old_root) { - self.taffy.remove(old_root.implicit_viewport_node).unwrap(); - } - } - self.camera_roots.insert(camera_id, new_roots); } @@ -370,8 +363,13 @@ ui_surface.remove_entities(removed_nodes.read()); // update camera children - for (camera_id, CameraLayoutInfo { root_nodes, .. }) in &camera_layout_info { - ui_surface.set_camera_children(*camera_id, root_nodes.iter().cloned()); + for (camera_id, _) in cameras.iter() { + let root_nodes = if let Some(CameraLayoutInfo { root_nodes, .. }) = camera_layout_info.get(&camera_id) { + root_nodes.iter().cloned() + } else { + [].iter().cloned() + }; + ui_surface.set_camera_children(camera_id, root_nodes); } // update and remove children ``` Please ping me on the PR: I'm keen to get this fixed. > Ok, I think this fixes it without extraneously incrementing the taffy ids. @StrikeForceZero Hmm... this seems to be creating one "implicit viewport node" per camera (viewport) rather than one for each direct child of the camera (viewport). I think this will break the case when there are multiple ui trees as children of a camera which are currently laid out independently (but I think the proposed patch will cause them to be laid out in a grid).
2024-03-03T02:10:02Z
1.76
2024-03-25T23:06:39Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "geometry::tests::test_uirect_axes", "geometry::tests::default_val_equals_const_default_val", "geometry::tests::uirect_default_equals_const_default", "geometry::tests::uirect_percent", "geometry::tests::uirect_px", "geometry::tests::val_arithmetic_error_messages", "geometry::tests::val_auto_is_non_resolveable", "geometry::tests::val_evaluate", "geometry::tests::val_resolve_px", "geometry::tests::val_resolve_viewport_coords", "layout::convert::tests::test_into_length_percentage", "layout::convert::tests::test_convert_from", "layout::tests::round_layout_coords_must_round_ties_up", "ui_node::tests::grid_placement_accessors", "ui_node::tests::invalid_grid_placement_values", "stack::tests::test_ui_stack_system", "layout::tests::ui_node_should_be_set_to_its_content_size", "layout::tests::despawning_a_ui_entity_should_remove_its_corresponding_ui_node - should panic", "layout::tests::ui_surface_tracks_ui_entities", "layout::tests::ui_nodes_with_percent_100_dimensions_should_fill_their_parent", "layout::tests::measure_funcs_should_be_removed_on_content_size_removal", "layout::tests::changes_to_children_of_a_ui_entity_change_its_corresponding_ui_nodes_children", "layout::tests::ui_rounding_test", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 1655)", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 1676)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 239)", "crates/bevy_ui/src/ui_node.rs - ui_node::IsDefaultUiCamera (line 1864)", "crates/bevy_ui/src/ui_material.rs - ui_material::UiMaterial (line 23)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 224)", "crates/bevy_ui/src/ui_node.rs - ui_node::Style::padding (line 322)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::px (line 341)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::left (line 457)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::all (line 316)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::axes (line 433)", "crates/bevy_ui/src/ui_node.rs - ui_node::Style::margin (line 300)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::vertical (line 411)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::horizontal (line 388)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::right (line 479)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 214)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::new (line 288)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::top (line 501)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::percent (line 365)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::bottom (line 523)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,173
bevyengine__bevy-12173
[ "12170" ]
6774e042c7b41e286ba2efb4cce1022625579d42
diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -66,6 +66,35 @@ impl Hsla { pub const fn with_lightness(self, lightness: f32) -> Self { Self { lightness, ..self } } + + /// Generate a deterministic but [quasi-randomly distributed](https://en.wikipedia.org/wiki/Low-discrepancy_sequence) + /// color from a provided `index`. + /// + /// This can be helpful for generating debug colors. + /// + /// # Examples + /// + /// ```rust + /// # use bevy_color::Hsla; + /// // Unique color for an entity + /// # let entity_index = 123; + /// // let entity_index = entity.index(); + /// let color = Hsla::sequential_dispersed(entity_index); + /// + /// // Palette with 5 distinct hues + /// let palette = (0..5).map(Hsla::sequential_dispersed).collect::<Vec<_>>(); + /// ``` + pub fn sequential_dispersed(index: u32) -> Self { + const FRAC_U32MAX_GOLDEN_RATIO: u32 = 2654435769; // (u32::MAX / Φ) rounded up + const RATIO_360: f32 = 360.0 / u32::MAX as f32; + + // from https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/ + // + // Map a sequence of integers (eg: 154, 155, 156, 157, 158) into the [0.0..1.0] range, + // so that the closer the numbers are, the larger the difference of their image. + let hue = index.wrapping_mul(FRAC_U32MAX_GOLDEN_RATIO) as f32 * RATIO_360; + Self::hsl(hue, 1., 0.5) + } } impl Default for Hsla { diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -70,6 +70,35 @@ impl Lcha { pub const fn with_lightness(self, lightness: f32) -> Self { Self { lightness, ..self } } + + /// Generate a deterministic but [quasi-randomly distributed](https://en.wikipedia.org/wiki/Low-discrepancy_sequence) + /// color from a provided `index`. + /// + /// This can be helpful for generating debug colors. + /// + /// # Examples + /// + /// ```rust + /// # use bevy_color::Lcha; + /// // Unique color for an entity + /// # let entity_index = 123; + /// // let entity_index = entity.index(); + /// let color = Lcha::sequential_dispersed(entity_index); + /// + /// // Palette with 5 distinct hues + /// let palette = (0..5).map(Lcha::sequential_dispersed).collect::<Vec<_>>(); + /// ``` + pub fn sequential_dispersed(index: u32) -> Self { + const FRAC_U32MAX_GOLDEN_RATIO: u32 = 2654435769; // (u32::MAX / Φ) rounded up + const RATIO_360: f32 = 360.0 / u32::MAX as f32; + + // from https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/ + // + // Map a sequence of integers (eg: 154, 155, 156, 157, 158) into the [0.0..1.0] range, + // so that the closer the numbers are, the larger the difference of their image. + let hue = index.wrapping_mul(FRAC_U32MAX_GOLDEN_RATIO) as f32 * RATIO_360; + Self::lch(0.75, 0.35, hue) + } } impl Default for Lcha { diff --git a/crates/bevy_color/src/oklcha.rs b/crates/bevy_color/src/oklcha.rs --- a/crates/bevy_color/src/oklcha.rs +++ b/crates/bevy_color/src/oklcha.rs @@ -69,6 +69,35 @@ impl Oklcha { pub const fn with_h(self, hue: f32) -> Self { Self { hue, ..self } } + + /// Generate a deterministic but [quasi-randomly distributed](https://en.wikipedia.org/wiki/Low-discrepancy_sequence) + /// color from a provided `index`. + /// + /// This can be helpful for generating debug colors. + /// + /// # Examples + /// + /// ```rust + /// # use bevy_color::Oklcha; + /// // Unique color for an entity + /// # let entity_index = 123; + /// // let entity_index = entity.index(); + /// let color = Oklcha::sequential_dispersed(entity_index); + /// + /// // Palette with 5 distinct hues + /// let palette = (0..5).map(Oklcha::sequential_dispersed).collect::<Vec<_>>(); + /// ``` + pub fn sequential_dispersed(index: u32) -> Self { + const FRAC_U32MAX_GOLDEN_RATIO: u32 = 2654435769; // (u32::MAX / Φ) rounded up + const RATIO_360: f32 = 360.0 / u32::MAX as f32; + + // from https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/ + // + // Map a sequence of integers (eg: 154, 155, 156, 157, 158) into the [0.0..1.0] range, + // so that the closer the numbers are, the larger the difference of their image. + let hue = index.wrapping_mul(FRAC_U32MAX_GOLDEN_RATIO) as f32 * RATIO_360; + Self::lch(0.75, 0.1, hue) + } } impl Default for Oklcha { diff --git a/crates/bevy_gizmos/src/aabb.rs b/crates/bevy_gizmos/src/aabb.rs --- a/crates/bevy_gizmos/src/aabb.rs +++ b/crates/bevy_gizmos/src/aabb.rs @@ -3,6 +3,7 @@ use crate as bevy_gizmos; use bevy_app::{Plugin, PostUpdate}; +use bevy_color::Oklcha; use bevy_ecs::{ component::Component, entity::Entity, diff --git a/crates/bevy_gizmos/src/aabb.rs b/crates/bevy_gizmos/src/aabb.rs --- a/crates/bevy_gizmos/src/aabb.rs +++ b/crates/bevy_gizmos/src/aabb.rs @@ -97,18 +98,7 @@ fn draw_all_aabbs( } fn color_from_entity(entity: Entity) -> LegacyColor { - let index = entity.index(); - - // from https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/ - // - // See https://en.wikipedia.org/wiki/Low-discrepancy_sequence - // Map a sequence of integers (eg: 154, 155, 156, 157, 158) into the [0.0..1.0] range, - // so that the closer the numbers are, the larger the difference of their image. - const FRAC_U32MAX_GOLDEN_RATIO: u32 = 2654435769; // (u32::MAX / Φ) rounded up - const RATIO_360: f32 = 360.0 / u32::MAX as f32; - let hue = index.wrapping_mul(FRAC_U32MAX_GOLDEN_RATIO) as f32 * RATIO_360; - - LegacyColor::hsl(hue, 1., 0.5) + Oklcha::sequential_dispersed(entity.index()).into() } fn aabb_transform(aabb: Aabb, transform: GlobalTransform) -> GlobalTransform {
diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -306,4 +335,21 @@ mod tests { assert_approx_eq!(hsla2.mix(&hsla0, 0.5).hue, 0., 0.001); assert_approx_eq!(hsla2.mix(&hsla0, 0.75).hue, 5., 0.001); } + + #[test] + fn test_from_index() { + let references = [ + Hsla::hsl(0.0, 1., 0.5), + Hsla::hsl(222.49225, 1., 0.5), + Hsla::hsl(84.984474, 1., 0.5), + Hsla::hsl(307.4767, 1., 0.5), + Hsla::hsl(169.96895, 1., 0.5), + ]; + + for (index, reference) in references.into_iter().enumerate() { + let color = Hsla::sequential_dispersed(index as u32); + + assert_approx_eq!(color.hue, reference.hue, 0.001); + } + } }
Add a `color_from_index` randomized color palette generator Since this method generates a nice sequence of colors based on the `u32` representation of an `Entity`, maybe we could offer a more general `pub fn color_from_index(index: u32) -> Oklcha`? Feels like a pretty handy function for debugging purposes, and might be nice for end users to have access to a color palette that can be programmatically accessed. _Originally posted by @bushrat011899 in https://github.com/bevyengine/bevy/pull/12163#discussion_r1505082162_
2024-02-28T00:47:57Z
1.76
2024-05-03T20:25:39Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "hsla::tests::test_to_from_linear", "lcha::tests::test_to_from_linear", "lcha::tests::test_to_from_srgba", "oklcha::tests::test_to_from_srgba_2", "oklcha::tests::test_to_from_srgba", "srgba::tests::hex_color", "oklaba::tests::test_to_from_linear", "xyza::tests::test_to_from_srgba_2", "linear_rgba::tests::darker_lighter", "oklaba::tests::test_to_from_srgba", "srgba::tests::test_to_from_linear", "xyza::tests::test_to_from_srgba", "color_range::tests::test_color_range", "linear_rgba::tests::euclidean_distance", "hwba::tests::test_to_from_srgba_2", "hsva::tests::test_to_from_srgba", "hsla::tests::test_to_from_srgba", "hsla::tests::test_mix_wrap", "srgba::tests::darker_lighter", "hwba::tests::test_to_from_srgba", "laba::tests::test_to_from_linear", "hsla::tests::test_to_from_srgba_2", "laba::tests::test_to_from_srgba", "oklaba::tests::test_to_from_srgba_2", "oklcha::tests::test_to_from_linear", "hsva::tests::test_to_from_srgba_2", "srgba::tests::euclidean_distance", "crates/bevy_color/src/xyza.rs - xyza::Xyza (line 10)", "crates/bevy_color/src/oklaba.rs - oklaba::Oklaba (line 13)", "crates/bevy_color/src/hsva.rs - hsva::Hsva (line 11)", "crates/bevy_color/src/linear_rgba.rs - linear_rgba::LinearRgba (line 12)", "crates/bevy_color/src/laba.rs - laba::Laba (line 12)", "crates/bevy_color/src/lib.rs - (line 57)", "crates/bevy_color/src/lib.rs - (line 84)", "crates/bevy_color/src/hsla.rs - hsla::Hsla (line 11)", "crates/bevy_color/src/srgba.rs - srgba::Srgba (line 13)", "crates/bevy_color/src/srgba.rs - srgba::Srgba::hex (line 92)", "crates/bevy_color/src/oklcha.rs - oklcha::Oklcha (line 13)", "crates/bevy_color/src/lcha.rs - lcha::Lcha (line 10)", "crates/bevy_color/src/color.rs - color::Color (line 15)", "crates/bevy_color/src/hwba.rs - hwba::Hwba (line 15)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
12,105
bevyengine__bevy-12105
[ "12068" ]
bb00d9fc3c06dbd27e9e4bea25ad8bc71e07677d
diff --git a/crates/bevy_color/Cargo.toml b/crates/bevy_color/Cargo.toml --- a/crates/bevy_color/Cargo.toml +++ b/crates/bevy_color/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_color" -version = "0.13.0" +version = "0.14.0-dev" edition = "2021" description = "Types for representing and manipulating color values" homepage = "https://bevyengine.org" diff --git a/crates/bevy_color/Cargo.toml b/crates/bevy_color/Cargo.toml --- a/crates/bevy_color/Cargo.toml +++ b/crates/bevy_color/Cargo.toml @@ -13,8 +13,8 @@ bevy_math = { path = "../bevy_math", version = "0.14.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.14.0-dev", features = [ "bevy", ] } -bevy_render = { path = "../bevy_render", version = "0.14.0-dev" } serde = "1.0" +thiserror = "1.0" [lints] workspace = true diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -1,6 +1,5 @@ use crate::{Alpha, Hsla, Lcha, LinearRgba, Oklaba, Srgba, StandardColor, Xyza}; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::LegacyColor; use serde::{Deserialize, Serialize}; /// An enumerated type that can represent any of the color types in this crate. diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -29,14 +28,7 @@ impl StandardColor for Color {} impl Color { /// Return the color as a linear RGBA color. pub fn linear(&self) -> LinearRgba { - match self { - Color::Srgba(srgba) => (*srgba).into(), - Color::LinearRgba(linear) => *linear, - Color::Hsla(hsla) => (*hsla).into(), - Color::Lcha(lcha) => (*lcha).into(), - Color::Oklaba(oklab) => (*oklab).into(), - Color::Xyza(xyza) => (*xyza).into(), - } + (*self).into() } } diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -142,9 +134,9 @@ impl From<Color> for Hsla { Color::Srgba(srgba) => srgba.into(), Color::LinearRgba(linear) => linear.into(), Color::Hsla(hsla) => hsla, - Color::Lcha(lcha) => LinearRgba::from(lcha).into(), - Color::Oklaba(oklab) => LinearRgba::from(oklab).into(), - Color::Xyza(xyza) => LinearRgba::from(xyza).into(), + Color::Lcha(lcha) => lcha.into(), + Color::Oklaba(oklab) => oklab.into(), + Color::Xyza(xyza) => xyza.into(), } } } diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -154,10 +146,10 @@ impl From<Color> for Lcha { match value { Color::Srgba(srgba) => srgba.into(), Color::LinearRgba(linear) => linear.into(), - Color::Hsla(hsla) => Srgba::from(hsla).into(), + Color::Hsla(hsla) => hsla.into(), Color::Lcha(lcha) => lcha, - Color::Oklaba(oklab) => LinearRgba::from(oklab).into(), - Color::Xyza(xyza) => LinearRgba::from(xyza).into(), + Color::Oklaba(oklab) => oklab.into(), + Color::Xyza(xyza) => xyza.into(), } } } diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -167,10 +159,10 @@ impl From<Color> for Oklaba { match value { Color::Srgba(srgba) => srgba.into(), Color::LinearRgba(linear) => linear.into(), - Color::Hsla(hsla) => Srgba::from(hsla).into(), - Color::Lcha(lcha) => LinearRgba::from(lcha).into(), + Color::Hsla(hsla) => hsla.into(), + Color::Lcha(lcha) => lcha.into(), Color::Oklaba(oklab) => oklab, - Color::Xyza(xyza) => LinearRgba::from(xyza).into(), + Color::Xyza(xyza) => xyza.into(), } } } diff --git a/crates/bevy_color/src/color.rs b/crates/bevy_color/src/color.rs --- a/crates/bevy_color/src/color.rs +++ b/crates/bevy_color/src/color.rs @@ -187,27 +179,3 @@ impl From<Color> for Xyza { } } } - -impl From<LegacyColor> for Color { - fn from(value: LegacyColor) -> Self { - match value { - LegacyColor::Rgba { .. } => Srgba::from(value).into(), - LegacyColor::RgbaLinear { .. } => LinearRgba::from(value).into(), - LegacyColor::Hsla { .. } => Hsla::from(value).into(), - LegacyColor::Lcha { .. } => Lcha::from(value).into(), - } - } -} - -impl From<Color> for LegacyColor { - fn from(value: Color) -> Self { - match value { - Color::Srgba(x) => x.into(), - Color::LinearRgba(x) => x.into(), - Color::Hsla(x) => x.into(), - Color::Lcha(x) => x.into(), - Color::Oklaba(x) => x.into(), - Color::Xyza(x) => x.into(), - } - } -} diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -1,6 +1,5 @@ use crate::{Alpha, Lcha, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor}; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::HslRepresentation; use serde::{Deserialize, Serialize}; /// Color in Hue-Saturation-Lightness color space with alpha diff --git a/crates/bevy_color/src/hsla.rs b/crates/bevy_color/src/hsla.rs --- a/crates/bevy_color/src/hsla.rs +++ b/crates/bevy_color/src/hsla.rs @@ -129,35 +128,72 @@ impl Luminance for Hsla { } impl From<Srgba> for Hsla { - fn from(value: Srgba) -> Self { - let (h, s, l) = - HslRepresentation::nonlinear_srgb_to_hsl([value.red, value.green, value.blue]); - Self::new(h, s, l, value.alpha) - } -} + fn from( + Srgba { + red, + green, + blue, + alpha, + }: Srgba, + ) -> Self { + // https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB + let x_max = red.max(green.max(blue)); + let x_min = red.min(green.min(blue)); + let chroma = x_max - x_min; + let lightness = (x_max + x_min) / 2.0; + let hue = if chroma == 0.0 { + 0.0 + } else if red == x_max { + 60.0 * (green - blue) / chroma + } else if green == x_max { + 60.0 * (2.0 + (blue - red) / chroma) + } else { + 60.0 * (4.0 + (red - green) / chroma) + }; + let hue = if hue < 0.0 { 360.0 + hue } else { hue }; + let saturation = if lightness <= 0.0 || lightness >= 1.0 { + 0.0 + } else { + (x_max - lightness) / lightness.min(1.0 - lightness) + }; -impl From<Hsla> for bevy_render::color::LegacyColor { - fn from(value: Hsla) -> Self { - bevy_render::color::LegacyColor::Hsla { - hue: value.hue, - saturation: value.saturation, - lightness: value.lightness, - alpha: value.alpha, - } + Self::new(hue, saturation, lightness, alpha) } } -impl From<bevy_render::color::LegacyColor> for Hsla { - fn from(value: bevy_render::color::LegacyColor) -> Self { - match value.as_hsla() { - bevy_render::color::LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => Hsla::new(hue, saturation, lightness, alpha), - _ => unreachable!(), - } +impl From<Hsla> for Srgba { + fn from( + Hsla { + hue, + saturation, + lightness, + alpha, + }: Hsla, + ) -> Self { + // https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB + let chroma = (1.0 - (2.0 * lightness - 1.0).abs()) * saturation; + let hue_prime = hue / 60.0; + let largest_component = chroma * (1.0 - (hue_prime % 2.0 - 1.0).abs()); + let (r_temp, g_temp, b_temp) = if hue_prime < 1.0 { + (chroma, largest_component, 0.0) + } else if hue_prime < 2.0 { + (largest_component, chroma, 0.0) + } else if hue_prime < 3.0 { + (0.0, chroma, largest_component) + } else if hue_prime < 4.0 { + (0.0, largest_component, chroma) + } else if hue_prime < 5.0 { + (largest_component, 0.0, chroma) + } else { + (chroma, 0.0, largest_component) + }; + let lightness_match = lightness - chroma / 2.0; + + let red = r_temp + lightness_match; + let green = g_temp + lightness_match; + let blue = b_temp + lightness_match; + + Self::new(red, green, blue, alpha) } } diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -1,6 +1,5 @@ -use crate::{Alpha, Hsla, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor}; +use crate::{Alpha, Hsla, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor, Xyza}; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::LchRepresentation; use serde::{Deserialize, Serialize}; /// Color in LCH color space, with alpha diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -67,6 +66,16 @@ impl Lcha { pub const fn with_lightness(self, lightness: f32) -> Self { Self { lightness, ..self } } + + /// CIE Epsilon Constant + /// + /// See [Continuity (16) (17)](http://brucelindbloom.com/index.html?LContinuity.html) + pub const CIE_EPSILON: f32 = 216.0 / 24389.0; + + /// CIE Kappa Constant + /// + /// See [Continuity (16) (17)](http://brucelindbloom.com/index.html?LContinuity.html) + pub const CIE_KAPPA: f32 = 24389.0 / 27.0; } impl Default for Lcha { diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -129,19 +138,116 @@ impl Luminance for Lcha { } } +impl From<Lcha> for Xyza { + fn from( + Lcha { + lightness, + chroma, + hue, + alpha, + }: Lcha, + ) -> Self { + let lightness = lightness * 100.0; + let chroma = chroma * 100.0; + + // convert LCH to Lab + // http://www.brucelindbloom.com/index.html?Eqn_LCH_to_Lab.html + let l = lightness; + let a = chroma * hue.to_radians().cos(); + let b = chroma * hue.to_radians().sin(); + + // convert Lab to XYZ + // http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html + let fy = (l + 16.0) / 116.0; + let fx = a / 500.0 + fy; + let fz = fy - b / 200.0; + let xr = { + let fx3 = fx.powf(3.0); + + if fx3 > Lcha::CIE_EPSILON { + fx3 + } else { + (116.0 * fx - 16.0) / Lcha::CIE_KAPPA + } + }; + let yr = if l > Lcha::CIE_EPSILON * Lcha::CIE_KAPPA { + ((l + 16.0) / 116.0).powf(3.0) + } else { + l / Lcha::CIE_KAPPA + }; + let zr = { + let fz3 = fz.powf(3.0); + + if fz3 > Lcha::CIE_EPSILON { + fz3 + } else { + (116.0 * fz - 16.0) / Lcha::CIE_KAPPA + } + }; + let x = xr * Xyza::D65_WHITE.x; + let y = yr * Xyza::D65_WHITE.y; + let z = zr * Xyza::D65_WHITE.z; + + Xyza::new(x, y, z, alpha) + } +} + +impl From<Xyza> for Lcha { + fn from(Xyza { x, y, z, alpha }: Xyza) -> Self { + // XYZ to Lab + // http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html + let xr = x / Xyza::D65_WHITE.x; + let yr = y / Xyza::D65_WHITE.y; + let zr = z / Xyza::D65_WHITE.z; + let fx = if xr > Lcha::CIE_EPSILON { + xr.cbrt() + } else { + (Lcha::CIE_KAPPA * xr + 16.0) / 116.0 + }; + let fy = if yr > Lcha::CIE_EPSILON { + yr.cbrt() + } else { + (Lcha::CIE_KAPPA * yr + 16.0) / 116.0 + }; + let fz = if yr > Lcha::CIE_EPSILON { + zr.cbrt() + } else { + (Lcha::CIE_KAPPA * zr + 16.0) / 116.0 + }; + let l = 116.0 * fy - 16.0; + let a = 500.0 * (fx - fy); + let b = 200.0 * (fy - fz); + + // Lab to LCH + // http://www.brucelindbloom.com/index.html?Eqn_Lab_to_LCH.html + let c = (a.powf(2.0) + b.powf(2.0)).sqrt(); + let h = { + let h = b.to_radians().atan2(a.to_radians()).to_degrees(); + + if h < 0.0 { + h + 360.0 + } else { + h + } + }; + + let lightness = (l / 100.0).clamp(0.0, 1.5); + let chroma = (c / 100.0).clamp(0.0, 1.5); + let hue = h; + + Lcha::new(lightness, chroma, hue, alpha) + } +} + impl From<Srgba> for Lcha { fn from(value: Srgba) -> Self { - let (l, c, h) = - LchRepresentation::nonlinear_srgb_to_lch([value.red, value.green, value.blue]); - Lcha::new(l, c, h, value.alpha) + Xyza::from(value).into() } } impl From<Lcha> for Srgba { fn from(value: Lcha) -> Self { - let [r, g, b] = - LchRepresentation::lch_to_nonlinear_srgb(value.lightness, value.chroma, value.hue); - Srgba::new(r, g, b, value.alpha) + Xyza::from(value).into() } } diff --git a/crates/bevy_color/src/lcha.rs b/crates/bevy_color/src/lcha.rs --- a/crates/bevy_color/src/lcha.rs +++ b/crates/bevy_color/src/lcha.rs @@ -157,31 +263,6 @@ impl From<Lcha> for LinearRgba { } } -impl From<Lcha> for bevy_render::color::LegacyColor { - fn from(value: Lcha) -> Self { - bevy_render::color::LegacyColor::Lcha { - hue: value.hue, - chroma: value.chroma, - lightness: value.lightness, - alpha: value.alpha, - } - } -} - -impl From<bevy_render::color::LegacyColor> for Lcha { - fn from(value: bevy_render::color::LegacyColor) -> Self { - match value.as_lcha() { - bevy_render::color::LegacyColor::Lcha { - hue, - chroma, - lightness, - alpha, - } => Lcha::new(hue, chroma, lightness, alpha), - _ => unreachable!(), - } - } -} - impl From<Oklaba> for Lcha { fn from(value: Oklaba) -> Self { Srgba::from(value).into() diff --git a/crates/bevy_color/src/lib.rs b/crates/bevy_color/src/lib.rs --- a/crates/bevy_color/src/lib.rs +++ b/crates/bevy_color/src/lib.rs @@ -95,8 +95,6 @@ pub use oklaba::*; pub use srgba::*; pub use xyza::*; -use bevy_render::color::LegacyColor; - /// Describes the traits that a color should implement for consistency. #[allow(dead_code)] // This is an internal marker trait used to ensure that our color types impl the required traits pub(crate) trait StandardColor diff --git a/crates/bevy_color/src/lib.rs b/crates/bevy_color/src/lib.rs --- a/crates/bevy_color/src/lib.rs +++ b/crates/bevy_color/src/lib.rs @@ -108,7 +106,6 @@ where Self: bevy_reflect::Reflect, Self: Default, Self: From<Color> + Into<Color>, - Self: From<LegacyColor> + Into<LegacyColor>, Self: From<Srgba> + Into<Srgba>, Self: From<LinearRgba> + Into<LinearRgba>, Self: From<Hsla> + Into<Hsla>, diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -4,7 +4,6 @@ use crate::{ }; use bevy_math::Vec4; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::SrgbColorSpace; use serde::{Deserialize, Serialize}; /// Linear RGB color with alpha. diff --git a/crates/bevy_color/src/linear_rgba.rs b/crates/bevy_color/src/linear_rgba.rs --- a/crates/bevy_color/src/linear_rgba.rs +++ b/crates/bevy_color/src/linear_rgba.rs @@ -160,43 +159,6 @@ impl EuclideanDistance for LinearRgba { } } -impl From<Srgba> for LinearRgba { - #[inline] - fn from(value: Srgba) -> Self { - Self { - red: value.red.nonlinear_to_linear_srgb(), - green: value.green.nonlinear_to_linear_srgb(), - blue: value.blue.nonlinear_to_linear_srgb(), - alpha: value.alpha, - } - } -} - -impl From<LinearRgba> for bevy_render::color::LegacyColor { - fn from(value: LinearRgba) -> Self { - bevy_render::color::LegacyColor::RgbaLinear { - red: value.red, - green: value.green, - blue: value.blue, - alpha: value.alpha, - } - } -} - -impl From<bevy_render::color::LegacyColor> for LinearRgba { - fn from(value: bevy_render::color::LegacyColor) -> Self { - match value.as_rgba_linear() { - bevy_render::color::LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => LinearRgba::new(red, green, blue, alpha), - _ => unreachable!(), - } - } -} - impl From<LinearRgba> for [f32; 4] { fn from(color: LinearRgba) -> Self { [color.red, color.green, color.blue, color.alpha] diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -3,7 +3,6 @@ use crate::{ StandardColor, }; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::LegacyColor; use serde::{Deserialize, Serialize}; /// Color in Oklaba color space, with alpha diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -1,10 +1,10 @@ use crate::color_difference::EuclideanDistance; use crate::oklaba::Oklaba; -use crate::{Alpha, Hsla, LinearRgba, Luminance, Mix, StandardColor}; +use crate::{Alpha, LinearRgba, Luminance, Mix, StandardColor}; use bevy_math::Vec4; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::{HexColorError, HslRepresentation, SrgbColorSpace}; use serde::{Deserialize, Serialize}; +use thiserror::Error; /// Non-linear standard RGB with alpha. #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, Reflect)] diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -177,6 +177,31 @@ impl Srgba { a as f32 / u8::MAX as f32, ) } + + /// Converts a non-linear sRGB value to a linear one via [gamma correction](https://en.wikipedia.org/wiki/Gamma_correction). + pub fn gamma_function(value: f32) -> f32 { + if value <= 0.0 { + return value; + } + if value <= 0.04045 { + value / 12.92 // linear falloff in dark values + } else { + ((value + 0.055) / 1.055).powf(2.4) // gamma curve in other area + } + } + + /// Converts a linear sRGB value to a non-linear one via [gamma correction](https://en.wikipedia.org/wiki/Gamma_correction). + pub fn gamma_function_inverse(value: f32) -> f32 { + if value <= 0.0 { + return value; + } + + if value <= 0.0031308 { + value * 12.92 // linear falloff in dark values + } else { + (1.055 * value.powf(1.0 / 2.4)) - 0.055 // gamma curve in other area + } + } } impl Default for Srgba { diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -196,7 +221,7 @@ impl Luminance for Srgba { fn with_luminance(&self, luminance: f32) -> Self { let linear: LinearRgba = (*self).into(); linear - .with_luminance(luminance.nonlinear_to_linear_srgb()) + .with_luminance(Srgba::gamma_function(luminance)) .into() } diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -252,50 +277,29 @@ impl From<LinearRgba> for Srgba { #[inline] fn from(value: LinearRgba) -> Self { Self { - red: value.red.linear_to_nonlinear_srgb(), - green: value.green.linear_to_nonlinear_srgb(), - blue: value.blue.linear_to_nonlinear_srgb(), + red: Srgba::gamma_function_inverse(value.red), + green: Srgba::gamma_function_inverse(value.green), + blue: Srgba::gamma_function_inverse(value.blue), alpha: value.alpha, } } } -impl From<Hsla> for Srgba { - fn from(value: Hsla) -> Self { - let [r, g, b] = - HslRepresentation::hsl_to_nonlinear_srgb(value.hue, value.saturation, value.lightness); - Self::new(r, g, b, value.alpha) - } -} - -impl From<Oklaba> for Srgba { - fn from(value: Oklaba) -> Self { - Srgba::from(LinearRgba::from(value)) - } -} - -impl From<Srgba> for bevy_render::color::LegacyColor { +impl From<Srgba> for LinearRgba { + #[inline] fn from(value: Srgba) -> Self { - bevy_render::color::LegacyColor::Rgba { - red: value.red, - green: value.green, - blue: value.blue, + Self { + red: Srgba::gamma_function(value.red), + green: Srgba::gamma_function(value.green), + blue: Srgba::gamma_function(value.blue), alpha: value.alpha, } } } -impl From<bevy_render::color::LegacyColor> for Srgba { - fn from(value: bevy_render::color::LegacyColor) -> Self { - match value.as_rgba() { - bevy_render::color::LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => Srgba::new(red, green, blue, alpha), - _ => unreachable!(), - } +impl From<Oklaba> for Srgba { + fn from(value: Oklaba) -> Self { + Srgba::from(LinearRgba::from(value)) } } diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -1,6 +1,5 @@ -use crate::{Alpha, Hsla, Lcha, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor}; +use crate::{Alpha, Hsla, LinearRgba, Luminance, Mix, Oklaba, Srgba, StandardColor}; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; -use bevy_render::color::LegacyColor; use serde::{Deserialize, Serialize}; /// [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel. diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -62,6 +61,9 @@ impl Xyza { pub const fn with_z(self, z: f32) -> Self { Self { z, ..self } } + + /// [D65 White Point](https://en.wikipedia.org/wiki/Illuminant_D65#Definition) + pub const D65_WHITE: Self = Self::xyz(0.95047, 1.0, 1.08883); } impl Default for Xyza { diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -184,18 +186,6 @@ impl From<Xyza> for Hsla { } } -impl From<Lcha> for Xyza { - fn from(value: Lcha) -> Self { - LinearRgba::from(value).into() - } -} - -impl From<Xyza> for Lcha { - fn from(value: Xyza) -> Self { - LinearRgba::from(value).into() - } -} - impl From<Oklaba> for Xyza { fn from(value: Oklaba) -> Self { LinearRgba::from(value).into() diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -40,6 +40,7 @@ ios_simulator = [] # bevy bevy_app = { path = "../bevy_app", version = "0.14.0-dev" } bevy_asset = { path = "../bevy_asset", version = "0.14.0-dev" } +bevy_color = { path = "../bevy_color", version = "0.14.0-dev" } bevy_core = { path = "../bevy_core", version = "0.14.0-dev" } bevy_derive = { path = "../bevy_derive", version = "0.14.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev" } diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1,12 +1,9 @@ -mod colorspace; - -pub use colorspace::*; +use bevy_color::{Color, HexColorError, Hsla, Lcha, LinearRgba, Oklaba, Srgba, Xyza}; use bevy_math::{Vec3, Vec4}; use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize}; use serde::{Deserialize, Serialize}; use std::ops::{Add, Mul, MulAssign}; -use thiserror::Error; #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, Reflect)] #[reflect(PartialEq, Serialize, Deserialize)] diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -304,32 +301,7 @@ impl LegacyColor { /// ``` /// pub fn hex<T: AsRef<str>>(hex: T) -> Result<LegacyColor, HexColorError> { - let hex = hex.as_ref(); - let hex = hex.strip_prefix('#').unwrap_or(hex); - - match *hex.as_bytes() { - // RGB - [r, g, b] => { - let [r, g, b, ..] = decode_hex([r, r, g, g, b, b])?; - Ok(LegacyColor::rgb_u8(r, g, b)) - } - // RGBA - [r, g, b, a] => { - let [r, g, b, a, ..] = decode_hex([r, r, g, g, b, b, a, a])?; - Ok(LegacyColor::rgba_u8(r, g, b, a)) - } - // RRGGBB - [r1, r2, g1, g2, b1, b2] => { - let [r, g, b, ..] = decode_hex([r1, r2, g1, g2, b1, b2])?; - Ok(LegacyColor::rgb_u8(r, g, b)) - } - // RRGGBBAA - [r1, r2, g1, g2, b1, b2, a1, a2] => { - let [r, g, b, a, ..] = decode_hex([r1, r2, g1, g2, b1, b2, a1, a2])?; - Ok(LegacyColor::rgba_u8(r, g, b, a)) - } - _ => Err(HexColorError::Length), - } + Srgba::hex(hex).map(|color| color.into()) } /// New `Color` from sRGB colorspace. diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -570,211 +542,22 @@ impl LegacyColor { /// Converts a `Color` to variant `LegacyColor::Rgba` pub fn as_rgba(self: &LegacyColor) -> LegacyColor { - match self { - LegacyColor::Rgba { .. } => *self, - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => LegacyColor::Rgba { - red: red.linear_to_nonlinear_srgb(), - green: green.linear_to_nonlinear_srgb(), - blue: blue.linear_to_nonlinear_srgb(), - alpha: *alpha, - }, - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(*hue, *saturation, *lightness); - LegacyColor::Rgba { - red, - green, - blue, - alpha: *alpha, - } - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(*lightness, *chroma, *hue); - - LegacyColor::Rgba { - red, - green, - blue, - alpha: *alpha, - } - } - } + Srgba::from(*self).into() } /// Converts a `Color` to variant `LegacyColor::RgbaLinear` pub fn as_rgba_linear(self: &LegacyColor) -> LegacyColor { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => LegacyColor::RgbaLinear { - red: red.nonlinear_to_linear_srgb(), - green: green.nonlinear_to_linear_srgb(), - blue: blue.nonlinear_to_linear_srgb(), - alpha: *alpha, - }, - LegacyColor::RgbaLinear { .. } => *self, - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(*hue, *saturation, *lightness); - LegacyColor::RgbaLinear { - red: red.nonlinear_to_linear_srgb(), - green: green.nonlinear_to_linear_srgb(), - blue: blue.nonlinear_to_linear_srgb(), - alpha: *alpha, - } - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(*lightness, *chroma, *hue); - - LegacyColor::RgbaLinear { - red: red.nonlinear_to_linear_srgb(), - green: green.nonlinear_to_linear_srgb(), - blue: blue.nonlinear_to_linear_srgb(), - alpha: *alpha, - } - } - } + LinearRgba::from(*self).into() } /// Converts a `Color` to variant `LegacyColor::Hsla` pub fn as_hsla(self: &LegacyColor) -> LegacyColor { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => { - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([*red, *green, *blue]); - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha: *alpha, - } - } - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => { - let (hue, saturation, lightness) = HslRepresentation::nonlinear_srgb_to_hsl([ - red.linear_to_nonlinear_srgb(), - green.linear_to_nonlinear_srgb(), - blue.linear_to_nonlinear_srgb(), - ]); - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha: *alpha, - } - } - LegacyColor::Hsla { .. } => *self, - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let rgb = LchRepresentation::lch_to_nonlinear_srgb(*lightness, *chroma, *hue); - let (hue, saturation, lightness) = HslRepresentation::nonlinear_srgb_to_hsl(rgb); - - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha: *alpha, - } - } - } + Hsla::from(*self).into() } /// Converts a `Color` to variant `LegacyColor::Lcha` pub fn as_lcha(self: &LegacyColor) -> LegacyColor { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => { - let (lightness, chroma, hue) = - LchRepresentation::nonlinear_srgb_to_lch([*red, *green, *blue]); - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha: *alpha, - } - } - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => { - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([ - red.linear_to_nonlinear_srgb(), - green.linear_to_nonlinear_srgb(), - blue.linear_to_nonlinear_srgb(), - ]); - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha: *alpha, - } - } - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let rgb = HslRepresentation::hsl_to_nonlinear_srgb(*hue, *saturation, *lightness); - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch(rgb); - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha: *alpha, - } - } - LegacyColor::Lcha { .. } => *self, - } + Lcha::from(*self).into() } /// Converts a `Color` to a `[u8; 4]` from sRGB colorspace diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -790,193 +573,47 @@ impl LegacyColor { /// Converts a `Color` to a `[f32; 4]` from sRGB colorspace pub fn as_rgba_f32(self: LegacyColor) -> [f32; 4] { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => [red, green, blue, alpha], - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => [ - red.linear_to_nonlinear_srgb(), - green.linear_to_nonlinear_srgb(), - blue.linear_to_nonlinear_srgb(), - alpha, - ], - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - [red, green, blue, alpha] - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - - [red, green, blue, alpha] - } - } + let Srgba { + red, + green, + blue, + alpha, + } = Srgba::from(self); + [red, green, blue, alpha] } /// Converts a `Color` to a `[f32; 4]` from linear RGB colorspace #[inline] pub fn as_linear_rgba_f32(self: LegacyColor) -> [f32; 4] { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => [ - red.nonlinear_to_linear_srgb(), - green.nonlinear_to_linear_srgb(), - blue.nonlinear_to_linear_srgb(), - alpha, - ], - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => [red, green, blue, alpha], - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - [ - red.nonlinear_to_linear_srgb(), - green.nonlinear_to_linear_srgb(), - blue.nonlinear_to_linear_srgb(), - alpha, - ] - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - - [ - red.nonlinear_to_linear_srgb(), - green.nonlinear_to_linear_srgb(), - blue.nonlinear_to_linear_srgb(), - alpha, - ] - } - } + let LinearRgba { + red, + green, + blue, + alpha, + } = LinearRgba::from(self); + [red, green, blue, alpha] } /// Converts a `Color` to a `[f32; 4]` from HSL colorspace pub fn as_hsla_f32(self: LegacyColor) -> [f32; 4] { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => { - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([red, green, blue]); - [hue, saturation, lightness, alpha] - } - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => { - let (hue, saturation, lightness) = HslRepresentation::nonlinear_srgb_to_hsl([ - red.linear_to_nonlinear_srgb(), - green.linear_to_nonlinear_srgb(), - blue.linear_to_nonlinear_srgb(), - ]); - [hue, saturation, lightness, alpha] - } - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => [hue, saturation, lightness, alpha], - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let rgb = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - let (hue, saturation, lightness) = HslRepresentation::nonlinear_srgb_to_hsl(rgb); - - [hue, saturation, lightness, alpha] - } - } + let Hsla { + hue, + saturation, + lightness, + alpha, + } = Hsla::from(self); + [hue, saturation, lightness, alpha] } /// Converts a `Color` to a `[f32; 4]` from LCH colorspace pub fn as_lcha_f32(self: LegacyColor) -> [f32; 4] { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => { - let (lightness, chroma, hue) = - LchRepresentation::nonlinear_srgb_to_lch([red, green, blue]); - [lightness, chroma, hue, alpha] - } - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => { - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([ - red.linear_to_nonlinear_srgb(), - green.linear_to_nonlinear_srgb(), - blue.linear_to_nonlinear_srgb(), - ]); - [lightness, chroma, hue, alpha] - } - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let rgb = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch(rgb); - - [lightness, chroma, hue, alpha] - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => [lightness, chroma, hue, alpha], - } + let Lcha { + lightness, + chroma, + hue, + alpha, + } = Lcha::from(self); + [lightness, chroma, hue, alpha] } /// Converts `Color` to a `u32` from sRGB colorspace. diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -984,61 +621,7 @@ impl LegacyColor { /// Maps the RGBA channels in RGBA order to a little-endian byte array (GPUs are little-endian). /// `A` will be the most significant byte and `R` the least significant. pub fn as_rgba_u32(self: LegacyColor) -> u32 { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => u32::from_le_bytes([ - (red * 255.0) as u8, - (green * 255.0) as u8, - (blue * 255.0) as u8, - (alpha * 255.0) as u8, - ]), - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => u32::from_le_bytes([ - (red.linear_to_nonlinear_srgb() * 255.0) as u8, - (green.linear_to_nonlinear_srgb() * 255.0) as u8, - (blue.linear_to_nonlinear_srgb() * 255.0) as u8, - (alpha * 255.0) as u8, - ]), - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - u32::from_le_bytes([ - (red * 255.0) as u8, - (green * 255.0) as u8, - (blue * 255.0) as u8, - (alpha * 255.0) as u8, - ]) - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - - u32::from_le_bytes([ - (red * 255.0) as u8, - (green * 255.0) as u8, - (blue * 255.0) as u8, - (alpha * 255.0) as u8, - ]) - } - } + u32::from_le_bytes(self.as_rgba_u8()) } /// Converts Color to a u32 from linear RGB colorspace. diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1046,61 +629,18 @@ impl LegacyColor { /// Maps the RGBA channels in RGBA order to a little-endian byte array (GPUs are little-endian). /// `A` will be the most significant byte and `R` the least significant. pub fn as_linear_rgba_u32(self: LegacyColor) -> u32 { - match self { - LegacyColor::Rgba { - red, - green, - blue, - alpha, - } => u32::from_le_bytes([ - (red.nonlinear_to_linear_srgb() * 255.0) as u8, - (green.nonlinear_to_linear_srgb() * 255.0) as u8, - (blue.nonlinear_to_linear_srgb() * 255.0) as u8, - (alpha * 255.0) as u8, - ]), - LegacyColor::RgbaLinear { - red, - green, - blue, - alpha, - } => u32::from_le_bytes([ - (red * 255.0) as u8, - (green * 255.0) as u8, - (blue * 255.0) as u8, - (alpha * 255.0) as u8, - ]), - LegacyColor::Hsla { - hue, - saturation, - lightness, - alpha, - } => { - let [red, green, blue] = - HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - u32::from_le_bytes([ - (red.nonlinear_to_linear_srgb() * 255.0) as u8, - (green.nonlinear_to_linear_srgb() * 255.0) as u8, - (blue.nonlinear_to_linear_srgb() * 255.0) as u8, - (alpha * 255.0) as u8, - ]) - } - LegacyColor::Lcha { - lightness, - chroma, - hue, - alpha, - } => { - let [red, green, blue] = - LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - - u32::from_le_bytes([ - (red.nonlinear_to_linear_srgb() * 255.0) as u8, - (green.nonlinear_to_linear_srgb() * 255.0) as u8, - (blue.nonlinear_to_linear_srgb() * 255.0) as u8, - (alpha * 255.0) as u8, - ]) - } - } + let LinearRgba { + red, + green, + blue, + alpha, + } = self.into(); + u32::from_le_bytes([ + (red * 255.0) as u8, + (green * 255.0) as u8, + (blue * 255.0) as u8, + (alpha * 255.0) as u8, + ]) } /// New `Color` from `[f32; 4]` (or a type that can be converted into them) with RGB representation in sRGB colorspace. diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1345,6 +885,163 @@ impl Add<LegacyColor> for LegacyColor { } } +impl From<LegacyColor> for Color { + fn from(value: LegacyColor) -> Self { + match value { + LegacyColor::Rgba { + red, + green, + blue, + alpha, + } => Srgba::new(red, green, blue, alpha).into(), + LegacyColor::RgbaLinear { + red, + green, + blue, + alpha, + } => LinearRgba::new(red, green, blue, alpha).into(), + LegacyColor::Hsla { + hue, + saturation, + lightness, + alpha, + } => Hsla::new(hue, saturation, lightness, alpha).into(), + LegacyColor::Lcha { + lightness, + chroma, + hue, + alpha, + } => Lcha::new(lightness, chroma, hue, alpha).into(), + } + } +} + +impl From<Color> for LegacyColor { + fn from(value: Color) -> Self { + match value { + Color::Srgba(x) => x.into(), + Color::LinearRgba(x) => x.into(), + Color::Hsla(x) => x.into(), + Color::Lcha(x) => x.into(), + Color::Oklaba(x) => x.into(), + Color::Xyza(x) => x.into(), + } + } +} + +impl From<LinearRgba> for LegacyColor { + fn from( + LinearRgba { + red, + green, + blue, + alpha, + }: LinearRgba, + ) -> Self { + LegacyColor::RgbaLinear { + red, + green, + blue, + alpha, + } + } +} + +impl From<LegacyColor> for Xyza { + fn from(value: LegacyColor) -> Self { + LinearRgba::from(value).into() + } +} + +impl From<Xyza> for LegacyColor { + fn from(value: Xyza) -> Self { + LinearRgba::from(value).into() + } +} + +impl From<LegacyColor> for LinearRgba { + fn from(value: LegacyColor) -> Self { + Color::from(value).into() + } +} + +impl From<Srgba> for LegacyColor { + fn from( + Srgba { + red, + green, + blue, + alpha, + }: Srgba, + ) -> Self { + LegacyColor::Rgba { + red, + green, + blue, + alpha, + } + } +} + +impl From<LegacyColor> for Srgba { + fn from(value: LegacyColor) -> Self { + Color::from(value).into() + } +} + +impl From<Hsla> for LegacyColor { + fn from(value: Hsla) -> Self { + LegacyColor::Hsla { + hue: value.hue, + saturation: value.saturation, + lightness: value.lightness, + alpha: value.alpha, + } + } +} + +impl From<LegacyColor> for Hsla { + fn from(value: LegacyColor) -> Self { + Color::from(value).into() + } +} + +impl From<Lcha> for LegacyColor { + fn from( + Lcha { + lightness, + chroma, + hue, + alpha, + }: Lcha, + ) -> Self { + LegacyColor::Lcha { + hue, + chroma, + lightness, + alpha, + } + } +} + +impl From<LegacyColor> for Lcha { + fn from(value: LegacyColor) -> Self { + Color::from(value).into() + } +} + +impl From<LegacyColor> for Oklaba { + fn from(value: LegacyColor) -> Self { + LinearRgba::from(value).into() + } +} + +impl From<Oklaba> for LegacyColor { + fn from(value: Oklaba) -> Self { + LinearRgba::from(value).into() + } +} + impl From<LegacyColor> for wgpu::Color { fn from(color: LegacyColor) -> Self { if let LegacyColor::RgbaLinear { diff --git a/crates/bevy_render/src/texture/ktx2.rs b/crates/bevy_render/src/texture/ktx2.rs --- a/crates/bevy_render/src/texture/ktx2.rs +++ b/crates/bevy_render/src/texture/ktx2.rs @@ -1,11 +1,11 @@ #[cfg(any(feature = "flate2", feature = "ruzstd"))] use std::io::Read; -use crate::color::SrgbColorSpace; #[cfg(feature = "basis-universal")] use basis_universal::{ DecodeFlags, LowLevelUastcTranscoder, SliceParametersUastc, TranscoderBlockFormat, }; +use bevy_color::Srgba; use bevy_utils::default; #[cfg(any(feature = "flate2", feature = "ruzstd"))] use ktx2::SupercompressionScheme; diff --git a/crates/bevy_render/src/texture/ktx2.rs b/crates/bevy_render/src/texture/ktx2.rs --- a/crates/bevy_render/src/texture/ktx2.rs +++ b/crates/bevy_render/src/texture/ktx2.rs @@ -95,7 +95,7 @@ pub fn ktx2_buffer_to_image( level_data .iter() .copied() - .map(|v| v.nonlinear_to_linear_srgb()) + .map(|v| (Srgba::gamma_function(v as f32 / 255.) * 255.).floor() as u8) .collect::<Vec<u8>>(), ); diff --git a/crates/bevy_render/src/texture/ktx2.rs b/crates/bevy_render/src/texture/ktx2.rs --- a/crates/bevy_render/src/texture/ktx2.rs +++ b/crates/bevy_render/src/texture/ktx2.rs @@ -114,7 +114,7 @@ pub fn ktx2_buffer_to_image( level_data .iter() .copied() - .map(|v| v.nonlinear_to_linear_srgb()) + .map(|v| (Srgba::gamma_function(v as f32 / 255.) * 255.).floor() as u8) .collect::<Vec<u8>>(), );
diff --git a/crates/bevy_color/src/oklaba.rs b/crates/bevy_color/src/oklaba.rs --- a/crates/bevy_color/src/oklaba.rs +++ b/crates/bevy_color/src/oklaba.rs @@ -165,18 +164,6 @@ impl From<Hsla> for Oklaba { } } -impl From<LegacyColor> for Oklaba { - fn from(value: LegacyColor) -> Self { - LinearRgba::from(value).into() - } -} - -impl From<Oklaba> for LegacyColor { - fn from(value: Oklaba) -> Self { - LinearRgba::from(value).into() - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/crates/bevy_color/src/srgba.rs b/crates/bevy_color/src/srgba.rs --- a/crates/bevy_color/src/srgba.rs +++ b/crates/bevy_color/src/srgba.rs @@ -311,6 +315,20 @@ impl From<Srgba> for Vec4 { } } +/// Error returned if a hex string could not be parsed as a color. +#[derive(Debug, Error, PartialEq, Eq)] +pub enum HexColorError { + /// Parsing error. + #[error("Invalid hex string")] + Parse(#[from] std::num::ParseIntError), + /// Invalid length. + #[error("Unexpected length of hex string")] + Length, + /// Invalid character. + #[error("Invalid hex char")] + Char(char), +} + #[cfg(test)] mod tests { use crate::testing::assert_approx_eq; diff --git a/crates/bevy_color/src/xyza.rs b/crates/bevy_color/src/xyza.rs --- a/crates/bevy_color/src/xyza.rs +++ b/crates/bevy_color/src/xyza.rs @@ -208,18 +198,6 @@ impl From<Xyza> for Oklaba { } } -impl From<LegacyColor> for Xyza { - fn from(value: LegacyColor) -> Self { - LinearRgba::from(value).into() - } -} - -impl From<Xyza> for LegacyColor { - fn from(value: Xyza) -> Self { - LinearRgba::from(value).into() - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/crates/bevy_render/src/color/colorspace.rs /dev/null --- a/crates/bevy_render/src/color/colorspace.rs +++ /dev/null @@ -1,430 +0,0 @@ -pub trait SrgbColorSpace { - fn linear_to_nonlinear_srgb(self) -> Self; - fn nonlinear_to_linear_srgb(self) -> Self; -} - -// source: https://entropymine.com/imageworsener/srgbformula/ -impl SrgbColorSpace for f32 { - #[inline] - fn linear_to_nonlinear_srgb(self) -> f32 { - if self <= 0.0 { - return self; - } - - if self <= 0.0031308 { - self * 12.92 // linear falloff in dark values - } else { - (1.055 * self.powf(1.0 / 2.4)) - 0.055 // gamma curve in other area - } - } - - #[inline] - fn nonlinear_to_linear_srgb(self) -> f32 { - if self <= 0.0 { - return self; - } - if self <= 0.04045 { - self / 12.92 // linear falloff in dark values - } else { - ((self + 0.055) / 1.055).powf(2.4) // gamma curve in other area - } - } -} - -impl SrgbColorSpace for u8 { - #[inline] - fn linear_to_nonlinear_srgb(self) -> Self { - ((self as f32 / u8::MAX as f32).linear_to_nonlinear_srgb() * u8::MAX as f32) as u8 - } - - #[inline] - fn nonlinear_to_linear_srgb(self) -> Self { - ((self as f32 / u8::MAX as f32).nonlinear_to_linear_srgb() * u8::MAX as f32) as u8 - } -} - -pub struct HslRepresentation; -impl HslRepresentation { - /// converts a color in HLS space to sRGB space - #[inline] - pub fn hsl_to_nonlinear_srgb(hue: f32, saturation: f32, lightness: f32) -> [f32; 3] { - // https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB - let chroma = (1.0 - (2.0 * lightness - 1.0).abs()) * saturation; - let hue_prime = hue / 60.0; - let largest_component = chroma * (1.0 - (hue_prime % 2.0 - 1.0).abs()); - let (r_temp, g_temp, b_temp) = if hue_prime < 1.0 { - (chroma, largest_component, 0.0) - } else if hue_prime < 2.0 { - (largest_component, chroma, 0.0) - } else if hue_prime < 3.0 { - (0.0, chroma, largest_component) - } else if hue_prime < 4.0 { - (0.0, largest_component, chroma) - } else if hue_prime < 5.0 { - (largest_component, 0.0, chroma) - } else { - (chroma, 0.0, largest_component) - }; - let lightness_match = lightness - chroma / 2.0; - - [ - r_temp + lightness_match, - g_temp + lightness_match, - b_temp + lightness_match, - ] - } - - /// converts a color in sRGB space to HLS space - #[inline] - pub fn nonlinear_srgb_to_hsl([red, green, blue]: [f32; 3]) -> (f32, f32, f32) { - // https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB - let x_max = red.max(green.max(blue)); - let x_min = red.min(green.min(blue)); - let chroma = x_max - x_min; - let lightness = (x_max + x_min) / 2.0; - let hue = if chroma == 0.0 { - 0.0 - } else if red == x_max { - 60.0 * (green - blue) / chroma - } else if green == x_max { - 60.0 * (2.0 + (blue - red) / chroma) - } else { - 60.0 * (4.0 + (red - green) / chroma) - }; - let hue = if hue < 0.0 { 360.0 + hue } else { hue }; - let saturation = if lightness <= 0.0 || lightness >= 1.0 { - 0.0 - } else { - (x_max - lightness) / lightness.min(1.0 - lightness) - }; - - (hue, saturation, lightness) - } -} - -pub struct LchRepresentation; -impl LchRepresentation { - // References available at http://brucelindbloom.com/ in the "Math" section - - // CIE Constants - // http://brucelindbloom.com/index.html?LContinuity.html (16) (17) - const CIE_EPSILON: f32 = 216.0 / 24389.0; - const CIE_KAPPA: f32 = 24389.0 / 27.0; - // D65 White Reference: - // https://en.wikipedia.org/wiki/Illuminant_D65#Definition - const D65_WHITE_X: f32 = 0.95047; - const D65_WHITE_Y: f32 = 1.0; - const D65_WHITE_Z: f32 = 1.08883; - - /// converts a color in LCH space to sRGB space - #[inline] - pub fn lch_to_nonlinear_srgb(lightness: f32, chroma: f32, hue: f32) -> [f32; 3] { - let lightness = lightness * 100.0; - let chroma = chroma * 100.0; - - // convert LCH to Lab - // http://www.brucelindbloom.com/index.html?Eqn_LCH_to_Lab.html - let l = lightness; - let a = chroma * hue.to_radians().cos(); - let b = chroma * hue.to_radians().sin(); - - // convert Lab to XYZ - // http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html - let fy = (l + 16.0) / 116.0; - let fx = a / 500.0 + fy; - let fz = fy - b / 200.0; - let xr = { - let fx3 = fx.powf(3.0); - - if fx3 > Self::CIE_EPSILON { - fx3 - } else { - (116.0 * fx - 16.0) / Self::CIE_KAPPA - } - }; - let yr = if l > Self::CIE_EPSILON * Self::CIE_KAPPA { - ((l + 16.0) / 116.0).powf(3.0) - } else { - l / Self::CIE_KAPPA - }; - let zr = { - let fz3 = fz.powf(3.0); - - if fz3 > Self::CIE_EPSILON { - fz3 - } else { - (116.0 * fz - 16.0) / Self::CIE_KAPPA - } - }; - let x = xr * Self::D65_WHITE_X; - let y = yr * Self::D65_WHITE_Y; - let z = zr * Self::D65_WHITE_Z; - - // XYZ to sRGB - // http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html - // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html (sRGB, XYZ to RGB [M]-1) - let red = x * 3.2404542 + y * -1.5371385 + z * -0.4985314; - let green = x * -0.969266 + y * 1.8760108 + z * 0.041556; - let blue = x * 0.0556434 + y * -0.2040259 + z * 1.0572252; - - [ - red.linear_to_nonlinear_srgb().clamp(0.0, 1.0), - green.linear_to_nonlinear_srgb().clamp(0.0, 1.0), - blue.linear_to_nonlinear_srgb().clamp(0.0, 1.0), - ] - } - - /// converts a color in sRGB space to LCH space - #[inline] - pub fn nonlinear_srgb_to_lch([red, green, blue]: [f32; 3]) -> (f32, f32, f32) { - // RGB to XYZ - // http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html - let red = red.nonlinear_to_linear_srgb(); - let green = green.nonlinear_to_linear_srgb(); - let blue = blue.nonlinear_to_linear_srgb(); - - // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html (sRGB, RGB to XYZ [M]) - let x = red * 0.4124564 + green * 0.3575761 + blue * 0.1804375; - let y = red * 0.2126729 + green * 0.7151522 + blue * 0.072175; - let z = red * 0.0193339 + green * 0.119192 + blue * 0.9503041; - - // XYZ to Lab - // http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html - let xr = x / Self::D65_WHITE_X; - let yr = y / Self::D65_WHITE_Y; - let zr = z / Self::D65_WHITE_Z; - let fx = if xr > Self::CIE_EPSILON { - xr.cbrt() - } else { - (Self::CIE_KAPPA * xr + 16.0) / 116.0 - }; - let fy = if yr > Self::CIE_EPSILON { - yr.cbrt() - } else { - (Self::CIE_KAPPA * yr + 16.0) / 116.0 - }; - let fz = if yr > Self::CIE_EPSILON { - zr.cbrt() - } else { - (Self::CIE_KAPPA * zr + 16.0) / 116.0 - }; - let l = 116.0 * fy - 16.0; - let a = 500.0 * (fx - fy); - let b = 200.0 * (fy - fz); - - // Lab to LCH - // http://www.brucelindbloom.com/index.html?Eqn_Lab_to_LCH.html - let c = (a.powf(2.0) + b.powf(2.0)).sqrt(); - let h = { - let h = b.to_radians().atan2(a.to_radians()).to_degrees(); - - if h < 0.0 { - h + 360.0 - } else { - h - } - }; - - ((l / 100.0).clamp(0.0, 1.5), (c / 100.0).clamp(0.0, 1.5), h) - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn srgb_linear_full_roundtrip() { - let u8max: f32 = u8::MAX as f32; - for color in 0..u8::MAX { - let color01 = color as f32 / u8max; - let color_roundtrip = color01 - .linear_to_nonlinear_srgb() - .nonlinear_to_linear_srgb(); - // roundtrip is not perfect due to numeric precision, even with f64 - // so ensure the error is at least ready for u8 (where sRGB is used) - assert_eq!( - (color01 * u8max).round() as u8, - (color_roundtrip * u8max).round() as u8 - ); - } - } - - #[test] - fn hsl_to_srgb() { - // "truth" from https://en.wikipedia.org/wiki/HSL_and_HSV#Examples - - // black - let (hue, saturation, lightness) = (0.0, 0.0, 0.0); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 0); - assert_eq!((g * 100.0).round() as u32, 0); - assert_eq!((b * 100.0).round() as u32, 0); - - // white - let (hue, saturation, lightness) = (0.0, 0.0, 1.0); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 100); - assert_eq!((g * 100.0).round() as u32, 100); - assert_eq!((b * 100.0).round() as u32, 100); - - let (hue, saturation, lightness) = (300.0, 0.5, 0.5); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 75); - assert_eq!((g * 100.0).round() as u32, 25); - assert_eq!((b * 100.0).round() as u32, 75); - - // a red - let (hue, saturation, lightness) = (283.7, 0.775, 0.543); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 70); - assert_eq!((g * 100.0).round() as u32, 19); - assert_eq!((b * 100.0).round() as u32, 90); - - // a green - let (hue, saturation, lightness) = (162.4, 0.779, 0.447); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 10); - assert_eq!((g * 100.0).round() as u32, 80); - assert_eq!((b * 100.0).round() as u32, 59); - - // a blue - let (hue, saturation, lightness) = (251.1, 0.832, 0.511); - let [r, g, b] = HslRepresentation::hsl_to_nonlinear_srgb(hue, saturation, lightness); - assert_eq!((r * 100.0).round() as u32, 25); - assert_eq!((g * 100.0).round() as u32, 10); - assert_eq!((b * 100.0).round() as u32, 92); - } - - #[test] - fn srgb_to_hsl() { - // "truth" from https://en.wikipedia.org/wiki/HSL_and_HSV#Examples - - // black - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([0.0, 0.0, 0.0]); - assert_eq!(hue.round() as u32, 0); - assert_eq!((saturation * 100.0).round() as u32, 0); - assert_eq!((lightness * 100.0).round() as u32, 0); - - // white - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([1.0, 1.0, 1.0]); - assert_eq!(hue.round() as u32, 0); - assert_eq!((saturation * 100.0).round() as u32, 0); - assert_eq!((lightness * 100.0).round() as u32, 100); - - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([0.75, 0.25, 0.75]); - assert_eq!(hue.round() as u32, 300); - assert_eq!((saturation * 100.0).round() as u32, 50); - assert_eq!((lightness * 100.0).round() as u32, 50); - - // a red - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([0.704, 0.187, 0.897]); - assert_eq!(hue.round() as u32, 284); - assert_eq!((saturation * 100.0).round() as u32, 78); - assert_eq!((lightness * 100.0).round() as u32, 54); - - // a green - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([0.099, 0.795, 0.591]); - assert_eq!(hue.round() as u32, 162); - assert_eq!((saturation * 100.0).round() as u32, 78); - assert_eq!((lightness * 100.0).round() as u32, 45); - - // a blue - let (hue, saturation, lightness) = - HslRepresentation::nonlinear_srgb_to_hsl([0.255, 0.104, 0.918]); - assert_eq!(hue.round() as u32, 251); - assert_eq!((saturation * 100.0).round() as u32, 83); - assert_eq!((lightness * 100.0).round() as u32, 51); - } - - #[test] - fn lch_to_srgb() { - // "truth" from http://www.brucelindbloom.com/ColorCalculator.html - - // black - let (lightness, chroma, hue) = (0.0, 0.0, 0.0); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 0); - assert_eq!((g * 100.0).round() as u32, 0); - assert_eq!((b * 100.0).round() as u32, 0); - - // white - let (lightness, chroma, hue) = (1.0, 0.0, 0.0); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 100); - assert_eq!((g * 100.0).round() as u32, 100); - assert_eq!((b * 100.0).round() as u32, 100); - - let (lightness, chroma, hue) = (0.501236, 0.777514, 327.6608); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 75); - assert_eq!((g * 100.0).round() as u32, 25); - assert_eq!((b * 100.0).round() as u32, 75); - - // a red - let (lightness, chroma, hue) = (0.487122, 0.999531, 318.7684); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 70); - assert_eq!((g * 100.0).round() as u32, 19); - assert_eq!((b * 100.0).round() as u32, 90); - - // a green - let (lightness, chroma, hue) = (0.732929, 0.560925, 164.3216); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 10); - assert_eq!((g * 100.0).round() as u32, 80); - assert_eq!((b * 100.0).round() as u32, 59); - - // a blue - let (lightness, chroma, hue) = (0.335030, 1.176923, 306.7828); - let [r, g, b] = LchRepresentation::lch_to_nonlinear_srgb(lightness, chroma, hue); - assert_eq!((r * 100.0).round() as u32, 25); - assert_eq!((g * 100.0).round() as u32, 10); - assert_eq!((b * 100.0).round() as u32, 92); - } - - #[test] - fn srgb_to_lch() { - // "truth" from http://www.brucelindbloom.com/ColorCalculator.html - - // black - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([0.0, 0.0, 0.0]); - assert_eq!((lightness * 100.0).round() as u32, 0); - assert_eq!((chroma * 100.0).round() as u32, 0); - assert_eq!(hue.round() as u32, 0); - - // white - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([1.0, 1.0, 1.0]); - assert_eq!((lightness * 100.0).round() as u32, 100); - assert_eq!((chroma * 100.0).round() as u32, 0); - assert_eq!(hue.round() as u32, 0); - - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([0.75, 0.25, 0.75]); - assert_eq!((lightness * 100.0).round() as u32, 50); - assert_eq!((chroma * 100.0).round() as u32, 78); - assert_eq!(hue.round() as u32, 328); - - // a red - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([0.70, 0.19, 0.90]); - assert_eq!((lightness * 100.0).round() as u32, 49); - assert_eq!((chroma * 100.0).round() as u32, 100); - assert_eq!(hue.round() as u32, 319); - - // a green - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([0.10, 0.80, 0.59]); - assert_eq!((lightness * 100.0).round() as u32, 73); - assert_eq!((chroma * 100.0).round() as u32, 56); - assert_eq!(hue.round() as u32, 164); - - // a blue - let (lightness, chroma, hue) = LchRepresentation::nonlinear_srgb_to_lch([0.25, 0.10, 0.92]); - assert_eq!((lightness * 100.0).round() as u32, 34); - assert_eq!((chroma * 100.0).round() as u32, 118); - assert_eq!(hue.round() as u32, 307); - } -} diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1904,56 +1601,10 @@ impl encase::private::CreateFrom for LegacyColor { impl encase::ShaderSize for LegacyColor {} -#[derive(Debug, Error, PartialEq, Eq)] -pub enum HexColorError { - #[error("Invalid hex string")] - Parse(#[from] std::num::ParseIntError), - #[error("Unexpected length of hex string")] - Length, - #[error("Invalid hex char")] - Char(char), -} - -/// Converts hex bytes to an array of RGB\[A\] components -/// -/// # Example -/// For RGB: *b"ffffff" -> [255, 255, 255, ..] -/// For RGBA: *b"E2E2E2FF" -> [226, 226, 226, 255, ..] -const fn decode_hex<const N: usize>(mut bytes: [u8; N]) -> Result<[u8; N], HexColorError> { - let mut i = 0; - while i < bytes.len() { - // Convert single hex digit to u8 - let val = match hex_value(bytes[i]) { - Ok(val) => val, - Err(byte) => return Err(HexColorError::Char(byte as char)), - }; - bytes[i] = val; - i += 1; - } - // Modify the original bytes to give an `N / 2` length result - i = 0; - while i < bytes.len() / 2 { - // Convert pairs of u8 to R/G/B/A - // e.g `ff` -> [102, 102] -> [15, 15] = 255 - bytes[i] = bytes[i * 2] * 16 + bytes[i * 2 + 1]; - i += 1; - } - Ok(bytes) -} - -/// Parse a single hex digit (a-f/A-F/0-9) as a `u8` -const fn hex_value(b: u8) -> Result<u8, u8> { - match b { - b'0'..=b'9' => Ok(b - b'0'), - b'A'..=b'F' => Ok(b - b'A' + 10), - b'a'..=b'f' => Ok(b - b'a' + 10), - // Wrong hex digit - _ => Err(b), - } -} - #[cfg(test)] mod tests { + use std::num::ParseIntError; + use super::*; #[test] diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1971,7 +1622,9 @@ mod tests { Ok(LegacyColor::rgb_u8(3, 169, 244)) ); assert_eq!(LegacyColor::hex("yy"), Err(HexColorError::Length)); - assert_eq!(LegacyColor::hex("yyy"), Err(HexColorError::Char('y'))); + let Err(HexColorError::Parse(ParseIntError { .. })) = LegacyColor::hex("yyy") else { + panic!("Expected Parse Int Error") + }; assert_eq!( LegacyColor::hex("#f2a"), Ok(LegacyColor::rgb_u8(255, 34, 170)) diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -1981,7 +1634,9 @@ mod tests { Ok(LegacyColor::rgb_u8(226, 48, 48)) ); assert_eq!(LegacyColor::hex("#ff"), Err(HexColorError::Length)); - assert_eq!(LegacyColor::hex("##fff"), Err(HexColorError::Char('#'))); + let Err(HexColorError::Parse(ParseIntError { .. })) = LegacyColor::hex("##fff") else { + panic!("Expected Parse Int Error") + }; } #[test]
bevy_color: migrate color conversion code from bevy_render Currently, bevy_color uses color conversion functions contained in bevy_render. This means that bevy_color depends on bevy_render. This dependency should be the other way around - bevy_color should be a lower-level dependency of bevy_render. To fix this, a number of modules will need to be moved: * The `colorspace` module in bevy_render should be moved to `bevy_color`. * The `From` impls that convert between the old legacy color type to the new color types should be moved to `bevy_render`.
2024-02-25T03:55:57Z
1.76
2024-05-03T20:27:25Z
c9ec95d7827297528d0779e3fd232dfc2e3cbed7
[ "hsla::tests::test_to_from_linear", "color_range::tests::test_color_range", "hsla::tests::test_mix_wrap", "hsla::tests::test_to_from_srgba", "hsla::tests::test_to_from_srgba_2", "lcha::tests::test_to_from_linear", "lcha::tests::test_to_from_srgba", "linear_rgba::tests::darker_lighter", "linear_rgba::tests::euclidean_distance", "oklaba::tests::test_to_from_linear", "oklaba::tests::test_to_from_srgba", "oklaba::tests::test_to_from_srgba_2", "srgba::tests::darker_lighter", "srgba::tests::euclidean_distance", "srgba::tests::hex_color", "srgba::tests::test_to_from_linear", "xyza::tests::test_to_from_srgba", "xyza::tests::test_to_from_srgba_2", "crates/bevy_color/src/lib.rs - (line 62)", "crates/bevy_color/src/srgba.rs - srgba::Srgba::hex (line 89)", "color::tests::mul_and_mulassign_f32", "color::tests::conversions_vec4", "color::tests::convert_to_rgba_linear", "color::tests::hex_color", "color::tests::mul_and_mulassign_f32by3", "color::tests::mul_and_mulassign_f32by4", "color::tests::mul_and_mulassign_vec3", "color::tests::mul_and_mulassign_vec4", "mesh::mesh::conversions::tests::f32", "mesh::mesh::conversions::tests::correct_message", "mesh::mesh::conversions::tests::f32_2", "mesh::mesh::conversions::tests::f32_3", "mesh::mesh::conversions::tests::f32_4", "mesh::mesh::conversions::tests::i32", "mesh::mesh::conversions::tests::i32_2", "mesh::mesh::conversions::tests::i32_3", "mesh::mesh::conversions::tests::i32_4", "mesh::mesh::conversions::tests::ivec2", "mesh::mesh::conversions::tests::ivec3", "mesh::mesh::conversions::tests::ivec4", "mesh::mesh::conversions::tests::u32", "mesh::mesh::conversions::tests::u32_2", "mesh::mesh::conversions::tests::u32_3", "mesh::mesh::conversions::tests::u32_4", "mesh::mesh::conversions::tests::uvec2", "mesh::mesh::conversions::tests::uvec3", "mesh::mesh::conversions::tests::uvec4", "mesh::mesh::conversions::tests::vec2", "mesh::mesh::conversions::tests::vec3", "mesh::mesh::conversions::tests::vec3a", "mesh::mesh::conversions::tests::vec4", "mesh::primitives::dim2::tests::test_regular_polygon", "primitives::tests::aabb_enclosing", "mesh::mesh::tests::panic_invalid_format - should panic", "primitives::tests::intersects_sphere_big_frustum_intersect", "primitives::tests::intersects_sphere_big_frustum_outside", "primitives::tests::intersects_sphere_frustum_contained", "primitives::tests::intersects_sphere_frustum_dodges_1_plane", "primitives::tests::intersects_sphere_frustum_intersects_2_planes", "primitives::tests::intersects_sphere_frustum_intersects_3_planes", "primitives::tests::intersects_sphere_frustum_intersects_plane", "primitives::tests::intersects_sphere_frustum_surrounding", "primitives::tests::intersects_sphere_long_frustum_intersect", "primitives::tests::intersects_sphere_long_frustum_outside", "render_graph::graph::tests::test_get_node_typed", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_add_node_edges", "render_phase::rangefinder::tests::distance", "render_graph::graph::tests::test_slot_already_occupied", "render_graph::graph::tests::test_graph_edges", "render_resource::bind_group::test::texture_visibility", "texture::image::test::image_default_size", "texture::image_texture_conversion::test::two_way_conversion", "view::visibility::render_layers::rendering_mask_tests::rendering_mask_sanity", "view::visibility::test::ensure_visibility_enum_size", "view::visibility::test::visibility_propagation_with_invalid_parent", "view::visibility::test::visibility_propagation_change_detection", "texture::image::test::image_size", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indexed_indirect (line 295)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect (line 323)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect_count (line 361)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect_count (line 444)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect (line 404)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indirect (line 272)", "crates/bevy_render/src/mesh/mesh/mod.rs - mesh::mesh::Mesh (line 49)", "crates/bevy_render/src/mesh/primitives/mod.rs - mesh::primitives (line 7)", "crates/bevy_render/src/render_phase/draw.rs - render_phase::draw::RenderCommand (line 156)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 76)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 229)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::push_debug_group (line 561)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 192)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 255)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 164)", "crates/bevy_render/src/extract_param.rs - extract_param::Extract (line 30)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 176)", "crates/bevy_render/src/camera/projection.rs - camera::projection::OrthographicProjection (line 316)", "crates/bevy_render/src/mesh/mesh/conversions.rs - mesh::mesh::conversions (line 6)", "crates/bevy_render/src/camera/projection.rs - camera::projection::ScalingMode (line 219)", "crates/bevy_render/src/primitives/mod.rs - primitives::Aabb::enclosing (line 59)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
17,025
bevyengine__bevy-17025
[ "17024" ]
64efd08e13c55598587f3071070f750f8945e28e
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 @@ -412,7 +412,10 @@ pub fn update_frusta<T: Component + CameraProjection + Send + Sync + 'static>( fn visibility_propagate_system( changed: Query< (Entity, &Visibility, Option<&Parent>, Option<&Children>), - (With<InheritedVisibility>, Changed<Visibility>), + ( + With<InheritedVisibility>, + Or<(Changed<Visibility>, Changed<Parent>)>, + ), >, mut visibility_query: Query<(&Visibility, &mut InheritedVisibility)>, children_query: Query<&Children, (With<Visibility>, With<InheritedVisibility>)>,
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 @@ -757,6 +760,58 @@ mod test { ); } + #[test] + fn test_visibility_propagation_on_parent_change() { + // Setup the world and schedule + let mut app = App::new(); + + app.add_systems(Update, visibility_propagate_system); + + // Create entities with visibility and hierarchy + let parent1 = app.world_mut().spawn((Visibility::Hidden,)).id(); + let parent2 = app.world_mut().spawn((Visibility::Visible,)).id(); + let child1 = app.world_mut().spawn((Visibility::Inherited,)).id(); + let child2 = app.world_mut().spawn((Visibility::Inherited,)).id(); + + // Build hierarchy + app.world_mut() + .entity_mut(parent1) + .add_children(&[child1, child2]); + + // Run the system initially to set up visibility + app.update(); + + // Change parent visibility to Hidden + app.world_mut() + .entity_mut(parent2) + .insert(Visibility::Visible); + // Simulate a change in the parent component + app.world_mut().entity_mut(child2).set_parent(parent2); // example of changing parent + + // Run the system again to propagate changes + app.update(); + + let is_visible = |e: Entity| { + app.world() + .entity(e) + .get::<InheritedVisibility>() + .unwrap() + .get() + }; + + // Retrieve and assert visibility + + assert!( + !is_visible(child1), + "Child1 should inherit visibility from parent" + ); + + assert!( + is_visible(child2), + "Child2 should inherit visibility from parent" + ); + } + #[test] fn visibility_propagation_unconditional_visible() { use Visibility::{Hidden, Inherited, Visible};
Using .set_parent on an entity whose parent was Visibility:Hidden fails to refresh visibility ## Bevy version 0.15 I found a super annoying bug !! ``` commands .entity(*equipment_link_node) .set_parent(*parent_entity); //this doesnt refresh inherited visibility ! ``` If you use set_parent and the entity had a 'false' inherited visibility, then the inherited visibility doesnt refresh! what gives ? is this a bug in bevy or am i supposed to handle this i think it is because of this ``` fn visibility_propagate_system( changed: Query< (Entity, &Visibility, Option<&Parent>, Option<&Children>), (With<InheritedVisibility>, Changed<Visibility>), >, mut visibility_query: Query<(&Visibility, &mut InheritedVisibility)>, children_query: Query<&Children, (With<Visibility>, With<InheritedVisibility>)>, ) { ``` doesnt account for changed<parent> ... ? seems like it doesnt
I am able to fix my issue for now by doing this ``` commands .entity(*equipment_link_node) .set_parent(*parent_entity); //this doesnt refresh inherited visibility ! //a dirty hack to fix a bevy bug.. ? if let Some(mut cmd) = commands.get_entity( *equipment_link_node ){ cmd.insert(Visibility::Inherited); // a hack for now } ``` i believe adding Changed (Parent) to the visibility propogate may fix this.. feel free to chime in You should try it and make a PR :)
2024-12-29T18:55:13Z
1.83
2025-01-28T04:45:16Z
64efd08e13c55598587f3071070f750f8945e28e
[ "view::visibility::test::test_visibility_propagation_on_parent_change" ]
[ "primitives::tests::aabb_enclosing", "primitives::tests::aabb_intersect_frustum", "primitives::tests::aabb_inside_frustum", "primitives::tests::aabb_inside_frustum_rotation", "primitives::tests::aabb_intersect_frustum_rotation", "primitives::tests::aabb_outside_frustum", "primitives::tests::intersects_sphere_big_frustum_intersect", "primitives::tests::intersects_sphere_big_frustum_outside", "primitives::tests::intersects_sphere_frustum_contained", "primitives::tests::intersects_sphere_frustum_dodges_1_plane", "primitives::tests::intersects_sphere_frustum_intersects_2_planes", "primitives::tests::intersects_sphere_frustum_intersects_3_planes", "primitives::tests::intersects_sphere_frustum_intersects_plane", "primitives::tests::intersects_sphere_frustum_surrounding", "primitives::tests::intersects_sphere_long_frustum_intersect", "primitives::tests::intersects_sphere_long_frustum_outside", "render_graph::graph::tests::test_get_node_typed", "render_graph::graph::tests::test_edge_already_exists", "render_graph::graph::tests::test_add_node_edges", "render_graph::graph::tests::test_graph_edges", "render_phase::rangefinder::tests::distance", "render_resource::bind_group::test::texture_visibility", "render_graph::graph::tests::test_slot_already_occupied", "view::visibility::render_layers::rendering_mask_tests::render_layer_iter_no_overflow", "view::visibility::render_layers::rendering_mask_tests::render_layer_ops", "view::visibility::render_layers::rendering_mask_tests::render_layer_shrink", "view::visibility::test::ensure_visibility_enum_size", "view::visibility::render_layers::rendering_mask_tests::rendering_mask_sanity", "sync_world::tests::sync_world", "view::visibility::test::visibility_propagation_change_detection", "view::visibility::test::visibility_propagation_with_invalid_parent", "view::visibility::test::visibility_propagation_unconditional_visible", "view::visibility::test::visibility_propagation", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indirect (line 303)", "crates/bevy_render/src/batching/gpu_preprocessing.rs - batching::gpu_preprocessing::IndirectParameters (line 273)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect (line 354)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::draw_indexed_indirect (line 326)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect (line 435)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indirect_count (line 392)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::multi_draw_indexed_indirect_count (line 475)", "crates/bevy_render/src/render_phase/draw_state.rs - render_phase::draw_state::TrackedRenderPass<'a>::push_debug_group (line 592)", "crates/bevy_render/src/render_phase/draw.rs - render_phase::draw::RenderCommand (line 164)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 90)", "crates/bevy_render/src/extract_param.rs - extract_param::Extract (line 30)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 198)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 304)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 216)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 185)", "crates/bevy_render/src/view/window/screenshot.rs - view::window::screenshot::Screenshot (line 63)", "crates/bevy_render/src/render_resource/bind_group.rs - render_resource::bind_group::AsBindGroup (line 277)", "crates/bevy_render/src/camera/projection.rs - camera::projection::ScalingMode (line 280)", "crates/bevy_render/src/primitives/mod.rs - primitives::Aabb::enclosing (line 57)", "crates/bevy_render/src/camera/projection.rs - camera::projection::OrthographicProjection (line 336)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
17,005
bevyengine__bevy-17005
[ "17001" ]
31367108f73469bcb7d84452f7191c353a08805d
diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -4,7 +4,7 @@ use alloc::{ string::{String, ToString}, vec::Vec, }; -use bevy_utils::TypeIdMap; +use bevy_utils::{hashbrown::hash_map::Entry, TypeIdMap}; use core::any::TypeId; use log::{debug, warn}; diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -224,11 +224,6 @@ impl PluginGroup for PluginGroupBuilder { } } -/// Helper method to get the [`TypeId`] of a value without having to name its type. -fn type_id_of_val<T: 'static>(_: &T) -> TypeId { - TypeId::of::<T>() -} - /// Facilitates the creation and configuration of a [`PluginGroup`]. /// /// Provides a build ordering to ensure that [`Plugin`]s which produce/require a [`Resource`](bevy_ecs::system::Resource) diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -250,20 +245,24 @@ impl PluginGroupBuilder { } } - /// Finds the index of a target [`Plugin`]. Panics if the target's [`TypeId`] is not found. - fn index_of<Target: Plugin>(&self) -> usize { - let index = self - .order + /// Checks if the [`PluginGroupBuilder`] contains the given [`Plugin`]. + pub fn contains<T: Plugin>(&self) -> bool { + self.plugins.contains_key(&TypeId::of::<T>()) + } + + /// Returns `true` if the [`PluginGroupBuilder`] contains the given [`Plugin`] and it's enabled. + pub fn enabled<T: Plugin>(&self) -> bool { + self.plugins + .get(&TypeId::of::<T>()) + .map(|e| e.enabled) + .unwrap_or(false) + } + + /// Finds the index of a target [`Plugin`]. + fn index_of<Target: Plugin>(&self) -> Option<usize> { + self.order .iter() - .position(|&ty| ty == TypeId::of::<Target>()); - - match index { - Some(i) => i, - None => panic!( - "Plugin does not exist in group: {}.", - core::any::type_name::<Target>() - ), - } + .position(|&ty| ty == TypeId::of::<Target>()) } // Insert the new plugin as enabled, and removes its previous ordering if it was diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -311,15 +310,27 @@ impl PluginGroupBuilder { /// # Panics /// /// Panics if the [`Plugin`] does not exist. - pub fn set<T: Plugin>(mut self, plugin: T) -> Self { - let entry = self.plugins.get_mut(&TypeId::of::<T>()).unwrap_or_else(|| { + pub fn set<T: Plugin>(self, plugin: T) -> Self { + self.try_set(plugin).unwrap_or_else(|_| { panic!( "{} does not exist in this PluginGroup", core::any::type_name::<T>(), ) - }); - entry.plugin = Box::new(plugin); - self + }) + } + + /// Tries to set the value of the given [`Plugin`], if it exists. + /// + /// If the given plugin doesn't exist returns self and the passed in [`Plugin`]. + pub fn try_set<T: Plugin>(mut self, plugin: T) -> Result<Self, (Self, T)> { + match self.plugins.entry(TypeId::of::<T>()) { + Entry::Occupied(mut entry) => { + entry.get_mut().plugin = Box::new(plugin); + + Ok(self) + } + Entry::Vacant(_) => Err((self, plugin)), + } } /// Adds the plugin [`Plugin`] at the end of this [`PluginGroupBuilder`]. If the plugin was diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -336,6 +347,17 @@ impl PluginGroupBuilder { self } + /// Attempts to add the plugin [`Plugin`] at the end of this [`PluginGroupBuilder`]. + /// + /// If the plugin was already in the group the addition fails. + pub fn try_add<T: Plugin>(self, plugin: T) -> Result<Self, (Self, T)> { + if self.contains::<T>() { + return Err((self, plugin)); + } + + Ok(self.add(plugin)) + } + /// Adds a [`PluginGroup`] at the end of this [`PluginGroupBuilder`]. If the plugin was /// already in the group, it is removed from its previous place. pub fn add_group(mut self, group: impl PluginGroup) -> Self { diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -357,23 +379,105 @@ impl PluginGroupBuilder { } /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] before the plugin of type `Target`. - /// If the plugin was already the group, it is removed from its previous place. There must - /// be a plugin of type `Target` in the group or it will panic. - pub fn add_before<Target: Plugin>(mut self, plugin: impl Plugin) -> Self { - let target_index = self.index_of::<Target>(); - self.order.insert(target_index, type_id_of_val(&plugin)); + /// + /// If the plugin was already the group, it is removed from its previous place. + /// + /// # Panics + /// + /// Panics if `Target` is not already in this [`PluginGroupBuilder`]. + pub fn add_before<Target: Plugin>(self, plugin: impl Plugin) -> Self { + self.try_add_before_overwrite::<Target, _>(plugin) + .unwrap_or_else(|_| { + panic!( + "Plugin does not exist in group: {}.", + core::any::type_name::<Target>() + ) + }) + } + + /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] before the plugin of type `Target`. + /// + /// If the plugin was already in the group the add fails. If there isn't a plugin + /// of type `Target` in the group the plugin we're trying to insert is returned. + pub fn try_add_before<Target: Plugin, Insert: Plugin>( + self, + plugin: Insert, + ) -> Result<Self, (Self, Insert)> { + if self.contains::<Insert>() { + return Err((self, plugin)); + } + + self.try_add_before_overwrite::<Target, _>(plugin) + } + + /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] before the plugin of type `Target`. + /// + /// If the plugin was already in the group, it is removed from its previous places. + /// If there isn't a plugin of type `Target` in the group the plugin we're trying to insert + /// is returned. + pub fn try_add_before_overwrite<Target: Plugin, Insert: Plugin>( + mut self, + plugin: Insert, + ) -> Result<Self, (Self, Insert)> { + let Some(target_index) = self.index_of::<Target>() else { + return Err((self, plugin)); + }; + + self.order.insert(target_index, TypeId::of::<Insert>()); self.upsert_plugin_state(plugin, target_index); - self + Ok(self) } /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] after the plugin of type `Target`. - /// If the plugin was already the group, it is removed from its previous place. There must - /// be a plugin of type `Target` in the group or it will panic. - pub fn add_after<Target: Plugin>(mut self, plugin: impl Plugin) -> Self { - let target_index = self.index_of::<Target>() + 1; - self.order.insert(target_index, type_id_of_val(&plugin)); + /// + /// If the plugin was already the group, it is removed from its previous place. + /// + /// # Panics + /// + /// Panics if `Target` is not already in this [`PluginGroupBuilder`]. + pub fn add_after<Target: Plugin>(self, plugin: impl Plugin) -> Self { + self.try_add_after_overwrite::<Target, _>(plugin) + .unwrap_or_else(|_| { + panic!( + "Plugin does not exist in group: {}.", + core::any::type_name::<Target>() + ) + }) + } + + /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] after the plugin of type `Target`. + /// + /// If the plugin was already in the group the add fails. If there isn't a plugin + /// of type `Target` in the group the plugin we're trying to insert is returned. + pub fn try_add_after<Target: Plugin, Insert: Plugin>( + self, + plugin: Insert, + ) -> Result<Self, (Self, Insert)> { + if self.contains::<Insert>() { + return Err((self, plugin)); + } + + self.try_add_after_overwrite::<Target, _>(plugin) + } + + /// Adds a [`Plugin`] in this [`PluginGroupBuilder`] after the plugin of type `Target`. + /// + /// If the plugin was already in the group, it is removed from its previous places. + /// If there isn't a plugin of type `Target` in the group the plugin we're trying to insert + /// is returned. + pub fn try_add_after_overwrite<Target: Plugin, Insert: Plugin>( + mut self, + plugin: Insert, + ) -> Result<Self, (Self, Insert)> { + let Some(target_index) = self.index_of::<Target>() else { + return Err((self, plugin)); + }; + + let target_index = target_index + 1; + + self.order.insert(target_index, TypeId::of::<Insert>()); self.upsert_plugin_state(plugin, target_index); - self + Ok(self) } /// Enables a [`Plugin`].
diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -451,6 +555,8 @@ impl PluginGroup for NoopPluginGroup { #[cfg(test)] mod tests { + use core::{any::TypeId, fmt::Debug}; + use super::PluginGroupBuilder; use crate::{App, NoopPluginGroup, Plugin}; diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -469,6 +575,35 @@ mod tests { fn build(&self, _: &mut App) {} } + #[derive(PartialEq, Debug)] + struct PluginWithData(u32); + impl Plugin for PluginWithData { + fn build(&self, _: &mut App) {} + } + + fn get_plugin<T: Debug + 'static>(group: &PluginGroupBuilder, id: TypeId) -> &T { + group.plugins[&id] + .plugin + .as_any() + .downcast_ref::<T>() + .unwrap() + } + + #[test] + fn contains() { + let group = PluginGroupBuilder::start::<NoopPluginGroup>() + .add(PluginA) + .add(PluginB); + + assert!(group.contains::<PluginA>()); + assert!(!group.contains::<PluginC>()); + + let group = group.disable::<PluginA>(); + + assert!(group.enabled::<PluginB>()); + assert!(!group.enabled::<PluginA>()); + } + #[test] fn basic_ordering() { let group = PluginGroupBuilder::start::<NoopPluginGroup>() diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -479,13 +614,56 @@ mod tests { assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginB>(), - core::any::TypeId::of::<PluginC>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginB>(), + TypeId::of::<PluginC>(), + ] + ); + } + + #[test] + fn add_before() { + let group = PluginGroupBuilder::start::<NoopPluginGroup>() + .add(PluginA) + .add(PluginB) + .add_before::<PluginB>(PluginC); + + assert_eq!( + group.order, + vec![ + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), ] ); } + #[test] + fn try_add_before() { + let group = PluginGroupBuilder::start::<NoopPluginGroup>().add(PluginA); + + let Ok(group) = group.try_add_before::<PluginA, _>(PluginC) else { + panic!("PluginA wasn't in group"); + }; + + assert_eq!( + group.order, + vec![TypeId::of::<PluginC>(), TypeId::of::<PluginA>(),] + ); + + assert!(group.try_add_before::<PluginA, _>(PluginC).is_err()); + } + + #[test] + #[should_panic( + expected = "Plugin does not exist in group: bevy_app::plugin_group::tests::PluginB." + )] + fn add_before_nonexistent() { + PluginGroupBuilder::start::<NoopPluginGroup>() + .add(PluginA) + .add_before::<PluginB>(PluginC); + } + #[test] fn add_after() { let group = PluginGroupBuilder::start::<NoopPluginGroup>() diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -496,26 +674,103 @@ mod tests { assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginC>(), - core::any::TypeId::of::<PluginB>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), ] ); } #[test] - fn add_before() { + fn try_add_after() { let group = PluginGroupBuilder::start::<NoopPluginGroup>() .add(PluginA) - .add(PluginB) - .add_before::<PluginB>(PluginC); + .add(PluginB); + + let Ok(group) = group.try_add_after::<PluginA, _>(PluginC) else { + panic!("PluginA wasn't in group"); + }; assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginC>(), - core::any::TypeId::of::<PluginB>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), + ] + ); + + assert!(group.try_add_after::<PluginA, _>(PluginC).is_err()); + } + + #[test] + #[should_panic( + expected = "Plugin does not exist in group: bevy_app::plugin_group::tests::PluginB." + )] + fn add_after_nonexistent() { + PluginGroupBuilder::start::<NoopPluginGroup>() + .add(PluginA) + .add_after::<PluginB>(PluginC); + } + + #[test] + fn add_overwrite() { + let group = PluginGroupBuilder::start::<NoopPluginGroup>() + .add(PluginA) + .add(PluginWithData(0x0F)) + .add(PluginC); + + let id = TypeId::of::<PluginWithData>(); + assert_eq!( + get_plugin::<PluginWithData>(&group, id), + &PluginWithData(0x0F) + ); + + let group = group.add(PluginWithData(0xA0)); + + assert_eq!( + get_plugin::<PluginWithData>(&group, id), + &PluginWithData(0xA0) + ); + assert_eq!( + group.order, + vec![ + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginWithData>(), + ] + ); + + let Ok(group) = group.try_add_before_overwrite::<PluginA, _>(PluginWithData(0x01)) else { + panic!("PluginA wasn't in group"); + }; + assert_eq!( + get_plugin::<PluginWithData>(&group, id), + &PluginWithData(0x01) + ); + assert_eq!( + group.order, + vec![ + TypeId::of::<PluginWithData>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + ] + ); + + let Ok(group) = group.try_add_after_overwrite::<PluginA, _>(PluginWithData(0xdeadbeef)) + else { + panic!("PluginA wasn't in group"); + }; + assert_eq!( + get_plugin::<PluginWithData>(&group, id), + &PluginWithData(0xdeadbeef) + ); + assert_eq!( + group.order, + vec![ + TypeId::of::<PluginA>(), + TypeId::of::<PluginWithData>(), + TypeId::of::<PluginC>(), ] ); } diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -531,45 +786,45 @@ mod tests { assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginC>(), - core::any::TypeId::of::<PluginB>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), ] ); } #[test] - fn readd_after() { + fn readd_before() { let group = PluginGroupBuilder::start::<NoopPluginGroup>() .add(PluginA) .add(PluginB) .add(PluginC) - .add_after::<PluginA>(PluginC); + .add_before::<PluginB>(PluginC); assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginC>(), - core::any::TypeId::of::<PluginB>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), ] ); } #[test] - fn readd_before() { + fn readd_after() { let group = PluginGroupBuilder::start::<NoopPluginGroup>() .add(PluginA) .add(PluginB) .add(PluginC) - .add_before::<PluginB>(PluginC); + .add_after::<PluginA>(PluginC); assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginC>(), - core::any::TypeId::of::<PluginB>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginC>(), + TypeId::of::<PluginB>(), ] ); } diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -587,9 +842,9 @@ mod tests { assert_eq!( group_b.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginB>(), - core::any::TypeId::of::<PluginC>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginB>(), + TypeId::of::<PluginC>(), ] ); } diff --git a/crates/bevy_app/src/plugin_group.rs b/crates/bevy_app/src/plugin_group.rs --- a/crates/bevy_app/src/plugin_group.rs +++ b/crates/bevy_app/src/plugin_group.rs @@ -611,9 +866,9 @@ mod tests { assert_eq!( group.order, vec![ - core::any::TypeId::of::<PluginA>(), - core::any::TypeId::of::<PluginB>(), - core::any::TypeId::of::<PluginC>(), + TypeId::of::<PluginA>(), + TypeId::of::<PluginB>(), + TypeId::of::<PluginC>(), ] ); }
Add `contains` or `has` to `PluginGroupBuilder` ## What problem does this solve or what need does it fill? `PluginGroupBuilder` has several panicking methods such as `set` and `disable`, which panic if the given type of plugin is missing from the plugin group. These methods have no error-returning variants, and there is currently no way to check from the outside if a `PluginGroupBuilder` has a given plugin, even though internally it would just be a simple `contains_key` call to the plugin hash map. This can be problematic for APIs that take or produce a `PluginGroupBuilder` and want to perform some operations on it, or otherwise just need to check if a plugin exists. ## What solution would you like? Add a `contains` or `has` method to `PluginGroupBuilder`. ## What alternative(s) have you considered? - Add non-panicking variants for all of the panicking methods (not exclusive with a `contains` method, both could exist) - Make the panicking methods non-panicking (doesn't necessarily solve just wanting to know if a plugin exists)
2024-12-28T13:32:06Z
1.83
2024-12-31T07:46:45Z
64efd08e13c55598587f3071070f750f8945e28e
[ "app::tests::app_exit_size", "app::tests::test_derive_app_label", "plugin_group::tests::add_after", "plugin_group::tests::add_basic_subgroup", "app::tests::initializing_resources_from_world", "app::tests::can_add_twice_the_same_plugin_not_unique", "app::tests::can_add_twice_the_same_plugin_with_different_type_param", "plugin_group::tests::add_before", "app::tests::can_add_two_plugins", "plugin_group::tests::add_conflicting_subgroup", "app::tests::plugin_should_not_be_added_during_build_time", "app::tests::cant_add_twice_the_same_plugin - should panic", "app::tests::cant_call_app_run_from_plugin_build - should panic", "app::tests::add_systems_should_create_schedule_if_it_does_not_exist", "plugin_group::tests::basic_ordering", "plugin_group::tests::readd", "app::tests::test_is_plugin_added_works_during_finish - should panic", "plugin_group::tests::readd_after", "plugin_group::tests::readd_before", "app::tests::events_should_be_updated_once_per_update", "app::tests::runner_returns_correct_exit_code", "app::tests::regression_test_10385", "app::tests::test_extract_sees_changes", "app::tests::test_update_clears_trackers_once", "task_pool_plugin::tests::runs_spawn_local_tasks", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 29) - compile", "crates/bevy_app/src/panic_handler.rs - panic_handler::PanicHandlerPlugin (line 17) - compile", "crates/bevy_app/src/terminal_ctrl_c_handler.rs - terminal_ctrl_c_handler::TerminalCtrlCHandlerPlugin (line 26) - compile", "crates/bevy_app/src/terminal_ctrl_c_handler.rs - terminal_ctrl_c_handler::TerminalCtrlCHandlerPlugin (line 14) - compile", "crates/bevy_app/src/plugin_group.rs - plugin_group::plugin_group (line 17)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 55)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp::take_extract (line 177)", "crates/bevy_app/src/app.rs - app::App::get_added_plugins (line 512)", "crates/bevy_app/src/app.rs - app::App::insert_non_send_resource (line 430)", "crates/bevy_app/src/app.rs - app::App::insert_resource (line 371)", "crates/bevy_app/src/app.rs - app::App::add_systems (line 286)", "crates/bevy_app/src/app.rs - app::App (line 64)", "crates/bevy_app/src/app.rs - app::App::set_runner (line 198)", "crates/bevy_app/src/app.rs - app::App::add_event (line 346)", "crates/bevy_app/src/app.rs - app::App::add_plugins (line 551)", "crates/bevy_app/src/app.rs - app::App::register_type_data (line 609)", "crates/bevy_app/src/plugin.rs - plugin::Plugin (line 42)", "crates/bevy_app/src/app.rs - app::App::register_function (line 665)", "crates/bevy_app/src/main_schedule.rs - main_schedule::RunFixedMainLoopSystem::AfterFixedMainLoop (line 457)", "crates/bevy_app/src/sub_app.rs - sub_app::SubApp (line 24)", "crates/bevy_app/src/app.rs - app::App::register_function (line 680)", "crates/bevy_app/src/app.rs - app::App::register_required_components (line 804)", "crates/bevy_app/src/app.rs - app::App::try_register_required_components (line 929)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_resource (line 1212)", "crates/bevy_app/src/app.rs - app::App::add_observer (line 1291)", "crates/bevy_app/src/app.rs - app::App::register_function (line 653)", "crates/bevy_app/src/app.rs - app::App::init_resource (line 397)", "crates/bevy_app/src/app.rs - app::App::register_function_with_name (line 727)", "crates/bevy_app/src/main_schedule.rs - main_schedule::RunFixedMainLoopSystem::FixedMainLoop (line 428)", "crates/bevy_app/src/app.rs - app::App::register_required_components_with (line 864)", "crates/bevy_app/src/main_schedule.rs - main_schedule::RunFixedMainLoopSystem::BeforeFixedMainLoop (line 404)", "crates/bevy_app/src/app.rs - app::App::register_function_with_name (line 752)", "crates/bevy_app/src/app.rs - app::App::try_register_required_components_with (line 991)", "crates/bevy_app/src/app.rs - app::App::allow_ambiguous_component (line 1174)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
16,910
bevyengine__bevy-16910
[ "16676" ]
65835f535493a14d4fabe3c1569de61be2e884b1
diff --git a/crates/bevy_math/src/curve/easing.rs b/crates/bevy_math/src/curve/easing.rs --- a/crates/bevy_math/src/curve/easing.rs +++ b/crates/bevy_math/src/curve/easing.rs @@ -176,9 +176,15 @@ pub enum EaseFunction { /// Behaves as `EaseFunction::CircularIn` for t < 0.5 and as `EaseFunction::CircularOut` for t >= 0.5 CircularInOut, - /// `f(t) = 2.0^(10.0 * (t - 1.0))` + /// `f(t) ≈ 2.0^(10.0 * (t - 1.0))` + /// + /// The precise definition adjusts it slightly so it hits both `(0, 0)` and `(1, 1)`: + /// `f(t) = 2.0^(10.0 * t - A) - B`, where A = log₂(2¹⁰-1) and B = 1/(2¹⁰-1). ExponentialIn, - /// `f(t) = 1.0 - 2.0^(-10.0 * t)` + /// `f(t) ≈ 1.0 - 2.0^(-10.0 * t)` + /// + /// As with `EaseFunction::ExponentialIn`, the precise definition adjusts it slightly + // so it hits both `(0, 0)` and `(1, 1)`. ExponentialOut, /// Behaves as `EaseFunction::ExponentialIn` for t < 0.5 and as `EaseFunction::ExponentialOut` for t >= 0.5 ExponentialInOut, diff --git a/crates/bevy_math/src/curve/easing.rs b/crates/bevy_math/src/curve/easing.rs --- a/crates/bevy_math/src/curve/easing.rs +++ b/crates/bevy_math/src/curve/easing.rs @@ -324,20 +330,30 @@ mod easing_functions { } } + // These are copied from a high precision calculator; I'd rather show them + // with blatantly more digits than needed (since rust will round them to the + // nearest representable value anyway) rather than make it seem like the + // truncated value is somehow carefully chosen. + #[allow(clippy::excessive_precision)] + const LOG2_1023: f32 = 9.998590429745328646459226; + #[allow(clippy::excessive_precision)] + const FRAC_1_1023: f32 = 0.00097751710654936461388074291; #[inline] pub(crate) fn exponential_in(t: f32) -> f32 { - ops::powf(2.0, 10.0 * t - 10.0) + // Derived from a rescaled exponential formula `(2^(10*t) - 1) / (2^10 - 1)` + // See <https://www.wolframalpha.com/input?i=solve+over+the+reals%3A+pow%282%2C+10-A%29+-+pow%282%2C+-A%29%3D+1> + ops::exp2(10.0 * t - LOG2_1023) - FRAC_1_1023 } #[inline] pub(crate) fn exponential_out(t: f32) -> f32 { - 1.0 - ops::powf(2.0, -10.0 * t) + (FRAC_1_1023 + 1.0) - ops::exp2(-10.0 * t - (LOG2_1023 - 10.0)) } #[inline] pub(crate) fn exponential_in_out(t: f32) -> f32 { if t < 0.5 { - ops::powf(2.0, 20.0 * t - 10.0) / 2.0 + ops::exp2(20.0 * t - (LOG2_1023 + 1.0)) - (FRAC_1_1023 / 2.0) } else { - (2.0 - ops::powf(2.0, -20.0 * t + 10.0)) / 2.0 + (FRAC_1_1023 / 2.0 + 1.0) - ops::exp2(-20.0 * t - (LOG2_1023 - 19.0)) } }
diff --git a/crates/bevy_math/src/curve/easing.rs b/crates/bevy_math/src/curve/easing.rs --- a/crates/bevy_math/src/curve/easing.rs +++ b/crates/bevy_math/src/curve/easing.rs @@ -459,3 +475,83 @@ impl EaseFunction { } } } + +#[cfg(test)] +mod tests { + use super::*; + const MONOTONIC_IN_OUT_INOUT: &[[EaseFunction; 3]] = { + use EaseFunction::*; + &[ + [QuadraticIn, QuadraticOut, QuadraticInOut], + [CubicIn, CubicOut, CubicInOut], + [QuarticIn, QuarticOut, QuarticInOut], + [QuinticIn, QuinticOut, QuinticInOut], + [SineIn, SineOut, SineInOut], + [CircularIn, CircularOut, CircularInOut], + [ExponentialIn, ExponentialOut, ExponentialInOut], + ] + }; + + // For easing function we don't care if eval(0) is super-tiny like 2.0e-28, + // so add the same amount of error on both ends of the unit interval. + const TOLERANCE: f32 = 1.0e-6; + const _: () = const { + assert!(1.0 - TOLERANCE != 1.0); + }; + + #[test] + fn ease_functions_zero_to_one() { + for ef in MONOTONIC_IN_OUT_INOUT.iter().flatten() { + let start = ef.eval(0.0); + assert!( + (0.0..=TOLERANCE).contains(&start), + "EaseFunction.{ef:?}(0) was {start:?}", + ); + + let finish = ef.eval(1.0); + assert!( + (1.0 - TOLERANCE..=1.0).contains(&finish), + "EaseFunction.{ef:?}(1) was {start:?}", + ); + } + } + + #[test] + fn ease_function_inout_deciles() { + // convexity gives these built-in tolerances + for [_, _, ef_inout] in MONOTONIC_IN_OUT_INOUT { + for x in [0.1, 0.2, 0.3, 0.4] { + let y = ef_inout.eval(x); + assert!(y < x, "EaseFunction.{ef_inout:?}({x:?}) was {y:?}"); + } + + for x in [0.6, 0.7, 0.8, 0.9] { + let y = ef_inout.eval(x); + assert!(y > x, "EaseFunction.{ef_inout:?}({x:?}) was {y:?}"); + } + } + } + + #[test] + fn ease_function_midpoints() { + for [ef_in, ef_out, ef_inout] in MONOTONIC_IN_OUT_INOUT { + let mid = ef_in.eval(0.5); + assert!( + mid < 0.5 - TOLERANCE, + "EaseFunction.{ef_in:?}(½) was {mid:?}", + ); + + let mid = ef_out.eval(0.5); + assert!( + mid > 0.5 + TOLERANCE, + "EaseFunction.{ef_out:?}(½) was {mid:?}", + ); + + let mid = ef_inout.eval(0.5); + assert!( + (0.5 - TOLERANCE..=0.5 + TOLERANCE).contains(&mid), + "EaseFunction.{ef_inout:?}(½) was {mid:?}", + ); + } + } +}
`EaseFunction::ExponentialIn` jumps at the beginning ## Bevy version 2024-12-05 https://github.com/bevyengine/bevy/commit/bc572cd27 ## What you did Called `ExponentialIn.eval(0)`, expecting it to be essentially 0, but it returned about 1‰ instead. See tests in https://github.com/bevyengine/bevy/pull/16675/files#diff-91e5390dd7a24ce92750ba40df5ef8d7a2466401ef7d3e50eb3d8861b8bc52d6R486-R501 ``` EaseFunction.ExponentialIn(0) was 0.0009765625 ``` ## Additional information It's only the `Exponential*` functions that fail these tests; the rest of them all pass. TBH, the definition feels very arbitrary to me in comparison to the other things: https://github.com/bevyengine/bevy/blob/72f096c91ea1056c41f2da821d310765c4482c00/crates/bevy_math/src/curve/easing.rs#L327-L330 Why `10`, for example? It makes me wonder if it should be something more like <https://en.wikipedia.org/wiki/Non-analytic_smooth_function#Smooth_transition_functions> instead.
2024-12-20T07:30:51Z
1.83
2024-12-24T03:01:12Z
64efd08e13c55598587f3071070f750f8945e28e
[ "curve::easing::tests::ease_functions_zero_to_one" ]
[ "bounding::bounded2d::aabb2d_tests::area", "bounding::bounded2d::aabb2d_tests::center", "bounding::bounded2d::aabb2d_tests::closest_point", "bounding::bounded2d::aabb2d_tests::contains", "bounding::bounded2d::aabb2d_tests::grow", "bounding::bounded2d::aabb2d_tests::half_size", "bounding::bounded2d::aabb2d_tests::intersect_aabb", "bounding::bounded2d::aabb2d_tests::intersect_bounding_circle", "bounding::bounded2d::aabb2d_tests::merge", "bounding::bounded2d::aabb2d_tests::scale_around_center", "bounding::bounded2d::aabb2d_tests::shrink", "bounding::bounded2d::aabb2d_tests::transform", "bounding::bounded2d::bounding_circle_tests::area", "bounding::bounded2d::bounding_circle_tests::closest_point", "bounding::bounded2d::bounding_circle_tests::contains", "bounding::bounded2d::bounding_circle_tests::contains_identical", "bounding::bounded2d::bounding_circle_tests::grow", "bounding::bounded2d::bounding_circle_tests::intersect_bounding_circle", "bounding::bounded2d::bounding_circle_tests::merge", "bounding::bounded2d::bounding_circle_tests::merge_identical", "bounding::bounded2d::bounding_circle_tests::scale_around_center", "bounding::bounded2d::bounding_circle_tests::shrink", "bounding::bounded2d::bounding_circle_tests::transform", "bounding::bounded2d::primitive_impls::tests::acute_triangle", "bounding::bounded2d::primitive_impls::tests::annulus", "bounding::bounded2d::primitive_impls::tests::capsule", "bounding::bounded2d::primitive_impls::tests::circle", "bounding::bounded2d::primitive_impls::tests::arc_and_segment", "bounding::bounded2d::primitive_impls::tests::circular_sector", "bounding::bounded2d::primitive_impls::tests::ellipse", "bounding::bounded2d::primitive_impls::tests::line", "bounding::bounded2d::primitive_impls::tests::obtuse_triangle", "bounding::bounded2d::primitive_impls::tests::plane", "bounding::bounded2d::primitive_impls::tests::polygon", "bounding::bounded2d::primitive_impls::tests::polyline", "bounding::bounded2d::primitive_impls::tests::rectangle", "bounding::bounded2d::primitive_impls::tests::regular_polygon", "bounding::bounded2d::primitive_impls::tests::rhombus", "bounding::bounded2d::primitive_impls::tests::segment", "bounding::bounded3d::aabb3d_tests::area", "bounding::bounded3d::aabb3d_tests::center", "bounding::bounded3d::aabb3d_tests::closest_point", "bounding::bounded3d::aabb3d_tests::contains", "bounding::bounded3d::aabb3d_tests::grow", "bounding::bounded3d::aabb3d_tests::half_size", "bounding::bounded3d::aabb3d_tests::intersect_aabb", "bounding::bounded3d::aabb3d_tests::intersect_bounding_sphere", "bounding::bounded3d::aabb3d_tests::merge", "bounding::bounded3d::aabb3d_tests::scale_around_center", "bounding::bounded3d::aabb3d_tests::shrink", "bounding::bounded3d::aabb3d_tests::transform", "bounding::bounded3d::bounding_sphere_tests::area", "bounding::bounded3d::bounding_sphere_tests::closest_point", "bounding::bounded3d::bounding_sphere_tests::contains", "bounding::bounded3d::bounding_sphere_tests::contains_identical", "bounding::bounded3d::bounding_sphere_tests::grow", "bounding::bounded3d::bounding_sphere_tests::intersect_bounding_sphere", "bounding::bounded3d::bounding_sphere_tests::merge", "bounding::bounded3d::bounding_sphere_tests::scale_around_center", "bounding::bounded3d::bounding_sphere_tests::merge_identical", "bounding::bounded3d::bounding_sphere_tests::shrink", "bounding::bounded3d::bounding_sphere_tests::transform", "bounding::bounded3d::extrusion::tests::capsule", "bounding::bounded3d::extrusion::tests::circle", "bounding::bounded3d::extrusion::tests::ellipse", "bounding::bounded3d::extrusion::tests::line", "bounding::bounded3d::extrusion::tests::polygon", "bounding::bounded3d::extrusion::tests::polyline", "bounding::bounded3d::extrusion::tests::rectangle", "bounding::bounded3d::extrusion::tests::segment", "bounding::bounded3d::extrusion::tests::regular_polygon", "bounding::bounded3d::extrusion::tests::triangle", "bounding::bounded3d::primitive_impls::tests::capsule", "bounding::bounded3d::primitive_impls::tests::cone", "bounding::bounded3d::primitive_impls::tests::conical_frustum", "bounding::bounded3d::primitive_impls::tests::cuboid", "bounding::bounded3d::primitive_impls::tests::cylinder", "bounding::bounded3d::primitive_impls::tests::line", "bounding::bounded3d::primitive_impls::tests::plane", "bounding::bounded3d::primitive_impls::tests::polyline", "bounding::bounded3d::primitive_impls::tests::segment", "bounding::bounded3d::primitive_impls::tests::sphere", "bounding::bounded3d::primitive_impls::tests::torus", "bounding::bounded3d::primitive_impls::tests::triangle3d", "bounding::bounded3d::primitive_impls::tests::wide_conical_frustum", "bounding::raycast2d::tests::test_aabb_cast_hits", "bounding::raycast2d::tests::test_circle_cast_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_hits", "bounding::raycast2d::tests::test_ray_intersection_aabb_inside", "bounding::raycast2d::tests::test_ray_intersection_aabb_misses", "bounding::raycast2d::tests::test_ray_intersection_circle_hits", "bounding::raycast2d::tests::test_ray_intersection_circle_inside", "bounding::raycast2d::tests::test_ray_intersection_circle_misses", "bounding::raycast3d::tests::test_aabb_cast_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_hits", "bounding::raycast3d::tests::test_ray_intersection_aabb_misses", "bounding::raycast3d::tests::test_ray_intersection_aabb_inside", "bounding::raycast3d::tests::test_ray_intersection_sphere_hits", "bounding::raycast3d::tests::test_ray_intersection_sphere_misses", "bounding::raycast3d::tests::test_ray_intersection_sphere_inside", "bounding::raycast3d::tests::test_sphere_cast_hits", "compass::test_compass_octant::test_cardinal_directions", "compass::test_compass_octant::test_east_pie_slice", "compass::test_compass_octant::test_north_east_pie_slice", "compass::test_compass_octant::test_north_pie_slice", "compass::test_compass_octant::test_north_west_pie_slice", "compass::test_compass_octant::test_south_east_pie_slice", "compass::test_compass_octant::test_south_pie_slice", "compass::test_compass_octant::test_south_west_pie_slice", "compass::test_compass_octant::test_west_pie_slice", "compass::test_compass_quadrant::test_cardinal_directions", "compass::test_compass_quadrant::test_east_pie_slice", "compass::test_compass_quadrant::test_north_pie_slice", "compass::test_compass_quadrant::test_south_pie_slice", "compass::test_compass_quadrant::test_west_pie_slice", "cubic_splines::tests::cardinal_control_pts", "cubic_splines::tests::cubic_to_rational", "cubic_splines::tests::easing_simple", "cubic_splines::tests::easing_overshoot", "cubic_splines::tests::easing_undershoot", "cubic_splines::tests::nurbs_circular_arc", "curve::cores::tests::chunked_uneven_sample_interp", "curve::cores::tests::uneven_sample_interp", "cubic_splines::tests::cubic", "curve::derivatives::adaptor_impls::tests::continuation_curve", "curve::derivatives::adaptor_impls::tests::constant_curve", "curve::derivatives::adaptor_impls::tests::forever_curve", "curve::cores::tests::even_sample_interp", "curve::derivatives::adaptor_impls::tests::chain_curve", "curve::derivatives::adaptor_impls::tests::curve_reparam_curve", "curve::derivatives::adaptor_impls::tests::graph_curve", "curve::derivatives::adaptor_impls::tests::reverse_curve", "curve::derivatives::adaptor_impls::tests::zip_curve", "curve::derivatives::adaptor_impls::tests::ping_pong_curve", "curve::derivatives::adaptor_impls::tests::repeat_curve", "curve::easing::tests::ease_function_inout_deciles", "curve::easing::tests::ease_function_midpoints", "curve::derivatives::adaptor_impls::tests::linear_reparam_curve", "curve::interval::tests::containment", "curve::interval::tests::intersections", "curve::interval::tests::interval_containment", "curve::interval::tests::boundedness", "curve::interval::tests::linear_maps", "curve::interval::tests::lengths", "curve::interval::tests::make_intervals", "curve::sample_curves::tests::reflect_sample_curve", "curve::sample_curves::tests::reflect_uneven_sample_curve", "curve::tests::constant_curves", "curve::tests::curve_can_be_made_into_an_object", "curve::tests::continue_chain", "curve::tests::easing_curves_quadratic", "curve::tests::easing_curves_step", "curve::tests::function_curves", "curve::tests::linear_curve", "curve::tests::mapping", "curve::tests::multiple_maps", "curve::tests::multiple_reparams", "curve::tests::ping_pong", "curve::tests::reparameterization", "curve::tests::repeat", "curve::tests::reverse", "curve::tests::sample_iterators", "direction::tests::dir2_creation", "direction::tests::dir2_renorm", "direction::tests::dir2_slerp", "curve::tests::uneven_resampling", "direction::tests::dir2_to_rotation2d", "direction::tests::dir3_creation", "direction::tests::dir3_slerp", "direction::tests::dir3_renorm", "curve::interval::tests::spaced_points", "curve::tests::resampling", "direction::tests::dir3a_creation", "direction::tests::dir3a_renorm", "direction::tests::dir3a_slerp", "float_ord::tests::float_ord_cmp", "float_ord::tests::float_ord_cmp_operators", "float_ord::tests::float_ord_eq", "float_ord::tests::float_ord_hash", "isometry::tests::identity_2d", "isometry::tests::identity_3d", "isometry::tests::inverse_2d", "isometry::tests::inverse_3d", "isometry::tests::inverse_mul_2d", "isometry::tests::inverse_mul_3d", "isometry::tests::inverse_transform_2d", "isometry::tests::inverse_transform_3d", "isometry::tests::mul_2d", "isometry::tests::mul_3d", "isometry::tests::transform_2d", "isometry::tests::transform_3d", "primitives::dim2::arc_tests::full_circle", "primitives::dim2::arc_tests::half_circle", "primitives::dim2::arc_tests::quarter_circle", "primitives::dim2::arc_tests::zero_angle", "primitives::dim2::arc_tests::zero_radius", "primitives::dim2::tests::annulus_closest_point", "primitives::dim2::tests::annulus_math", "primitives::dim2::tests::capsule_math", "primitives::dim2::tests::circle_closest_point", "primitives::dim2::tests::circle_math", "primitives::dim2::tests::ellipse_math", "primitives::dim2::tests::ellipse_perimeter", "primitives::dim2::tests::rectangle_closest_point", "primitives::dim2::tests::rectangle_math", "primitives::dim2::tests::regular_polygon_math", "primitives::dim2::tests::regular_polygon_vertices", "primitives::dim2::tests::rhombus_closest_point", "primitives::dim2::tests::rhombus_math", "primitives::dim2::tests::triangle_circumcenter", "primitives::dim2::tests::triangle_math", "primitives::dim2::tests::triangle_winding_order", "primitives::dim3::tests::capsule_math", "primitives::dim3::tests::cone_math", "primitives::dim3::tests::cuboid_closest_point", "primitives::dim3::tests::cuboid_math", "primitives::dim3::tests::cylinder_math", "primitives::dim3::tests::direction_creation", "primitives::dim3::tests::extrusion_math", "primitives::dim3::tests::infinite_plane_math", "primitives::dim3::tests::plane_from_points", "primitives::dim3::tests::sphere_closest_point", "primitives::dim3::tests::sphere_math", "primitives::dim3::tests::tetrahedron_math", "primitives::dim3::tests::torus_math", "primitives::dim3::tests::triangle_math", "ray::tests::intersect_plane_2d", "primitives::polygon::tests::complex_polygon", "primitives::polygon::tests::simple_polygon", "ray::tests::intersect_plane_3d", "rects::irect::tests::rect_inflate", "rects::irect::tests::rect_intersect", "rects::irect::tests::rect_union", "rects::irect::tests::rect_union_pt", "rects::irect::tests::well_formed", "rects::rect::tests::rect_inflate", "rects::rect::tests::rect_intersect", "rects::rect::tests::rect_union", "rects::rect::tests::rect_union_pt", "rects::rect::tests::well_formed", "rects::urect::tests::rect_inflate", "rects::urect::tests::rect_intersect", "rects::urect::tests::rect_union", "rects::urect::tests::rect_union_pt", "rects::urect::tests::well_formed", "rotation2d::tests::add", "rotation2d::tests::creation", "rotation2d::tests::fast_renormalize", "rotation2d::tests::is_near_identity", "rotation2d::tests::length", "rotation2d::tests::nlerp", "rotation2d::tests::normalize", "rotation2d::tests::rotate", "rotation2d::tests::rotation_range", "rotation2d::tests::slerp", "rotation2d::tests::subtract", "rotation2d::tests::try_normalize", "sampling::shape_sampling::tests::circle_boundary_sampling", "sampling::shape_sampling::tests::circle_interior_sampling", "crates/bevy_math/src/curve/mod.rs - curve::Curve::reparametrize (line 422)", "crates/bevy_math/src/curve/mod.rs - curve (line 153)", "crates/bevy_math/src/curve/mod.rs - curve (line 96)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::contains (line 231)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::is_empty (line 139)", "crates/bevy_math/src/curve/mod.rs - curve (line 126)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::new (line 52)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::height (line 167)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::contains (line 228)", "crates/bevy_math/src/curve/mod.rs - curve (line 141)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::width (line 153)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union (line 237)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::new (line 52)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_corners (line 69)", "crates/bevy_math/src/curve/cores.rs - curve::cores::UnevenCore (line 269)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::height (line 164)", "crates/bevy_math/src/curve/mod.rs - curve (line 55)", "crates/bevy_math/src/curve/mod.rs - curve (line 176)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::contains (line 219)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_size (line 92)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::is_empty (line 135)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::height (line 163)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::intersect (line 283)", "crates/bevy_math/src/common_traits.rs - common_traits::StableInterpolate::smooth_nudge (line 333)", "crates/bevy_math/src/curve/cores.rs - curve::cores::EvenCore (line 69)", "crates/bevy_math/src/isometry.rs - isometry::Isometry2d (line 28)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::union_point (line 260)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_corners (line 69)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_corners (line 69)", "crates/bevy_math/src/curve/mod.rs - curve::Curve::reparametrize (line 431)", "crates/bevy_math/src/isometry.rs - isometry::Isometry2d (line 36)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::half_size (line 191)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::center (line 205)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::inflate (line 311)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::width (line 149)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::from_center_half_size (line 113)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::size (line 177)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::is_empty (line 136)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::new (line 52)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::width (line 150)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2::nlerp (line 385)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling (line 5)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_interior (line 59)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::sample_boundary (line 73)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::boundary_dist (line 109)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling::ShapeSample::interior_dist (line 87)", "crates/bevy_math/src/curve/mod.rs - curve::Curve::resample (line 719)", "crates/bevy_math/src/curve/mod.rs - curve::Curve::by_ref (line 875)", "crates/bevy_math/src/isometry.rs - isometry::Isometry3d (line 320)", "crates/bevy_math/src/isometry.rs - isometry::Isometry3d (line 337)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_size (line 96)", "crates/bevy_math/src/direction.rs - direction::Dir3::fast_renormalize (line 491)", "crates/bevy_math/src/curve/mod.rs - curve (line 198)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicSegment<Vec2>::ease (line 1045)", "crates/bevy_math/src/curve/mod.rs - curve (line 251)", "crates/bevy_math/src/isometry.rs - isometry::Isometry2d (line 45)", "crates/bevy_math/src/isometry.rs - isometry::Isometry2d (line 74)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::size (line 178)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union_point (line 269)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicBSpline (line 430)", "crates/bevy_math/src/sampling/mesh_sampling.rs - sampling::mesh_sampling::UniformMeshSampler (line 19)", "crates/bevy_math/src/rects/rect.rs - rects::rect::Rect::normalize (line 340)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_size (line 96)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicNurbs (line 604)", "crates/bevy_math/src/isometry.rs - isometry::Isometry3d (line 351)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::inflate (line 323)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::half_size (line 199)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union (line 249)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2::turn_fraction (line 162)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::from_center_half_size (line 117)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::union_point (line 272)", "crates/bevy_math/src/direction.rs - direction::Dir2::slerp (line 203)", "crates/bevy_math/src/isometry.rs - isometry::Isometry2d (line 61)", "crates/bevy_math/src/direction.rs - direction::Dir3A::slerp (line 721)", "crates/bevy_math/src/isometry.rs - isometry::Isometry3d (line 310)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2::degrees (line 138)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard::FromRng (line 39)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::center (line 217)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::intersect (line 292)", "crates/bevy_math/src/direction.rs - direction::Dir3::fast_renormalize (line 501)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::inflate (line 320)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2 (line 19)", "crates/bevy_math/src/curve/mod.rs - curve (line 71)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::union (line 246)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::size (line 181)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicCardinalSpline (line 268)", "crates/bevy_math/src/rects/irect.rs - rects::irect::IRect::intersect (line 295)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicHermite (line 133)", "crates/bevy_math/src/isometry.rs - isometry::Isometry3d (line 301)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::from_center_half_size (line 117)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::half_size (line 196)", "crates/bevy_math/src/direction.rs - direction::Dir3::slerp (line 462)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2::slerp (line 423)", "crates/bevy_math/src/sampling/shape_sampling.rs - sampling::shape_sampling (line 21)", "crates/bevy_math/src/primitives/dim3.rs - primitives::dim3::InfinitePlane3d::isometries_xy (line 312)", "crates/bevy_math/src/curve/mod.rs - curve (line 220)", "crates/bevy_math/src/cubic_splines/mod.rs - cubic_splines::CubicBezier (line 41)", "crates/bevy_math/src/rotation2d.rs - rotation2d::Rot2::radians (line 112)", "crates/bevy_math/src/rects/urect.rs - rects::urect::URect::center (line 214)", "crates/bevy_math/src/sampling/standard.rs - sampling::standard (line 7)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
16,841
bevyengine__bevy-16841
[ "16731" ]
8d9a00f5483b2ba28f40081759bd3d6f8b8a686d
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1,7 +1,7 @@ use crate::{ experimental::{UiChildren, UiRootNodes}, - BorderRadius, ComputedNode, ContentSize, DefaultUiCamera, Display, Node, Outline, OverflowAxis, - ScrollPosition, TargetCamera, UiScale, Val, + BorderRadius, ComputedNode, ContentSize, DefaultUiCamera, Display, LayoutConfig, Node, Outline, + OverflowAxis, ScrollPosition, TargetCamera, UiScale, Val, }; use bevy_ecs::{ change_detection::{DetectChanges, DetectChangesMut}, diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -120,10 +120,12 @@ pub fn ui_layout_system( &mut ComputedNode, &mut Transform, &Node, + Option<&LayoutConfig>, Option<&BorderRadius>, Option<&Outline>, Option<&ScrollPosition>, )>, + mut buffer_query: Query<&mut ComputedTextBlock>, mut font_system: ResMut<CosmicFontSystem>, ) { diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -294,6 +296,7 @@ with UI components as a child of an entity without UI components, your UI layout &mut commands, *root, &mut ui_surface, + true, None, &mut node_transform_query, &ui_children, diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -312,11 +315,13 @@ with UI components as a child of an entity without UI components, your UI layout commands: &mut Commands, entity: Entity, ui_surface: &mut UiSurface, + inherited_use_rounding: bool, root_size: Option<Vec2>, node_transform_query: &mut Query<( &mut ComputedNode, &mut Transform, &Node, + Option<&LayoutConfig>, Option<&BorderRadius>, Option<&Outline>, Option<&ScrollPosition>, diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -330,12 +335,17 @@ with UI components as a child of an entity without UI components, your UI layout mut node, mut transform, style, + maybe_layout_config, maybe_border_radius, maybe_outline, maybe_scroll_position, )) = node_transform_query.get_mut(entity) { - let Ok((layout, unrounded_size)) = ui_surface.get_layout(entity) else { + let use_rounding = maybe_layout_config + .map(|layout_config| layout_config.use_rounding) + .unwrap_or(inherited_use_rounding); + + let Ok((layout, unrounded_size)) = ui_surface.get_layout(entity, use_rounding) else { return; }; diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -446,6 +456,7 @@ with UI components as a child of an entity without UI components, your UI layout commands, child_uinode, ui_surface, + use_rounding, Some(viewport_size), node_transform_query, ui_children, diff --git a/crates/bevy_ui/src/layout/ui_surface.rs b/crates/bevy_ui/src/layout/ui_surface.rs --- a/crates/bevy_ui/src/layout/ui_surface.rs +++ b/crates/bevy_ui/src/layout/ui_surface.rs @@ -277,23 +277,33 @@ impl UiSurface { /// Does not compute the layout geometry, `compute_window_layouts` should be run before using this function. /// On success returns a pair consisting of the final resolved layout values after rounding /// and the size of the node after layout resolution but before rounding. - pub fn get_layout(&mut self, entity: Entity) -> Result<(taffy::Layout, Vec2), LayoutError> { + pub fn get_layout( + &mut self, + entity: Entity, + use_rounding: bool, + ) -> Result<(taffy::Layout, Vec2), LayoutError> { let Some(taffy_node) = self.entity_to_taffy.get(&entity) else { return Err(LayoutError::InvalidHierarchy); }; - let layout = self - .taffy - .layout(*taffy_node) - .cloned() - .map_err(LayoutError::TaffyError)?; + if use_rounding { + self.taffy.enable_rounding(); + } else { + self.taffy.disable_rounding(); + } - self.taffy.disable_rounding(); - let taffy_size = self.taffy.layout(*taffy_node).unwrap().size; - let unrounded_size = Vec2::new(taffy_size.width, taffy_size.height); - self.taffy.enable_rounding(); + let out = match self.taffy.layout(*taffy_node).cloned() { + Ok(layout) => { + self.taffy.disable_rounding(); + let taffy_size = self.taffy.layout(*taffy_node).unwrap().size; + let unrounded_size = Vec2::new(taffy_size.width, taffy_size.height); + Ok((layout, unrounded_size)) + } + Err(taffy_error) => Err(LayoutError::TaffyError(taffy_error)), + }; - Ok((layout, unrounded_size)) + self.taffy.enable_rounding(); + out } }
diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -573,7 +584,7 @@ mod tests { let mut ui_surface = world.resource_mut::<UiSurface>(); for ui_entity in [ui_root, ui_child] { - let layout = ui_surface.get_layout(ui_entity).unwrap().0; + let layout = ui_surface.get_layout(ui_entity, true).unwrap().0; assert_eq!(layout.size.width, WINDOW_WIDTH); assert_eq!(layout.size.height, WINDOW_HEIGHT); } diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -962,7 +973,7 @@ mod tests { let mut ui_surface = world.resource_mut::<UiSurface>(); let layout = ui_surface - .get_layout(ui_node_entity) + .get_layout(ui_node_entity, true) .expect("failed to get layout") .0; diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1049,7 +1060,7 @@ mod tests { ui_schedule.run(&mut world); let mut ui_surface = world.resource_mut::<UiSurface>(); - let layout = ui_surface.get_layout(ui_entity).unwrap().0; + let layout = ui_surface.get_layout(ui_entity, true).unwrap().0; // the node should takes its size from the fixed size measure func assert_eq!(layout.size.width, content_size.x); diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1078,7 +1089,7 @@ mod tests { // a node with a content size should have taffy context assert!(ui_surface.taffy.get_node_context(ui_node).is_some()); - let layout = ui_surface.get_layout(ui_entity).unwrap().0; + let layout = ui_surface.get_layout(ui_entity, true).unwrap().0; assert_eq!(layout.size.width, content_size.x); assert_eq!(layout.size.height, content_size.y); diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1091,7 +1102,7 @@ mod tests { assert!(ui_surface.taffy.get_node_context(ui_node).is_none()); // Without a content size, the node has no width or height constraints so the length of both dimensions is 0. - let layout = ui_surface.get_layout(ui_entity).unwrap().0; + let layout = ui_surface.get_layout(ui_entity, true).unwrap().0; assert_eq!(layout.size.width, 0.); assert_eq!(layout.size.height, 0.); } diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -2550,6 +2550,28 @@ impl Default for ShadowStyle { } } +#[derive(Component, Copy, Clone, Debug, PartialEq, Reflect)] +#[reflect(Component, Debug, PartialEq, Default)] +#[cfg_attr( + feature = "serialize", + derive(serde::Serialize, serde::Deserialize), + reflect(Serialize, Deserialize) +)] +/// This component can be added to any UI node to modify its layout behavior. +pub struct LayoutConfig { + /// If set to true the coordinates for this node and its descendents will be rounded to the nearest physical pixel. + /// This can help prevent visual artifacts like blurry images or semi-transparent edges that can occur with sub-pixel positioning. + /// + /// Defaults to true. + pub use_rounding: bool, +} + +impl Default for LayoutConfig { + fn default() -> Self { + Self { use_rounding: true } + } +} + #[cfg(test)] mod tests { use crate::GridPlacement;
Bevy UI nodes are always pixel-aligned and there is no way to disable it ## Bevy version - 0.15.0 ## \[Optional\] Relevant system information ``` - cargo 1.83.0 (5ffbef321 2024-10-29) - MacOS Sonoma 14.1.1 (23B81) - SystemInfo { os: "MacOS 14.1.1 ", kernel: "23.1.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" } - AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal } ``` ## What you did Made UI follow 3d entity. Bascially I want to make health bar (and some more info) to stick above/belove each unit. ## What went wrong It seams that Bevy UI nodes are always aligned to pixels. This is a good thing for static UI to make it sharper but introduces jaggines when UI is smoothly moved. This is especially noticeable when UI is placed near the object. I think default behaviour is correct but there should be a way to disable it and allow sub-pixel positions/sizes for UI. It probably should be some component added to the root node or a flag in the `TargetCamera`. ## Additional information Here is example from the game in question: ![Image](https://github.com/user-attachments/assets/3d80b4d3-eb3d-41fd-81ae-42df816f0c95) As you can see model moves smoothly but green borders and red rect (all are nodes within a single root node) are always jumping here and there. If you just look/focus at the model, it becomes much more noticeable. UI position is calculated by projecting each corner of the hexagon and taking min/max x/y values: ```rust let corners = Map::get_layout().hex_corners(agent.hex) .map(|e| e.extend(0.0).xzy()) .map(|e| camera.world_to_viewport(camera_transform, e)) .map(|e| e.unwrap_or(Vec2::INFINITY)); if corners.iter().any(|e| !e.is_finite()) { continue; } let Some((min_x, max_x)) = corners.iter().minmax_by_key(|e| e.x).into_option() else { continue; }; let Some((min_y, max_y)) = corners.iter().minmax_by_key(|e| e.y).into_option() else { continue; }; node.top = Val::Px(min_y.y); node.left = Val::Px(min_x.x); node.width = Val::Px(max_x.x - min_x.x); node.height = Val::Px(max_y.y - min_y.y); ``` Here is simpler example: ![Image](https://github.com/user-attachments/assets/6783b587-9f08-438b-889c-661e07e6eabb) UI scaling in this case is 2, so it takes half of the logical pixel to see UI moving.
Hmm. I see your point. I'm not sure where the best place to expose a setting for this would be. @ickshonpe may have ideas. Yep this isn't difficult to expose. It would have to be a per-root-node setting I think. It would be great if this could be defined on any node and have it apply to that node and all nodes down the tree, but I guess that’s technically not possible?
2024-12-16T14:31:25Z
1.83
2024-12-24T02:58:33Z
64efd08e13c55598587f3071070f750f8945e28e
[ "geometry::tests::default_val_equals_const_default_val", "geometry::tests::test_uirect_axes", "geometry::tests::uirect_percent", "geometry::tests::uirect_px", "geometry::tests::uirect_default_equals_const_default", "geometry::tests::val_arithmetic_error_messages", "geometry::tests::val_auto_is_non_resolveable", "geometry::tests::val_evaluate", "geometry::tests::val_resolve_px", "geometry::tests::val_resolve_viewport_coords", "layout::convert::tests::test_into_length_percentage", "layout::convert::tests::test_convert_from", "layout::ui_surface::tests::test_initialization", "layout::ui_surface::tests::test_get_root_node_pair_exact", "layout::ui_surface::tests::test_remove_camera_entities", "layout::ui_surface::tests::test_remove_entities", "experimental::ghost_hierarchy::tests::iterate_ui_children", "layout::ui_surface::tests::test_set_camera_children", "layout::ui_surface::tests::test_try_update_measure", "experimental::ghost_hierarchy::tests::iterate_ui_root_nodes", "layout::ui_surface::tests::test_update_children", "layout::ui_surface::tests::test_upsert", "ui_node::tests::grid_placement_accessors", "ui_node::tests::invalid_grid_placement_values", "stack::tests::test_with_equal_global_zindex_zindex_decides_order", "stack::tests::test_ui_stack_system", "layout::tests::test_ui_surface_compute_camera_layout", "layout::tests::no_camera_ui", "layout::tests::ui_nodes_with_percent_100_dimensions_should_fill_their_parent", "layout::tests::ui_surface_tracks_ui_entities", "layout::tests::ui_surface_tracks_camera_entities", "layout::tests::ui_root_node_should_act_like_position_absolute", "layout::tests::despawning_a_ui_entity_should_remove_its_corresponding_ui_node - should panic", "layout::tests::ui_node_should_be_set_to_its_content_size", "layout::tests::measure_funcs_should_be_removed_on_content_size_removal", "layout::tests::node_removal_and_reinsert_should_work", "layout::tests::changes_to_children_of_a_ui_entity_change_its_corresponding_ui_nodes_children", "layout::tests::ui_node_should_properly_update_when_changing_target_camera", "layout::tests::ui_rounding_test", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 221)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 236)", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 2063)", "crates/bevy_ui/src/ui_node.rs - ui_node::BorderRadius (line 2158)", "crates/bevy_ui/src/ui_material.rs - ui_material::UiMaterial (line 33)", "crates/bevy_ui/src/ui_node.rs - ui_node::Outline (line 2045)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::left (line 452)", "crates/bevy_ui/src/ui_node.rs - ui_node::Node::padding (line 516)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::px (line 336)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_top (line 577)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::vertical (line 406)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::axes (line 428)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::percent (line 360)", "crates/bevy_ui/src/widget/text.rs - widget::text::Text (line 116)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::horizontal (line 383)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::bottom (line 518)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::all (line 311)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::new (line 283)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_right (line 558)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::right (line 474)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_bottom (line 596)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::with_left (line 539)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect::top (line 496)", "crates/bevy_ui/src/ui_node.rs - ui_node::Node::margin (line 494)", "crates/bevy_ui/src/geometry.rs - geometry::UiRect (line 211)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
16,826
bevyengine__bevy-16826
[ "15350" ]
6178ce93e8537f823685e8c1b617e22ba93696e7
diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -18,6 +18,7 @@ pub struct EntityCloner { filter_allows_components: bool, filter: Arc<HashSet<ComponentId>>, clone_handlers_overrides: Arc<HashMap<ComponentId, ComponentCloneHandler>>, + move_components: bool, } impl EntityCloner { diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -35,17 +36,21 @@ impl EntityCloner { .filter(|id| self.is_cloning_allowed(id)), ); - for component in components { + for component in &components { let global_handlers = world.components().get_component_clone_handlers(); - let handler = match self.clone_handlers_overrides.get(&component) { - None => global_handlers.get_handler(component), + let handler = match self.clone_handlers_overrides.get(component) { + None => global_handlers.get_handler(*component), Some(ComponentCloneHandler::Default) => global_handlers.get_default_handler(), Some(ComponentCloneHandler::Ignore) => component_clone_ignore, Some(ComponentCloneHandler::Custom(handler)) => *handler, }; - self.component_id = Some(component); + self.component_id = Some(*component); (handler)(&mut world.into(), self); } + + if self.move_components { + world.entity_mut(self.source).remove_by_ids(&components); + } } fn is_cloning_allowed(&self, component: &ComponentId) -> bool { diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -145,6 +150,8 @@ pub struct EntityCloneBuilder<'w> { filter_allows_components: bool, filter: HashSet<ComponentId>, clone_handlers_overrides: HashMap<ComponentId, ComponentCloneHandler>, + attach_required_components: bool, + move_components: bool, } impl<'w> EntityCloneBuilder<'w> { diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -155,6 +162,8 @@ impl<'w> EntityCloneBuilder<'w> { filter_allows_components: false, filter: Default::default(), clone_handlers_overrides: Default::default(), + attach_required_components: true, + move_components: false, } } diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -165,6 +174,7 @@ impl<'w> EntityCloneBuilder<'w> { filter_allows_components, filter, clone_handlers_overrides, + move_components, .. } = self; diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -175,29 +185,49 @@ impl<'w> EntityCloneBuilder<'w> { filter_allows_components, filter: Arc::new(filter), clone_handlers_overrides: Arc::new(clone_handlers_overrides), + move_components, } .clone_entity(world); world.flush_commands(); } + /// By default, any components allowed/denied through the filter will automatically + /// allow/deny all of their required components. + /// + /// This method allows for a scoped mode where any changes to the filter + /// will not involve required components. + pub fn without_required_components( + &mut self, + builder: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, + ) -> &mut Self { + self.attach_required_components = false; + builder(self); + self.attach_required_components = true; + self + } + + /// Sets whether the cloner should remove any components that were cloned, + /// effectively moving them from the source entity to the target. + /// + /// This is disabled by default. + /// + /// The setting only applies to components that are allowed through the filter + /// at the time [`EntityCloneBuilder::clone_entity`] is called. + pub fn move_components(&mut self, enable: bool) -> &mut Self { + self.move_components = enable; + self + } + /// Adds all components of the bundle to the list of components to clone. /// /// Note that all components are allowed by default, to clone only explicitly allowed components make sure to call /// [`deny_all`](`Self::deny_all`) before calling any of the `allow` methods. pub fn allow<T: Bundle>(&mut self) -> &mut Self { - if self.filter_allows_components { - T::get_component_ids(self.world.components(), &mut |id| { - if let Some(id) = id { - self.filter.insert(id); - } - }); - } else { - T::get_component_ids(self.world.components(), &mut |id| { - if let Some(id) = id { - self.filter.remove(&id); - } - }); + let bundle = self.world.register_bundle::<T>(); + let ids = bundle.explicit_components().to_owned(); + for id in ids { + self.filter_allow(id); } self } diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -207,12 +237,8 @@ impl<'w> EntityCloneBuilder<'w> { /// Note that all components are allowed by default, to clone only explicitly allowed components make sure to call /// [`deny_all`](`Self::deny_all`) before calling any of the `allow` methods. pub fn allow_by_ids(&mut self, ids: impl IntoIterator<Item = ComponentId>) -> &mut Self { - if self.filter_allows_components { - self.filter.extend(ids); - } else { - ids.into_iter().for_each(|id| { - self.filter.remove(&id); - }); + for id in ids { + self.filter_allow(id); } self } diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -222,15 +248,10 @@ impl<'w> EntityCloneBuilder<'w> { /// Note that all components are allowed by default, to clone only explicitly allowed components make sure to call /// [`deny_all`](`Self::deny_all`) before calling any of the `allow` methods. pub fn allow_by_type_ids(&mut self, ids: impl IntoIterator<Item = TypeId>) -> &mut Self { - let ids = ids - .into_iter() - .filter_map(|id| self.world.components().get_id(id)); - if self.filter_allows_components { - self.filter.extend(ids); - } else { - ids.into_iter().for_each(|id| { - self.filter.remove(&id); - }); + for type_id in ids { + if let Some(id) = self.world.components().get_id(type_id) { + self.filter_allow(id); + } } self } diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -244,45 +265,28 @@ impl<'w> EntityCloneBuilder<'w> { /// Disallows all components of the bundle from being cloned. pub fn deny<T: Bundle>(&mut self) -> &mut Self { - if self.filter_allows_components { - T::get_component_ids(self.world.components(), &mut |id| { - if let Some(id) = id { - self.filter.remove(&id); - } - }); - } else { - T::get_component_ids(self.world.components(), &mut |id| { - if let Some(id) = id { - self.filter.insert(id); - } - }); + let bundle = self.world.register_bundle::<T>(); + let ids = bundle.explicit_components().to_owned(); + for id in ids { + self.filter_deny(id); } self } /// Extends the list of components that shouldn't be cloned. pub fn deny_by_ids(&mut self, ids: impl IntoIterator<Item = ComponentId>) -> &mut Self { - if self.filter_allows_components { - ids.into_iter().for_each(|id| { - self.filter.remove(&id); - }); - } else { - self.filter.extend(ids); + for id in ids { + self.filter_deny(id); } self } /// Extends the list of components that shouldn't be cloned by type ids. pub fn deny_by_type_ids(&mut self, ids: impl IntoIterator<Item = TypeId>) -> &mut Self { - let ids = ids - .into_iter() - .filter_map(|id| self.world.components().get_id(id)); - if self.filter_allows_components { - ids.into_iter().for_each(|id| { - self.filter.remove(&id); - }); - } else { - self.filter.extend(ids); + for type_id in ids { + if let Some(id) = self.world.components().get_id(type_id) { + self.filter_deny(id); + } } 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 @@ -1738,7 +1738,53 @@ impl<'a> EntityCommands<'a> { self.queue(observe(system)) } - /// Clones an entity and returns the [`EntityCommands`] of the clone. + /// Clones parts of an entity (components, observers, etc.) onto another entity, + /// configured through [`EntityCloneBuilder`]. + /// + /// By default, the other entity will receive all the components of the original that implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// Configure through [`EntityCloneBuilder`] as follows: + /// ``` + /// # use bevy_ecs::prelude::*; + /// + /// #[derive(Component, Clone)] + /// struct ComponentA(u32); + /// #[derive(Component, Clone)] + /// struct ComponentB(u32); + /// + /// fn example_system(mut commands: Commands) { + /// // Create an empty entity + /// let target = commands.spawn_empty().id(); + /// + /// // Create a new entity and keep its EntityCommands + /// let mut entity = commands.spawn((ComponentA(10), ComponentB(20))); + /// + /// // Clone only ComponentA onto the target + /// entity.clone_with(target, |builder| { + /// builder.deny::<ComponentB>(); + /// }); + /// } + /// # bevy_ecs::system::assert_is_system(example_system); + /// ``` + /// + /// See the following for more options: + /// - [`EntityCloneBuilder`] + /// - [`CloneEntityWithObserversExt`](crate::observer::CloneEntityWithObserversExt) + /// - `CloneEntityHierarchyExt` + /// + /// # Panics + /// + /// The command will panic when applied if either of the entities do not exist. + pub fn clone_with( + &mut self, + target: Entity, + config: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, + ) -> &mut Self { + self.queue(clone_with(target, config)) + } + + /// Spawns a clone of this entity and returns the [`EntityCommands`] of the clone. /// /// The clone will receive all the components of the original that implement /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). 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 @@ -1772,8 +1818,8 @@ impl<'a> EntityCommands<'a> { self.clone_and_spawn_with(|_| {}) } - /// Clones an entity and allows configuring cloning behavior using [`EntityCloneBuilder`], - /// returning the [`EntityCommands`] of the clone. + /// Spawns a clone of this entity and allows configuring cloning behavior + /// using [`EntityCloneBuilder`], returning the [`EntityCommands`] of the clone. /// /// By default, the clone will receive all the components of the original that implement /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). 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 @@ -1782,6 +1828,8 @@ impl<'a> EntityCommands<'a> { /// To only include specific components, use [`EntityCloneBuilder::deny_all`] /// followed by [`EntityCloneBuilder::allow`]. /// + /// See the methods on [`EntityCloneBuilder`] for more options. + /// /// # Panics /// /// The command will panic when applied if the original 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 @@ -1808,15 +1856,40 @@ impl<'a> EntityCommands<'a> { /// # bevy_ecs::system::assert_is_system(example_system); pub fn clone_and_spawn_with( &mut self, - f: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, + config: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, ) -> EntityCommands<'_> { let entity_clone = self.commands().spawn_empty().id(); - self.queue(clone_and_spawn_with(entity_clone, f)); + self.queue(clone_with(entity_clone, config)); EntityCommands { commands: self.commands_mut().reborrow(), entity: entity_clone, } } + + /// Clones the specified components of this entity and inserts them into another entity. + /// + /// Components can only be cloned if they implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// # Panics + /// + /// The command will panic when applied if either of the entities do not exist. + pub fn clone_components<B: Bundle>(&mut self, target: Entity) -> &mut Self { + self.queue(clone_components::<B>(target)) + } + + /// Clones the specified components of this entity and inserts them into another entity, + /// then removes the components from this entity. + /// + /// Components can only be cloned if they implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// # Panics + /// + /// The command will panic when applied if either of the entities do not exist. + pub fn move_components<B: Bundle>(&mut self, target: Entity) -> &mut Self { + self.queue(move_components::<B>(target)) + } } /// A wrapper around [`EntityCommands`] with convenience methods for working with a specified 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 @@ -2291,14 +2364,34 @@ fn observe<E: Event, B: Bundle, M>( } } -fn clone_and_spawn_with( - entity_clone: Entity, - f: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, +/// An [`EntityCommand`] that clones an entity with configurable cloning behavior. +fn clone_with( + target: Entity, + config: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, ) -> impl EntityCommand { move |entity: Entity, world: &mut World| { - let mut builder = EntityCloneBuilder::new(world); - f(&mut builder); - builder.clone_entity(entity, entity_clone); + if let Ok(mut entity) = world.get_entity_mut(entity) { + entity.clone_with(target, config); + } + } +} + +/// An [`EntityCommand`] that clones the specified components into another entity. +fn clone_components<B: Bundle>(target: Entity) -> impl EntityCommand { + move |entity: Entity, world: &mut World| { + if let Ok(mut entity) = world.get_entity_mut(entity) { + entity.clone_components::<B>(target); + } + } +} + +/// An [`EntityCommand`] that clones the specified components into another entity +/// and removes them from the original entity. +fn move_components<B: Bundle>(target: Entity) -> impl EntityCommand { + move |entity: Entity, world: &mut World| { + if let Ok(mut entity) = world.get_entity_mut(entity) { + entity.move_components::<B>(target); + } } } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -3,7 +3,7 @@ use crate::{ bundle::{Bundle, BundleId, BundleInfo, BundleInserter, DynamicBundle, InsertMode}, change_detection::MutUntyped, component::{Component, ComponentId, ComponentTicks, Components, Mutable, StorageType}, - entity::{Entities, Entity, EntityLocation}, + entity::{Entities, Entity, EntityCloneBuilder, EntityLocation}, event::Event, observer::Observer, query::{Access, ReadOnlyQueryData}, diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1819,6 +1819,31 @@ impl<'w> EntityWorldMut<'w> { self } + /// Removes a dynamic bundle from the entity if it exists. + /// + /// You should prefer to use the typed API [`EntityWorldMut::remove`] where possible. + /// + /// # Panics + /// + /// Panics if any of the provided [`ComponentId`]s do not exist in the [`World`] or if the + /// entity has been despawned while this `EntityWorldMut` is still alive. + pub fn remove_by_ids(&mut self, component_ids: &[ComponentId]) -> &mut Self { + self.assert_not_despawned(); + let components = &mut self.world.components; + + let bundle_id = self + .world + .bundles + .init_dynamic_info(components, component_ids); + + // SAFETY: the `BundleInfo` for this `bundle_id` is initialized above + unsafe { self.remove_bundle(bundle_id) }; + + self.world.flush(); + self.update_location(); + self + } + /// Removes all components associated with the entity. /// /// # Panics diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -2107,6 +2132,161 @@ impl<'w> EntityWorldMut<'w> { self.update_location(); self } + + /// Clones parts of an entity (components, observers, etc.) onto another entity, + /// configured through [`EntityCloneBuilder`]. + /// + /// By default, the other entity will receive all the components of the original that implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// Configure through [`EntityCloneBuilder`] as follows: + /// ``` + /// # use bevy_ecs::prelude::*; + /// # #[derive(Component, Clone, PartialEq, Debug)] + /// # struct ComponentA; + /// # #[derive(Component, Clone, PartialEq, Debug)] + /// # struct ComponentB; + /// # let mut world = World::new(); + /// # let entity = world.spawn((ComponentA, ComponentB)).id(); + /// # let target = world.spawn_empty().id(); + /// world.entity_mut(entity).clone_with(target, |builder| { + /// builder.deny::<ComponentB>(); + /// }); + /// # assert_eq!(world.get::<ComponentA>(target), Some(&ComponentA)); + /// # assert_eq!(world.get::<ComponentB>(target), None); + /// ``` + /// + /// See the following for more options: + /// - [`EntityCloneBuilder`] + /// - [`CloneEntityWithObserversExt`](crate::observer::CloneEntityWithObserversExt) + /// - `CloneEntityHierarchyExt` + /// + /// # Panics + /// + /// - If this entity has been despawned while this `EntityWorldMut` is still alive. + /// - If the target entity does not exist. + pub fn clone_with( + &mut self, + target: Entity, + config: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, + ) -> &mut Self { + self.assert_not_despawned(); + + let mut builder = EntityCloneBuilder::new(self.world); + config(&mut builder); + builder.clone_entity(self.entity, target); + + self.world.flush(); + self.update_location(); + self + } + + /// Spawns a clone of this entity and returns the [`Entity`] of the clone. + /// + /// The clone will receive all the components of the original that implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// To configure cloning behavior (such as only cloning certain components), + /// use [`EntityWorldMut::clone_and_spawn_with`]. + /// + /// # Panics + /// + /// If this entity has been despawned while this `EntityWorldMut` is still alive. + pub fn clone_and_spawn(&mut self) -> Entity { + self.clone_and_spawn_with(|_| {}) + } + + /// Spawns a clone of this entity and allows configuring cloning behavior + /// using [`EntityCloneBuilder`], returning the [`Entity`] of the clone. + /// + /// By default, the clone will receive all the components of the original that implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// Configure through [`EntityCloneBuilder`] as follows: + /// ``` + /// # use bevy_ecs::prelude::*; + /// # #[derive(Component, Clone, PartialEq, Debug)] + /// # struct ComponentA; + /// # #[derive(Component, Clone, PartialEq, Debug)] + /// # struct ComponentB; + /// # let mut world = World::new(); + /// # let entity = world.spawn((ComponentA, ComponentB)).id(); + /// let entity_clone = world.entity_mut(entity).clone_and_spawn_with(|builder| { + /// builder.deny::<ComponentB>(); + /// }); + /// # assert_eq!(world.get::<ComponentA>(entity_clone), Some(&ComponentA)); + /// # assert_eq!(world.get::<ComponentB>(entity_clone), None); + /// ``` + /// + /// See the following for more options: + /// - [`EntityCloneBuilder`] + /// - [`CloneEntityWithObserversExt`](crate::observer::CloneEntityWithObserversExt) + /// - `CloneEntityHierarchyExt` + /// + /// # Panics + /// + /// If this entity has been despawned while this `EntityWorldMut` is still alive. + pub fn clone_and_spawn_with( + &mut self, + config: impl FnOnce(&mut EntityCloneBuilder) + Send + Sync + 'static, + ) -> Entity { + self.assert_not_despawned(); + + let entity_clone = self.world.entities.reserve_entity(); + self.world.flush(); + + let mut builder = EntityCloneBuilder::new(self.world); + config(&mut builder); + builder.clone_entity(self.entity, entity_clone); + + self.world.flush(); + self.update_location(); + entity_clone + } + + /// Clones the specified components of this entity and inserts them into another entity. + /// + /// Components can only be cloned if they implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// # Panics + /// + /// - If this entity has been despawned while this `EntityWorldMut` is still alive. + /// - If the target entity does not exist. + pub fn clone_components<B: Bundle>(&mut self, target: Entity) -> &mut Self { + self.assert_not_despawned(); + + let mut builder = EntityCloneBuilder::new(self.world); + builder.deny_all().allow::<B>(); + builder.clone_entity(self.entity, target); + + self.world.flush(); + self.update_location(); + self + } + + /// Clones the specified components of this entity and inserts them into another entity, + /// then removes the components from this entity. + /// + /// Components can only be cloned if they implement + /// [`Clone`] or [`Reflect`](bevy_reflect::Reflect). + /// + /// # Panics + /// + /// - If this entity has been despawned while this `EntityWorldMut` is still alive. + /// - If the target entity does not exist. + pub fn move_components<B: Bundle>(&mut self, target: Entity) -> &mut Self { + self.assert_not_despawned(); + + let mut builder = EntityCloneBuilder::new(self.world); + builder.deny_all().allow::<B>(); + builder.move_components(true); + builder.clone_entity(self.entity, target); + + self.world.flush(); + self.update_location(); + self + } } /// # Safety
diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -315,11 +319,52 @@ impl<'w> EntityCloneBuilder<'w> { } self } + + /// Helper function that allows a component through the filter. + fn filter_allow(&mut self, id: ComponentId) { + if self.filter_allows_components { + self.filter.insert(id); + } else { + self.filter.remove(&id); + } + if self.attach_required_components { + if let Some(info) = self.world.components().get_info(id) { + for required_id in info.required_components().iter_ids() { + if self.filter_allows_components { + self.filter.insert(required_id); + } else { + self.filter.remove(&required_id); + } + } + } + } + } + + /// Helper function that disallows a component through the filter. + fn filter_deny(&mut self, id: ComponentId) { + if self.filter_allows_components { + self.filter.remove(&id); + } else { + self.filter.insert(id); + } + if self.attach_required_components { + if let Some(info) = self.world.components().get_info(id) { + for required_id in info.required_components().iter_ids() { + if self.filter_allows_components { + self.filter.remove(&required_id); + } else { + self.filter.insert(required_id); + } + } + } + } + } } #[cfg(test)] mod tests { use crate::{self as bevy_ecs, component::Component, entity::EntityCloneBuilder, world::World}; + use bevy_ecs_macros::require; #[cfg(feature = "bevy_reflect")] #[test] diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -520,4 +565,34 @@ mod tests { assert!(world.get::<B>(e_clone).is_none()); assert!(world.get::<C>(e_clone).is_none()); } + + #[test] + fn clone_entity_with_required_components() { + #[derive(Component, Clone, PartialEq, Debug)] + #[require(B)] + struct A; + + #[derive(Component, Clone, PartialEq, Debug, Default)] + #[require(C(|| C(5)))] + struct B; + + #[derive(Component, Clone, PartialEq, Debug)] + struct C(u32); + + let mut world = World::default(); + + let e = world.spawn(A).id(); + let e_clone = world.spawn_empty().id(); + + let mut builder = EntityCloneBuilder::new(&mut world); + builder.deny_all(); + builder.without_required_components(|builder| { + builder.allow::<B>(); + }); + builder.clone_entity(e, e_clone); + + assert_eq!(world.entity(e_clone).get::<A>(), None); + assert_eq!(world.entity(e_clone).get::<B>(), Some(&B)); + assert_eq!(world.entity(e_clone).get::<C>(), Some(&C(5))); + } } diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -4776,4 +4956,75 @@ mod tests { world.flush(); assert_eq!(world.resource_mut::<TestVec>().0.as_slice(), &expected[..]); } + + #[test] + fn entity_world_mut_clone_and_move_components() { + #[derive(Component, Clone, PartialEq, Debug)] + struct A; + + #[derive(Component, Clone, PartialEq, Debug)] + struct B; + + #[derive(Component, Clone, PartialEq, Debug)] + struct C(u32); + + #[derive(Component, Clone, PartialEq, Debug, Default)] + struct D; + + let mut world = World::new(); + let entity_a = world.spawn((A, B, C(5))).id(); + let entity_b = world.spawn((A, C(4))).id(); + + world.entity_mut(entity_a).clone_components::<B>(entity_b); + assert_eq!(world.entity(entity_a).get::<B>(), Some(&B)); + assert_eq!(world.entity(entity_b).get::<B>(), Some(&B)); + + world.entity_mut(entity_a).move_components::<C>(entity_b); + assert_eq!(world.entity(entity_a).get::<C>(), None); + assert_eq!(world.entity(entity_b).get::<C>(), Some(&C(5))); + + assert_eq!(world.entity(entity_a).get::<A>(), Some(&A)); + assert_eq!(world.entity(entity_b).get::<A>(), Some(&A)); + } + + #[test] + fn entity_world_mut_clone_with_move_and_require() { + #[derive(Component, Clone, PartialEq, Debug)] + #[require(B)] + struct A; + + #[derive(Component, Clone, PartialEq, Debug, Default)] + #[require(C(|| C(3)))] + struct B; + + #[derive(Component, Clone, PartialEq, Debug, Default)] + #[require(D)] + struct C(u32); + + #[derive(Component, Clone, PartialEq, Debug, Default)] + struct D; + + let mut world = World::new(); + let entity_a = world.spawn(A).id(); + let entity_b = world.spawn_empty().id(); + + world.entity_mut(entity_a).clone_with(entity_b, |builder| { + builder.move_components(true); + builder.without_required_components(|builder| { + builder.deny::<A>(); + }); + }); + + assert_eq!(world.entity(entity_a).get::<A>(), Some(&A)); + assert_eq!(world.entity(entity_b).get::<A>(), None); + + assert_eq!(world.entity(entity_a).get::<B>(), None); + assert_eq!(world.entity(entity_b).get::<B>(), Some(&B)); + + assert_eq!(world.entity(entity_a).get::<C>(), None); + assert_eq!(world.entity(entity_b).get::<C>(), Some(&C(3))); + + assert_eq!(world.entity(entity_a).get::<D>(), None); + assert_eq!(world.entity(entity_b).get::<D>(), Some(&D)); + } }
Moving components from one entity to another ## What problem does this solve or what need does it fill? For my reversible systems crate I want to support reversible entity commands that do structural changes. For example, to create a reversible variant of `EntityCommands::insert`, that takes a `Bundle` as an argument, I first have to move the components that would be overwritten out of the entity so I can make this process undoable. `BundleInfo` has the methods I need to get the relevant ids including required components. However, there is no further API from here on. ## What solution would you like? What would work is to move components from one entity to another by id(s). A typed variant should be added there too because it does not exist yet. This is an elegant solution because the data structure of storing untyped components is already there: The ECS storages. This might be useful for other use cases as well. ```rs // in EntityWorldMut and EntityCommands impl pub fn move<T: Bundle>(&mut self, to: Entity) -> &mut Self; pub fn move_by_id(&mut self, to: Entity, component_id: ComponentId) -> &mut Self; pub fn move_by_ids( &mut self, to: Entity, component_ids: impl IntoIterator<Item = ComponentId> ) -> &mut Self; ``` Each variant should also come with a `_with_requires` variant like https://github.com/bevyengine/bevy/pull/15026 that has the difference to not construct required components at the target entity but to move them from the source entity as well. Hooks should be triggered by these operations. Panics should happen if either the source or target entity is missing or at least one `ComponentId` is invalid. ### Open questions - Should this come with variants like `try_insert` that fail silently? ## What alternative(s) have you considered? An alternative is to move the components entirely out of the ECS storage as some kind of blob. However, no such type exists yet as far I can tell. It would require extra work to design this blob, also because it needs to support generating `OwningPtr` for reinsertion. I see no alternative in my untyped context. I could mirror the Bundle trait to create an associated function but that would not work with third-party Bundle implementors that do not implement my trait. Until a feature like this comes out I consider to require only tuple bundles for my crate's API with further restrictions on the upcoming required components feature. This probably makes the API very panic-happy. 🫤 I see reflection not helping me here as not every component can be reflected.
Note that there's no valid `'a` lifetime for the `OwningPtr`, in fact `'a` is not used in the inputs at all. This might work with a callback API though. I took the liberty to rewrite parts of the initial comment to focus on the "move component from one entity to another" solution. The "return some blob data for later reinsertion" seems just not attractive to me while the first might be interesting for other use cases as well, also to be implemented for `EntityCommands` I hope this brings the remaining design work forward.
2024-12-15T02:50:34Z
1.82
2025-03-25T20:07:17Z
6178ce93e8537f823685e8c1b617e22ba93696e7
[ "bundle::tests::sorted_remove", "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::as_deref_mut", "change_detection::tests::mut_from_res_mut", "bundle::tests::component_hook_order_replace", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::insert_if_new", "bundle::tests::component_hook_order_recursive", "change_detection::tests::mut_new", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::change_expiration", "change_detection::tests::set_if_neq", "entity::clone_entities::tests::clone_entity_using_clone", "entity::clone_entities::tests::clone_entity_with_allow_filter", "entity::clone_entities::tests::clone_entity_with_deny_filter", "entity::map_entities::tests::entity_mapper", "entity::map_entities::tests::entity_mapper_no_panic", "entity::clone_entities::tests::clone_entity_specialization", "entity::tests::entity_bits_roundtrip", "entity::clone_entities::tests::clone_entity_with_override_bundle", "entity::clone_entities::tests::clone_entity_using_reflect", "entity::tests::entity_comparison", "entity::map_entities::tests::world_scope_reserves_generations", "entity::tests::entity_const", "entity::clone_entities::tests::clone_entity_with_override_allow_filter", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "entity::visit_entities::tests::visit_entities", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::extract_kind", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_construction", "identifier::tests::id_comparison", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "intern::tests::zero_sized_type", "label::tests::dyn_hash_object_safe", "label::tests::dyn_eq_object_safe", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn", "observer::tests::observer_invalid_params", "observer::tests::observer_apply_deferred_from_param_set", "observer::entity_observer::tests::clone_entity_with_observer", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_dynamic_component", "observer::tests::observer_multiple_listeners", "observer::tests::observer_entity_routing", "observer::tests::observer_propagating_no_next", "observer::tests::observer_multiple_events", "observer::tests::observer_propagating", "observer::tests::observer_propagating_halt", "observer::tests::observer_multiple_components", "query::access::tests::filtered_access_extend", "query::access::tests::access_get_conflicts", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_combined_access", "observer::tests::observer_order_insert_remove_sparse", "observer::tests::observer_order_recursive", "observer::tests::observer_no_target", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "observer::tests::observer_order_spawn_despawn", "query::access::tests::test_access_clone", "observer::tests::observer_propagating_join", "observer::tests::observer_multiple_matches", "query::access::tests::test_access_clone_from", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_propagating_parallel_propagation", "query::access::tests::read_all_access_conflicts", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_set_clone", "query::access::tests::test_access_filters_clone", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_clone_from", "query::access::tests::test_filtered_access_set_from", "observer::tests::observer_order_replace", "observer::tests::observer_order_insert_remove", "observer::tests::observer_propagating_world", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "observer::tests::observer_trigger_ref", "observer::tests::observer_propagating_world_skipping", "observer::tests::observer_triggered_components", "query::fetch::tests::world_query_phantom_data", "query::builder::tests::builder_static_components", "query::builder::tests::builder_with_without_dynamic", "query::fetch::tests::world_query_metadata_collision", "query::builder::tests::builder_or", "query::fetch::tests::world_query_struct_variants", "query::error::test::query_does_not_match", "query::builder::tests::builder_with_without_static", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_dynamic_components", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::builder::tests::builder_transmute", "query::iter::tests::empty_query_iter_sort_after_next_does_not_panic", "query::state::tests::can_transmute_mut_fetch", "query::iter::tests::query_iter_many_sort_doesnt_panic_after_next", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_to_more_general", "query::iter::tests::query_iter_many_sorts", "query::state::tests::can_transmute_empty_tuple", "query::state::tests::can_generalize_with_option", "query::iter::tests::query_iter_sorts", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_entity_mut", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::join_with_get", "query::state::tests::can_transmute_changed", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::join", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::transmute_from_dense_to_sparse", "query::state::tests::transmute_from_sparse_to_dense", "query::iter::tests::query_iter_sort_after_next - should panic", "query::iter::tests::query_iter_sort_after_next_dense - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - 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::right_world_get_many_mut - should panic", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::right_world_get - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::transmute_with_different_world - should panic", "query::tests::any_query", "schedule::graph::graph_map::tests::node_order_preservation", "query::tests::query_iter_combinations", "schedule::condition::tests::distributive_run_if_compiles", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::has_query", "query::tests::query_iter_combinations_sparse", "query::tests::query", "query::tests::self_conflicting_worldquery - should panic", "reflect::entity_commands::tests::remove_reflected_with_registry", "query::tests::many_entities", "query::tests::multi_storage_query", "schedule::executor::simple::skip_automatic_sync_points", "schedule::graph::graph_map::tests::strongly_connected_components", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_bundle", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "reflect::entity_commands::tests::insert_reflected_with_registry", "query::tests::query_filtered_iter_combinations", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::remove_reflected", "query::tests::derived_worldqueries", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::stepping::tests::clear_schedule", "schedule::stepping::tests::clear_schedule_then_set_behavior", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::clear_system", "schedule::stepping::tests::schedules", "schedule::stepping::tests::continue_always_run", "schedule::stepping::tests::waiting_always_run", "schedule::stepping::tests::continue_never_run", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::remove_schedule", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::stepping::tests::step_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::step_duplicate_systems", "schedule::stepping::tests::stepping_disabled", "schedule::stepping::tests::step_always_run", "schedule::stepping::tests::set_behavior_then_clear_schedule", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_breakpoint", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "event::tests::test_event_mutator_iter_nth", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::stepping::tests::verify_cursor", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::executor::tests::invalid_system_param_skips", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "event::tests::test_event_reader_iter_nth", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::stepping::single_threaded_executor", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::stepping::simple_executor", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::set::tests::test_schedule_label", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::tests::conditions::system_conditions_and_change_detection", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::schedule::tests::disable_auto_sync_points", "schedule::tests::conditions::multiple_conditions_on_system_sets", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::tests::system_ambiguity::components", "schedule::stepping::tests::step_run_if_false", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::conditions::system_with_condition", "schedule::tests::system_ambiguity::exclusive", "schedule::tests::conditions::systems_nested_in_system_sets", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::schedule::tests::inserts_a_sync_point", "schedule::tests::system_ambiguity::nonsend", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::system_ambiguity::events", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::system_ambiguity::one_of_everything", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::system_ambiguity::read_world", "storage::blob_vec::tests::resize_test", "storage::table::tests::table", "storage::blob_vec::tests::blob_vec", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "schedule::condition::tests::run_condition", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "system::builder::tests::custom_param_builder", "system::builder::tests::filtered_resource_conflicts_read_with_res", "storage::blob_vec::tests::aligned_zst", "system::builder::tests::dyn_builder", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::condition::tests::run_condition_combinators", "storage::sparse_set::tests::sparse_set", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::tests::system_execution::run_exclusive_system", "system::builder::tests::filtered_resource_mut_conflicts_read_with_res", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_execution::run_system", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "storage::sparse_set::tests::sparse_sets", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "schedule::schedule::tests::no_sync_chain::chain_first", "system::builder::tests::local_builder", "system::builder::tests::query_builder", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "system::commands::tests::append", "schedule::schedule::tests::no_sync_chain::chain_all", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_with_resmut - should panic", "system::builder::tests::param_set_builder", "schedule::tests::system_ordering::order_exclusive_systems", "system::builder::tests::filtered_resource_mut_conflicts_write_all_with_res - should panic", "system::builder::tests::filtered_resource_conflicts_read_all_with_resmut - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_with_res - should panic", "system::builder::tests::filtered_resource_mut_conflicts_read_with_resmut - should panic", "system::builder::tests::filtered_resource_conflicts_read_with_resmut - should panic", "system::builder::tests::query_builder_state", "query::tests::par_iter_mut_change_detection", "system::commands::tests::commands", "system::commands::tests::test_commands_are_send_and_sync", "system::builder::tests::param_set_vec_builder", "system::builder::tests::vec_builder", "event::tests::test_event_cursor_par_read_mut", "schedule::tests::system_ordering::add_systems_correct_order", "system::commands::tests::entity_commands_entry", "system::commands::tests::remove_component_with_required_components", "system::commands::tests::remove_resources", "system::exclusive_function_system::tests::into_system_type_id_consistency", "event::tests::test_event_cursor_par_read", "schedule::schedule::tests::merges_sync_points_into_one", "system::commands::tests::remove_components", "system::function_system::tests::into_system_type_id_consistency", "system::commands::tests::unregister_system_cached_commands", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::commands::tests::insert_components", "system::system::tests::command_processing", "system::system::tests::run_system_once", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system::tests::non_send_resources", "system::commands::tests::remove_components_by_id", "system::system::tests::run_system_once_invalid_params", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "schedule::tests::system_ambiguity::read_only", "system::system::tests::run_two_systems", "schedule::tests::system_ordering::order_systems", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::non_sync_local", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "system::system_param::tests::param_set_non_send_first", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::cached_system", "system::system_registry::tests::cached_system_commands", "system::system_registry::tests::cached_system_adapters", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_registry::tests::local_variables", "system::system_registry::tests::input_values", "system::system_registry::tests::nested_systems", "system::system_registry::tests::output_values", "system::system_registry::tests::nested_systems_with_inputs", "schedule::tests::system_ordering::add_systems_correct_order_nested", "system::system_registry::tests::run_system_invalid_params", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::system_with_input_ref", "system::tests::any_of_and_without", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_with_and_without_common", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_entity_and_mut", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::assert_systems", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "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_with_ref_and_mut - should panic", "system::tests::any_of_working", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_query_mut_system - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::commands_param_set", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_sets_system - should panic", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::get_system_conflicts", "system::tests::disjoint_query_mut_read_component_system", "system::tests::long_life_test", "system::tests::changed_resource_system", "system::tests::immutable_mut_test", "system::tests::disjoint_query_mut_system", "system::tests::convert_mut_to_immut", "system::tests::local_system", "system::tests::into_iter_impl", "system::tests::option_has_no_filter_with - should panic", "system::tests::non_send_system", "system::tests::non_send_option_system", "system::tests::nonconflicting_system_resources", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::pipe_change_detection", "system::tests::query_validates_world_id - should panic", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::or_expanded_with_and_without_common", "system::tests::or_has_filter_with", "system::tests::query_is_empty", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::read_system_state", "system::tests::panic_inside_system - should panic", "system::tests::system_state_invalid_world - should panic", "system::tests::system_state_archetype_update", "system::tests::system_state_change_detection", "system::tests::simple_fallible_system", "system::tests::or_param_set_system", "system::tests::query_set_system", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::write_system_state", "tests::added_queries", "tests::changed_query", "system::tests::removal_tracking", "system::tests::world_collections_system", "tests::add_remove_components", "system::tests::update_archetype_component_access_works", "system::tests::test_combinator_clone", "tests::added_tracking", "tests::clear_entities", "tests::despawn_mixed_storage", "tests::despawn_table_storage", "tests::bundle_derive", "tests::empty_spawn", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::duplicate_components_panic - should panic", "tests::entity_ref_and_entity_ref_query_no_panic", "tests::dynamic_required_components", "tests::entity_ref_and_mut_query_panic - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::filtered_query_access", "tests::changed_trackers_sparse", "tests::exact_size_query", "tests::changed_trackers", "tests::generic_required_components", "tests::insert_batch", "tests::insert_batch_if_new", "tests::insert_overwrite_drop", "tests::insert_or_spawn_batch_invalid", "tests::insert_or_spawn_batch", "tests::insert_overwrite_drop_sparse", "tests::insert_batch_same_archetype", "tests::multiple_worlds_same_query_for_each - should panic", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_drop_from_same_thread", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::non_send_resource_panic - should panic", "tests::query_all_for_each", "tests::query_all", "tests::query_filter_with_for_each", "tests::query_filter_with", "tests::par_for_each_dense", "query::tests::query_filtered_exactsizeiterator_len", "tests::par_for_each_sparse", "tests::query_filter_with_sparse", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_without", "tests::query_filter_with_sparse_for_each", "tests::query_missing_component", "tests::query_get", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_sparse", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_single_component", "tests::query_sparse_component", "tests::ref_and_mut_query_panic - should panic", "tests::random_access", "tests::remove", "tests::remove_missing", "tests::remove_component_and_its_required_components", "tests::remove_bundle_and_his_required_components", "tests::remove_component_and_its_runtime_required_components", "tests::required_components", "tests::remove_tracking", "tests::required_components_insert_existing_hooks", "tests::required_components_recursion_errors - should panic", "tests::required_components_spawn_nonexistent_hooks", "tests::required_components_inheritance_depth", "tests::required_components_spawn_then_insert_no_overwrite", "tests::required_components_take_leaves_required", "tests::resource", "tests::reserve_and_spawn", "tests::resource_scope", "tests::required_components_retain_keeps_required", "tests::runtime_required_components_existing_archetype", "tests::runtime_required_components", "tests::runtime_required_components_fail_with_duplicate", "tests::runtime_required_components_deep_require_does_not_override_shallow_require", "tests::runtime_required_components_deep_require_does_not_override_shallow_require_deep_subtree_after_shallow", "tests::runtime_required_components_override_1", "tests::runtime_required_components_override_2", "tests::runtime_required_components_propagate_up", "tests::runtime_required_components_propagate_up_even_more", "tests::sparse_set_add_remove_many", "tests::spawn_batch", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::try_insert_batch", "world::command_queue::test::test_command_queue_inner", "tests::try_insert_batch_if_new", "world::command_queue::test::test_command_queue_inner_drop_early", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "tests::test_is_archetypal_size_hints", "world::command_queue::test::test_command_queue_inner_panic_safe", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::adding_observer_updates_location", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::archetype_modifications_trigger_flush", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::command_ordering_is_correct", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_by_id_array", "world::entity_ref::tests::get_by_id_vec", "world::entity_ref::tests::get_components", "world::entity_ref::tests::get_mut_by_id_unchecked", "world::entity_ref::tests::get_mut_by_id_array", "world::entity_ref::tests::get_mut_by_id_vec", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::mut_compatible_with_resource", "world::entity_ref::tests::location_on_despawned_entity_panics - should panic", "world::entity_ref::tests::mut_compatible_with_resource_mut", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_compatible_with_resource_mut", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::dynamic_resource", "world::tests::get_entity", "world::tests::get_entity_mut", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::reflect::tests::get_component_as_reflect", "world::tests::init_non_send_resource_does_not_overwrite", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::init_resource_does_not_overwrite", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::inspect_entity_components", "world::tests::iterate_entities", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1795) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 244) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 254) - compile", "crates/bevy_ecs/src/component.rs - component::Component (line 357) - compile fail", "crates/bevy_ecs/src/lib.rs - (line 35)", "crates/bevy_ecs/src/component.rs - component::Component (line 367)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 583)", "crates/bevy_ecs/src/component.rs - component::ComponentMutability (line 442)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/component.rs - component::Component (line 48)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/lib.rs - (line 192)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 72)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/lib.rs - (line 288)", "crates/bevy_ecs/src/lib.rs - (line 79)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 480)", "crates/bevy_ecs/src/component.rs - component::Component (line 332)", "crates/bevy_ecs/src/component.rs - component::Component (line 298)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1811)", "crates/bevy_ecs/src/lib.rs - (line 215)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 30)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 100)", "crates/bevy_ecs/src/lib.rs - (line 240)", "crates/bevy_ecs/src/component.rs - component::Component (line 100)", "crates/bevy_ecs/src/lib.rs - (line 168)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 2307)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 101)", "crates/bevy_ecs/src/reflect/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 819)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 2321)", "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/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 64)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 413) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1548)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 107)", "crates/bevy_ecs/src/component.rs - component::Component (line 254)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 248)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 844)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 130)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 211)", "crates/bevy_ecs/src/lib.rs - (line 96)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 43)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 607)", "crates/bevy_ecs/src/lib.rs - (line 56)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1889)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 959)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 877)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 517)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1866)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 703)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 1510)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 174)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 127)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 107)", "crates/bevy_ecs/src/lib.rs - (line 312)", "crates/bevy_ecs/src/lib.rs - (line 255)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 667)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 160)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/component.rs - component::Component (line 138)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 805)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/lib.rs - (line 337)", "crates/bevy_ecs/src/component.rs - component::Component (line 216)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/observer/mod.rs - observer::World::add_observer (line 408)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 142)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 192)", "crates/bevy_ecs/src/component.rs - component::Component (line 160)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 223)", "crates/bevy_ecs/src/lib.rs - (line 46)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 68)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 21)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1453)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::par_read (line 40)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 813)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 239)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_by (line 1625)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 649)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/component.rs - component::Component (line 118)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/lib.rs - (line 127)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_unstable (line 1536)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/component.rs - component::Component (line 190)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 557)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 284) - compile fail", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 59)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort (line 1395)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_by_key (line 1775)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 395)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 50)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 759)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamBuilder (line 129)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 787)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 229)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 926) - compile", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 533)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 571)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 360)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1037) - compile", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 732)", "crates/bevy_ecs/src/system/builder.rs - system::builder::LocalBuilder (line 508)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::queue (line 1644)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 505)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 351)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 314)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 547)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 411)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 243)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 393)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 251)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if_new_and (line 1475)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 164)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 464)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 711) - compile fail", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert (line 1380)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::retain (line 1667)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if (line 1428)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2030) - compile fail", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 431)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 17)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 848)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 722)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 325)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2006)", "crates/bevy_ecs/src/system/builder.rs - system::builder::QueryParamBuilder (line 226)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove_with_requires (line 1566)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 234)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 281)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 201)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 51)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 209)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::despawn (line 1612)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::entry (line 1160)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::id (line 1130)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 157)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 1051)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1299)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 115)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::run_schedule (line 1007)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 224)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert_if (line 1253)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove (line 1524)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 308)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1223)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 979)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert (line 1198)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 281)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 462)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 901)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 500)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 95)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1146)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 180)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 131)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 251)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 858)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1264)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1631)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 75)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 634)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 821)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1118)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 280)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1064)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 570)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamSetBuilder (line 339)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1674)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 85)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1041)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 267)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2149)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 214)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 643)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1403)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 599)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 688)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 604)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 658)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 167)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 255)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 218)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1193)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 28)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1519)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 185)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 663)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 300)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with (line 302)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 168)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 136)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 209)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 231)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 373)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 130) - compile", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1342)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 147)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 51)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1172)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 682)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 63)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 231)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 712)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 193)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 24)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 561)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 640)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 1030)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 305)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1458)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 682)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 811)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1557)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 345)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 661)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_component_clone_handlers_mut (line 3351)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 256)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 889)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 3423)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 1197)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1493)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 788)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources (line 3445)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 765)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 864)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 744)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_insert_with (line 2188)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 2860)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 96)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_init (line 2240)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1587)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 900)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 1234)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components_with (line 476)", "crates/bevy_ecs/src/world/mod.rs - world::World::iter_resources_mut (line 3522)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components (line 320)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1405)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 623)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 999)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1654)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 855)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1623)", "crates/bevy_ecs/src/world/mod.rs - world::World::last_change_tick_scope (line 3171)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query (line 1706)", "crates/bevy_ecs/src/world/mod.rs - world::World::schedule_scope (line 3786)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1437)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 1306)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 1161)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query_filtered (line 1729)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 1272)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query (line 1678)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components_with (line 368)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 2392)" ]
[]
[]
[]
auto_2025-06-08
bevyengine/bevy
16,747
bevyengine__bevy-16747
[ "16736" ]
bb090e61766a7e4c09d14e28abc16829d7b60368
diff --git a/crates/bevy_animation/src/animation_curves.rs b/crates/bevy_animation/src/animation_curves.rs --- a/crates/bevy_animation/src/animation_curves.rs +++ b/crates/bevy_animation/src/animation_curves.rs @@ -243,18 +243,26 @@ where impl<C: Typed, P, F: Fn(&mut C) -> &mut P + 'static> AnimatedField<C, P, F> { /// Creates a new instance of [`AnimatedField`]. This operates under the assumption that - /// `C` is a reflect-able struct with named fields, and that `field_name` is a valid field on that struct. + /// `C` is a reflect-able struct, and that `field_name` is a valid field on that struct. /// /// # Panics - /// If the type of `C` is not a struct with named fields or if the `field_name` does not exist. + /// If the type of `C` is not a struct or if the `field_name` does not exist. pub fn new_unchecked(field_name: &str, func: F) -> Self { - let TypeInfo::Struct(struct_info) = C::type_info() else { + let field_index; + if let TypeInfo::Struct(struct_info) = C::type_info() { + field_index = struct_info + .index_of(field_name) + .expect("Field name should exist"); + } else if let TypeInfo::TupleStruct(struct_info) = C::type_info() { + field_index = field_name + .parse() + .expect("Field name should be a valid tuple index"); + if field_index >= struct_info.field_len() { + panic!("Field name should be a valid tuple index"); + } + } else { panic!("Only structs are supported in `AnimatedField::new_unchecked`") - }; - - let field_index = struct_info - .index_of(field_name) - .expect("Field name should exist"); + } Self { func,
diff --git a/crates/bevy_animation/src/animation_curves.rs b/crates/bevy_animation/src/animation_curves.rs --- a/crates/bevy_animation/src/animation_curves.rs +++ b/crates/bevy_animation/src/animation_curves.rs @@ -984,3 +992,21 @@ macro_rules! animated_field { }) }; } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_animated_field_tuple_struct_simple_uses() { + #[derive(Clone, Debug, Component, Reflect)] + struct A(f32); + let _ = AnimatedField::new_unchecked("0", |a: &mut A| &mut a.0); + + #[derive(Clone, Debug, Component, Reflect)] + struct B(f32, f64, f32); + let _ = AnimatedField::new_unchecked("0", |b: &mut B| &mut b.0); + let _ = AnimatedField::new_unchecked("1", |b: &mut B| &mut b.1); + let _ = AnimatedField::new_unchecked("2", |b: &mut B| &mut b.2); + } +}
Add support to the `animated_field!` macro for tuple structs ## What problem does this solve or what need does it fill? Components like `TextColor` and `BackgroundColor` cannot currently be easily animated without creating a custom `AnimatableProperty`. ## What solution would you like? Add support to the `animated_field!` macro (and consequently `AnimatedField`) for tuple structs. I'm not sure what the cleanest way to do this is from an implementation perspective, since the `$ident` pattern doesn't match tuple struct field indices and I'm not sure if it makes sense to use `$literal`, as that matches more than just field indices. ## What alternative(s) have you considered? - Add an alternative easy way to animate tuple structs (e.g. a separate macro/type) - Maybe something could be done with `Deref` and a blanket implementation of `AnimatableProperty`? But this puts the burden on components to implement `Deref`, only works for tuple structs with single fields, and also introduces potential conflicts with trait implementations because it would be a blanket implementation ## Additional context I was specifically trying to animate UI color alpha when I ran into this, and I wonder if it's worth considering if there should be easy ways to get a `&mut` to a `Color`'s alpha and also possibly animate individual fields of a component's fields (e.g. animating `Transform::translation::x`), but that's a separate issue and probably a little more complicated.
Can you use `_0` and so on? That's the field name of tuple structs. `_0` and friends don't seem to work with the macro, Rust complains about incorrect field names because the macro does field access via the provided field name. You can try to construct an `AnimatedField` directly (the below compiles): ```rust #[derive(Clone, Debug, Component, Reflect)] struct MyTupleStruct(f32); let mut clip = AnimationClip::default(); clip.add_curve_to_target( AnimationTargetId::from_name(&Name::new("target")), AnimatableCurve::new( AnimatedField::new_unchecked( "_0", |my_tuple_struct: &mut MyTupleStruct| &mut my_tuple_struct.0 ), EasingCurve::new(0., 1., EaseFunction::Linear), ) ); ``` ...but running it panics because `AnimatedField` only supports non-tuple structs. I could probably draft a PR to make it possible to manually construct an `AnimatedField` (it seems like a trivial fix, just check for tuple structs as well), but I'm not as sure what the "correct" way to change the macro would be, or if changing `AnimatedField` would be useful without also fixing the macro. Let's start with that and get more feedback in review.
2024-12-10T13:25:48Z
1.82
2024-12-12T04:00:23Z
6178ce93e8537f823685e8c1b617e22ba93696e7
[ "animation_curves::tests::test_animated_field_tuple_struct_simple_uses" ]
[ "tests::test_events_triggers", "tests::test_events_triggers_looping", "tests::test_multiple_events_triggers", "crates/bevy_animation/src/animation_curves.rs - animation_curves (line 10)", "crates/bevy_animation/src/animation_curves.rs - animation_curves::AnimatableProperty (line 117)", "crates/bevy_animation/src/animation_curves.rs - animation_curves (line 28)", "crates/bevy_animation/src/lib.rs - AnimationClip::add_event_fn_to_target (line 396)", "crates/bevy_animation/src/animation_curves.rs - animation_curves (line 41)", "crates/bevy_animation/src/lib.rs - AnimationClip::add_event_fn (line 373)", "crates/bevy_animation/src/animation_curves.rs - animation_curves::AnimatableProperty (line 145)" ]
[]
[]
auto_2025-06-08
bevyengine/bevy
16,707
bevyengine__bevy-16707
[ "16706" ]
48fb4aa6d549f3dcb915db2fed3193a1de930b31
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 @@ -2874,21 +2874,34 @@ impl World { /// }); /// assert_eq!(world.get_resource::<A>().unwrap().0, 2); /// ``` + /// + /// See also [`try_resource_scope`](Self::try_resource_scope). #[track_caller] pub fn resource_scope<R: Resource, U>(&mut self, f: impl FnOnce(&mut World, Mut<R>) -> U) -> U { + self.try_resource_scope(f) + .unwrap_or_else(|| panic!("resource does not exist: {}", core::any::type_name::<R>())) + } + + /// Temporarily removes the requested resource from this [`World`] if it exists, runs custom user code, + /// then re-adds the resource before returning. Returns `None` if the resource does not exist in this [`World`]. + /// + /// This enables safe simultaneous mutable access to both a resource and the rest of the [`World`]. + /// For more complex access patterns, consider using [`SystemState`](crate::system::SystemState). + /// + /// See also [`resource_scope`](Self::resource_scope). + pub fn try_resource_scope<R: Resource, U>( + &mut self, + f: impl FnOnce(&mut World, Mut<R>) -> U, + ) -> Option<U> { let last_change_tick = self.last_change_tick(); let change_tick = self.change_tick(); - let component_id = self - .components - .get_resource_id(TypeId::of::<R>()) - .unwrap_or_else(|| panic!("resource does not exist: {}", core::any::type_name::<R>())); + let component_id = self.components.get_resource_id(TypeId::of::<R>())?; let (ptr, mut ticks, mut _caller) = self .storages .resources .get_mut(component_id) - .and_then(ResourceData::remove) - .unwrap_or_else(|| panic!("resource does not exist: {}", core::any::type_name::<R>())); + .and_then(ResourceData::remove)?; // Read the value onto the stack to avoid potential mut aliasing. // SAFETY: `ptr` was obtained from the TypeId of `R`. let mut value = unsafe { ptr.read::<R>() }; 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 @@ -2912,27 +2925,18 @@ impl World { OwningPtr::make(value, |ptr| { // SAFETY: pointer is of type R unsafe { - self.storages - .resources - .get_mut(component_id) - .map(|info| { - info.insert_with_ticks( - ptr, - ticks, - #[cfg(feature = "track_change_detection")] - _caller, - ); - }) - .unwrap_or_else(|| { - panic!( - "No resource of type {} exists in the World.", - core::any::type_name::<R>() - ) - }); + self.storages.resources.get_mut(component_id).map(|info| { + info.insert_with_ticks( + ptr, + ticks, + #[cfg(feature = "track_change_detection")] + _caller, + ); + }) } - }); + })?; - result + Some(result) } /// Sends an [`Event`].
diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1484,6 +1484,7 @@ mod tests { #[test] fn resource_scope() { let mut world = World::default(); + assert!(world.try_resource_scope::<A, _>(|_, _| {}).is_none()); world.insert_resource(A(0)); world.resource_scope(|world: &mut World, mut value: Mut<A>| { value.0 += 1;
`try_resource_scope` that returns an `Option` instead of panicking in case the resource doesn't exist ## What problem does this solve or what need does it fill? Guarding against a panic with `resource_scope` currently requires the resource to be checked for existence prior to calling `resource_scope`: ```rust if !world.contains_resource::<UiStack>() { return; } world.resource_scope(|world, mut stack: Mut<UiStack>| { // ... }); ``` Without the `contains_resource` call I always encounter a panic when closing the window, which I would like to avoid. ## What solution would you like? A new function with the following signature: ```rust impl World { pub fn try_resource_scope<R: Resource, U>(&mut self, f: impl FnOnce(&mut World, Mut<R>) -> U) -> Option<U>; } ``` And would be used as follows: ```rust let ret = world.try_resource_scope(|world, mut stack: Mut<UiStack>| { // ... }); // optionally use the return value if let Some(ret) = ret { // ... } ``` **I recommend reimplementing `resource_scope` in terms of this function when finished, to avoid duplication.**
2024-12-07T23:16:04Z
1.82
2024-12-08T15:57:48Z
6178ce93e8537f823685e8c1b617e22ba93696e7
[ "change_detection::tests::mut_from_non_send_mut", "change_detection::tests::map_mut", "change_detection::tests::mut_untyped_from_mut", "change_detection::tests::mut_new", "change_detection::tests::mut_from_res_mut", "change_detection::tests::mut_untyped_to_reflect", "change_detection::tests::as_deref_mut", "change_detection::tests::set_if_neq", "bundle::tests::component_hook_order_spawn_despawn", "bundle::tests::component_hook_order_spawn_despawn_with_macro_hooks", "bundle::tests::component_hook_order_insert_remove", "bundle::tests::component_hook_order_replace", "entity::clone_entities::tests::clone_entity_using_clone", "bundle::tests::insert_if_new", "entity::clone_entities::tests::clone_entity_with_allow_filter", "bundle::tests::component_hook_order_recursive", "change_detection::tests::change_tick_wraparound", "change_detection::tests::change_tick_scan", "bundle::tests::component_hook_order_recursive_multiple", "change_detection::tests::change_expiration", "entity::clone_entities::tests::clone_entity_with_deny_filter", "entity::map_entities::tests::entity_mapper", "entity::clone_entities::tests::clone_entity_with_override_bundle", "entity::clone_entities::tests::clone_entity_with_override_allow_filter", "entity::map_entities::tests::entity_mapper_no_panic", "entity::tests::entity_bits_roundtrip", "entity::clone_entities::tests::clone_entity_using_reflect", "entity::map_entities::tests::world_scope_reserves_generations", "entity::clone_entities::tests::clone_entity_specialization", "entity::tests::entity_comparison", "entity::tests::entity_const", "entity::tests::entity_debug", "entity::tests::entity_display", "entity::tests::entity_hash_id_bitflip_affects_high_7_bits", "entity::tests::entity_hash_keeps_similar_ids_together", "entity::tests::entity_niche_optimization", "entity::tests::get_reserved_and_invalid", "entity::tests::reserve_entity_len", "entity::tests::reserve_generations", "entity::tests::reserve_generations_and_alloc", "event::collections::tests::iter_current_update_events_iterates_over_current_events", "entity::visit_entities::tests::visit_entities", "event::tests::test_event_cursor_clear", "event::tests::ensure_reader_readonly", "event::tests::test_event_cursor_iter_len_updated", "event::tests::test_event_cursor_len_current", "event::tests::test_event_cursor_len_empty", "event::tests::test_event_cursor_len_filled", "event::tests::test_event_cursor_len_update", "event::tests::test_event_cursor_read", "event::tests::test_event_cursor_read_mut", "event::tests::test_event_mutator_iter_last", "event::tests::test_event_reader_iter_last", "event::tests::test_events", "event::tests::test_event_registry_can_add_and_remove_events_to_world", "event::tests::test_events_clear_and_read", "event::tests::test_events_drain_and_read", "event::tests::test_events_empty", "event::tests::test_events_extend_impl", "event::tests::test_events_send_default", "event::tests::test_events_update_drain", "event::tests::test_send_events_ids", "identifier::masks::tests::extract_high_value", "identifier::masks::tests::get_u64_parts", "identifier::masks::tests::extract_kind", "identifier::masks::tests::incrementing_masked_nonzero_high_is_safe", "identifier::masks::tests::pack_into_u64", "identifier::masks::tests::pack_kind_bits", "identifier::tests::from_bits", "identifier::tests::id_comparison", "identifier::tests::id_construction", "intern::tests::different_interned_content", "intern::tests::fieldless_enum", "intern::tests::same_interned_content", "intern::tests::same_interned_instance", "intern::tests::static_sub_strings", "label::tests::dyn_hash_object_safe", "label::tests::dyn_eq_object_safe", "intern::tests::zero_sized_type", "observer::tests::observer_apply_deferred_from_param_set", "observer::entity_observer::tests::clone_entity_with_observer", "observer::tests::observer_despawn_archetype_flags", "observer::tests::observer_multiple_matches", "observer::tests::observer_dynamic_trigger", "observer::tests::observer_despawn", "observer::tests::observer_no_target", "observer::tests::observer_multiple_events", "observer::tests::observer_invalid_params", "observer::tests::observer_multiple_components", "observer::tests::observer_dynamic_component", "observer::tests::observer_entity_routing", "query::access::tests::filtered_access_extend_or", "query::access::tests::filtered_access_extend", "observer::tests::observer_propagating_world", "observer::tests::observer_multiple_listeners", "observer::tests::observer_order_recursive", "query::access::tests::filtered_combined_access", "query::access::tests::access_get_conflicts", "observer::tests::observer_order_replace", "observer::tests::observer_order_insert_remove", "observer::tests::observer_trigger_targets_ref", "observer::tests::observer_propagating_no_next", "observer::tests::observer_propagating_halt", "observer::tests::observer_propagating_redundant_dispatch_parent_child", "observer::tests::observer_triggered_components", "observer::tests::observer_order_spawn_despawn", "observer::tests::observer_on_remove_during_despawn_spawn_empty", "query::access::tests::read_all_access_conflicts", "observer::tests::observer_trigger_ref", "query::access::tests::test_access_clone_from", "observer::tests::observer_propagating", "observer::tests::observer_order_insert_remove_sparse", "query::access::tests::test_access_filters_clone", "query::access::tests::test_access_clone", "query::access::tests::test_access_filters_clone_from", "query::access::tests::test_filtered_access_clone", "query::access::tests::test_filtered_access_clone_from", "observer::tests::observer_propagating_parallel_propagation", "observer::tests::observer_propagating_redundant_dispatch_same_entity", "query::access::tests::test_filtered_access_set_from", "query::access::tests::test_filtered_access_set_clone", "observer::tests::observer_propagating_join", "observer::tests::observer_propagating_world_skipping", "query::builder::tests::builder_static_components", "query::builder::tests::builder_dynamic_components", "query::builder::tests::builder_static_dense_dynamic_sparse", "query::builder::tests::builder_transmute", "query::builder::tests::builder_or", "query::builder::tests::builder_with_without_dynamic", "query::error::test::query_does_not_match", "query::fetch::tests::read_only_field_visibility", "query::builder::tests::builder_with_without_static", "query::fetch::tests::world_query_metadata_collision", "query::fetch::tests::world_query_phantom_data", "query::iter::tests::empty_query_iter_sort_after_next_does_not_panic", "query::iter::tests::query_iter_many_sort_doesnt_panic_after_next", "query::fetch::tests::world_query_struct_variants", "query::iter::tests::query_iter_cursor_state_non_empty_after_next", "query::iter::tests::query_iter_many_sorts", "query::state::tests::can_generalize_with_option", "query::state::tests::can_transmute_empty_tuple", "query::iter::tests::query_iter_sorts", "query::state::tests::can_transmute_immut_fetch", "query::state::tests::can_transmute_added", "query::state::tests::can_transmute_mut_fetch", "query::state::tests::can_transmute_changed", "query::state::tests::get_many_unchecked_manual_uniqueness", "query::state::tests::can_transmute_filtered_entity", "query::state::tests::cannot_get_data_not_in_original_query", "query::state::tests::can_transmute_entity_mut", "query::state::tests::transmute_from_dense_to_sparse", "query::state::tests::join", "query::state::tests::can_transmute_to_more_general", "query::state::tests::join_with_get", "query::state::tests::transmute_from_sparse_to_dense", "query::tests::any_query", "query::tests::has_query", "query::tests::query", "query::tests::multi_storage_query", "query::tests::many_entities", "query::tests::mut_to_immut_query_methods_have_immut_item", "query::tests::query_iter_combinations", "query::state::tests::cannot_transmute_to_include_data_not_in_original_query - should panic", "schedule::graph::graph_map::tests::node_order_preservation", "query::state::tests::cannot_transmute_changed_without_access - should panic", "query::state::tests::cannot_transmute_immut_to_mut - should panic", "query::tests::query_iter_combinations_sparse", "query::state::tests::right_world_get - should panic", "query::iter::tests::query_iter_sort_after_next - should panic", "query::state::tests::cannot_transmute_entity_ref - should panic", "query::state::tests::cannot_join_wrong_filter - should panic", "query::state::tests::cannot_transmute_option_to_immut - should panic", "query::state::tests::right_world_get_many_mut - should panic", "query::state::tests::cannot_join_wrong_fetch - should panic", "query::iter::tests::query_iter_sort_after_next_dense - should panic", "query::state::tests::right_world_get_many - should panic", "query::state::tests::transmute_with_different_world - should panic", "reflect::entity_commands::tests::insert_reflect_bundle_with_registry", "query::tests::self_conflicting_worldquery - should panic", "reflect::entity_commands::tests::insert_reflected_with_registry", "schedule::graph::graph_map::tests::strongly_connected_components", "query::tests::query_filtered_iter_combinations", "query::tests::derived_worldqueries", "schedule::condition::tests::distributive_run_if_compiles", "reflect::entity_commands::tests::remove_reflected", "reflect::entity_commands::tests::remove_reflected_bundle_with_registry", "reflect::entity_commands::tests::insert_reflected", "reflect::entity_commands::tests::remove_reflected_with_registry", "reflect::entity_commands::tests::insert_reflect_bundle", "reflect::entity_commands::tests::remove_reflected_bundle", "schedule::executor::simple::skip_automatic_sync_points", "schedule::set::tests::test_derive_schedule_label", "schedule::set::tests::test_derive_system_set", "schedule::schedule::tests::ambiguous_with_not_breaking_run_conditions", "schedule::executor::tests::invalid_condition_param_skips_system", "schedule::condition::tests::multiple_run_conditions_is_and_operation", "event::tests::test_event_mutator_iter_nth", "event::tests::test_event_reader_iter_nth", "schedule::schedule::tests::configure_set_on_existing_schedule", "schedule::schedule::tests::add_systems_to_non_existing_schedule", "schedule::schedule::tests::disable_auto_sync_points", "schedule::schedule::tests::add_systems_to_existing_schedule", "schedule::schedule::tests::configure_set_on_new_schedule", "schedule::schedule::tests::no_sync_edges::set_to_set_before", "schedule::schedule::tests::no_sync_edges::set_to_system_before", "schedule::schedule::tests::no_sync_edges::set_to_set_after", "schedule::executor::multi_threaded::tests::skipped_systems_notify_dependents", "schedule::condition::tests::multiple_run_conditions", "schedule::schedule::tests::no_sync_edges::set_to_system_after", "schedule::stepping::tests::continue_never_run", "schedule::executor::multi_threaded::tests::check_spawn_exclusive_system_task_miri", "schedule::stepping::tests::step_always_run", "schedule::schedule::tests::inserts_a_sync_point", "schedule::executor::tests::invalid_system_param_skips", "schedule::schedule::tests::adds_multiple_consecutive_syncs", "schedule::stepping::tests::multiple_calls_per_frame_step", "schedule::schedule::tests::no_sync_edges::system_to_system_before", "schedule::stepping::tests::waiting_never_run", "schedule::stepping::tests::step_duplicate_systems", "schedule::set::tests::test_schedule_label", "schedule::tests::conditions::mixed_conditions_and_change_detection", "schedule::stepping::tests::clear_schedule", "schedule::schedule::tests::no_sync_chain::only_chain_outside", "schedule::stepping::tests::unknown_schedule", "schedule::stepping::tests::waiting_breakpoint", "schedule::stepping::tests::waiting_always_run", "schedule::condition::tests::run_condition", "schedule::stepping::tests::disabled_breakpoint", "schedule::stepping::tests::clear_breakpoint", "schedule::stepping::tests::continue_always_run", "schedule::schedule::tests::no_sync_chain::chain_second", "schedule::condition::tests::run_condition_combinators", "schedule::schedule::tests::no_sync_chain::chain_first", "schedule::tests::schedule_build_errors::hierarchy_redundancy", "schedule::stepping::tests::step_breakpoint", "schedule::tests::conditions::run_exclusive_system_with_condition", "schedule::schedule::tests::no_sync_edges::system_to_system_after", "schedule::tests::stepping::simple_executor", "schedule::tests::schedule_build_errors::sets_have_order_but_intersect", "schedule::schedule::tests::no_sync_chain::chain_all", "schedule::stepping::tests::schedules", "schedule::tests::stepping::multi_threaded_executor", "schedule::tests::conditions::multiple_conditions_on_system", "schedule::tests::stepping::single_threaded_executor", "schedule::stepping::tests::disabled_always_run", "schedule::stepping::tests::remove_schedule", "schedule::tests::system_ambiguity::ambiguous_with_system", "schedule::tests::system_ambiguity::ambiguous_with_label", "schedule::tests::system_ambiguity::anonymous_set_name", "schedule::tests::system_ambiguity::components", "schedule::tests::system_ambiguity::before_and_after", "schedule::tests::schedule_build_errors::cross_dependency", "schedule::stepping::tests::step_run_if_false", "schedule::tests::schedule_build_errors::hierarchy_cycle", "schedule::stepping::tests::disabled_never_run", "schedule::stepping::tests::multiple_calls_per_frame_continue", "schedule::stepping::tests::clear_system", "schedule::tests::schedule_build_errors::ambiguity", "schedule::tests::system_ambiguity::resources", "schedule::tests::system_ambiguity::resource_mut_and_entity_ref", "schedule::tests::conditions::system_with_condition", "schedule::tests::system_ambiguity::resource_and_entity_mut", "schedule::stepping::tests::verify_cursor", "schedule::tests::system_ambiguity::shared_resource_mut_component", "schedule::stepping::tests::continue_step_continue_with_breakpoint", "schedule::tests::system_ambiguity::read_world", "schedule::tests::conditions::system_set_conditions_and_change_detection", "schedule::tests::schedule_build_errors::system_type_set_ambiguity", "schedule::tests::schedule_build_errors::configure_system_type_set - should panic", "schedule::tests::schedule_build_errors::dependency_loop - should panic", "schedule::tests::schedule_build_errors::hierarchy_loop - should panic", "schedule::schedule::tests::merges_sync_points_into_one", "schedule::tests::system_ambiguity::ignore_all_ambiguities", "schedule::stepping::tests::clear_schedule_then_set_behavior", "storage::blob_vec::tests::blob_vec", "schedule::stepping::tests::continue_breakpoint", "schedule::stepping::tests::set_behavior_then_clear_schedule", "storage::blob_vec::tests::aligned_zst", "schedule::tests::conditions::systems_with_distributive_condition", "schedule::stepping::tests::stepping_disabled", "schedule::tests::schedule_build_errors::dependency_cycle", "schedule::tests::conditions::system_conditions_and_change_detection", "storage::blob_vec::tests::blob_vec_drop_empty_capacity", "storage::blob_vec::tests::blob_vec_capacity_overflow - should panic", "query::tests::par_iter_mut_change_detection", "schedule::tests::conditions::multiple_conditions_on_system_sets", "system::builder::tests::dyn_builder", "storage::blob_vec::tests::blob_vec_zst_size_overflow - should panic", "storage::sparse_set::tests::sparse_set", "storage::sparse_set::tests::sparse_sets", "storage::blob_vec::tests::resize_test", "storage::blob_array::tests::make_sure_zst_components_get_dropped - should panic", "event::tests::test_event_cursor_par_read_mut", "storage::table::tests::table", "schedule::tests::system_execution::run_system", "schedule::tests::system_ambiguity::correct_ambiguities", "schedule::tests::system_execution::run_exclusive_system", "schedule::tests::system_ambiguity::nonsend", "system::builder::tests::custom_param_builder", "system::builder::tests::filtered_resource_mut_conflicts_read_with_res", "system::builder::tests::filtered_resource_conflicts_read_with_res", "schedule::stepping::tests::step_never_run", "schedule::tests::system_ambiguity::write_component_and_entity_ref", "schedule::tests::conditions::systems_nested_in_system_sets", "system::builder::tests::local_builder", "schedule::tests::system_ambiguity::events", "system::builder::tests::multi_param_builder", "system::builder::tests::multi_param_builder_inference", "system::builder::tests::filtered_resource_mut_conflicts_write_all_with_res - should panic", "system::builder::tests::filtered_resource_mut_conflicts_read_with_resmut - should panic", "schedule::tests::system_ambiguity::exclusive", "system::builder::tests::filtered_resource_conflicts_read_all_with_resmut - should panic", "system::builder::tests::query_builder", "system::builder::tests::filtered_resource_conflicts_read_with_resmut - should panic", "system::builder::tests::filtered_resource_mut_conflicts_write_with_resmut - should panic", "system::builder::tests::param_set_vec_builder", "schedule::tests::system_ambiguity::one_of_everything", "system::builder::tests::filtered_resource_mut_conflicts_write_with_res - should panic", "system::commands::tests::entity_commands_entry", "system::commands::tests::append", "schedule::tests::system_ordering::order_exclusive_systems", "system::commands::tests::remove_component_with_required_components", "schedule::tests::system_ordering::add_systems_correct_order", "system::builder::tests::query_builder_state", "schedule::tests::system_ambiguity::read_component_and_entity_mut", "system::commands::tests::commands", "system::builder::tests::vec_builder", "event::tests::test_event_cursor_par_read", "system::commands::tests::test_commands_are_send_and_sync", "system::commands::tests::insert_components", "system::builder::tests::param_set_builder", "system::exclusive_function_system::tests::into_system_type_id_consistency", "system::commands::tests::remove_resources", "system::function_system::tests::into_system_type_id_consistency", "schedule::tests::system_ambiguity::ignore_component_resource_ambiguities", "system::commands::tests::remove_components", "system::observer_system::tests::test_piped_observer_systems_no_input", "system::system::tests::command_processing", "system::commands::tests::remove_components_by_id", "system::observer_system::tests::test_piped_observer_systems_with_inputs", "system::system::tests::non_send_resources", "system::system::tests::run_system_once", "system::system::tests::run_system_once_invalid_params", "system::system::tests::run_two_systems", "system::system_name::tests::test_closure_system_name_regular_param", "system::system_name::tests::test_exclusive_closure_system_name_regular_param", "system::exclusive_system_param::tests::test_exclusive_system_params", "system::system_name::tests::test_system_name_exclusive_param", "system::system_param::tests::system_param_const_generics", "system::system_name::tests::test_system_name_regular_param", "system::system_param::tests::system_param_flexibility", "system::system_param::tests::system_param_generic_bounds", "system::system_param::tests::system_param_field_limit", "system::system_param::tests::system_param_invariant_lifetime", "system::system_param::tests::system_param_name_collision", "system::system_param::tests::system_param_phantom_data", "system::system_param::tests::system_param_private_fields", "system::system_param::tests::non_sync_local", "schedule::tests::system_ordering::order_systems", "system::system_param::tests::system_param_struct_variants", "system::system_param::tests::system_param_where_clause", "schedule::tests::system_ordering::add_systems_correct_order_nested", "schedule::tests::system_ambiguity::read_only", "system::system_registry::tests::cached_system_adapters", "system::system_param::tests::param_set_non_send_second", "system::system_registry::tests::cached_system_commands", "system::system_registry::tests::cached_system", "system::system_registry::tests::exclusive_system", "system::system_registry::tests::change_detection", "system::system_registry::tests::input_values", "system::system_registry::tests::local_variables", "system::system_registry::tests::output_values", "system::system_registry::tests::system_with_input_ref", "system::system_registry::tests::nested_systems", "system::system_param::tests::param_set_non_send_first", "system::system_registry::tests::system_with_input_mut", "system::system_registry::tests::run_system_invalid_params", "system::system_registry::tests::nested_systems_with_inputs", "system::tests::any_of_and_without", "system::tests::any_of_with_conflicting - should panic", "system::tests::any_of_has_no_filter_with - should panic", "system::tests::any_of_doesnt_remove_unrelated_filter_with", "system::tests::any_of_has_filter_with_when_both_have_it", "system::tests::any_of_with_and_without_common", "system::tests::any_of_with_empty_and_mut", "system::tests::any_of_with_entity_and_mut", "system::tests::assert_entity_ref_and_entity_mut_system_does_conflict - should panic", "system::tests::assert_entity_mut_system_does_conflict - should panic", "system::tests::any_of_with_mut_and_option - should panic", "system::tests::any_of_with_mut_and_ref - should panic", "system::tests::assert_system_does_not_conflict - should panic", "system::tests::assert_systems", "system::tests::any_of_with_ref_and_mut - should panic", "system::tests::any_of_working", "system::tests::assert_world_and_entity_mut_system_does_conflict - should panic", "system::tests::changed_trackers_or_conflict - should panic", "system::tests::conflicting_query_immut_system - should panic", "system::tests::conflicting_query_mut_system - should panic", "system::tests::can_have_16_parameters", "system::tests::conflicting_system_resources_multiple_mutable - should panic", "system::tests::conflicting_system_resources - should panic", "system::tests::get_system_conflicts", "system::tests::long_life_test", "system::tests::conflicting_system_resources_reverse_order - should panic", "system::tests::conflicting_query_with_query_set_system - should panic", "system::tests::immutable_mut_test", "system::tests::conflicting_query_sets_system - should panic", "system::tests::commands_param_set", "system::tests::disjoint_query_mut_system", "system::tests::disjoint_query_mut_read_component_system", "system::tests::local_system", "system::tests::convert_mut_to_immut", "system::tests::changed_resource_system", "system::tests::option_has_no_filter_with - should panic", "system::tests::nonconflicting_system_resources", "system::tests::into_iter_impl", "system::tests::non_send_system", "system::tests::or_expanded_nested_or_with_and_disjoint_without - should panic", "system::tests::option_doesnt_remove_unrelated_filter_with", "system::tests::non_send_option_system", "system::tests::or_expanded_nested_with_and_disjoint_nested_without - should panic", "system::tests::or_doesnt_remove_unrelated_filter_with", "system::tests::or_expanded_nested_with_and_disjoint_without - should panic", "system::tests::or_expanded_nested_with_and_common_nested_without", "system::tests::or_expanded_with_and_disjoint_nested_without - should panic", "system::tests::pipe_change_detection", "system::tests::or_has_filter_with", "system::tests::query_validates_world_id - should panic", "system::tests::or_has_no_filter_with - should panic", "system::tests::or_has_filter_with_when_both_have_it", "system::tests::query_is_empty", "system::tests::or_expanded_with_and_without_common", "system::tests::simple_system", "system::tests::or_with_without_and_compatible_with_without", "system::tests::or_expanded_nested_with_and_without_common", "system::tests::system_state_archetype_update", "system::tests::read_system_state", "system::tests::system_state_invalid_world - should panic", "system::tests::panic_inside_system - should panic", "system::tests::system_state_change_detection", "system::tests::simple_fallible_system", "system::tests::query_set_system", "system::tests::with_and_disjoint_or_empty_without - should panic", "system::tests::or_param_set_system", "system::tests::write_system_state", "system::tests::update_archetype_component_access_works", "tests::despawn_mixed_storage", "tests::changed_query", "tests::clear_entities", "tests::despawn_table_storage", "system::tests::test_combinator_clone", "tests::added_queries", "system::tests::removal_tracking", "tests::added_tracking", "tests::dynamic_required_components", "tests::empty_spawn", "tests::add_remove_components", "tests::bundle_derive", "tests::entity_ref_and_entity_ref_query_no_panic", "system::tests::world_collections_system", "tests::entity_mut_and_entity_mut_query_panic - should panic", "tests::entity_ref_and_mut_query_panic - should panic", "tests::entity_ref_and_entity_mut_query_panic - should panic", "tests::duplicate_components_panic - should panic", "tests::exact_size_query", "tests::filtered_query_access", "tests::insert_batch", "tests::generic_required_components", "tests::insert_overwrite_drop", "tests::changed_trackers", "tests::insert_batch_same_archetype", "tests::insert_or_spawn_batch_invalid", "tests::insert_batch_if_new", "tests::insert_overwrite_drop_sparse", "tests::insert_or_spawn_batch", "tests::multiple_worlds_same_query_for_each - should panic", "tests::changed_trackers_sparse", "query::tests::query_filtered_exactsizeiterator_len", "tests::multiple_worlds_same_query_get - should panic", "tests::mut_and_mut_query_panic - should panic", "tests::mut_and_entity_ref_query_panic - should panic", "tests::multiple_worlds_same_query_iter - should panic", "tests::mut_and_ref_query_panic - should panic", "tests::non_send_resource", "tests::non_send_resource_points_to_distinct_data", "tests::non_send_resource_drop_from_same_thread", "tests::query_all", "tests::non_send_resource_drop_from_different_thread - should panic", "tests::query_all_for_each", "tests::query_filter_with", "tests::non_send_resource_panic - should panic", "tests::query_filters_dont_collide_with_fetches", "tests::query_filter_with_sparse", "tests::par_for_each_sparse", "tests::par_for_each_dense", "tests::query_filter_with_for_each", "tests::query_filter_with_sparse_for_each", "tests::query_filter_without", "tests::query_missing_component", "tests::query_get", "tests::query_get_works_across_sparse_removal", "tests::query_optional_component_sparse", "tests::query_optional_component_sparse_no_match", "tests::query_optional_component_table", "tests::query_single_component_for_each", "tests::query_single_component", "tests::ref_and_mut_query_panic - should panic", "tests::query_sparse_component", "tests::random_access", "tests::remove", "tests::remove_missing", "tests::remove_bundle_and_his_required_components", "tests::remove_component_and_his_required_components", "tests::remove_tracking", "tests::remove_component_and_his_runtime_required_components", "tests::required_components", "tests::required_components_insert_existing_hooks", "tests::required_components_retain_keeps_required", "tests::required_components_inheritance_depth", "tests::required_components_spawn_nonexistent_hooks", "tests::reserve_and_spawn", "tests::resource", "tests::required_components_take_leaves_required", "tests::required_components_spawn_then_insert_no_overwrite", "tests::resource_scope", "tests::runtime_required_components_existing_archetype", "tests::runtime_required_components_fail_with_duplicate", "tests::runtime_required_components_deep_require_does_not_override_shallow_require", "tests::runtime_required_components_override_1", "tests::runtime_required_components", "tests::runtime_required_components_deep_require_does_not_override_shallow_require_deep_subtree_after_shallow", "tests::runtime_required_components_override_2", "tests::runtime_required_components_propagate_up", "tests::runtime_required_components_propagate_up_even_more", "tests::sparse_set_add_remove_many", "tests::stateful_query_handles_new_archetype", "world::command_queue::test::test_command_is_send", "tests::spawn_batch", "world::command_queue::test::test_command_queue_inner_drop_early", "tests::try_insert_batch_if_new", "tests::try_insert_batch", "world::command_queue::test::test_command_queue_inner", "world::command_queue::test::test_command_queue_inner_drop", "tests::take", "world::command_queue::test::test_command_queue_inner_panic_safe", "tests::test_is_archetypal_size_hints", "world::command_queue::test::test_command_queue_inner_nested_panic_safe", "world::entity_ref::tests::despawning_entity_updates_archetype_row", "world::entity_ref::tests::disjoint_access", "world::entity_ref::tests::despawning_entity_updates_table_row", "world::entity_ref::tests::entity_mut_except", "world::entity_ref::tests::adding_observer_updates_location", "world::entity_ref::tests::entity_mut_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_mut_get_by_id", "world::entity_ref::tests::entity_mut_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_mut_except_conflicts_with_other - should panic", "world::entity_ref::tests::archetype_modifications_trigger_flush", "world::entity_ref::tests::entity_mut_except_doesnt_conflict", "world::entity_ref::tests::entity_mut_remove_by_id", "world::entity_ref::tests::entity_mut_insert_by_id", "world::entity_ref::tests::entity_mut_world_scope_panic", "world::entity_ref::tests::command_ordering_is_correct", "world::entity_ref::tests::entity_mut_insert_bundle_by_id", "world::entity_ref::tests::entity_ref_except", "world::entity_ref::tests::entity_ref_except_conflicts_with_other - should panic", "world::entity_ref::tests::entity_ref_get_by_id_invalid_component_id", "world::entity_ref::tests::entity_ref_except_doesnt_conflict", "world::entity_ref::tests::entity_ref_except_conflicts_with_self - should panic", "world::entity_ref::tests::entity_ref_get_by_id", "world::entity_ref::tests::filtered_entity_mut_missing", "world::entity_ref::tests::filtered_entity_ref_missing", "world::entity_ref::tests::filtered_entity_mut_normal", "world::entity_ref::tests::filtered_entity_ref_normal", "world::entity_ref::tests::get_by_id_vec", "world::entity_ref::tests::get_by_id_array", "world::entity_ref::tests::get_components", "world::entity_ref::tests::get_mut_by_id_unchecked", "world::entity_ref::tests::get_mut_by_id_array", "world::entity_ref::tests::get_mut_by_id_vec", "world::entity_ref::tests::inserting_dense_updates_table_row", "world::entity_ref::tests::inserting_dense_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_entity", "world::entity_ref::tests::inserting_sparse_updates_archetype_row", "world::entity_ref::tests::mut_compatible_with_resource", "world::entity_ref::tests::mut_compatible_with_resource_mut", "world::entity_ref::tests::mut_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::location_on_despawned_entity_panics - should panic", "world::entity_ref::tests::mut_incompatible_with_read_only_component - should panic", "world::entity_ref::tests::mut_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::ref_compatible", "world::entity_ref::tests::mut_incompatible_with_read_only_query - should panic", "world::entity_ref::tests::ref_compatible_with_resource", "world::entity_ref::tests::ref_compatible_with_resource_mut", "world::entity_ref::tests::ref_incompatible_with_mutable_component - should panic", "world::entity_ref::tests::ref_incompatible_with_mutable_query - should panic", "world::entity_ref::tests::sorted_remove", "world::entity_ref::tests::removing_dense_updates_table_row", "world::entity_ref::tests::removing_sparse_updates_archetype_row", "world::entity_ref::tests::retain_nothing", "world::identifier::tests::world_ids_unique", "world::entity_ref::tests::retain_some_components", "world::identifier::tests::world_id_exclusive_system_param", "world::identifier::tests::world_id_system_param", "world::tests::custom_resource_with_layout", "world::tests::dynamic_resource", "world::tests::get_entity", "world::tests::get_entity_mut", "world::tests::get_resource_by_id", "world::tests::get_resource_mut_by_id", "world::tests::init_non_send_resource_does_not_overwrite", "world::reflect::tests::get_component_as_mut_reflect", "world::tests::init_resource_does_not_overwrite", "world::reflect::tests::get_component_as_reflect", "world::tests::iter_resources", "world::tests::iter_resources_mut", "world::tests::spawn_empty_bundle", "world::tests::iterate_entities_mut", "world::tests::panic_while_overwriting_component", "world::tests::iterate_entities", "world::tests::inspect_entity_components", "system::tests::get_many_is_ordered", "schedule::tests::system_execution::parallel_execution", "tests::table_add_remove_many", "crates/bevy_ecs/src/component.rs - component::ComponentTicks::set_changed (line 1773) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1027) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::MutUntyped<'w>::map_unchanged (line 1035) - compile", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 244) - compile", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 108) - compile fail", "crates/bevy_ecs/src/component.rs - component::Component (line 356) - compile fail", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity::PLACEHOLDER (line 254) - compile", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut (line 94)", "crates/bevy_ecs/src/../README.md - (line 188)", "crates/bevy_ecs/src/../README.md - (line 211)", "crates/bevy_ecs/src/../README.md - (line 236)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::EntityMapper (line 72)", "crates/bevy_ecs/src/observer/mod.rs - observer::Trigger<'w,E,B>::observer (line 87)", "crates/bevy_ecs/src/component.rs - component::ComponentMutability (line 440)", "crates/bevy_ecs/src/component.rs - component::ComponentIdFor (line 1789)", "crates/bevy_ecs/src/component.rs - component::Component (line 331)", "crates/bevy_ecs/src/component.rs - component::StorageType (line 478)", "crates/bevy_ecs/src/component.rs - component::Component (line 47)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Ref (line 721)", "crates/bevy_ecs/src/../README.md - (line 31)", "crates/bevy_ecs/src/../README.md - (line 164)", "crates/bevy_ecs/src/component.rs - component::Component (line 99)", "crates/bevy_ecs/src/component.rs - component::Component (line 366)", "crates/bevy_ecs/src/../README.md - (line 284)", "crates/bevy_ecs/src/component.rs - component::Component (line 297)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator (line 16)", "crates/bevy_ecs/src/bundle.rs - bundle::Bundle (line 96)", "crates/bevy_ecs/src/entity/clone_entities.rs - entity::clone_entities::EntityCloneBuilder (line 119)", "crates/bevy_ecs/src/entity/map_entities.rs - entity::map_entities::MapEntities (line 30)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 40)", "crates/bevy_ecs/src/../README.md - (line 75)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 124)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChanges (line 41)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 199)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 224)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 583)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 819)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 2321)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryCombinationIter (line 2307)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining_mut (line 101)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::remaining (line 64)", "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/component.rs - reflect::component (line 18)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 25)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 215) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nand (line 185) - compile fail", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::insert_reflect (line 34)", "crates/bevy_ecs/src/intern.rs - intern::Interned (line 22)", "crates/bevy_ecs/src/reflect/entity_commands.rs - reflect::entity_commands::ReflectCommandExt::remove_reflect (line 122)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 267) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::nor (line 237) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 413) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xnor (line 380) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::xor (line 432) - compile fail", "crates/bevy_ecs/src/label.rs - label::define_label (line 69)", "crates/bevy_ecs/src/event/reader.rs - event::reader::EventReader<'w,'s,E>::is_empty (line 88)", "crates/bevy_ecs/src/../README.md - (line 42)", "crates/bevy_ecs/src/../README.md - (line 52)", "crates/bevy_ecs/src/event/event_cursor.rs - event::event_cursor::EventCursor (line 32)", "crates/bevy_ecs/src/component.rs - component::Component (line 189)", "crates/bevy_ecs/src/component.rs - component::Components::resource_id (line 1526)", "crates/bevy_ecs/src/component.rs - component::Component (line 117)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 174)", "crates/bevy_ecs/src/change_detection.rs - change_detection::ResMut<'w,T>::map_unchanged (line 407)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder<'w,D,F>::or (line 207)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 142)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 160)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::is_empty (line 116)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 223)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 248)", "crates/bevy_ecs/src/query/builder.rs - query::builder::QueryBuilder (line 12)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::replace_if_neq (line 211)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut<'w,T>::map_unchanged (line 407)", "crates/bevy_ecs/src/component.rs - component::ComponentHooks (line 515)", "crates/bevy_ecs/src/component.rs - component::Components::component_id (line 1488)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1889)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 144)", "crates/bevy_ecs/src/../README.md - (line 251)", "crates/bevy_ecs/src/component.rs - component::Component (line 137)", "crates/bevy_ecs/src/change_detection.rs - change_detection::Mut (line 816)", "crates/bevy_ecs/src/../README.md - (line 333)", "crates/bevy_ecs/src/event/writer.rs - event::writer::EventWriter (line 12)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 211)", "crates/bevy_ecs/src/removal_detection.rs - removal_detection::RemovedComponents (line 129)", "crates/bevy_ecs/src/query/filter.rs - query::filter::QueryFilter (line 40)", "crates/bevy_ecs/src/change_detection.rs - change_detection::NonSendMut<'w,T>::map_unchanged (line 407)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 107)", "crates/bevy_ecs/src/event/collections.rs - event::collections::Events (line 41)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Or (line 344)", "crates/bevy_ecs/src/entity/mod.rs - entity::Entity (line 127)", "crates/bevy_ecs/src/../README.md - (line 92)", "crates/bevy_ecs/src/system/builder.rs - system::builder::SystemParamBuilder (line 21)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many (line 805)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 68)", "crates/bevy_ecs/src/component.rs - component::Component (line 159)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 254)", "crates/bevy_ecs/src/observer/mod.rs - observer::World::add_observer (line 395)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 107)", "crates/bevy_ecs/src/../README.md - (line 308)", "crates/bevy_ecs/src/event/mutator.rs - event::mutator::EventMutator<'w,'s,E>::par_read (line 68)", "crates/bevy_ecs/src/entity/clone_entities.rs - entity::clone_entities::EntityCloneBuilder (line 87)", "crates/bevy_ecs/src/query/filter.rs - query::filter::With (line 118)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::Has (line 1866)", "crates/bevy_ecs/src/component.rs - component::Component (line 253)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 192)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::reborrow (line 239)", "crates/bevy_ecs/src/component.rs - component::Component (line 215)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_by (line 1625)", "crates/bevy_ecs/src/../README.md - (line 123)", "crates/bevy_ecs/src/query/fetch.rs - query::fetch::QueryData (line 67)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Without (line 229)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_unstable (line 557)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Changed (line 844)", "crates/bevy_ecs/src/query/filter.rs - query::filter::Added (line 607)", "crates/bevy_ecs/src/change_detection.rs - change_detection::DetectChangesMut::set_if_neq (line 154)", "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 (line 59)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 102)", "crates/bevy_ecs/src/observer/runner.rs - observer::runner::Observer (line 130)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition (line 35)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::get_many_mut (line 877)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_read_only_system (line 284) - compile fail", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort (line 1395)", "crates/bevy_ecs/src/query/state.rs - query::state::QueryState<D,F>::par_iter_mut (line 1453)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::not (line 1041)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_by_key (line 1775)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 134)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and (line 83)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryManyIter<'w,'s,D,F,I>::sort_unstable (line 1536)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by (line 649)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed_to (line 1133)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or (line 289)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::condition_changed (line 1082)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::any_with_component (line 994)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::and_then (line 153)", "crates/bevy_ecs/src/system/adapter_system.rs - system::adapter_system::Adapt (line 14)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort (line 395)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands (line 50)", "crates/bevy_ecs/src/system/builder.rs - system::builder::QueryParamBuilder (line 226)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamBuilder (line 129)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::entity (line 411)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::Condition::or_else (line 336)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn (line 351)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_empty (line 281)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::queue (line 547)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_added (line 666)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations (line 533)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::spawn_batch (line 505)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::distributive_run_if (line 360)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_equals (line 585)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_combinations_mut (line 571)", "crates/bevy_ecs/src/query/iter.rs - query::iter::QueryIter<'w,'s,D,F>::sort_by_key (line 813)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::PipeSystem (line 325)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many (line 926) - compile", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs (line 251)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::many_mut (line 1037) - compile", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::run_once (line 508)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed (line 716)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::clone (line 1729)", "crates/bevy_ecs/src/system/combinator.rs - system::combinator::Combine (line 20)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::get_entity (line 464)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 230)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::retain (line 1647)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::init_resource (line 732)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists (line 546)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::remove_resource (line 787)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_changed_or_removed (line 831)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::insert_resource (line 759)", "crates/bevy_ecs/src/schedule/schedule.rs - schedule::schedule::Schedule (line 244)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 711) - compile fail", "crates/bevy_ecs/src/system/builder.rs - system::builder::LocalBuilder (line 508)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert_if (line 1233)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::reborrow (line 431)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if (line 1408)", "crates/bevy_ecs/src/schedule/config.rs - schedule::config::IntoSystemConfigs::run_if (line 393)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_changed (line 770)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2030) - compile fail", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::on_event (line 950)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert_if_new_and (line 1455)", "crates/bevy_ecs/src/system/builder.rs - system::builder::ParamSetBuilder (line 339)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 722)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::clone_with (line 1758)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem (line 164)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_exists_and_equals (line 623)", "crates/bevy_ecs/src/system/system_name.rs - system::system_name::SystemName (line 17)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::queue (line 1624)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::StaticSystemParam (line 2006)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemParamFunction (line 901)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::register_system (line 848)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::despawn (line 1592)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommand (line 1031)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::insert (line 1178)", "crates/bevy_ecs/src/schedule/condition.rs - schedule::condition::common_conditions::resource_removed (line 898)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 51)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove (line 1504)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::Commands<'w,'s>::run_schedule (line 987)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 281)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 180)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::id (line 1110)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::try_insert (line 1360)", "crates/bevy_ecs/src/system/commands/parallel_scope.rs - system::commands::parallel_scope::ParallelCommands (line 27)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::entry (line 1140)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 131)", "crates/bevy_ecs/src/system/mod.rs - system::IntoSystem::map (line 201)", "crates/bevy_ecs/src/system/commands/mod.rs - system::commands::EntityCommands<'a>::remove_with_requires (line 1546)", "crates/bevy_ecs/src/system/mod.rs - system::assert_is_system (line 251)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 209)", "crates/bevy_ecs/src/system/function_system.rs - system::function_system::SystemState (line 314)", "crates/bevy_ecs/src/system/input.rs - system::input::InMut (line 157)", "crates/bevy_ecs/src/system/input.rs - system::input::InRef (line 106)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 234)", "crates/bevy_ecs/src/system/mod.rs - system (line 13)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_inner (line 1585)", "crates/bevy_ecs/src/system/input.rs - system::input::In (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single (line 1146)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 224)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 54)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 115)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 308)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get (line 858)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_inner (line 1542)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 157)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::is_empty (line 1264)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::par_iter_mut (line 821)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many_mut (line 658)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter (line 462)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::contains (line 1299)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1064)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single_mut (line 1193)", "crates/bevy_ecs/src/world/mod.rs - world::Command (line 75)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::single (line 1118)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_mut (line 979)", "crates/bevy_ecs/src/system/mod.rs - system (line 56)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 634)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_mut (line 500)", "crates/bevy_ecs/src/system/query.rs - system::query::Query (line 95)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::get_single_mut (line 1223)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::iter_many (line 604)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 214)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 235)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 231)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 136)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 167)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 147)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 599)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::join (line 1430)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef (line 28)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 193)", "crates/bevy_ecs/src/system/query.rs - system::query::Query<'w,'s,D,F>::transmute_lens (line 1342)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 663)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::SystemParam (line 85)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 231)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::DynSystemParam (line 2149)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 185)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 267)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Resource (line 682)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system_with_input (line 302)", "crates/bevy_ecs/src/system/system_registry.rs - system::system_registry::World::run_system (line 255)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 643)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Local (line 1041)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 300)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::ParamSet (line 570)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell<'w>::world_mut (line 130) - compile", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 218)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 688)", "crates/bevy_ecs/src/world/deferred_world.rs - world::deferred_world::DeferredWorld<'w>::entity_mut (line 168)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityRef<'w>::get_by_id (line 209)", "crates/bevy_ecs/src/system/system.rs - system::system::RunSystemOnce (line 280)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut<'w>::get_mut_by_id (line 712)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::insert_entry (line 2182)", "crates/bevy_ecs/src/world/unsafe_world_cell.rs - world::unsafe_world_cell::UnsafeWorldCell (line 51)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityMut (line 2742)", "crates/bevy_ecs/src/system/system_param.rs - system::system_param::Deferred (line 1172)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::world_scope (line 1979)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 63)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::take (line 2345)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::and_modify (line 2154)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::FilteredEntityRef (line 2471)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityMut (line 373)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::insert (line 2322)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert_with (line 2241)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 24)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_default (line 2267)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::EntityWorldMut<'w>::entry (line 2048)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get (line 2300)", "crates/bevy_ecs/src/world/mod.rs - world::World::clear_trackers (line 1558)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 305)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_mut (line 1161)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::Entry<'w,'a,T>::or_insert (line 2212)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::VacantEntry<'w,'a,T>::insert (line 2441)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 765)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::get_mut (line 2376)", "crates/bevy_ecs/src/world/mod.rs - world::World::component_id (line 561)", "crates/bevy_ecs/src/world/entity_ref.rs - world::entity_ref::OccupiedEntry<'w,'a,T>::into_mut (line 2409)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_mut (line 1459)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 623)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic_mut (line 1197)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities (line 999)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_insert_with (line 2189)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 345)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 855)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResources (line 96)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 682)", "crates/bevy_ecs/src/world/mod.rs - world::World::despawn (line 1494)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities (line 864)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 744)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 661)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_from_set_mut (line 1234)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 811)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_many_entities_dynamic (line 1030)", "crates/bevy_ecs/src/world/mod.rs - world::World::get (line 1438)", "crates/bevy_ecs/src/world/mod.rs - world::World::get_resource_or_init (line 2241)", "crates/bevy_ecs/src/world/filtered_resource.rs - world::filtered_resource::FilteredResourcesMut (line 256)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity (line 640)", "crates/bevy_ecs/src/world/mod.rs - world::World::insert_or_spawn_batch (line 2393)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components (line 320)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_empty (line 1273)", "crates/bevy_ecs/src/world/mod.rs - world::World::entity_mut (line 788)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query (line 1679)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components_with (line 476)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1588)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 889)", "crates/bevy_ecs/src/world/mod.rs - world::World::many_entities_mut (line 900)", "crates/bevy_ecs/src/world/reflect.rs - world::reflect::World::get_reflect (line 30)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn (line 1307)", "crates/bevy_ecs/src/world/mod.rs - world::World::query_filtered (line 1655)", "crates/bevy_ecs/src/world/mod.rs - world::World::query (line 1624)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query (line 1707)", "crates/bevy_ecs/src/world/mod.rs - world::World::resource_scope (line 2861)", "crates/bevy_ecs/src/world/mod.rs - world::World::spawn_batch (line 1406)", "crates/bevy_ecs/src/world/mod.rs - world::World::register_required_components_with (line 368)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_register_required_components (line 423)", "crates/bevy_ecs/src/world/mod.rs - world::World::try_query_filtered (line 1730)" ]
[]
[]
[]
auto_2025-06-08