Skip to content

Commit 13cac2e

Browse files
Fix doc when state is missing (#13049)
# Objective The warning mentions the function `add_state` which doesn't exist; replaced with `init_state`
1 parent 54456b7 commit 13cac2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ecs/src/schedule/condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ pub mod common_conditions {
752752
move |current_state: Option<Res<State<S>>>| match current_state {
753753
Some(current_state) => *current_state == state,
754754
None => {
755-
warn_once!("No state matching the type for {} exists - did you forget to `add_state` when initializing the app?", {
755+
warn_once!("No state matching the type for {} exists - did you forget to `init_state` when initializing the app?", {
756756
let debug_state = format!("{state:?}");
757757
let result = debug_state
758758
.split("::")

0 commit comments

Comments
 (0)