bevy/crates/bevy_core_pipeline/src
JoJoJet b8263b55fb Support system.in_schedule() and system.on_startup() (#7790)
# Objective

Support the following syntax for adding systems:

```rust
App::new()
    .add_system(setup.on_startup())
    .add_systems((
        show_menu.in_schedule(OnEnter(GameState::Paused)),
        menu_ssytem.in_set(OnUpdate(GameState::Paused)),
        hide_menu.in_schedule(OnExit(GameState::Paused)),
    ))
```

## Solution

Add the traits `IntoSystemAppConfig{s}`, which provide the extension methods necessary for configuring which schedule a system belongs to. These extension methods return `IntoSystemAppConfig{s}`, which `App::add_system{s}` uses to choose which schedule to add systems to.

---

## Changelog

+ Added the extension methods `in_schedule(label)` and  `on_startup()` for configuring the schedule a system belongs to.

## Future Work

* Replace all uses of `add_startup_system` in the engine.
* Deprecate this method
2023-02-24 18:33:55 +00:00
..
bloom Add push contant config to layout (#7681) 2023-02-17 06:20:16 +00:00
core_2d Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
core_3d Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
fullscreen_vertex_shader separate tonemapping and upscaling passes (#3425) 2022-10-26 20:13:59 +00:00
fxaa Add push contant config to layout (#7681) 2023-02-17 06:20:16 +00:00
prepass bevy_core_pipeline: Fix prepass sort orders (#7539) 2023-02-07 11:31:35 +00:00
tonemapping Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
upscaling Add push contant config to layout (#7681) 2023-02-17 06:20:16 +00:00
clear_color.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
lib.rs Add depth and normal prepass (#6284) 2023-01-19 22:11:13 +00:00