From dd1293c0fc472a044df3d44c8bea3c7d0ff10c6f Mon Sep 17 00:00:00 2001 From: Schmarni Date: Fri, 31 May 2024 11:19:13 +0200 Subject: [PATCH] fix compile errors after rebase Signed-off-by: Schmarni --- crates/bevy_xr_utils/src/xr_utils_actions.rs | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/bevy_xr_utils/src/xr_utils_actions.rs b/crates/bevy_xr_utils/src/xr_utils_actions.rs index 4a0cef5..ded0b19 100644 --- a/crates/bevy_xr_utils/src/xr_utils_actions.rs +++ b/crates/bevy_xr_utils/src/xr_utils_actions.rs @@ -1,9 +1,9 @@ //! This plugin and module are here to ease the creation of actions withing openxr //! The general idea is any plugin can create entities in startup before XRUtilsActionSystemSet::CreateEvents //! this plugin will then create the neccessary actions sets, actions, and bindings and get them ready for use. -//! +//! //! example creating actions -//! +//! //! //create a set //! let set = commands //! .spawn(( @@ -39,10 +39,10 @@ //! //TODO look into a better system //! commands.entity(action).add_child(binding); //! commands.entity(set).add_child(action); -//! +//! //! then you can read the action states after XRUtilsActionSystemSet::SyncActionStates //! for example -//! +//! //! fn read_action_with_marker_component( //! mut action_query: Query<&XRUtilsActionState, With>, //! ) { @@ -51,13 +51,12 @@ //! info!("action state is: {:?}", state); //! } //! } -//! -//! +//! +//! use bevy::prelude::*; use bevy_openxr::{ - action_binding::OxrSuggestActionBinding, - action_set_attaching::OxrAttachActionSet, - resources::{OxrInstance, OxrSession}, + action_binding::OxrSuggestActionBinding, action_set_attaching::OxrAttachActionSet, + resources::OxrInstance, session::OxrSession, }; use openxr::{ActiveActionSet, Path, Vector2f}; use std::borrow::Cow; @@ -65,7 +64,10 @@ use std::borrow::Cow; pub struct XRUtilsActionsPlugin; impl Plugin for XRUtilsActionsPlugin { fn build(&self, app: &mut App) { - app.add_systems(Startup, create_openxr_events.in_set(XRUtilsActionSystemSet::CreateEvents)); + app.add_systems( + Startup, + create_openxr_events.in_set(XRUtilsActionSystemSet::CreateEvents), + ); app.add_systems(Update, sync_active_action_sets); app.add_systems( Update,