Using bevy 0.13.
s there any way to conditionally run a system that has world access?
E.g. given this system:
fn world_system_test (
world: &mut World,
) {
}
Adding it like this
app.add_systems(Update, world_system_test).run_if(in_state(GameState::InGame))
.. gives me a long error starting like this:
error[E0599]: the method `run_if` exists for mutable reference `&mut App`, but its trait bounds were not satisfied
--> src/lights.rs:16:53
|
11 | / app.add_systems(Update, world_system_test).run_if(in_state(GameState::InGame))
So is there a nice way to accomplish that, other than specifically checking for GameState::InGame inside the system?