mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,8 @@ pub trait AppExtStates {
|
|||
///
|
||||
/// Note that you can also apply state transitions at other points in the schedule
|
||||
/// 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;
|
||||
|
||||
/// Inserts a specific [`State`] to the current [`App`] and overrides any [`State`] previously
|
||||
|
|
Loading…
Reference in a new issue