Bevy version
0.8.1
What you did
Describe how you arrived at the problem. If you can, consider providing a code snippet or link.
I have my game menus each have a corresponding AppState. For example, there is a state for options menu, main menu etc.
I have two systems:
on_previous_menu_event which I need ran before
on_resume, which gets ran when I resume a state.
I tried to achieve this by doing the following:
.add_system(on_previous_menu_event.before(on_menu_spawn))
.add_system_set(SystemSet::on_resume(AppState::MainMenu).with_system(on_resume.after(on_previous_menu_event)))
The ordering is required for the logic to work correctly.
What went wrong
By inserting print statements into both systems, I see that about half the time, the systems are ran in the opposite order in which I declared above.
Additional information
Other information that can be used to further reproduce or isolate the problem.
This commonly includes:
- screenshots
- logs
- theories about what might be going wrong
- workarounds that you used
- links to related bugs, PRs or discussions
Bevy version
0.8.1
What you did
Describe how you arrived at the problem. If you can, consider providing a code snippet or link.
I have my game menus each have a corresponding AppState. For example, there is a state for options menu, main menu etc.
I have two systems:
on_previous_menu_eventwhich I need ran beforeon_resume, which gets ran when I resume a state.I tried to achieve this by doing the following:
The ordering is required for the logic to work correctly.
What went wrong
By inserting print statements into both systems, I see that about half the time, the systems are ran in the opposite order in which I declared above.
Additional information
Other information that can be used to further reproduce or isolate the problem.
This commonly includes: