bevy/crates/bevy_render/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
..
camera Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
color Fix clippy clamp warning (#7697) 2023-02-16 02:13:25 +00:00
mesh Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
primitives Derive Copy for Aabb (#7401) 2023-01-30 18:27:58 +00:00
render_graph Use position in code when possible (#7621) 2023-02-11 08:28:14 +00:00
render_phase implement TypeUuid for primitives and fix multiple-parameter generics having the same TypeUuid (#6633) 2023-02-16 17:09:44 +00:00
render_resource Only execute #define if current scope is accepting lines (#7798) 2023-02-24 02:44:28 +00:00
renderer Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
texture Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
view Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
extract_component.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
extract_param.rs Migrate engine to Schedule v3 (#7267) 2023-02-06 02:04:50 +00:00
extract_resource.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
globals.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
lib.rs Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
pipelined_rendering.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
render_asset.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
settings.rs add OpenGL and DX11 backends (#7481) 2023-02-04 23:20:20 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00