Ben Frankel
Ben Frankel
> Few more thoughts: > > The `NextState` force flag idea won't work with cases like: > > ```rust > ... > ``` > > which _could_ be the intended...
I don't think setting the state to `Foo` should be fully ignored if the current state is `Foo`. There was a logical intention for the next state to be `Foo`,...
> The Idea of removing the verification and let the user verifying themselves if they are trying to change something to the same state would probably be the simplest and...
> What if this happened due to system order ambiguity, then it's an additional thing to worry about If you have a race condition / ambiguity between systems that set...
Made a PR for the system param approach, which I prefer. I'm leaving the `NextState::set_forced` PR open for now. Names are all bikesheddable, I didn't think too hard about them.
Until this is fixed, the easiest workaround is to add a `RestartFoo` state and a system upon entering `RestartFoo` to set the next state to `Foo`. This introduces a 1...
This is fixed in my 3rd-party crate [pyri_state](https://github.com/benfrankel/pyri_state). I was unable to get any fix upstreamed unfortunately after _a lot of discussion_, because there's more than one way to implement...
Workaround: ```rust trait Foo { fn foo() -> BoxedSystem { Box::new(IntoSystem::into_system(|| {})) } } ```
This bug applies to run conditions as well, but `BoxedCondition` is not a proper workaround because it doesn't `impl Condition`. You have to use `.run_if_dyn` instead of `.run_if`, but `.run_if_dyn`...
Interesting. That works. I guess this isn't a bug in Rust or Bevy, but it is surprising.