From 612e77ef7810759b855cd2853e620a10a5081ebf Mon Sep 17 00:00:00 2001 From: Spooky Th Ghost <30451500+spooky-th-ghost@users.noreply.github.com> Date: Mon, 20 May 2024 15:46:25 -0400 Subject: [PATCH] Adds doc note that Timer and Stopwatch must be progressed manually (#13441) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective - Fix #13421 ## Solution - Add an explicit note at the root of each struct that they must be ticked manually ## Testing - Generated the docs and the changes look good --- --------- Co-authored-by: François Mockers Co-authored-by: Matty --- crates/bevy_time/src/stopwatch.rs | 1 + crates/bevy_time/src/timer.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/crates/bevy_time/src/stopwatch.rs b/crates/bevy_time/src/stopwatch.rs index 632d4c1764e11..7579b3a8b6f01 100644 --- a/crates/bevy_time/src/stopwatch.rs +++ b/crates/bevy_time/src/stopwatch.rs @@ -4,6 +4,7 @@ use bevy_utils::Duration; /// A Stopwatch is a struct that track elapsed time when started. /// +/// Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called. /// # Examples /// /// ``` diff --git a/crates/bevy_time/src/timer.rs b/crates/bevy_time/src/timer.rs index 7995f986a4d8c..c594a73140e33 100644 --- a/crates/bevy_time/src/timer.rs +++ b/crates/bevy_time/src/timer.rs @@ -10,6 +10,8 @@ use bevy_utils::Duration; /// exceeded, and can still be reset at any given point. /// /// Paused timers will not have elapsed time increased. +/// +/// Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. #[derive(Clone, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))] #[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Default))]