mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
Fix doc when state is missing (#13049)
# Objective The warning mentions the function `add_state` which doesn't exist; replaced with `init_state`
This commit is contained in:
parent
54456b7ea6
commit
13cac2eeff
1 changed files with 1 additions and 1 deletions
|
@ -752,7 +752,7 @@ pub mod common_conditions {
|
||||||
move |current_state: Option<Res<State<S>>>| match current_state {
|
move |current_state: Option<Res<State<S>>>| match current_state {
|
||||||
Some(current_state) => *current_state == state,
|
Some(current_state) => *current_state == state,
|
||||||
None => {
|
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 debug_state = format!("{state:?}");
|
||||||
let result = debug_state
|
let result = debug_state
|
||||||
.split("::")
|
.split("::")
|
||||||
|
|
Loading…
Reference in a new issue