pub fn add_stage<S: Stage>(&mut self, label: impl StageLabel, stage: S) -> &mut Self {
        let label: Box<dyn StageLabel> = Box::new(label);
        self.stage_order.push(label.clone());
        let prev = self.stages.insert(label.clone(), Box::new(stage));
        if prev.is_some() {
            panic!("Stage already exists: {:?}.", label);
        }
        self
    }
/// Adds the given `stage` at the last position of the schedule.
///
/// # Example
///
/// ```
/// # use bevy_ecs::prelude::*;
/// #
/// # let mut schedule = Schedule::default();
/// schedule.add_stage("my_stage", SystemStage::parallel());
/// ```
Adds the given `stage` at the last position of the schedule.
Adds the given ` stage ` at the last position of the schedule .
pub fn add_stage<S: Stage>(&mut self, label: impl StageLabel, stage: S) -> &mut Self {
        let label: Box<dyn StageLabel> = Box::new(label);
        self.stage_order.push(label.clone());
        let prev = self.stages.insert(label.clone(), Box::new(stage));
        if prev.is_some() {
            panic!("Stage already exists: {:?}.", label);
        }
        self
    }
pub fn add_stage < S : Stage > ( & mut self , label : impl StageLabel , stage : S ) -> & mut Self { let label : Box < dyn StageLabel > = Box :: new ( label ) ; self . stage_order . push ( label . clone ( ) ) ; let prev = self . stages . insert ( label . clone ( ) , Box :: new ( stage ) ) ; if prev . is_some ( ) { panic ! ( " " label ) ; } self }
Adds the given `stage` at the last position of the schedule.
Adds the given ` stage ` at the last position of the schedule .
&mut self
label
impl StageLabel
stage
S
&mut self
label
impl StageLabel
stage
S
example
None
use bevy_ecs::prelude::*;
None
let mut schedule = schedule::default();
schedule.add_stage("my_stage", SystemStage::parallel());
```
schedule . add_stage ( " my_stage " SystemStage :: parallel () ) ; ` ` `