From 61af3d231b4787c7e727bb229023f84b3f99284d Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Thu, 30 May 2024 15:51:02 -0400 Subject: [PATCH] Update docs for NextState (#13578) # Objective Fixes #13577. ## Solution Explain how the resource works now. Co-authored-by: Alice Cecile --- crates/bevy_state/src/state/resources.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_state/src/state/resources.rs b/crates/bevy_state/src/state/resources.rs index 9ef49788b1..279ea8589c 100644 --- a/crates/bevy_state/src/state/resources.rs +++ b/crates/bevy_state/src/state/resources.rs @@ -85,7 +85,8 @@ impl Deref for State { /// The next state of [`State`]. /// -/// To queue a transition, just set the contained value to `Some(next_state)`. +/// This can be fetched as a resource and used to queue state transitions. +/// To queue a transition, call [`NextState::set`] or mutate the value to [`NextState::Pending`] directly. /// /// Note that these transitions can be overridden by other systems: /// only the actual value of this resource at the time of [`apply_state_transition`](crate::state::apply_state_transition) matters.