bevy/crates/bevy_dev_tools/src
MiniaczQ 58a0c1336c
Move utilities from examples to bevy_state and add concept of state-scoped entities (#13649)
# Objective

Move `StateScoped` and `log_transitions` to `bevy_state`, since they're
useful for end users.

Addresses #12852, although not in the way the issue had in mind.

## Solution

- Added `bevy_hierarchy` to default features of `bevy_state`.
- Move `log_transitions` to `transitions` module.
- Move `StateScoped` to `state_scoped` module, gated behind
`bevy_hierarchy` feature.
- Refreshed implementation.
- Added `enable_state_coped_entities<S: States>()` to add required
machinery to `App` for clearing state-scoped entities.


## Changelog

- Added `log_transitions` for displaying state transitions.
- Added `StateScoped` for binding entity lifetime to state and app
`enable_state_coped_entities` to register cleaning behavior.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: François Mockers <francois.mockers@vleue.com>
2024-06-04 11:44:34 +00:00
..
ci_testing Refactor ci_testing and separate it from DevToolsPlugin (#13513) 2024-05-26 22:32:36 +00:00
ui_debug_overlay #12502 Remove limit on RenderLayers. (#13317) 2024-05-16 16:15:47 +00:00
fps_overlay.rs Always spawn fps_overlay on top of everything (#12586) 2024-03-20 13:11:48 +00:00
lib.rs Move utilities from examples to bevy_state and add concept of state-scoped entities (#13649) 2024-06-04 11:44:34 +00:00
states.rs Move utilities from examples to bevy_state and add concept of state-scoped entities (#13649) 2024-06-04 11:44:34 +00:00