works but destroys the session manually because one space somewhere survives session exit
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use bevy::prelude::*;
|
||||
use bevy_openxr::add_xr_plugins;
|
||||
use bevy_xr::session::{XrSharedStatus, XrStatus};
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
@@ -18,6 +19,7 @@ fn handle_input(
|
||||
mut destroy: EventWriter<bevy_xr::session::DestroyXrSession>,
|
||||
mut begin: EventWriter<bevy_xr::session::BeginXrSession>,
|
||||
mut create: EventWriter<bevy_xr::session::CreateXrSession>,
|
||||
state: Res<XrSharedStatus>,
|
||||
) {
|
||||
if keys.just_pressed(KeyCode::KeyE) {
|
||||
info!("sending end");
|
||||
@@ -35,6 +37,9 @@ fn handle_input(
|
||||
info!("sending create");
|
||||
create.send_default();
|
||||
}
|
||||
if keys.just_pressed(KeyCode::KeyI) {
|
||||
info!("current state: {:?}", state.get());
|
||||
}
|
||||
}
|
||||
|
||||
/// set up a simple 3D scene
|
||||
|
||||
Reference in New Issue
Block a user