We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
has_received_time
time_system
1 parent 9a24592 commit e3b82f3Copy full SHA for e3b82f3
crates/bevy_time/src/lib.rs
@@ -81,13 +81,17 @@ fn time_system(
81
mut time: ResMut<Time>,
82
update_strategy: Res<TimeUpdateStrategy>,
83
time_recv: Option<Res<TimeReceiver>>,
84
+ mut has_received_time: Local<bool>,
85
) {
86
let new_time = if let Some(time_recv) = time_recv {
87
// TODO: Figure out how to handle this when using pipelined rendering.
88
if let Ok(new_time) = time_recv.0.try_recv() {
89
+ *has_received_time = true;
90
new_time
91
} else {
- warn!("time_system did not receive the time from the render world! Calculations depending on the time may be incorrect.");
92
+ if *has_received_time {
93
+ warn!("time_system did not receive the time from the render world! Calculations depending on the time may be incorrect.");
94
+ }
95
Instant::now()
96
}
97
0 commit comments