This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from XRTK/development
Version 0.1.1
- Loading branch information
Showing
15 changed files
with
190 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...ts/XRTK.WindowsMixedReality/Inspectors/WindowsMixedRealityDataProviderProfileInspector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright (c) XRTK. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using UnityEditor; | ||
using UnityEngine; | ||
using XRTK.Definitions; | ||
using XRTK.Inspectors.Profiles; | ||
using XRTK.Inspectors.Utilities; | ||
using XRTK.Services; | ||
using XRTK.WindowsMixedReality.Profiles; | ||
|
||
namespace XRTK.WindowsMixedReality.Inspectors | ||
{ | ||
[CustomEditor(typeof(WindowsMixedRealityControllerDataProviderProfile))] | ||
public class WindowsMixedRealityDataProviderProfileInspector : BaseMixedRealityProfileInspector | ||
{ | ||
private SerializedProperty windowsManipulationGestureSettings; | ||
private SerializedProperty useRailsNavigation; | ||
private SerializedProperty windowsNavigationGestureSettings; | ||
private SerializedProperty windowsRailsNavigationGestures; | ||
private SerializedProperty windowsGestureAutoStart; | ||
|
||
protected override void OnEnable() | ||
{ | ||
base.OnEnable(); | ||
|
||
if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) | ||
{ | ||
return; | ||
} | ||
|
||
windowsManipulationGestureSettings = serializedObject.FindProperty("manipulationGestures"); | ||
useRailsNavigation = serializedObject.FindProperty("useRailsNavigation"); | ||
windowsNavigationGestureSettings = serializedObject.FindProperty("navigationGestures"); | ||
windowsRailsNavigationGestures = serializedObject.FindProperty("railsNavigationGestures"); | ||
windowsGestureAutoStart = serializedObject.FindProperty("windowsGestureAutoStart"); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
MixedRealityInspectorUtility.RenderMixedRealityToolkitLogo(); | ||
|
||
if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } | ||
|
||
if (GUILayout.Button("Back to Controller Data Providers")) | ||
{ | ||
Selection.activeObject = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerDataProvidersProfile; | ||
} | ||
|
||
EditorGUILayout.Space(); | ||
EditorGUILayout.LabelField("Windows Mixed Reality Controller Data Provider Settings", EditorStyles.boldLabel); | ||
EditorGUILayout.HelpBox("This profile aids in configuring additional platform settings for the registered controller data provider. This can be anything from additional gestures or platform specific settings.", MessageType.Info); | ||
|
||
(target as BaseMixedRealityProfile).CheckProfileLock(); | ||
|
||
serializedObject.Update(); | ||
EditorGUILayout.Space(); | ||
EditorGUILayout.LabelField("Windows Gesture Settings", EditorStyles.boldLabel); | ||
EditorGUILayout.PropertyField(windowsGestureAutoStart); | ||
EditorGUILayout.PropertyField(windowsManipulationGestureSettings); | ||
EditorGUILayout.PropertyField(windowsNavigationGestureSettings); | ||
EditorGUILayout.PropertyField(useRailsNavigation); | ||
EditorGUILayout.PropertyField(windowsRailsNavigationGestures); | ||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...TK.WindowsMixedReality/Inspectors/WindowsMixedRealityDataProviderProfileInspector.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ets/XRTK.WindowsMixedReality/Profiles/WindowsMixedRealityControllerDataProviderProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using UnityEngine; | ||
using XRTK.Attributes; | ||
using XRTK.Definitions.InputSystem; | ||
using XRTK.Definitions.Utilities; | ||
using XRTK.Providers.Controllers; | ||
|
||
namespace XRTK.WindowsMixedReality.Profiles | ||
{ | ||
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Input System/Controller Data Providers/Windows Mixed Reality", fileName = "WindowsMixedRealityControllerDataProviderProfile", order = (int)CreateProfileMenuItemIndices.Input)] | ||
public class WindowsMixedRealityControllerDataProviderProfile : BaseMixedRealityControllerDataProviderProfile | ||
{ | ||
[EnumFlags] | ||
[SerializeField] | ||
[Tooltip("The recognizable Manipulation Gestures.")] | ||
private WindowsGestureSettings manipulationGestures = 0; | ||
|
||
/// <summary> | ||
/// The recognizable Manipulation Gestures. | ||
/// </summary> | ||
public WindowsGestureSettings ManipulationGestures => manipulationGestures; | ||
|
||
[EnumFlags] | ||
[SerializeField] | ||
[Tooltip("The recognizable Navigation Gestures.")] | ||
private WindowsGestureSettings navigationGestures = 0; | ||
|
||
/// <summary> | ||
/// The recognizable Navigation Gestures. | ||
/// </summary> | ||
public WindowsGestureSettings NavigationGestures => navigationGestures; | ||
|
||
[SerializeField] | ||
[Tooltip("Should the Navigation use Rails on start?\nNote: This can be changed at runtime to switch between the two Navigation settings.")] | ||
private bool useRailsNavigation = false; | ||
|
||
public bool UseRailsNavigation => useRailsNavigation; | ||
|
||
[EnumFlags] | ||
[SerializeField] | ||
[Tooltip("The recognizable Rails Navigation Gestures.")] | ||
private WindowsGestureSettings railsNavigationGestures = 0; | ||
|
||
/// <summary> | ||
/// The recognizable Navigation Gestures. | ||
/// </summary> | ||
public WindowsGestureSettings RailsNavigationGestures => railsNavigationGestures; | ||
|
||
[SerializeField] | ||
private AutoStartBehavior windowsGestureAutoStart = AutoStartBehavior.AutoStart; | ||
|
||
public AutoStartBehavior WindowsGestureAutoStart => windowsGestureAutoStart; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...RTK.WindowsMixedReality/Profiles/WindowsMixedRealityControllerDataProviderProfile.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
m_EditorVersion: 2018.3.10f1 | ||
m_EditorVersion: 2018.3.11f1 |