Skip to content

Commit

Permalink
Don't auto insert on the extract schedule (bevyengine#11669)
Browse files Browse the repository at this point in the history
# Objective

- In bevyengine#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.
  • Loading branch information
hymm authored Feb 3, 2024
1 parent c55a5ba commit a919cb0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/bevy_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ pub mod prelude {
};
}

use bevy_ecs::schedule::ScheduleBuildSettings;
use bevy_utils::prelude::default;
pub use extract_param::Extract;

use bevy_hierarchy::ValidParentCheckPlugin;
Expand Down Expand Up @@ -388,6 +390,12 @@ unsafe fn initialize_render_app(app: &mut App) {
render_app.main_schedule_label = Render.intern();

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);

render_app
Expand Down

0 comments on commit a919cb0

Please sign in to comment.