partialy revert the scheduling changes and fix non xr crash

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-07-12 08:20:50 +02:00
parent 3d773f86ba
commit 1eed718860
8 changed files with 111 additions and 100 deletions

View File

@@ -31,7 +31,12 @@ pub struct OxrSpatialPlugin;
impl Plugin for OxrSpatialPlugin {
fn build(&self, app: &mut App) {
app.add_event::<XrDestroySpace>()
.add_systems(XrFirst, destroy_space_event.before(XrHandleEvents))
.add_systems(
XrFirst,
destroy_space_event
.before(XrHandleEvents::Poll)
.run_if(session_available),
)
.add_systems(
PreUpdate,
update_space_transforms