I have this add_systems call:
.add_systems(
StateTransition,
on_exit_item_screen.before(super::on_enter_root_menu),
)
where on_enter_root_menu's system is added like this:
.add_systems(OnEnter(PauseScreenState::Root), on_enter_root_menu)
and I thought that would work, since, at least as far as I can tell, the OnEnter schedules run within the StateTransition schedule. But this doesn't work. Here's an example run where I added a log to the top of each system:
2025-01-24T22:05:41.629673Z DEBUG game::map::pause_screen: on_enter_root_menu
2025-01-24T22:05:41.641341Z DEBUG game::map::pause_screen::item_screen: on_exit_item_screen
What am I not getting right here?
For the record, I'm not using OnExit with on_exit_item_screen because the enum variant in question looks like ShowItems(ItemCategory) and I haven't found a way to use those systems with a non-unit enum variant.