bevy/crates/bevy_ecs/src
Torne Wuff b1afe2dcca Make System responsible for updating its own archetypes (#4115)
# Objective

- Make it possible to use `System`s outside of the scheduler/executor without having to define logic to track new archetypes and call `System::add_archetype()` for each.

## Solution

- Replace `System::add_archetype(&Archetype)` with `System::update_archetypes(&World)`, making systems responsible for tracking their own most recent archetype generation the way that `SystemState` already does.

This has minimal (or simplifying) effect on most of the code with the exception of `FunctionSystem`, which must now track the latest `ArchetypeGeneration` it saw instead of relying on the executor to do it.

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-04-07 20:50:43 +00:00
..
entity unsafeify World::entities_mut (#4093) 2022-03-30 23:52:45 +00:00
query Add more FromWorld implementations (#3945) 2022-04-05 20:04:34 +00:00
schedule Make System responsible for updating its own archetypes (#4115) 2022-04-07 20:50:43 +00:00
storage Proper prehashing (#3963) 2022-02-18 03:26:01 +00:00
system Make System responsible for updating its own archetypes (#4115) 2022-04-07 20:50:43 +00:00
world REMOVE unsound lifetime annotations on EntityMut (#4096) 2022-04-04 21:33:33 +00:00
archetype.rs Change Cow<[ComponentId]> to Box<[ComponentId]> (#4185) 2022-03-19 04:14:27 +00:00
bundle.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
change_detection.rs add missing into_inner to ReflectMut (#3841) 2022-02-04 03:37:45 +00:00
component.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
event.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
lib.rs Some small changes related to run criteria piping (#3923) 2022-04-07 19:08:08 +00:00
reflect.rs Add FromReflect trait to convert dynamic types to concrete types (#1395) 2021-12-26 18:49:01 +00:00