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::{Deferr...
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, R...
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 poss...
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_m...
[]
[]
[]
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(&...
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( ...
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) ```...
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 l...
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:...
[]
[]
[]
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 `...
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()); - ...
`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 `pus...
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_builde...
[]
[]
[]
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 { + ty...
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").u...
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 ...
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 argumen...
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", "attribu...
[]
[]
[]
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, ReflectDeserializ...
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...
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: G...
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 thi...
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::sho...
[]
[]
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 whe...
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)]); } + #[tes...
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...
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_r...
[]
[]
[]
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", f...
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::Reflect...
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 `Gioos...
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_de...
[]
[]
[]
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}, ...
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...
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 wrappe...
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::test...
[ "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", "...
[]
[]
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 observ...
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: usiz...
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 { /* ... */ }; ...
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_mu...
[]
[]
[]
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...
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. ///...
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`...
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 `Fixe...
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_sa...
[]
[]
[]
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, PartialRefl...
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::<...
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 { ...
@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_functio...
[]
[]
[]
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 av...
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_...
`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...
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::...
[]
[]
[]
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 sup...
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 + ...
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_...
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 `QueryStat...
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_o...
[]
[]
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.o...
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 ...
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...
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 inf...
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_reflec...
[]
[]
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(), } } + + /// Wi...
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)] + ...
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; ...
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...
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...
[]
[]
[]
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!...
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)] + #[co...
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`...
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_d...
[]
[]
[]
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, TaskPoolPl...
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(); - ...
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 displayi...
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 { ), }, d...
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_side...
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]...
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_aa...
[]
[]
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 sh...
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]>>, + ...
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. ...
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 t...
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, ...
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...
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 { na...
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_...
[]
[]
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] #visibilit...
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: World...
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 ...
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_e...
[]
[]
[]
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; ...
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;...
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, s...
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:...
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, ToTok...
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: Wor...
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 stat...
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_e...
[]
[]
[]
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, UniformComp...
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::W...
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_mu...
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...
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...
[]
[]
[]
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<(), Map...
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(t...
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...
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 statem...
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::test...
[]
[]
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> { + ...
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() { + ...
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 `...
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::re...
[]
[]
[]
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, Boxe...
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::Com...
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 perfor...
> 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 th...
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...
[ "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_se...
[]
[]
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" qu...
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...
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, From...
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 ...
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:...
[]
[]
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:...
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...
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 assoc...
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_gene...
[]
[]
[]
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...
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)> + '_ { ...
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) ...
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 cl...
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", "enti...
[]
[]
[]
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, DetectC...
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}; ...
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`. ...
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/p...
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", "syste...
[]
[]
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, Res...
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::{M...
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 a...
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 ...
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_...
[]
[]
[]
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: ( comp...
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 ...
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 ...
> 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 resou...
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:...
[]
[]
[]
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> { ...
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...
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...
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 th...
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/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]...
[ "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, I...
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...
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 f...
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, ma...
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: Rea...
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] + ...
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...
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_...
[]
[]
[]
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: ...
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 ...
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#L15...
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...
[]
[]
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 + ...
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<...
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`, b...
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", "...
[]
[]
[]
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 mus...
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....
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 Co...
+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 enti...
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", "...
[]
[]
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...
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 ...
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 enti...
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_maint...
[]
[]
[]
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...
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() {...
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...
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_compone...
[]
[]
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,...
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>>, ...
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 a...
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 ill...
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::...
[]
[]
[]
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, ) { ...
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: ...
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 ...
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...
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_deri...
[]
[]
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}; us...
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 s...
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 ...
@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/be...
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", "hierarc...
[]
[]
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, w...
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_ty...
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...
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_desp...
[]
[]
[]
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 = u...
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")] + s...
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_ent...
[]
[]
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_s...
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::{ + ...
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(AppS...
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_...
[]
[]
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_uniqu...
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 + ///...
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 { ...
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_un...
[]
[]
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, OnEnt...
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::...
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. ## Wha...
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 solut...
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...
[]
[]
[]
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 fo...
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::{Res...
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...
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 ...
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",...
[]
[]
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...
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::DynEntityMapp...
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. ...
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::m...
[]
[]
[]
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_inf...
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, }; ...
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_d...
[]
[]
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 { + ( $k...
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...
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::sho...
[]
[]
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 { } } } + +/// ...
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, En...
`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 EntityMapp...
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 ...
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_builde...
[]
[]
[]
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/b...
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 - ...
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_w...
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_...
[]
[]
[]
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 betwe...
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...
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 con...
[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 righ...
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::aabb...
[]
[]
[]
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...
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 { + ...
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 ...
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::...
[]
[]
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 { ...
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::*; ...
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)`. ...
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_t...
[]
[]
[]
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_util...
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) /// #[...
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...
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_...
[]
[]
[]
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::Int...
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_even...
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#issuecomme...
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_...
[]
[]
[]
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 @@ symph...
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-...
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_...
[]
[]
[]
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...
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 Ou...
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: "Mac...
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::Text...
[]
[]
[]
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...
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; + ...
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 tri...
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", "...
[]
[]
[]
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>( ...
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>) { ...
`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 mor...
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::c...
[]
[]
[]
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; ...
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.re...
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 i...
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_...
[]
[]
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); ...
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(); + ...
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...
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 @C...
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_reflec...
[]
[]
[]
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>( - &'...
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, - ...
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_...
[]
[]
[]
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 sy...
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_...
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...
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 separat...
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", "bun...
[]
[]
[]
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 [`Compone...
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 descripto...
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 Part...
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_res...
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_desp...
[]
[]
[]
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.i...
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::<Sp...
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 ...
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_...
[]
[]
[]
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>, { - ...
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);...
`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. Thi...
(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_...
[]
[]
[]
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...
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 wo...
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` ## W...
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:...
[]
[]
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) { ...
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); } + + //...
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(); } #[deri...
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...
[]
[]
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.ge...
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) ...
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_d...
[]
[]
[]
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_met...
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)) } } + +#...
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 matche...
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 expe...
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_desp...
[]
[]
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 [`Tetrahedro...
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))...
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 @NthTen...
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::aabb...
[]
[]
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, bu...
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}, }; ...
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...
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_mu...
[]
[]
[]
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 life...
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); + + #...
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. ...
@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 ...
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_reflec...
[]
[]
[]
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...
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...
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: "...
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", "geome...
[]
[]
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 //...
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::{AssetPl...
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: "", ba...
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 ...
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...
[]
[]
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(s...
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_uti...
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-s...
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::Text...
[]
[]
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_r...
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 =...
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 ove...
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_scen...
[]
[]
[]
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::I...
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...
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 d...
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_...
[]
[]
[]
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...
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 th...
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 ev...
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 t...
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::aabb...
[]
[]
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() ...
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 + #...
`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#)...
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", ...
[]
[]
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 +/// duri...
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 t...
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 ...
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_ti...
[]
[]
[]
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....
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_...
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 a...
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...
[]
[]
[]
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.o...
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...
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...
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 inf...
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::...
[]
[]
[]
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 con...
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::{ ...
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 prim...
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 missunderstoo...
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::aabb...
[]
[]
[]
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 ver...
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; } + +#[cf...
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 "rota...
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", ...
[]
[]
[]
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::...
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; + ...
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 beha...
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 i...
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_resol...
[]
[]
[]
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 deterministi...
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); ...
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...
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::t...
[]
[]
[]
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 value...
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::fr...
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 n...
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:...
[]
[]
[]
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 visib...
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_pare...
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 refr...
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.. ? ...
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_s...
[]
[]
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::E...
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::P...
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 ...
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_differen...
[]
[]
[]
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 ...
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::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#dif...
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::aabb...
[]
[]
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...
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] { - l...
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: "6...
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...
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_resol...
[]
[]
[]
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<Compone...
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 functio...
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...
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 r...
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_wi...
[]
[]
[]
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> { ...
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 { + u...
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_f...
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(...
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_animat...
[]
[]
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_res...
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...
`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 !wor...
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_mu...
[]
[]
[]
auto_2025-06-08