pipelined rendering, quest handtracking fix for examples, choose exiting behaviour, and allow not starting a session at startup

This commit is contained in:
Schmarni
2024-02-22 10:02:50 +01:00
parent 889ee3cc5d
commit bc6f2639c1
4 changed files with 58 additions and 24 deletions

View File

@@ -94,6 +94,27 @@ impl Plugin for XrInitPlugin {
}
}
#[derive(Resource, Clone, Copy, PartialEq, Eq,Default)]
pub enum ExitAppOnSessionExit {
#[default]
/// Restart XrSession when session is lost
OnlyOnExit,
/// Always exit the app
Always,
/// Keep app open when XrSession wants to exit or is lost
Never,
}
pub struct StartSessionOnStartup;
impl Plugin for StartSessionOnStartup {
fn build(&self, app: &mut App) {
app.add_systems(Startup, |mut event: EventWriter<StartXrSession>| {
event.send_default();
});
}
}
fn set_cleanup_res(mut commands: Commands) {
info!("Set Cleanup Res");
commands.insert_resource(CleanupRenderWorld);