add openxr specific session running and available conditions

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-10-18 23:43:39 +02:00
parent aea1cc66cd
commit 616bfff672
9 changed files with 46 additions and 19 deletions

View File

@@ -1,6 +1,5 @@
use crate::session::OxrSession;
use crate::{openxr_session_running, session::OxrSession};
use bevy::prelude::*;
use bevy_mod_xr::session::session_running;
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub struct OxrActionSetSyncSet;
@@ -10,7 +9,9 @@ impl Plugin for OxrActionSyncingPlugin {
app.add_event::<OxrSyncActionSet>();
app.add_systems(
PreUpdate,
sync_sets.in_set(OxrActionSetSyncSet).run_if(session_running), // .in_set(OxrPreUpdateSet::SyncActions),
sync_sets
.in_set(OxrActionSetSyncSet)
.run_if(openxr_session_running),
);
}
}