mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Don't auto insert on the extract schedule (#11669)
# Objective - In #9822 I forgot to disable auto sync points on the Extract Schedule. We want to do this because the Commands on the Extract Schedule should be applied on the render thread.
This commit is contained in:
parent
c55a5ba40b
commit
a919cb0a17
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,8 @@ pub mod prelude {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use bevy_ecs::schedule::ScheduleBuildSettings;
|
||||||
|
use bevy_utils::prelude::default;
|
||||||
pub use extract_param::Extract;
|
pub use extract_param::Extract;
|
||||||
|
|
||||||
use bevy_hierarchy::ValidParentCheckPlugin;
|
use bevy_hierarchy::ValidParentCheckPlugin;
|
||||||
|
@ -388,6 +390,12 @@ unsafe fn initialize_render_app(app: &mut App) {
|
||||||
render_app.main_schedule_label = Render.intern();
|
render_app.main_schedule_label = Render.intern();
|
||||||
|
|
||||||
let mut extract_schedule = Schedule::new(ExtractSchedule);
|
let mut extract_schedule = Schedule::new(ExtractSchedule);
|
||||||
|
// We skip applying any commands during the ExtractSchedule
|
||||||
|
// so commands can be applied on the render thread.
|
||||||
|
extract_schedule.set_build_settings(ScheduleBuildSettings {
|
||||||
|
auto_insert_apply_deferred: false,
|
||||||
|
..default()
|
||||||
|
});
|
||||||
extract_schedule.set_apply_final_deferred(false);
|
extract_schedule.set_apply_final_deferred(false);
|
||||||
|
|
||||||
render_app
|
render_app
|
||||||
|
|
Loading…
Reference in a new issue