Add note on StatesPlugin requirement for state code (#14489)
# Objective Clarify that `StatesPlugin` is a prerequisite for state code. Closes #14329 . Edit: am I missing a way to link `DefaultPlugins` correctly other than using the URL? I guess I expected to be able to refer to it with `bevy::prelude::DefaultPlugins` or some such 🤔
This commit is contained in:
parent
a9f4fd8ea1
commit
23cb0f9c54
@ -23,6 +23,8 @@ pub trait AppExtStates {
|
|||||||
///
|
///
|
||||||
/// Note that you can also apply state transitions at other points in the schedule
|
/// Note that you can also apply state transitions at other points in the schedule
|
||||||
/// by triggering the [`StateTransition`](struct@StateTransition) schedule manually.
|
/// by triggering the [`StateTransition`](struct@StateTransition) schedule manually.
|
||||||
|
///
|
||||||
|
/// The use of any states requires the presence of [`StatesPlugin`] (which is included in `DefaultPlugins`).
|
||||||
fn init_state<S: FreelyMutableState + FromWorld>(&mut self) -> &mut Self;
|
fn init_state<S: FreelyMutableState + FromWorld>(&mut self) -> &mut Self;
|
||||||
|
|
||||||
/// Inserts a specific [`State`] to the current [`App`] and overrides any [`State`] previously
|
/// Inserts a specific [`State`] to the current [`App`] and overrides any [`State`] previously
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user