bevy/examples/app
krunchington 70902413b2
Update log_layers_ecs example for children macro (#18293)
# Objective

Contributes to #18238 
Updates the `log_layers_ecs`, example to use the `children!` macro.

Note that I did not use a macro, nor `Children::spawn` for the outer
layer. Since the `EventReader` is borrowed mutably, any `.map` I did on
`events.read()` was going to have the reference outlive the function
body. I believe this scope of change is correct for the PR.

## Solution

Updates examples to use the Improved Spawning API merged in
https://github.com/bevyengine/bevy/pull/17521

## Testing

- Did you test these changes? If so, how?
- Opened the examples before and after and verified the same behavior
was observed. I did this on Ubuntu 24.04.2 LTS using `--features
wayland`.
- Are there any parts that need more testing?
- Other OS's and features can't hurt, but this is such a small change it
shouldn't be a problem.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
  - Run the examples yourself with and without these changes.
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
  - see above

---

## Showcase

n/a

## Migration Guide

n/a

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-06-30 23:01:44 +00:00
..
custom_loop.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
drag_and_drop.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
empty_defaults.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
empty.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
headless_renderer.rs Ugrade to wgpu version 25.0 (#19563) 2025-06-26 19:41:47 +00:00
headless.rs Fix compile errors on headless example (#18497) 2025-03-23 21:24:20 +00:00
log_layers_ecs.rs Update log_layers_ecs example for children macro (#18293) 2025-06-30 23:01:44 +00:00
log_layers.rs Revert "bevy_log: refactor how log layers are wired together (#19248)" (#19705) 2025-06-17 20:41:30 +00:00
logs.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
no_renderer.rs Add configuration for async pipeline creation on RenderPlugin (#11847) 2024-02-16 13:35:47 +00:00
plugin_group.rs Remove second generic from .add_before, .add_after (#14285) 2024-07-15 15:58:14 +00:00
plugin.rs Rename Timer::finished and Timer::paused to is_finished and is_paused (#19386) 2025-05-27 22:24:18 +00:00
return_after_run.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
thread_pool_resources.rs Break CorePlugin into TaskPoolPlugin, TypeRegistrationPlugin, FrameCountPlugin. (#7083) 2023-01-05 11:42:35 +00:00
without_winit.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00