bevy/crates/bevy_ecs/src/world
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
..
command_queue.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
deferred_world.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
entity_fetch.rs Fix regression on the get/get_mut/get_not_found (#19505) 2025-06-06 21:04:27 +00:00
entity_ref.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
error.rs FilteredResource returns a Result instead of a simple Option (#18265) 2025-03-17 18:54:13 +00:00
filtered_resource.rs Only get valid component ids (#19510) 2025-06-06 20:59:57 +00:00
identifier.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
mod.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
reflect.rs Only get valid component ids (#19510) 2025-06-06 20:59:57 +00:00
spawn_batch.rs Encapsulate cfg(feature = "track_location") in a type. (#17602) 2025-02-10 21:21:20 +00:00
unsafe_world_cell.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00