Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs around StateTransition and remove references to `apply_sta… #13772

Merged

Conversation

lee-orr
Copy link
Contributor

@lee-orr lee-orr commented Jun 9, 2024

The documentation for the State resource still referenced the use of apply_state_transition to manually force a state transition to occur, and the question around how to force transitions had come up a few times on discord.

This is a docs-only change, that does the following:

  • Properly references StateTransition in the MainSchedule docs
  • replace the explanations for applying NextState with ones that explain the StateTransition schedule, and mentions the possibility of calling it manually
  • Add an example of calling StateTransition manually in the docs for the state transition schedule itself.

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Jun 9, 2024
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Jun 9, 2024
/// use bevy_state::prelude::*;
/// use bevy_ecs::prelude::*;
///
/// fn run_state_transitions(world: &mut World) {
Copy link
Contributor

@hymm hymm Jun 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just have a exclusive system exported from bevy_state that does this? It's going to be a small annoyance when migrating to make your own.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly either way. It's definitely a bit easier, but I like reminding people that they can just run schedules.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 10, 2024
Merged via the queue into bevyengine:main with commit 7ec301c Jun 10, 2024
27 checks passed
mockersf pushed a commit that referenced this pull request Jun 10, 2024
#13772)

The documentation for the `State` resource still referenced the use of
`apply_state_transition` to manually force a state transition to occur,
and the question around how to force transitions had come up a few times
on discord.

This is a docs-only change, that does the following:
- Properly references `StateTransition` in the `MainSchedule` docs
- replace the explanations for applying `NextState` with ones that
explain the `StateTransition` schedule, and mentions the possibility of
calling it manually
- Add an example of calling `StateTransition` manually in the docs for
the state transition schedule itself.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants