-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
State can't be used in two stages at once (even with get_driver
)
#1865
Comments
Currently, States are owned by Stages, like all other run_criteria :( This should be fixed as part of the grand effort in #1375. |
Instead of |
I tried replacing
with
The behavior I see is exactly the same: only the systems in the As a workaround, I've modified the actual code I was working on to just pull in the |
This is a major issue for me. I'd be happy to contribute a fix. |
Pulling in @TheRawMeatball (author of the current state system). I recommend discussing alternative designs with them. |
More discussion is roughly centralized in #2801. The existing run-criteria based states are deeply limited and a full redesign is needed. |
Fixed by #7267. |
Bevy version
0.5
Operating system & version
Debian GNU/Linux "buster"
What you did
app.add_state(MyState::StateOne)
MyStage
app.add_system_set(State::<MyState>::get_driver())
MyStage
viaSystemSet::on_update(MyState::StateOne)
, etc.What you expected to happen
Systems that trigger on state enter and exit should run when the state changes, regardless of stage.
What actually happened
Only state change systems in the
Update
stage are executed.I know that the program hasn't completely locked because if I put state change systems into
Update
, they work fine. It does lock if I don't addState::<MyState>::get_driver()
, so that's having an effect.This text in the Bevy Rustdoc made me think this is supposed to work:
Additional information
Sample code:
test.tar.gz
The text was updated successfully, but these errors were encountered: