Skip to content

Commit 1c22c75

Browse files
committed
swap event buffers in FixedUpdate
1 parent bf4f4e4 commit 1c22c75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/bevy_app/src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{First, Main, MainSchedulePlugin, Plugin, Plugins, StateTransition};
1+
use crate::{FixedUpdate, Main, MainSchedulePlugin, Plugin, Plugins, StateTransition};
22
pub use bevy_derive::AppLabel;
33
use bevy_ecs::{
44
prelude::*,
@@ -486,7 +486,7 @@ impl App {
486486
{
487487
if !self.world.contains_resource::<Events<T>>() {
488488
self.init_resource::<Events<T>>().add_systems(
489-
First,
489+
FixedUpdate,
490490
bevy_ecs::event::event_update_system::<T>
491491
.run_if(bevy_ecs::event::event_update_condition::<T>),
492492
);

crates/bevy_ecs/src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ impl<'a, E: Event> ExactSizeIterator for EventIteratorWithId<'a, E> {
749749
}
750750
}
751751

752-
/// A system that calls [`Events::update`] once per frame.
752+
/// A system that calls [`Events::update`].
753753
pub fn event_update_system<T: Event>(mut events: ResMut<Events<T>>) {
754754
events.update();
755755
}

0 commit comments

Comments
 (0)