-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
'enter' stage not called in some cases #1117
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Milestone
Description
Bevy version
bevy 0.4.0
Operating system & version
Windows 10
What you did
The following code allow to reproduce the issue. If I uncomment the add_stage_before line, the enter_system is not called anymore.
use bevy::prelude::*;
#[derive(Clone)]
pub enum AppState {
Loading,
}
fn main() {
App::build()
.add_plugins(DefaultPlugins)
.add_resource(State::new(AppState::Loading))
// uncomment the next line and 'enter_system' is not called
// .add_stage_before(stage::UPDATE, "STAGE_1", StateStage::<AppState>::default())
.add_stage_after(stage::UPDATE, "STAGE_2", StateStage::<AppState>::default()
.with_enter_stage(
AppState::Loading,
SystemStage::parallel()
.with_system(enter_system.system()),
)
.with_update_stage(
AppState::Loading,
SystemStage::parallel()
.with_system(update_system.system()),
))
.run();
}
pub fn enter_system() {
println!("enter_system");
}
pub fn update_system() {
println!("update_system");
}What you expected to happen
The 'enter' should be called.
What actually happened
The 'enter' is not called.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior