Skip to content

Commit

Permalink
fix mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Nov 21, 2023
1 parent ecb1de1 commit b9bc002
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![allow(clippy::type_complexity)]

use bevy::prelude::*;
#[cfg(all(feature = "xr", not(target_os = "macos")))]
use bevy_oxr::xr_input::trackers::OpenXRTrackingRoot;

type TileMap = tilemap::TileMap<8145>;
Expand Down Expand Up @@ -54,6 +55,11 @@ fn setup(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>) {
/// Used to make sure all players have a map to walk on.
pub struct LocalPlayer;

#[cfg(not(all(feature = "xr", not(target_os = "macos"))))]
/// HACK: we can't attach `LocalPlayer` to the xr player yet, so we need
/// to access the OpenXRTrackingRoot, but that doesn't exist without the xr feature
type OpenXRTrackingRoot = LocalPlayer;

fn update_active_tile_zone(
mut commands: Commands,
mut tilemap: Query<
Expand Down

0 comments on commit b9bc002

Please sign in to comment.