Skip to content

Commit

Permalink
made lib fallback to flat when no runtime is found but can't compile …
Browse files Browse the repository at this point in the history
…with default settings under those circumstances
  • Loading branch information
Schmarni-Dev committed Dec 9, 2023
1 parent 368dfca commit 3e0032f
Show file tree
Hide file tree
Showing 10 changed files with 281 additions and 827 deletions.
1 change: 1 addition & 0 deletions examples/demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ color-eyre = "0.6.2"

[target.'cfg(not(target_os="android"))'.dependencies.bevy_oxr]
path = "../../"
# May need to be more specific. needs to be false at least on linux without an active runtime to run in flat
default-features = true
24 changes: 0 additions & 24 deletions examples/demo/Cargo_back.toml

This file was deleted.

10 changes: 5 additions & 5 deletions examples/demo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use bevy::{
};
use bevy_oxr::{
input::XrInput,
render_restart::{XrEnableRequest, XrEnableStatus},
xr_init::{XrEnableRequest, XrEnableStatus, xr_only},
resources::{XrFrameState, XrInstance, XrSession},
xr_input::{
actions::XrActionSets,
Expand Down Expand Up @@ -77,11 +77,11 @@ pub fn main() {
.add_systems(Startup, setup_scene)
.add_systems(Startup, spawn_controllers_example) //you need to spawn controllers or it crashes TODO:: Fix this
//add locomotion
.add_systems(Update, proto_locomotion)
.add_systems(Update, proto_locomotion.run_if(xr_only()))
.insert_resource(PrototypeLocomotionConfig::default())
//lets add the interaction systems
.add_event::<InteractionEvent>()
.add_systems(Update, prototype_interaction_input)
.add_systems(Update, prototype_interaction_input.run_if(xr_only()))
.add_systems(Update, interactions.before(update_interactable_states))
.add_systems(Update, update_interactable_states)
.add_systems(
Expand All @@ -93,7 +93,7 @@ pub fn main() {
//draw the interaction gizmos
.add_systems(
Update,
draw_interaction_gizmos.after(update_interactable_states),
draw_interaction_gizmos.run_if(xr_only()).after(update_interactable_states),
)
.add_systems(Update, draw_socket_gizmos.after(update_interactable_states))
//add our cube spawning system
Expand All @@ -102,7 +102,7 @@ pub fn main() {
0.25,
bevy::time::TimerMode::Once,
)))
.add_systems(Update, request_cube_spawn)
.add_systems(Update, request_cube_spawn.run_if(xr_only()))
.add_systems(Update, cube_spawner.after(request_cube_spawn))
//test capsule
.add_systems(Startup, spawn_capsule)
Expand Down
Loading

0 comments on commit 3e0032f

Please sign in to comment.