Skip to content

Commit b5bfc4b

Browse files
Phoqinumockersf
authored andcommitted
Make StateTransitionSteps public (#16612)
# Objective - Fixes #16594 ## Solution - `StateTransitionSteps` was made public ## Testing - _Did you test these changes? If so, how?_ I am now able to import it and use it. --- ## Showcase - Users can now write their own state scoped resources ```rust fn init_state_scoped_resource<R: Resource + FromWorld>( &mut self, state: impl States, ) -> &mut Self { use bevy::state::state::StateTransitionSteps; // this PR in action self.add_systems( StateTransition, ( clear_state_scoped_resource_impl::<_, R>(state.clone()) .in_set(StateTransitionSteps::ExitSchedules), // and here init_state_scoped_resource_impl::<_, R>(state) .in_set(StateTransitionSteps::EnterSchedules), // here too ), ); self } ```
1 parent 316b129 commit b5bfc4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_state/src/state/transitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct StateTransitionEvent<S: States> {
6868
///
6969
/// These system sets are run sequentially, in the order of the enum variants.
7070
#[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)]
71-
pub(crate) enum StateTransitionSteps {
71+
pub enum StateTransitionSteps {
7272
/// States apply their transitions from [`NextState`](super::NextState)
7373
/// and compute functions based on their parent states.
7474
DependentTransitions,

0 commit comments

Comments
 (0)