bevy/examples/ecs
Alice Cecile 6ddd0f16a8
Component lifecycle reorganization and documentation (#19543)
# Objective

I set out with one simple goal: clearly document the differences between
each of the component lifecycle events via module docs.

Unfortunately, no such module existed: the various lifecycle code was
scattered to the wind.
Without a unified module, it's very hard to discover the related types,
and there's nowhere good to put my shiny new documentation.

## Solution

1. Unify the assorted types into a single
`bevy_ecs::component_lifecycle` module.
2. Write docs.
3. Write a migration guide.

## Testing

Thanks CI!

## Follow-up

1. The lifecycle event names are pretty confusing, especially
`OnReplace`. We should consider renaming those. No bikeshedding in my PR
though!
2. Observers need real module docs too :(
3. Any additional functional changes should be done elsewhere; this is a
simple docs and re-org PR.

---------

Co-authored-by: theotherphil <phil.j.ellison@gmail.com>
2025-06-10 00:59:16 +00:00
..
change_detection.rs Rename track_change_detection flag to track_location (#17075) 2025-01-01 18:43:47 +00:00
component_hooks.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
custom_query_param.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
custom_schedule.rs
dynamic.rs Remove deprecated component_reads_and_writes (#16348) 2025-03-04 08:22:29 +00:00
ecs_guide.rs Adopt consistent FooSystems naming convention for system sets (#18900) 2025-05-06 15:18:03 +00:00
entity_disabling.rs Remove entity placeholder from observers (#19440) 2025-06-09 19:37:56 +00:00
error_handling.rs Per world error handler (#18810) 2025-05-19 01:35:07 +00:00
event.rs Rename Timer::finished and Timer::paused to is_finished and is_paused (#19386) 2025-05-27 22:24:18 +00:00
fallible_params.rs Per world error handler (#18810) 2025-05-19 01:35:07 +00:00
fixed_timestep.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
generic_system.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
hierarchy.rs Add an example teaching users about custom relationships (#17443) 2025-01-20 23:17:38 +00:00
hotpatching_systems.rs Hot patching systems with subsecond (#19309) 2025-06-03 21:12:38 +00:00
immutable_components.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
iter_combinations.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
nondeterministic_system_order.rs Fix non-functional nondeterministic_system_order example (#10719) 2023-11-25 21:13:35 +00:00
observer_propagation.rs Remove entity placeholder from observers (#19440) 2025-06-09 19:37:56 +00:00
observers.rs Remove entity placeholder from observers (#19440) 2025-06-09 19:37:56 +00:00
one_shot_systems.rs Rename JustifyText to Justify (#19522) 2025-06-09 19:59:48 +00:00
parallel_query.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
relationships.rs Change with_related to work with a Bundle and added with_relationships method (#18699) 2025-04-09 02:34:49 +00:00
removal_detection.rs Remove entity placeholder from observers (#19440) 2025-06-09 19:37:56 +00:00
run_conditions.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
send_and_receive_events.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
startup_system.rs
state_scoped.rs Rename Timer::finished and Timer::paused to is_finished and is_paused (#19386) 2025-05-27 22:24:18 +00:00
system_closure.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
system_param.rs
system_piping.rs Fix a few typos (#17292) 2025-01-10 22:48:30 +00:00
system_stepping.rs