bevy/crates/bevy_ecs/src
Carter Anderson 2e653e5774 Fix spawning empty bundles (#6425)
# Objective

Alternative to #6424 
Fixes #6226

Fixes spawning empty bundles

## Solution

Add `BundleComponentStatus` trait and implement it for `AddBundle` and a new `SpawnBundleStatus` type (which always returns an Added status). `write_components` is now generic on `BundleComponentStatus` instead of taking `AddBundle` directly. This means BundleSpawner can now avoid needing AddBundle from the Empty archetype, which means BundleSpawner no longer needs a reference to the original archetype.

In theory this cuts down on the work done in `write_components` when spawning, but I'm seeing no change in the spawn benchmarks.
2022-11-03 22:50:41 +00:00
..
entity [Fixes #6059] `Entity`'s “ID” should be named “index” instead (#6107) 2022-11-02 15:19:50 +00:00
query Replace WorldQueryGats trait with actual gats (#6319) 2022-11-03 16:33:05 +00:00
schedule fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
storage [Fixes #6059] `Entity`'s “ID” should be named “index” instead (#6107) 2022-11-02 15:19:50 +00:00
system Replace WorldQueryGats trait with actual gats (#6319) 2022-11-03 16:33:05 +00:00
world Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
archetype.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
bundle.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
change_detection.rs Implement IntoIterator for ECS wrapper types. (#5096) 2022-10-24 21:01:08 +00:00
component.rs Fix CI issues arising from use of Rust 1.64 (#6067) 2022-09-22 16:56:43 +00:00
event.rs Optimize use statement (#5992) 2022-09-15 17:05:09 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
reflect.rs Enable Constructing ReflectComponent/Resource (#6257) 2022-10-17 14:01:50 +00:00