fix status_changed_to, added OxrSuggestActionBindings event to app and fixed scheduling for run_action_binding_sugestion

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-04-29 18:49:07 +02:00
parent aa0eaa60f4
commit 9cb237e88f
3 changed files with 5 additions and 3 deletions

View File

@@ -13,10 +13,11 @@ use crate::resources::OxrInstance;
impl Plugin for OxrActionBindingPlugin {
fn build(&self, app: &mut App) {
app.add_schedule(Schedule::new(OxrSendActionBindings));
app.add_event::<OxrSuggestActionBinding>();
app.add_systems(
Update,
run_action_binding_sugestion
.run_if(run_once().and_then(status_changed_to(XrStatus::Ready))),
.run_if(status_changed_to(XrStatus::Ready).and_then(run_once())),
);
}
}