From 13cac2eeff7e3c4da7ae636ba3766f59b4e343d0 Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Sun, 21 Apr 2024 09:19:26 -0400 Subject: [PATCH] Fix doc when state is missing (#13049) # Objective The warning mentions the function `add_state` which doesn't exist; replaced with `init_state` --- crates/bevy_ecs/src/schedule/condition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index 4c438acc56..4997bfd110 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -752,7 +752,7 @@ pub mod common_conditions { move |current_state: Option>>| match current_state { Some(current_state) => *current_state == state, None => { - warn_once!("No state matching the type for {} exists - did you forget to `add_state` when initializing the app?", { + warn_once!("No state matching the type for {} exists - did you forget to `init_state` when initializing the app?", { let debug_state = format!("{state:?}"); let result = debug_state .split("::")