make app close when requested by os and other stuff (#61)

* idk

* mr stuff

* done

* fix windows

* add patches to Readme
This commit is contained in:
Schmarni
2024-01-01 00:35:59 +01:00
committed by GitHub
parent fcedb9c0c8
commit 65a30cac3c
22 changed files with 666 additions and 165 deletions

View File

@@ -10,13 +10,9 @@ license = "MIT OR Apache-2.0"
name = "bevy_openxr_android"
crate-type = ["rlib", "cdylib"]
[target.'cfg(not(target_os="android"))'.dependencies.bevy_oxr]
path = "../../"
default-features = true
[dependencies]
bevy_oxr = { path = "../..", default-features = false }
bevy_oxr.path = "../.."
bevy = "0.12"
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }

View File

@@ -1,6 +1,7 @@
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
use bevy::prelude::*;
use bevy::transform::components::Transform;
use bevy_oxr::graphics::XrAppInfo;
use bevy_oxr::xr_input::debug_gizmos::OpenXrDebugRenderer;
use bevy_oxr::xr_input::prototype_locomotion::{proto_locomotion, PrototypeLocomotionConfig};
use bevy_oxr::xr_input::trackers::{
@@ -11,7 +12,12 @@ use bevy_oxr::DefaultXrPlugins;
#[bevy_main]
fn main() {
App::new()
.add_plugins(DefaultXrPlugins)
.add_plugins(DefaultXrPlugins {
app_info: XrAppInfo {
name: "Bevy OXR Android Example".into(),
},
..default()
})
.add_plugins(OpenXrDebugRenderer)
.add_plugins(LogDiagnosticsPlugin::default())
.add_plugins(FrameTimeDiagnosticsPlugin)