diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scripts/BoundaryVisualizationDemo.cs b/Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scripts/BoundaryVisualizationDemo.cs index 51fe4526192..f04d6d377fa 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scripts/BoundaryVisualizationDemo.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scripts/BoundaryVisualizationDemo.cs @@ -32,19 +32,32 @@ public class BoundaryVisualizationDemo : MonoBehaviour, IMixedRealityBoundaryHan [SerializeField] private bool showBoundaryCeiling = true; + private IMixedRealityBoundarySystem boundarySystem = null; + + private IMixedRealityBoundarySystem BoundarySystem + { + get + { + if (boundarySystem == null) + { + MixedRealityServiceRegistry.TryGetService(out boundarySystem); + } + return boundarySystem; + } + } + #region MonoBehaviour Implementation private void Awake() { markerParent = new GameObject(); markerParent.name = "Boundary Demo Markers"; - markerParent.transform.parent = MixedRealityToolkit.Instance.MixedRealityPlayspace; + MixedRealityPlayspace.AddChild(markerParent.transform); } private void Start() { - - if (MixedRealityToolkit.BoundarySystem != null) + if (BoundarySystem != null) { if (markers.Count == 0) { @@ -55,25 +68,24 @@ private void Start() private void Update() { - if (MixedRealityToolkit.BoundarySystem != null) + if (BoundarySystem != null) { - MixedRealityToolkit.BoundarySystem.ShowFloor = showFloor; - MixedRealityToolkit.BoundarySystem.ShowPlayArea = showPlayArea; - MixedRealityToolkit.BoundarySystem.ShowTrackedArea = showTrackedArea; - MixedRealityToolkit.BoundarySystem.ShowBoundaryWalls = showBoundaryWalls; - MixedRealityToolkit.BoundarySystem.ShowBoundaryCeiling = showBoundaryCeiling; + BoundarySystem.ShowFloor = showFloor; + BoundarySystem.ShowPlayArea = showPlayArea; + BoundarySystem.ShowTrackedArea = showTrackedArea; + BoundarySystem.ShowBoundaryWalls = showBoundaryWalls; + BoundarySystem.ShowBoundaryCeiling = showBoundaryCeiling; } } - private async void OnEnable() + private void OnEnable() { - await new WaitUntil(() => MixedRealityToolkit.BoundarySystem != null); - MixedRealityToolkit.BoundarySystem.Register(gameObject); + BoundarySystem?.Register(gameObject); } private void OnDisable() { - MixedRealityToolkit.BoundarySystem?.Unregister(gameObject); + BoundarySystem?.Unregister(gameObject); } #endregion MonoBehaviour Implementation @@ -100,18 +112,30 @@ private void AddMarkers() float widthRect; float heightRect; - if (!MixedRealityToolkit.BoundarySystem.TryGetRectangularBoundsParams(out centerRect, out angleRect, out widthRect, out heightRect)) + if (BoundarySystem == null) { return; } + + if (!BoundarySystem.TryGetRectangularBoundsParams(out centerRect, out angleRect, out widthRect, out heightRect)) { // If we have no boundary manager or rectangular bounds we will show no indicators return; } - MixedRealityBoundaryVisualizationProfile visualizationProfile = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile; - if (visualizationProfile == null) + // Get the materials needed for marker display + GameObject playArea = BoundarySystem.GetPlayAreaVisualization(); + if (playArea == null) + { + // Failed to get the play area visualization; + return; + } + Material playAreaMaterial = playArea.GetComponent().sharedMaterial; + + GameObject trackedArea = BoundarySystem.GetTrackedAreaVisualization(); + if (trackedArea == null) { - // We do not have a visualization profile configured, therefore do not render the indicators. + // Failed to get the tracked area visualization; return; } + Material trackedAreaMaterial = trackedArea.GetComponent().sharedMaterial; const int indicatorCount = 20; const float indicatorDistance = 0.2f; @@ -131,14 +155,14 @@ private void AddMarkers() Material material = null; // Check inscribed rectangle first - if (MixedRealityToolkit.BoundarySystem.Contains(position, UnityBoundary.Type.PlayArea)) + if (BoundarySystem.Contains(position, UnityBoundary.Type.PlayArea)) { - material = visualizationProfile.PlayAreaMaterial; + material = playAreaMaterial; } // Then check geometry - else if (MixedRealityToolkit.BoundarySystem.Contains(position, UnityBoundary.Type.TrackedArea)) + else if (BoundarySystem.Contains(position, UnityBoundary.Type.TrackedArea)) { - material = visualizationProfile.TrackedAreaMaterial; + material = trackedAreaMaterial; } if (material != null) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Diagnostics/Scripts/DiagnosticsDemoControls.cs b/Assets/MixedRealityToolkit.Examples/Demos/Diagnostics/Scripts/DiagnosticsDemoControls.cs index bc3cb0a139b..d7a738858e4 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Diagnostics/Scripts/DiagnosticsDemoControls.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/Diagnostics/Scripts/DiagnosticsDemoControls.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using Microsoft.MixedReality.Toolkit.Diagnostics; using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine; @@ -8,18 +9,26 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos { public class DiagnosticsDemoControls : MonoBehaviour { - private async void Start() + private IMixedRealityDiagnosticsSystem diagnosticsSystem = null; + + private IMixedRealityDiagnosticsSystem DiagnosticsSystem { - if (!MixedRealityToolkit.Instance.ActiveProfile.IsDiagnosticsSystemEnabled) + get { - Debug.LogWarning("Diagnostics system is disabled. To run this demo, it needs to be enabled. Check your configuration settings."); - return; + if (diagnosticsSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out diagnosticsSystem); + } + return diagnosticsSystem; } + } - await new WaitUntil(() => MixedRealityToolkit.DiagnosticsSystem != null); + private async void Start() + { + await new WaitUntil(() => DiagnosticsSystem != null); - // Turn on the diagnostic visualizations for this demo. - MixedRealityToolkit.DiagnosticsSystem.ShowDiagnostics = true; + // Ensure the diagnostic visualizations are turned on. + DiagnosticsSystem.ShowDiagnostics = true; } /// @@ -27,7 +36,7 @@ private async void Start() /// public void OnToggleDiagnostics() { - MixedRealityToolkit.DiagnosticsSystem.ShowDiagnostics = !MixedRealityToolkit.DiagnosticsSystem.ShowDiagnostics; + DiagnosticsSystem.ShowDiagnostics = !DiagnosticsSystem.ShowDiagnostics; } /// @@ -35,7 +44,7 @@ public void OnToggleDiagnostics() /// public void OnToggleProfiler() { - MixedRealityToolkit.DiagnosticsSystem.ShowProfiler = !MixedRealityToolkit.DiagnosticsSystem.ShowProfiler; + DiagnosticsSystem.ShowProfiler = !DiagnosticsSystem.ShowProfiler; } } } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials/EyeGazeCursor.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials/EyeGazeCursor.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials/EyeGazeCursor.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials/EyeGazeCursor.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials/EyeGazeCursor.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials/EyeGazeCursor.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Materials/EyeGazeCursor.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Materials/EyeGazeCursor.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/ColorTap.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/ColorTap.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/ColorTap.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/ColorTap.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/ColorTap.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/ColorTap.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/ColorTap.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/ColorTap.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs new file mode 100644 index 00000000000..3df139ff0d9 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Input; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking +{ + /// + /// Sample for allowing the game object that this script is attached to follow the user's eye gaze + /// at a given distance of "DefaultDistanceInMeters". + /// + public class FollowEyeGazeGazeProvider : MonoBehaviour + { + [Tooltip("Display the game object along the eye gaze ray at a default distance (in meters).")] + [SerializeField] + private float defaultDistanceInMeters = 2f; + + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + + private void Update() + { + if (InputSystem?.GazeProvider != null) + { + gameObject.transform.position = InputSystem.GazeProvider.GazeOrigin + InputSystem.GazeProvider.GazeDirection.normalized * defaultDistanceInMeters; + } + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/FollowEyeGaze_GazeProvider.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/FollowEyeGaze_GazeProvider.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_map.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_map.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_map.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_map.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_map.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_map.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_map.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_map.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_text.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_text.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_text.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_text.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_text.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_text.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_PanAndZoom_text.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_PanAndZoom_text.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_SlateFrame.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_SlateFrame.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_SlateFrame.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_SlateFrame.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_SlateFrame.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_SlateFrame.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_SlateFrame.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_SlateFrame.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_notification_box_5x1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_notification_box_5x1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_notification_box_5x1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_notification_box_5x1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_notification_box_5x1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_notification_box_5x1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/mat_notification_box_5x1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/mat_notification_box_5x1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_2.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_2.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_2.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_2.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_2.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_2.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/ratio_test_2.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/ratio_test_2.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_map.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_map.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_map.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_map.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_map.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_map.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_map.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_map.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_text.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_text.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_text.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_text.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_text.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_text.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_PanAndZoom_text.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_PanAndZoom_text.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_panzoom.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_panzoom.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_panzoom.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_panzoom.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_panzoom.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_panzoom.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_panzoom.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_panzoom.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_scrolling.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_scrolling.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_scrolling.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_scrolling.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_scrolling.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_scrolling.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Materials/tex_icon_scrolling.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Materials/tex_icon_scrolling.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs similarity index 97% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs index 379cd52e6c2..794e6fb44f8 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs @@ -127,6 +127,23 @@ public abstract class PanZoomBase : MonoBehaviour, private IMixedRealityEyeSaccadeProvider eyeSaccadeProvider = null; #endregion + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + public abstract void Initialize(); public abstract float ComputePanSpeed(float cursorPosInOneDir, float maxSpeed, float minDistFromCenterForAutoPan); public abstract int ZoomDir(bool zoomIn); @@ -547,10 +564,10 @@ void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData even isZooming = true; } - void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } - void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData eventData) { } + void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } + void IMixedRealityFocusHandler.OnFocusEnter(FocusEventData eventData) { isFocused = true; @@ -567,7 +584,7 @@ void IMixedRealityFocusHandler.OnFocusExit(FocusEventData eventData) void IMixedRealitySourceStateHandler.OnSourceLost(SourceStateEventData eventData) { - foreach (var pointer in MixedRealityToolkit.InputSystem.GazeProvider.GazeInputSource.Pointers) + foreach (var pointer in InputSystem.GazeProvider.GazeInputSource.Pointers) { pointer.IsFocusLocked = false; } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs index 4f1431f15fa..8aa5b2158fe 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// This script allows to zoom into and pan the texture of a GameObject. /// It also allows for scrolling by restricting panning to one direction. /// - public class PanZoomBase_RectTransf : PanZoomBase + public class PanZoomBaseRectTransf : PanZoomBase { internal RectTransform navRectTransf = null; internal RectTransform viewportRectTransf = null; @@ -176,7 +176,7 @@ public override bool UpdateCursorPosInHitBox() Vector3 halfsize = gameObject.transform.lossyScale / 2; // Let's transform back to the origin: Translate & Rotate - Vector3 transfHitPnt = MixedRealityToolkit.InputSystem.EyeGazeProvider.HitPosition - center; + Vector3 transfHitPnt = InputSystem.EyeGazeProvider.HitPosition - center; // Rotate around the y axis transfHitPnt = Quaternion.AngleAxis(-(gameObject.transform.rotation.eulerAngles.y - 180), Vector3.up) * transfHitPnt; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseTexture.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseTexture.cs index 578a5bed0e9..2f3e4ed7d0a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseTexture.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// This script allows to zoom into and pan the texture of a GameObject. /// It also allows for scrolling by restricting panning to one direction. /// - public class PanZoomBase_Texture : PanZoomBase + public class PanZoomBaseTexture : PanZoomBase { protected Renderer textureRenderer = null; @@ -192,7 +192,7 @@ public override bool UpdateCursorPosInHitBox() Vector3 halfsize = gameObject.transform.lossyScale / 2; // Let's transform back to the origin: Translate & Rotate - Vector3 transfHitPnt = MixedRealityToolkit.InputSystem.EyeGazeProvider.HitPosition - center; + Vector3 transfHitPnt = InputSystem.EyeGazeProvider.HitPosition - center; // Rotate around the y axis transfHitPnt = Quaternion.AngleAxis(gameObject.transform.rotation.eulerAngles.y, Vector3.down) * transfHitPnt; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseTexture.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseTexture.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomRectTransf.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomRectTransf.cs index fad332b4400..27f6fa73f58 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomRectTransf.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// This script allows to scroll a texture both horizontally and vertically. /// - public class PanZoom_RectTransf : PanZoomBase_RectTransf + public class PanZoomRectTransf : PanZoomBaseRectTransf { [Tooltip("RectTransform from, for example, your TextMeshPro game object.")] [SerializeField] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomRectTransf.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomRectTransf.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_Texture.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomTexture.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_Texture.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomTexture.cs index e7e0e34ab35..e63599ec8ba 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_Texture.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomTexture.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// This script allows to scroll a texture both horizontally and vertically. /// - public class PanZoom_Texture : PanZoomBase_Texture + public class PanZoomTexture : PanZoomBaseTexture { [Tooltip("Referenced renderer of the texture to be navigated.")] [SerializeField] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_Texture.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomTexture.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_Texture.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/PanZoomTexture.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_RectTransf.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollRectTransf.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_RectTransf.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollRectTransf.cs index 69a16a63c16..471352d6e17 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_RectTransf.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollRectTransf.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// This script allows to zoom into and pan the texture of a GameObject. /// It also allows for scrolling by restricting panning to one direction. /// - public class Scroll_RectTransf : PanZoomBase_RectTransf + public class ScrollRectTransf : PanZoomBaseRectTransf { // Scroll [Tooltip("RectTransform from, for example, your TextMeshPro game object.")] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_RectTransf.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollRectTransf.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_RectTransf.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollRectTransf.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_Texture.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollTexture.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_Texture.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollTexture.cs index 35049ee5834..5a04277a63f 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_Texture.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollTexture.cs @@ -8,7 +8,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// This script allows to scroll a texture both horizontally and vertically. /// - public class Scroll_Texture : PanZoomBase_Texture + public class ScrollTexture : PanZoomBaseTexture { // Pan [Tooltip("Renderer of the texture to be scrolled.")] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_Texture.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollTexture.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Scroll_Texture.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/ScrollTexture.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Target_MoveToCamera.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/TargetMoveToCamera.cs similarity index 97% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Target_MoveToCamera.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/TargetMoveToCamera.cs index 5b8075f7b61..e07fa2839d5 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Target_MoveToCamera.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/TargetMoveToCamera.cs @@ -8,9 +8,9 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking { [RequireComponent(typeof(EyeTrackingTarget))] - public class Target_MoveToCamera : BaseEyeFocusHandler + public class TargetMoveToCamera : BaseEyeFocusHandler { - public static Target_MoveToCamera currentlyFocusedTarget; + public static TargetMoveToCamera currentlyFocusedTarget; public MonoBehaviour[] ActivateBehaviorsWhenInFront; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Target_MoveToCamera.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/TargetMoveToCamera.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/Target_MoveToCamera.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/TargetMoveToCamera.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbar.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbar.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbar.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbar.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbar.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbar.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbar.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbar.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbarhandle.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbarhandle.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbarhandle.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbarhandle.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbarhandle.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbarhandle.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/scrollbarhandle.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/scrollbarhandle.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_map.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_map.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_map.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_map.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_map.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_map.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_map.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_map.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_text.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_text.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_text.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_text.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_text.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_text.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_PanAndZoom_text.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_PanAndZoom_text.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_panzoom.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_panzoom.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_panzoom.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_panzoom.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_panzoom.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_panzoom.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_panzoom.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_panzoom.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_scrolling.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_scrolling.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_scrolling.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_scrolling.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_scrolling.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_scrolling.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Textures/tex_icon_scrolling.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Textures/tex_icon_scrolling.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_blue.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_blue.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_blue.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_blue.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_blue.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_blue.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_blue.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_blue.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_purple.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_purple.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_purple.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_purple.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_purple.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_purple.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_purple.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_purple.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_yellow.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_yellow.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_yellow.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_yellow.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_yellow.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_yellow.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_destination_yellow.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_destination_yellow.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_floor.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_floor.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_floor.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_floor.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_floor.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_floor.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_floor.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_floor.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type2.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type2.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type2.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type2.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type2.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type2.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_notification_type2.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_notification_type2.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_picture_destinationFrames.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_picture_destinationFrames.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_picture_destinationFrames.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_picture_destinationFrames.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_picture_destinationFrames.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_picture_destinationFrames.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_picture_destinationFrames.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_picture_destinationFrames.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_semitransp_dark.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_semitransp_dark.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_semitransp_dark.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_semitransp_dark.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_semitransp_dark.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_semitransp_dark.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_semitransp_dark.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_semitransp_dark.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar_markers.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar_markers.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar_markers.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar_markers.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar_markers.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar_markers.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderbar_markers.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderbar_markers.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob_hover.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob_hover.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob_hover.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob_hover.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob_hover.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob_hover.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_sliderknob_hover.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_sliderknob_hover.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_start_location.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_start_location.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_start_location.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_start_location.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_start_location.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_start_location.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_start_location.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_start_location.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue2.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue2.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue2.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue2.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue2.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue2.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_blue2.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_blue2.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_purple.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_purple.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_purple.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_purple.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_purple.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_purple.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_purple.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_purple.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_yellow.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_yellow.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_yellow.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_yellow.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_yellow.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_yellow.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_target_yellow.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_target_yellow.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_trigger.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_trigger.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_trigger.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_trigger.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_trigger.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_trigger.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/mat_trigger.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Materials/mat_trigger.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Horizontal.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderHorizontal.prefab similarity index 91% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Horizontal.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderHorizontal.prefab index 809bacec87f..05105408e5b 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Horizontal.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderHorizontal.prefab @@ -208,214 +208,6 @@ MonoBehaviour: - {fileID: 0} - {fileID: 0} m_maskType: 0 ---- !u!1 &191807725891000146 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2470530804131060238} - - component: {fileID: 217556923394076651} - - component: {fileID: 7764835857267048014} - - component: {fileID: 2839632784747118088} - - component: {fileID: 8770542414431061229} - m_Layer: 0 - m_Name: OutputLabel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2470530804131060238 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 191807725891000146} - m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: -0.774} - m_LocalScale: {x: 0.26708332, y: 0.26708338, z: 0.64100015} - m_Children: [] - m_Father: {fileID: 8870521973379306992} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 1.84, y: 0.87} - m_SizeDelta: {x: 20, y: 5} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!23 &217556923394076651 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 191807725891000146} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &7764835857267048014 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 191807725891000146} - m_Mesh: {fileID: 0} ---- !u!222 &2839632784747118088 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 191807725891000146} - m_CullTransparentMesh: 0 ---- !u!114 &8770542414431061229 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 191807725891000146} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_text: 1.2345 - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_sharedMaterial: {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 18 - m_fontSizeBase: 18 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 258 - m_isAlignmentEnumConverted: 1 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 0 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 13.765949, w: 2.0785923} - m_textInfo: - textComponent: {fileID: 8770542414431061229} - characterCount: 6 - spriteCount: 0 - spaceCount: 0 - wordCount: 2 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_havePropertiesChanged: 0 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_isInputParsingRequired: 0 - m_inputSource: 0 - m_hasFontAssetChanged: 0 - m_renderer: {fileID: 217556923394076651} - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_maskType: 0 --- !u!1 &207718398155803902 GameObject: m_ObjectHideFlags: 0 @@ -1337,7 +1129,7 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: -0.0165} m_LocalScale: {x: 0.04, y: 0.01, z: 0.04} m_Children: - - {fileID: 2470530804131060238} + - {fileID: 809413112841189899} - {fileID: 4789753410373275439} m_Father: {fileID: 8870521974597119031} m_RootOrder: 2 @@ -1449,7 +1241,7 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null useAsSlider: 1 - txtOutput_sliderValue: {fileID: 0} + txtOutput_sliderValue: {fileID: 1310273135765669717} slider_snapToNearestDecimal: 0.1 --- !u!114 &8870521973198618579 MonoBehaviour: @@ -1549,7 +1341,7 @@ Transform: m_GameObject: {fileID: 8870521974202702738} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.4, y: 0.15, z: 0.01} + m_LocalScale: {x: 0.4, y: 0.16, z: 0.01} m_Children: [] m_Father: {fileID: 8870521974597119031} m_RootOrder: 0 @@ -1622,7 +1414,7 @@ GameObject: m_Component: - component: {fileID: 8870521974597119031} m_Layer: 0 - m_Name: 3DSlider + m_Name: EyeTrackingDemoSliderHorizontal m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1724,6 +1516,97 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!1 &9178254948045687079 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 809413112841189899} + - component: {fileID: 656851632036040225} + - component: {fileID: 1310273135765669717} + m_Layer: 0 + m_Name: OutputLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &809413112841189899 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9178254948045687079} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.031, y: 0.99, z: -1.075} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_Children: [] + m_Father: {fileID: 8870521973379306992} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &656851632036040225 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9178254948045687079} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &1310273135765669717 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9178254948045687079} + m_Text: 1.2345 + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 500 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4294967295 --- !u!1 &9191179479151558189 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Horizontal.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderHorizontal.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Horizontal.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderHorizontal.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Vertical.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderVertical.prefab similarity index 91% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Vertical.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderVertical.prefab index a14f6baf3ea..055bfec850d 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Vertical.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderVertical.prefab @@ -272,214 +272,6 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!1 &3104200539904800983 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4728146162495744220} - - component: {fileID: 4944115961938640961} - - component: {fileID: 1981544228620122561} - - component: {fileID: 84218326836285299} - - component: {fileID: 6620893258549880666} - m_Layer: 0 - m_Name: OutputLabel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4728146162495744220 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3104200539904800983} - m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5} - m_LocalPosition: {x: 0, y: 0, z: 3.5} - m_LocalScale: {x: 0.26708344, y: 0.26708338, z: 0.6410001} - m_Children: [] - m_Father: {fileID: 5293869241137164879} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -0.32, y: 1.05} - m_SizeDelta: {x: 20, y: 5} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!23 &4944115961938640961 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3104200539904800983} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1981544228620122561 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3104200539904800983} - m_Mesh: {fileID: 0} ---- !u!222 &84218326836285299 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3104200539904800983} - m_CullTransparentMesh: 0 ---- !u!114 &6620893258549880666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3104200539904800983} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_text: 1,23 - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_sharedMaterial: {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 18 - m_fontSizeBase: 18 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 257 - m_isAlignmentEnumConverted: 1 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 0 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 15.908832, w: 2.0785923} - m_textInfo: - textComponent: {fileID: 6620893258549880666} - characterCount: 4 - spriteCount: 0 - spaceCount: 0 - wordCount: 2 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_havePropertiesChanged: 0 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_isInputParsingRequired: 0 - m_inputSource: 0 - m_hasFontAssetChanged: 0 - m_renderer: {fileID: 4944115961938640961} - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_maskType: 0 --- !u!1 &3261942694279469377 GameObject: m_ObjectHideFlags: 0 @@ -1097,7 +889,7 @@ GameObject: m_Component: - component: {fileID: 5293869240424762248} m_Layer: 0 - m_Name: 3DSlider (2) + m_Name: EyeTrackingDemoSliderVertical m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1155,7 +947,7 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: -0.0165} m_LocalScale: {x: 0.04, y: 0.01, z: 0.04} m_Children: - - {fileID: 4728146162495744220} + - {fileID: 7320792328468726041} - {fileID: 8076477931339720848} m_Father: {fileID: 5293869240424762248} m_RootOrder: 2 @@ -1267,7 +1059,7 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null useAsSlider: 1 - txtOutput_sliderValue: {fileID: 0} + txtOutput_sliderValue: {fileID: 7731428256366926128} slider_snapToNearestDecimal: 0.1 --- !u!114 &5293869241282730092 MonoBehaviour: @@ -1416,6 +1208,97 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!1 &6401212877872299946 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7320792328468726041} + - component: {fileID: 1225291977543477162} + - component: {fileID: 7731428256366926128} + m_Layer: 0 + m_Name: OutputLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7320792328468726041 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6401212877872299946} + m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5} + m_LocalPosition: {x: 0.05, y: 1.05, z: 1.17} + m_LocalScale: {x: 0.010000002, y: 0.01, z: 0.010000002} + m_Children: [] + m_Father: {fileID: 5293869241137164879} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &1225291977543477162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6401212877872299946} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &7731428256366926128 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6401212877872299946} + m_Text: 1.23 + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 500 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4294967295 --- !u!1 &6419275782176239997 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Vertical.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderVertical.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Prefabs/3DSlider - Vertical.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Prefabs/EyeTrackingDemoSliderVertical.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/GrabReleaseDetector.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/GrabReleaseDetector.cs similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/GrabReleaseDetector.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/GrabReleaseDetector.cs index e1f8d5dd2bb..896c905d476 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/GrabReleaseDetector.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/GrabReleaseDetector.cs @@ -23,12 +23,12 @@ void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData even OnGrab.Invoke(); } - void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } - void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData) { Debug.Log("OnRelease"); OnRelease.Invoke(); } + + void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/GrabReleaseDetector.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/GrabReleaseDetector.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/GrabReleaseDetector.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/GrabReleaseDetector.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/MoveObjByEyeGaze.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/MoveObjByEyeGaze.cs similarity index 97% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/MoveObjByEyeGaze.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/MoveObjByEyeGaze.cs index 13e2b98f59f..beee4eeac45 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/MoveObjByEyeGaze.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/MoveObjByEyeGaze.cs @@ -21,7 +21,24 @@ public class MoveObjByEyeGaze : MonoBehaviour, IMixedRealityPointerHandler, IMixedRealityHandJointHandler { - private IMixedRealityEyeGazeProvider EyeTrackingProvider => eyeTrackingProvider ?? (eyeTrackingProvider = MixedRealityToolkit.InputSystem?.EyeGazeProvider); + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + + private IMixedRealityEyeGazeProvider EyeTrackingProvider => eyeTrackingProvider ?? (eyeTrackingProvider = InputSystem?.EyeGazeProvider); private IMixedRealityEyeGazeProvider eyeTrackingProvider = null; #region Serialized variables @@ -242,12 +259,12 @@ void IMixedRealitySpeechHandler.OnSpeechKeywordRecognized(SpeechEventData eventD if (voiceAction_PutThis == eventData.MixedRealityInputAction) { DragAndDrop_Start(); - MixedRealityToolkit.InputSystem.PushModalInputHandler(gameObject); + InputSystem.PushModalInputHandler(gameObject); } else if (voiceAction_OverHere == eventData.MixedRealityInputAction) { DragAndDrop_Finish(); - MixedRealityToolkit.InputSystem.PopModalInputHandler(); + InputSystem.PopModalInputHandler(); } } #endregion @@ -304,8 +321,6 @@ void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData even } } - void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } - void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData eventData) { } #endregion @@ -353,7 +368,7 @@ private void HandDrag_Start() handPos_relative = Vector3.zero; handPos_absolute = Vector3.zero; DragAndDrop_Start(); - MixedRealityToolkit.InputSystem.PushModalInputHandler(gameObject); + InputSystem.PushModalInputHandler(gameObject); } } @@ -368,7 +383,7 @@ private void HandDrag_Stop() handIsPinching = false; handPos_relative = Vector3.zero; DragAndDrop_Finish(); - MixedRealityToolkit.InputSystem.PopModalInputHandler(); + InputSystem.PopModalInputHandler(); currEngagedHand = Handedness.None; } } @@ -787,5 +802,7 @@ private bool ShouldObjBeWarped(float deltaHand, float distTargetAndHitPos, bool return false; } } + + void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/MoveObjByEyeGaze.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/MoveObjByEyeGaze.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/MoveObjByEyeGaze.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/MoveObjByEyeGaze.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/SnapTo.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/SnapTo.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/SnapTo.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/SnapTo.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/SnapTo.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/SnapTo.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/SnapTo.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/SnapTo.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TransportToRespawnLocation.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TransportToRespawnLocation.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TransportToRespawnLocation.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TransportToRespawnLocation.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TransportToRespawnLocation.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TransportToRespawnLocation.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TransportToRespawnLocation.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TransportToRespawnLocation.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TriggerZone_PlaceObjsWithin.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TriggerZonePlaceObjsWithin.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TriggerZone_PlaceObjsWithin.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TriggerZonePlaceObjsWithin.cs index a97b236835e..f37ad58b375 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TriggerZone_PlaceObjsWithin.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TriggerZonePlaceObjsWithin.cs @@ -6,7 +6,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking { - public class TriggerZone_PlaceObjsWithin : MonoBehaviour + public class TriggerZonePlaceObjsWithin : MonoBehaviour { [Tooltip("Array of referenced game objects that are supposed to be placed within the collider of this target.).")] [SerializeField] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TriggerZone_PlaceObjsWithin.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TriggerZonePlaceObjsWithin.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Scripts/TriggerZone_PlaceObjsWithin.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetPositioning/Scripts/TriggerZonePlaceObjsWithin.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 2.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 2.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 2.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 2.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 2.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 2.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/EyeGazeCursor 2.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/EyeGazeCursor 2.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky 1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky 1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky 1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky 1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky 1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky 1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky 1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky 1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Bucky.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Bucky.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa 1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa 1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa 1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa 1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa 1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa 1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa 1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa 1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_Icosa.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_Icosa.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_blank_tile.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_blank_tile.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_blank_tile.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_blank_tile.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_blank_tile.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_blank_tile.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_blank_tile.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_blank_tile.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_black.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_black.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_black.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_black.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_black.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_black.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_black.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_black.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_green.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_green.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_green.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_green.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_green.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_green.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_green.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_green.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 2.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 2.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 2.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 2.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 2.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 2.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver 2.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver 2.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_silver.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_silver.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow 1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow 1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow 1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow 1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow 1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow 1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow 1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow 1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_color_yellow.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_color_yellow.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_mrtk_boxtile.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_mrtk_boxtile.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_mrtk_boxtile.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_mrtk_boxtile.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_mrtk_boxtile.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_mrtk_boxtile.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_mrtk_boxtile.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_mrtk_boxtile.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_notification_box_5x1.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_notification_box_5x1.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_notification_box_5x1.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_notification_box_5x1.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_notification_box_5x1.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_notification_box_5x1.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_notification_box_5x1.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_notification_box_5x1.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_rotationSphere.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_rotationSphere.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_rotationSphere.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_rotationSphere.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_rotationSphere.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_rotationSphere.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Materials/mat_rotationSphere.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Materials/mat_rotationSphere.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Bucky.fbx b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Bucky.fbx similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Bucky.fbx rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Bucky.fbx diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Bucky.fbx.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Bucky.fbx.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Bucky.fbx.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Bucky.fbx.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Icosa.fbx b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Icosa.fbx similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Icosa.fbx rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Icosa.fbx diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Icosa.fbx.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Icosa.fbx.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Models/Model_Icosa.fbx.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Models/Model_Icosa.fbx.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (1).prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (1).prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (1).prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (1).prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (1).prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (1).prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (1).prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (1).prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (2).prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (2).prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (2).prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (2).prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (2).prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (2).prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Prefabs/TargetType (2).prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Prefabs/TargetType (2).prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/HitBehavior_DestroyOnSelect.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/HitBehaviorDestroyOnSelect.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/HitBehavior_DestroyOnSelect.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/HitBehaviorDestroyOnSelect.cs index 2959fd8e0f1..740e1357eb8 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/HitBehavior_DestroyOnSelect.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/HitBehaviorDestroyOnSelect.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// Destroys the game object when selected and optionally plays a sound or animation when destroyed. /// [RequireComponent(typeof(EyeTrackingTarget))] - public class HitBehavior_DestroyOnSelect : MonoBehaviour + public class HitBehaviorDestroyOnSelect : MonoBehaviour { [Tooltip("Visual effect (e.g., particle explosion or animation) that is played when a target is selected.")] [SerializeField] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/HitBehavior_DestroyOnSelect.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/HitBehaviorDestroyOnSelect.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/HitBehavior_DestroyOnSelect.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/HitBehaviorDestroyOnSelect.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/OnLookAt_Rotate.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/OnLookAtRotate.cs similarity index 95% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/OnLookAt_Rotate.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/OnLookAtRotate.cs index db55eea63ac..56911c8afc2 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/OnLookAt_Rotate.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/OnLookAtRotate.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// The associated GameObject will rotate when being looked at based on a given direction. /// [RequireComponent(typeof(EyeTrackingTarget))] - public class OnLookAt_Rotate : BaseEyeFocusHandler + public class OnLookAtRotate : BaseEyeFocusHandler { #region Serialized variables diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/OnLookAt_Rotate.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/OnLookAtRotate.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/OnLookAt_Rotate.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/OnLookAtRotate.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupCreator_Radial.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupCreatorRadial.cs similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupCreator_Radial.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupCreatorRadial.cs index 04a53a28766..7330dbefe0a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupCreator_Radial.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupCreatorRadial.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// Handles the creation of a group of targets based on a list of given templates. /// - public class TargetGroupCreator_Radial : MonoBehaviour + public class TargetGroupCreatorRadial : MonoBehaviour { #region Variables [Tooltip("Target templates from which the group of targets will be created.")] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupCreator_Radial.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupCreatorRadial.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupCreator_Radial.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupCreatorRadial.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupIterator.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupIterator.cs similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupIterator.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupIterator.cs index c87dad98bee..179e1f10730 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupIterator.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupIterator.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// Iterates through a given set of targets based on a required TargetGroupCreator. /// - [RequireComponent(typeof(TargetGroupCreator_Radial))] + [RequireComponent(typeof(TargetGroupCreatorRadial))] public class TargetGroupIterator : MonoBehaviour, IMixedRealityPointerHandler { #region Variables @@ -94,7 +94,7 @@ public void ResetIterator() { currTargetIndex = 0; ResetAmountOfTries(); - targets = GetComponent().InstantiatedObjects; + targets = GetComponent().InstantiatedObjects; // Randomize the order in which targets are highlighted if (Randomize) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupIterator.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupIterator.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/TargetGroupIterator.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/TargetGroupIterator.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/ToggleGameObject.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/ToggleGameObject.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/ToggleGameObject.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/ToggleGameObject.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/ToggleGameObject.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/ToggleGameObject.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Scripts/ToggleGameObject.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Scripts/ToggleGameObject.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/notification_box_5x1.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/notification_box_5x1.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/notification_box_5x1.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/notification_box_5x1.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/notification_box_5x1.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/notification_box_5x1.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/notification_box_5x1.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/notification_box_5x1.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/tex_mrtk_tile.psd b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/tex_mrtk_tile.psd similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/tex_mrtk_tile.psd rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/tex_mrtk_tile.psd diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/tex_mrtk_tile.psd.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/tex_mrtk_tile.psd.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetSelections/Textures/tex_mrtk_tile.psd.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoTargetSelections/Textures/tex_mrtk_tile.psd.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_SlateFrame.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_SlateFrame.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_SlateFrame.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_SlateFrame.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_SlateFrame.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_SlateFrame.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_SlateFrame.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_SlateFrame.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_btn_backgr.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_btn_backgr.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_btn_backgr.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_btn_backgr.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_btn_backgr.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_btn_backgr.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_btn_backgr.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_btn_backgr.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_emptyHeatmapMaterial.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_emptyHeatmapMaterial.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_emptyHeatmapMaterial.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_emptyHeatmapMaterial.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_emptyHeatmapMaterial.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_emptyHeatmapMaterial.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_emptyHeatmapMaterial.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_emptyHeatmapMaterial.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_heatramp.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_heatramp.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_heatramp.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_heatramp.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_heatramp.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_heatramp.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_heatramp.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_heatramp.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_01.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_01.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_01.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_01.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_01.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_01.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_01.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_01.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_02.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_02.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_02.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_02.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_02.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_02.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_02.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_02.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_03.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_03.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_03.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_03.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_03.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_03.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_03.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_03.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_04.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_04.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_04.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_04.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_04.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_04.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_hololens2_04.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_hololens2_04.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_LoadRecordedData.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_LoadRecordedData.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_LoadRecordedData.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_LoadRecordedData.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_LoadRecordedData.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_LoadRecordedData.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_LoadRecordedData.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_LoadRecordedData.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PauseReplay.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PauseReplay.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PauseReplay.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PauseReplay.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PauseReplay.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PauseReplay.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PauseReplay.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PauseReplay.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData_Inactive.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData_Inactive.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData_Inactive.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData_Inactive.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData_Inactive.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData_Inactive.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_PlayData_Inactive.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_PlayData_Inactive.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StartRecording.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StartRecording.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StartRecording.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StartRecording.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StartRecording.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StartRecording.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StartRecording.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StartRecording.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StopRecording.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StopRecording.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StopRecording.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StopRecording.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StopRecording.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StopRecording.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_StopRecording.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_StopRecording.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_heatcircle01.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_heatcircle01.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_heatcircle01.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_heatcircle01.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_heatcircle01.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_heatcircle01.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_icon_heatcircle01.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_icon_heatcircle01.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_hitpnts.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_hitpnts.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_hitpnts.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_hitpnts.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_hitpnts.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_hitpnts.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_hitpnts.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_hitpnts.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_origins.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_origins.mat similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_origins.mat rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_origins.mat diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_origins.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_origins.mat.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Materials/mat_vis_et_origins.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Materials/mat_vis_et_origins.mat.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs/HolographicButton.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs/HolographicButton.prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs/HolographicButton.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs/HolographicButton.prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs/HolographicButton.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs/HolographicButton.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Prefabs/HolographicButton.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Prefabs/HolographicButton.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/AsyncHelpers.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/AsyncHelpers.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/AsyncHelpers.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/AsyncHelpers.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/AsyncHelpers.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/AsyncHelpers.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/AsyncHelpers.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/AsyncHelpers.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/BasicInputLogger.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/BasicInputLogger.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/BasicInputLogger.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/BasicInputLogger.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/BasicInputLogger.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/BasicInputLogger.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/BasicInputLogger.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/BasicInputLogger.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/CustomInputLogger.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/CustomInputLogger.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/CustomInputLogger.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/CustomInputLogger.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/CustomInputLogger.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/CustomInputLogger.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/CustomInputLogger.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/CustomInputLogger.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/DrawOnTexture.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/DrawOnTexture.cs similarity index 94% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/DrawOnTexture.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/DrawOnTexture.cs index deac482545f..010c6ac6eba 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/DrawOnTexture.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/DrawOnTexture.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using Microsoft.MixedReality.Toolkit.Input; using System.Collections; using UnityEngine; @@ -26,11 +27,28 @@ public class DrawOnTexture : MonoBehaviour public Material HeatmapOverlayMaterialTemplate; + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + private void Update() { - if (UseLiveInputStream && MixedRealityToolkit.InputSystem?.EyeGazeProvider?.GazeTarget == gameObject && MixedRealityToolkit.InputSystem.EyeGazeProvider.IsEyeGazeValid) + if (UseLiveInputStream && InputSystem?.EyeGazeProvider?.GazeTarget == gameObject && InputSystem.EyeGazeProvider.IsEyeGazeValid) { - DrawAtThisHitPos(MixedRealityToolkit.InputSystem.EyeGazeProvider.HitPosition); + DrawAtThisHitPos(InputSystem.EyeGazeProvider.HitPosition); } } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/DrawOnTexture.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/DrawOnTexture.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/DrawOnTexture.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/DrawOnTexture.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/InputPointerVisualizer.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/InputPointerVisualizer.cs similarity index 95% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/InputPointerVisualizer.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/InputPointerVisualizer.cs index 27e83b4e223..b476217aacb 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/InputPointerVisualizer.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/InputPointerVisualizer.cs @@ -75,6 +75,23 @@ public enum VisModes private bool isPaused = false; private int numberOfTraceSamples; + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + void Start() { AmountOfSamples = (int)nhist; @@ -327,7 +344,7 @@ public void UpdateDataVis(Ray cursorRay) void Update() { - if (MixedRealityToolkit.InputSystem?.EyeGazeProvider == null) + if (InputSystem?.EyeGazeProvider == null) { return; } @@ -339,7 +356,7 @@ void Update() if ((!isPaused) && (useLiveInputStream)) { - UpdateDataVis(new Ray(MixedRealityToolkit.InputSystem.EyeGazeProvider.GazeOrigin, MixedRealityToolkit.InputSystem.EyeGazeProvider.GazeDirection)); + UpdateDataVis(new Ray(InputSystem.EyeGazeProvider.GazeOrigin, InputSystem.EyeGazeProvider.GazeDirection)); } } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/InputPointerVisualizer.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/InputPointerVisualizer.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/InputPointerVisualizer.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/InputPointerVisualizer.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructure.cs similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructure.cs diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructure.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructure.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure_EyeGaze.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructureEyeGaze.cs similarity index 82% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure_EyeGaze.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructureEyeGaze.cs index 12708d59b03..c25e86cb05f 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure_EyeGaze.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructureEyeGaze.cs @@ -7,9 +7,9 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging { - public class LogStructure_EyeGaze : LogStructure + public class LogStructureEyeGaze : LogStructure { - private IMixedRealityEyeGazeProvider EyeTrackingProvider => eyeTrackingProvider ?? (eyeTrackingProvider = MixedRealityToolkit.InputSystem?.EyeGazeProvider); + private IMixedRealityEyeGazeProvider EyeTrackingProvider => eyeTrackingProvider ?? (eyeTrackingProvider = InputSystem?.EyeGazeProvider); private IMixedRealityEyeGazeProvider eyeTrackingProvider = null; public override string[] GetHeaderColumns() @@ -41,6 +41,23 @@ public override string[] GetHeaderColumns() }; } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + public override object[] GetData(string inputType, string inputStatus, EyeTrackingTarget intTarget) { // Let's prepare all the data we wanna log diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure_EyeGaze.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructureEyeGaze.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/LogStructure_EyeGaze.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/LogStructureEyeGaze.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/OnSelect_VisualizerInputController.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/OnSelectVisualizerInputController.cs similarity index 93% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/OnSelect_VisualizerInputController.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/OnSelectVisualizerInputController.cs index d8d823906e6..fb0efab1622 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/OnSelect_VisualizerInputController.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/OnSelectVisualizerInputController.cs @@ -11,7 +11,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// When the button is selected, it triggers starting the specified scene. /// [RequireComponent(typeof(EyeTrackingTarget))] - public class OnSelect_VisualizerInputController : BaseEyeFocusHandler, IMixedRealityPointerHandler + public class OnSelectVisualizerInputController : BaseEyeFocusHandler, IMixedRealityPointerHandler { [SerializeField] public UnityEvent EventToTrigger; @@ -35,8 +35,8 @@ void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData e void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData eventData) { } - void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } - void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData) { } + + void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData) { } } } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/OnSelect_VisualizerInputController.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/OnSelectVisualizerInputController.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/OnSelect_VisualizerInputController.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/OnSelectVisualizerInputController.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmap.cs similarity index 90% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmap.cs index 4a4bec8ab65..a8432cc19e7 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmap.cs @@ -24,14 +24,14 @@ public class ParticleHeatmap : MonoBehaviour private int particleDecalDataIndex; private ParticleSystem particleSys; private ParticleSystem.EmissionModule emissionModule; - private List particleData; + private List particleData; private void Start() { // Initialize particle data handlers particleSys = GetComponent(); emissionModule = particleSys.emission; - particleData = new List(); + particleData = new List(); } public void SetParticle(Vector3 pos) @@ -41,7 +41,7 @@ public void SetParticle(Vector3 pos) particleDecalDataIndex = 0; } - ParticleHeatmap_ParticleData newParticle = new ParticleHeatmap_ParticleData(); + ParticleHeatmapParticleData newParticle = new ParticleHeatmapParticleData(); newParticle.position = pos; newParticle.radiusInMeter = Random.Range(minParticleSize, maxParticleSize); @@ -69,7 +69,7 @@ private float DetermineNormalizedIntensity(Vector3 pos, float radius) { float tmpIntensity = 0; - foreach (ParticleHeatmap_ParticleData point in particleData) + foreach (ParticleHeatmapParticleData point in particleData) { if (pos != point.position) { @@ -84,7 +84,7 @@ private float DetermineNormalizedIntensity(Vector3 pos, float radius) private void UpdateColorForAllParticles() { - foreach (ParticleHeatmap_ParticleData particle in particleData) + foreach (ParticleHeatmapParticleData particle in particleData) { particle.color = colorGradient.Evaluate(DetermineNormalizedIntensity(particle.position, particle.radiusInMeter)); } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmap.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmap.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap_ParticleData.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmapParticleData.cs similarity index 89% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap_ParticleData.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmapParticleData.cs index f50b111d28c..ef204f42d4e 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap_ParticleData.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmapParticleData.cs @@ -5,7 +5,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking { - public class ParticleHeatmap_ParticleData + public class ParticleHeatmapParticleData { public Vector3 position; public float radiusInMeter; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap_ParticleData.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmapParticleData.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/ParticleHeatmap_ParticleData.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/ParticleHeatmapParticleData.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Playback.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Playback.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs index 9e9ea608cfa..3b7386ee442 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Playback.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs @@ -15,7 +15,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging { - public class UserInput_Playback : MonoBehaviour + public class UserInputPlayback : MonoBehaviour { [SerializeField] private string customFilename = ""; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Playback.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Playback.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputPlayback.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorder.cs similarity index 92% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorder.cs index b5181a9d185..713fa933bf8 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorder.cs @@ -7,7 +7,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging { - public class UserInput_Recorder : CustomInputLogger + public class UserInputRecorder : CustomInputLogger { public string FilenameToUse = "\\test\folder\\"; @@ -17,14 +17,14 @@ public class UserInput_Recorder : CustomInputLogger private bool automaticLogging = true; #region Singleton - private static UserInput_Recorder instance; - public static UserInput_Recorder Instance + private static UserInputRecorder instance; + public static UserInputRecorder Instance { get { if (instance == null) { - instance = FindObjectOfType(); + instance = FindObjectOfType(); } return instance; } @@ -142,9 +142,9 @@ void Update() public override void OnDestroy() { // Disable listening to user input - if (UserInput_Recorder.Instance != null) + if (UserInputRecorder.Instance != null) { - UserInput_Recorder.Instance.StopLoggingAndSave(); + UserInputRecorder.Instance.StopLoggingAndSave(); } base.OnDestroy(); diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorder.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorder.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_Feedback.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderFeedback.cs similarity index 97% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_Feedback.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderFeedback.cs index 8fa1de410d4..eaadf7e4072 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_Feedback.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderFeedback.cs @@ -6,7 +6,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging { - public class UserInput_Recorder_Feedback : MonoBehaviour + public class UserInputRecorderFeedback : MonoBehaviour { [SerializeField] private TextMesh statusText = null; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_Feedback.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderFeedback.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_Feedback.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderFeedback.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_UIController.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderUIController.cs similarity index 97% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_UIController.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderUIController.cs index d388b50a16f..32afa4296af 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_UIController.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderUIController.cs @@ -5,7 +5,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Logging { - public class UserInput_Recorder_UIController : MonoBehaviour + public class UserInputRecorderUIController : MonoBehaviour { [SerializeField] private GameObject btn_StartRecording = null; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_UIController.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderUIController.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Scripts/UserInput_Recorder_UIController.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Scripts/UserInputRecorderUIController.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_drawCanvasForHeatmap.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_drawCanvasForHeatmap.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_drawCanvasForHeatmap.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_drawCanvasForHeatmap.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_drawCanvasForHeatmap.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_drawCanvasForHeatmap.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_drawCanvasForHeatmap.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_drawCanvasForHeatmap.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_heatramp.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_heatramp.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_heatramp.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_heatramp.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_heatramp.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_heatramp.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_heatramp.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_heatramp.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_LoadData.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_LoadData.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_LoadData.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_LoadData.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_LoadData.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_LoadData.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_LoadData.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_LoadData.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Pause.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Pause.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Pause.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Pause.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Pause.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Pause.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Pause.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Pause.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Play.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Play.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Play.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Play.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Play.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Play.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_Play.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_Play.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StartRecording.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StartRecording.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StartRecording.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StartRecording.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StartRecording.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StartRecording.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StartRecording.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StartRecording.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StopRecording.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StopRecording.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StopRecording.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StopRecording.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StopRecording.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StopRecording.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_StopRecording.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_StopRecording.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_vis.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_vis.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_vis.png rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_vis.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_vis.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_vis.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_icon_vis.png.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_icon_vis.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture1.jpg b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture1.jpg similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture1.jpg rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture1.jpg diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture1.jpg.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture1.jpg.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture1.jpg.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture1.jpg.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture2.jpg b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture2.jpg similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture2.jpg rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture2.jpg diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture2.jpg.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture2.jpg.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_Visualizer/Textures/tex_picture2.jpg.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoVisualizer/Textures/tex_picture2.jpg.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/FollowEyeGaze_GazeProvider.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/FollowEyeGaze_GazeProvider.cs deleted file mode 100644 index c58fb514eac..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_BasicSetup/Scripts/FollowEyeGaze_GazeProvider.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking -{ - /// - /// Sample for allowing the game object that this script is attached to follow the user's eye gaze - /// at a given distance of "DefaultDistanceInMeters". - /// - public class FollowEyeGaze_GazeProvider : MonoBehaviour - { - [Tooltip("Display the game object along the eye gaze ray at a default distance (in meters).")] - [SerializeField] - private float defaultDistanceInMeters = 2f; - - private void Update() - { - if (MixedRealityToolkit.InputSystem?.GazeProvider != null) - { - gameObject.transform.position = MixedRealityToolkit.InputSystem.GazeProvider.GazeOrigin + MixedRealityToolkit.InputSystem.GazeProvider.GazeDirection.normalized * defaultDistanceInMeters; - } - } - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat deleted file mode 100644 index c7d65887e11..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat +++ /dev/null @@ -1,82 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Frame - m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF - m_LightmapFlags: 1 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 - stringTagMap: - RenderType: Transparent - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 2800000, guid: fa0251743c5f74043ac68d2759071d11, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: b8785da0d2db30b479c60704645f4fca, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 2800000, guid: fe0b00f3d3005ba4a88ca5695291e40d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: 5 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 10 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 3 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 0 - m_Colors: - - _Color: {r: 0.6886792, g: 0.6886792, b: 0.6886792, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat deleted file mode 100644 index 4ae4898a579..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat +++ /dev/null @@ -1,147 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image01 - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _EMISSION _HOVER_LIGHT - _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 1 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 2000 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ChannelMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 3bc246eb2f289bc4ca07a88ebda41cda, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AlbedoAlphaMode: 0 - - _AlbedoAssignedAtRuntime: 0 - - _BlendOp: 0 - - _BorderLight: 0 - - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 - - _BumpScale: 1 - - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 0 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 0 - - _EdgeSmoothingValue: 0.002 - - _EnableChannelMap: 0 - - _EnableEmission: 1 - - _EnableHoverColorOpaqueOverride: 0 - - _EnableHoverColorOverride: 0 - - _EnableLocalSpaceTriplanarMapping: 0 - - _EnableNormalMap: 0 - - _EnableTriplanarMapping: 0 - - _EnvironmentColorIntensity: 0.5 - - _EnvironmentColorThreshold: 1.5 - - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.85 - - _FadeCompleteDistance: 0.5 - - _GlossMapScale: 1 - - _Glossiness: 1 - - _GlossyReflections: 1 - - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 - - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 0 - - _NearPlaneFade: 0 - - _NormalMapScale: 1 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Reflections: 1 - - _Refraction: 0 - - _RefractiveIndex: 0 - - _RenderQueueOverride: -1 - - _RimLight: 0 - - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 - - _RoundCornerRadius: 0.25 - - _RoundCorners: 0 - - _Smoothness: 1 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _Stencil: 0 - - _StencilComparison: 0 - - _StencilOperation: 0 - - _StencilReference: 0 - - _TriplanarMappingBlendSharpness: 4 - - _UVSec: 0 - - _ZTest: 4 - - _ZWrite: 1 - m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat deleted file mode 100644 index 771350535a3..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat +++ /dev/null @@ -1,147 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image02 - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _EMISSION _HOVER_LIGHT - _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 2000 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ChannelMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 8902c3c9a9cbaff43a9fc5737cb9192c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AlbedoAlphaMode: 0 - - _AlbedoAssignedAtRuntime: 0 - - _BlendOp: 0 - - _BorderLight: 0 - - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 - - _BumpScale: 1 - - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 0 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 0 - - _EdgeSmoothingValue: 0.002 - - _EnableChannelMap: 0 - - _EnableEmission: 1 - - _EnableHoverColorOpaqueOverride: 0 - - _EnableHoverColorOverride: 0 - - _EnableLocalSpaceTriplanarMapping: 0 - - _EnableNormalMap: 0 - - _EnableTriplanarMapping: 0 - - _EnvironmentColorIntensity: 0.5 - - _EnvironmentColorThreshold: 1.5 - - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.85 - - _FadeCompleteDistance: 0.5 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 - - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 0 - - _NearPlaneFade: 0 - - _NormalMapScale: 1 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Reflections: 1 - - _Refraction: 0 - - _RefractiveIndex: 0 - - _RenderQueueOverride: -1 - - _RimLight: 0 - - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 - - _RoundCornerRadius: 0.25 - - _RoundCorners: 0 - - _Smoothness: 0.4 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _Stencil: 0 - - _StencilComparison: 0 - - _StencilOperation: 0 - - _StencilReference: 0 - - _TriplanarMappingBlendSharpness: 4 - - _UVSec: 0 - - _ZTest: 4 - - _ZWrite: 1 - m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat deleted file mode 100644 index 6dcfbfa74e0..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat +++ /dev/null @@ -1,147 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image03 - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _EMISSION _HOVER_LIGHT - _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 2000 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ChannelMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 6739b13fc20d6a748b1792257eb20a4c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AlbedoAlphaMode: 0 - - _AlbedoAssignedAtRuntime: 0 - - _BlendOp: 0 - - _BorderLight: 0 - - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 - - _BumpScale: 1 - - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 0 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 0 - - _EdgeSmoothingValue: 0.002 - - _EnableChannelMap: 0 - - _EnableEmission: 1 - - _EnableHoverColorOpaqueOverride: 0 - - _EnableHoverColorOverride: 0 - - _EnableLocalSpaceTriplanarMapping: 0 - - _EnableNormalMap: 0 - - _EnableTriplanarMapping: 0 - - _EnvironmentColorIntensity: 0.5 - - _EnvironmentColorThreshold: 1.5 - - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.85 - - _FadeCompleteDistance: 0.5 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 - - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 0 - - _NearPlaneFade: 0 - - _NormalMapScale: 1 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Reflections: 1 - - _Refraction: 0 - - _RefractiveIndex: 0 - - _RenderQueueOverride: -1 - - _RimLight: 0 - - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 - - _RoundCornerRadius: 0.25 - - _RoundCorners: 0 - - _Smoothness: 0.4 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _Stencil: 0 - - _StencilComparison: 0 - - _StencilOperation: 0 - - _StencilReference: 0 - - _TriplanarMappingBlendSharpness: 4 - - _UVSec: 0 - - _ZTest: 4 - - _ZWrite: 1 - m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat.meta deleted file mode 100644 index 16abf82c3bd..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f744ce37a56750040a9b577f39397d8d -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat deleted file mode 100644 index b5b6b725f72..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat +++ /dev/null @@ -1,147 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image03_preview - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _BORDER_LIGHT_USES_HOVER_COLOR - _DIRECTIONAL_LIGHT _HOVER_LIGHT _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 - stringTagMap: - RenderType: Transparent - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ChannelMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 6739b13fc20d6a748b1792257eb20a4c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AlbedoAlphaMode: 0 - - _AlbedoAssignedAtRuntime: 0 - - _BlendOp: 0 - - _BorderLight: 0 - - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 - - _BumpScale: 1 - - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 2 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 10 - - _EdgeSmoothingValue: 0.002 - - _EnableChannelMap: 0 - - _EnableEmission: 0 - - _EnableHoverColorOpaqueOverride: 0 - - _EnableHoverColorOverride: 0 - - _EnableLocalSpaceTriplanarMapping: 0 - - _EnableNormalMap: 0 - - _EnableTriplanarMapping: 0 - - _EnvironmentColorIntensity: 0.5 - - _EnvironmentColorThreshold: 1.5 - - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.85 - - _FadeCompleteDistance: 0.5 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 - - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 2 - - _NearPlaneFade: 0 - - _NormalMapScale: 1 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Reflections: 1 - - _Refraction: 0 - - _RefractiveIndex: 0 - - _RenderQueueOverride: -1 - - _RimLight: 0 - - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 - - _RoundCornerRadius: 0.25 - - _RoundCorners: 0 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 5 - - _Stencil: 0 - - _StencilComparison: 0 - - _StencilOperation: 0 - - _StencilReference: 0 - - _TriplanarMappingBlendSharpness: 4 - - _UVSec: 0 - - _ZTest: 4 - - _ZWrite: 0 - m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 0.3137255} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat.meta deleted file mode 100644 index 87f9caff4b2..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image03_preview.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b3597690c6df49043bf8bc30811f3fda -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat deleted file mode 100644 index 8ef37429621..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat +++ /dev/null @@ -1,147 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image04 - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _EMISSION _HOVER_LIGHT - _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 2000 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ChannelMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 5bc99d97eb86d094d8a8a71c7f7d95f3, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _AlbedoAlphaMode: 0 - - _AlbedoAssignedAtRuntime: 0 - - _BlendOp: 0 - - _BorderLight: 0 - - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 - - _BumpScale: 1 - - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 0 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 0 - - _EdgeSmoothingValue: 0.002 - - _EnableChannelMap: 0 - - _EnableEmission: 1 - - _EnableHoverColorOpaqueOverride: 0 - - _EnableHoverColorOverride: 0 - - _EnableLocalSpaceTriplanarMapping: 0 - - _EnableNormalMap: 0 - - _EnableTriplanarMapping: 0 - - _EnvironmentColorIntensity: 0.5 - - _EnvironmentColorThreshold: 1.5 - - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.85 - - _FadeCompleteDistance: 0.5 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 - - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 0 - - _NearPlaneFade: 0 - - _NormalMapScale: 1 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Reflections: 1 - - _Refraction: 0 - - _RefractiveIndex: 0 - - _RenderQueueOverride: -1 - - _RimLight: 0 - - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 - - _RoundCornerRadius: 0.25 - - _RoundCorners: 0 - - _Smoothness: 0.4 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _Stencil: 0 - - _StencilComparison: 0 - - _StencilOperation: 0 - - _StencilReference: 0 - - _TriplanarMappingBlendSharpness: 4 - - _UVSec: 0 - - _ZTest: 4 - - _ZWrite: 1 - m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat.meta deleted file mode 100644 index a10e4c9ad9a..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 43d11448ea7e850468ee93c8c7a8ade4 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat.meta deleted file mode 100644 index 19fc421a72b..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a76a11653ff630040b0a90e02a7d7d79 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat deleted file mode 100644 index 824b0f05937..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat +++ /dev/null @@ -1,83 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Image_Frame - m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _GLOSSYREFLECTIONS_OFF _NORMALMAP - _SPECULARHIGHLIGHTS_OFF - m_LightmapFlags: 1 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 - stringTagMap: - RenderType: Transparent - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 2800000, guid: 9e4aa4e4f31a837418a98f7ef566ef5c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 3da35daea2b7b1d4a954d8a09300b182, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 2800000, guid: fe0b00f3d3005ba4a88ca5695291e40d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: -10 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 10 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 0 - - _Metallic: 0 - - _Mode: 3 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 0 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 0 - m_Colors: - - _Color: {r: 0.6886792, g: 0.6886792, b: 0.6886792, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX deleted file mode 100644 index 72b9bccc623..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX.meta deleted file mode 100644 index 300d9666ee3..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1/Painting.FBX.meta +++ /dev/null @@ -1,100 +0,0 @@ -fileFormatVersion: 2 -guid: 2fd2ed57af01e8241ae60b839f0bba55 -ModelImporter: - serializedVersion: 23 - fileIDToRecycleName: - 100000: Farme - 100002: Image - 100004: //RootNode - 400000: Farme - 400002: Image - 400004: //RootNode - 2100000: Painting5 - 2300000: Farme - 2300002: Image - 3300000: Farme - 3300002: Image - 4300000: Farme - 4300002: Image - externalObjects: {} - materials: - importMaterials: 1 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - keepQuads: 0 - weldVertices: 1 - preserveHierarchy: 0 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - useFileScale: 1 - previousCalculatedGlobalScale: 1 - hasPreviousCalculatedGlobalScale: 0 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - serializedVersion: 2 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 0 - humanoidOversampling: 1 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png deleted file mode 100644 index 069fea4e560..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png.meta deleted file mode 100644 index 87396fb3138..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_A.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 3da35daea2b7b1d4a954d8a09300b182 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png deleted file mode 100644 index 1c8b7778c0b..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png.meta deleted file mode 100644 index 4f8f8184dea..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_N.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 9e4aa4e4f31a837418a98f7ef566ef5c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 1 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png deleted file mode 100644 index 980b93810bd..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png.meta deleted file mode 100644 index cd2c2e47e99..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame/Painting_S.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 43987af8fc940e74bbf978f0825de2c3 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image.meta deleted file mode 100644 index 673693ee81f..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 91259ae3516617d47adf9f0fe2b8f1fa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png deleted file mode 100644 index 53b47ff902b..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png.meta deleted file mode 100644 index 34e53410917..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image01.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 3bc246eb2f289bc4ca07a88ebda41cda -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png deleted file mode 100644 index fb31095b82a..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png.meta deleted file mode 100644 index b3c9b840c36..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image02.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 8902c3c9a9cbaff43a9fc5737cb9192c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png deleted file mode 100644 index 15660f2b491..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png.meta deleted file mode 100644 index 37658c0940f..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image03.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 6739b13fc20d6a748b1792257eb20a4c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png deleted file mode 100644 index aeab18ce639..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png.meta deleted file mode 100644 index a946c8196e5..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Image/Image04.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 5bc99d97eb86d094d8a8a71c7f7d95f3 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png deleted file mode 100644 index 993ffad516a..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png.meta deleted file mode 100644 index 1e23e2b14df..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/tex_picture_destinationFrames.png.meta +++ /dev/null @@ -1,110 +0,0 @@ -fileFormatVersion: 2 -guid: b8785da0d2db30b479c60704645f4fca -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Windows Store Apps - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_Notification.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos Notification.prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_Notification.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos Notification.prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_Notification.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos Notification.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_Notification.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos Notification.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos_SceneDescriptionPanel.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos SceneDescriptionPanel.prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos_SceneDescriptionPanel.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos SceneDescriptionPanel.prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos_SceneDescriptionPanel.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos SceneDescriptionPanel.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos_SceneDescriptionPanel.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos SceneDescriptionPanel.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_StackedNotification.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos StackedNotification.prefab similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_StackedNotification.prefab rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos StackedNotification.prefab diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_StackedNotification.prefab.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos StackedNotification.prefab.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTracking_StackedNotification.prefab.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/EyeTrackingDemos StackedNotification.prefab.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/MixedRealityBasicSceneSetup.prefab b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/MixedRealityBasicSceneSetup.prefab index a7e38ff9a07..e677ae44601 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/MixedRealityBasicSceneSetup.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Prefabs/MixedRealityBasicSceneSetup.prefab @@ -338,7 +338,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 47c2ae5b12da63c4e970fcb70eead958, type: 3} m_Name: m_EditorClassIdentifier: - SceneToBeLoaded: mrtk_eyes_02_TargetSelection + SceneToBeLoaded: EyeTrackingDemo-02-TargetSelection --- !u!1 &1596409283154020 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoConfigurationProfile.asset index 602b5402a46..d9f6facf25e 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoConfigurationProfile.asset +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoConfigurationProfile.asset @@ -9,27 +9,31 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 + m_GeneratorAsset: {fileID: 0} m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} m_Name: EyeTrackingDemoConfigurationProfile - m_EditorClassIdentifier: + m_EditorClassIdentifier: isCustomProfile: 1 targetExperienceScale: 4 - enableCameraProfile: 1 + enableCameraSystem: 1 cameraProfile: {fileID: 11400000, guid: de38e71178510674fae830377a72888a, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem enableInputSystem: 1 inputSystemProfile: {fileID: 11400000, guid: cc939e5f734608145a0be1e66727eac2, type: 2} inputSystemType: reference: Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem, Microsoft.MixedReality.Toolkit.Services.InputSystem enableBoundarySystem: 0 boundarySystemType: - reference: + reference: boundaryVisualizationProfile: {fileID: 0} enableTeleportSystem: 0 teleportSystemType: - reference: + reference: enableSpatialAwarenessSystem: 0 spatialAwarenessSystemType: - reference: + reference: spatialAwarenessSystemProfile: {fileID: 0} diagnosticsSystemProfile: {fileID: 11400000, guid: 478436bd1083882479a52d067e98e537, type: 2} @@ -38,3 +42,4 @@ MonoBehaviour: reference: Microsoft.MixedReality.Toolkit.Diagnostics.MixedRealityDiagnosticsSystem, Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem registeredServiceProvidersProfile: {fileID: 0} + useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoInputSystemProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoInputSystemProfile.asset index a6da36a9590..fb2f456fa81 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoInputSystemProfile.asset +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Profiles/EyeTrackingDemoInputSystemProfile.asset @@ -53,7 +53,7 @@ MonoBehaviour: componentName: Input Simulation Service priority: 0 runtimePlatform: 16 - deviceManagerProfile: {fileID: 11400000, guid: 41478039094d47641bf4e09c20e61a5a, + deviceManagerProfile: {fileID: 11400000, guid: 0e54184c8f9cca44aad8fdda3f62fd82, type: 2} - componentType: reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider, diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/FollowEyeGaze.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/FollowEyeGaze.cs index a8d6247dc9c..ecf85fcd368 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/FollowEyeGaze.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/FollowEyeGaze.cs @@ -17,12 +17,29 @@ public class FollowEyeGaze : MonoBehaviour [SerializeField] private float defaultDistanceInMeters = 2f; + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + private void Update() { // Update GameObject to the current eye gaze position at a given distance - if (MixedRealityToolkit.InputSystem?.EyeGazeProvider?.IsEyeGazeValid == true) + if (InputSystem?.EyeGazeProvider?.IsEyeGazeValid == true) { - GameObject target = MixedRealityToolkit.InputSystem.EyeGazeProvider.GazeTarget; + GameObject target = InputSystem.EyeGazeProvider.GazeTarget; if (target != null) { // Show the object at the center of the currently looked at target. @@ -37,14 +54,14 @@ private void Update() else { // Show the object at the hit position of the user's eye gaze ray with the target. - gameObject.transform.position = MixedRealityToolkit.InputSystem.EyeGazeProvider.HitPosition; + gameObject.transform.position = InputSystem.EyeGazeProvider.HitPosition; } } else { // If no target is hit, show the object at a default distance along the gaze ray. - gameObject.transform.position = MixedRealityToolkit.InputSystem.EyeGazeProvider.GazeOrigin + MixedRealityToolkit.InputSystem.EyeGazeProvider.GazeDirection.normalized * defaultDistanceInMeters; + gameObject.transform.position = InputSystem.EyeGazeProvider.GazeOrigin + InputSystem.EyeGazeProvider.GazeDirection.normalized * defaultDistanceInMeters; } } } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/Speech_VisualFeedback.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/SpeechVisualFeedback.cs similarity index 80% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/Speech_VisualFeedback.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/SpeechVisualFeedback.cs index 85333190c00..5873d369e1f 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/Speech_VisualFeedback.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/SpeechVisualFeedback.cs @@ -8,7 +8,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking { - public class Speech_VisualFeedback : MonoBehaviour, IMixedRealitySpeechHandler + public class SpeechVisualFeedback : MonoBehaviour, IMixedRealitySpeechHandler { #region Variable declarations @@ -38,6 +38,23 @@ private TextMesh MyTextMesh } } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + /// /// Update text to be displayed /// @@ -62,10 +79,10 @@ public void ShowVisualFeedback(string msg) // Update text to be displayed UpdateTextMesh(msg); - if (MixedRealityToolkit.InputSystem.GazeProvider != null) + if (InputSystem.GazeProvider != null) { // Show the visual feedback at 2m in the direction the user is looking - visualFeedbackTemplate.transform.position = CameraCache.Main.transform.position + MixedRealityToolkit.InputSystem.GazeProvider.GazeDirection.normalized * 2f; + visualFeedbackTemplate.transform.position = CameraCache.Main.transform.position + InputSystem.GazeProvider.GazeDirection.normalized * 2f; visualFeedbackTemplate.transform.LookAt(CameraCache.Main.transform.position); } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/Speech_VisualFeedback.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/SpeechVisualFeedback.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/Speech_VisualFeedback.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/Input/SpeechVisualFeedback.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoad_StartScene.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoadStartScene.cs similarity index 94% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoad_StartScene.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoadStartScene.cs index 25bb9c2557f..8378e95c51a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoad_StartScene.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoadStartScene.cs @@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// /// When the button is selected, it triggers starting the specified scene. /// - public class OnLoad_StartScene : MonoBehaviour + public class OnLoadStartScene : MonoBehaviour { [SerializeField] [Tooltip("Name of the scene to be loaded when the button is selected.")] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoad_StartScene.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoadStartScene.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoad_StartScene.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLoadStartScene.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_RotateByEyeGaze.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtRotateByEyeGaze.cs similarity index 89% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_RotateByEyeGaze.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtRotateByEyeGaze.cs index 1df64290e7d..6d66569cce6 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_RotateByEyeGaze.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtRotateByEyeGaze.cs @@ -12,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking /// The currently looked at part will move towards the front facing the user. /// [RequireComponent(typeof(EyeTrackingTarget))] - public class OnLookAt_RotateByEyeGaze : BaseEyeFocusHandler + public class OnLookAtRotateByEyeGaze : BaseEyeFocusHandler { #region Serialized variables [Tooltip("Horizontal rotation speed.")] @@ -52,6 +52,23 @@ public class OnLookAt_RotateByEyeGaze : BaseEyeFocusHandler private float maxRotY = 180.0f; #endregion + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + protected override void OnEyeFocusStay() { // Update target rotation @@ -60,7 +77,7 @@ protected override void OnEyeFocusStay() private void RotateHitTarget() { - Vector3 TargetToHit = (this.gameObject.transform.position - MixedRealityToolkit.InputSystem.EyeGazeProvider.HitPosition).normalized; + Vector3 TargetToHit = (this.gameObject.transform.position - InputSystem.EyeGazeProvider.HitPosition).normalized; Vector3 TargetToCam = (this.gameObject.transform.position - CameraCache.Main.transform.position).normalized; float angle1x, angle1y, angle1z, angle2x, angle2y; diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_RotateByEyeGaze.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtRotateByEyeGaze.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_RotateByEyeGaze.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtRotateByEyeGaze.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_ShowHoverFeedback.cs b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtShowHoverFeedback.cs similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_ShowHoverFeedback.cs rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtShowHoverFeedback.cs index 728337e963b..14dbe0fbba6 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_ShowHoverFeedback.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtShowHoverFeedback.cs @@ -12,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.Targeting /// a visual anchor at the target's center. Different fade in and fade out options are also available. /// [RequireComponent(typeof(EyeTrackingTarget))] - public class OnLookAt_ShowHoverFeedback : BaseEyeFocusHandler + public class OnLookAtShowHoverFeedback : BaseEyeFocusHandler { // Overlay Feedback: Acts as a visual anchor at the target's center to fixate on. [Tooltip("If TRUE: Show a visual indicator at the target center when hovered.")] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_ShowHoverFeedback.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtShowHoverFeedback.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAt_ShowHoverFeedback.cs.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/General/Scripts/TargetBehaviors/OnLookAtShowHoverFeedback.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity similarity index 98% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity index 5a9b3b353d4..525bdac1205 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -250,7 +250,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 1 + useEyeTracking: 1 --- !u!114 &256863739 MonoBehaviour: m_ObjectHideFlags: 0 @@ -467,6 +467,66 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &339543462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 339543464} + - component: {fileID: 339543463} + m_Layer: 0 + m_Name: BasicComponents + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &339543463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339543462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7cb65e41617e575428281e966cc805c6, type: 3} + m_Name: + m_EditorClassIdentifier: + OnSceneStart: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1328385304} + m_MethodName: HideIt + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!4 &339543464 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 339543462} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1339362589} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &356090457 MeshFilter: m_ObjectHideFlags: 0 @@ -5614,6 +5674,192 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1293844987} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1328385303 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1328385308} + - component: {fileID: 1328385307} + - component: {fileID: 1328385306} + - component: {fileID: 1328385305} + - component: {fileID: 1328385304} + m_Layer: 5 + m_Name: Eye-Gaze-Directed Target - Sample 2 + m_TagString: UI + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1328385304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1328385303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3eb9148c1cd001b4dbcfbb1da5b8fab7, type: 3} + m_Name: + m_EditorClassIdentifier: + objToShowHide: {fileID: 1328385303} +--- !u!114 &1328385305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1328385303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81b498afc6c2803408ca65bb53a40933, type: 3} + m_Name: + m_EditorClassIdentifier: + defaultDistanceInMeters: 2 +--- !u!23 &1328385306 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1328385303} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f35b45e77783d754ea8d9fc0f502c49d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1328385307 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1328385303} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1328385308 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1328385303} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.03, y: 0.03, z: 0.03} + m_Children: [] + m_Father: {fileID: 1339362589} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1339362588 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1339362589} + - component: {fileID: 1339362590} + m_Layer: 0 + m_Name: Eye-based Cursor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1339362589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1339362588} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1328385308} + m_Father: {fileID: 339543464} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1339362590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1339362588} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45b3eff181cc4244a8a14234096e62fd, type: 3} + m_Name: + m_EditorClassIdentifier: + isFocusRequired: 0 + keywords: + - keyword: Show cursor + response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1328385304} + m_MethodName: ShowIt + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + - keyword: Hide cursor + response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1328385304} + m_MethodName: HideIt + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + persistentKeywords: 0 --- !u!1 &1422416676 GameObject: m_ObjectHideFlags: 0 @@ -14617,7 +14863,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 84fe9b2a06f2be0419698407ab15c2f6, type: 3} m_Name: m_EditorClassIdentifier: - SceneToBeLoaded: mrtk_eyes_02_TargetSelection + SceneToBeLoaded: EyeTrackingDemo-02-TargetSelection audio_OnSelect: {fileID: 8300000, guid: 9c496bada7bf21e4eb17d275b19f4b25, type: 3} waitTimeInSecBeforeLoading: 0.1 --- !u!1 &4245363462499506534 @@ -20260,7 +20506,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 84fe9b2a06f2be0419698407ab15c2f6, type: 3} m_Name: m_EditorClassIdentifier: - SceneToBeLoaded: mrtk_eyes_03_Navigation + SceneToBeLoaded: EyeTrackingDemo-03-Navigation audio_OnSelect: {fileID: 8300000, guid: 9c496bada7bf21e4eb17d275b19f4b25, type: 3} waitTimeInSecBeforeLoading: 0.1 --- !u!114 &5755958761325800711 @@ -20275,7 +20521,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 84fe9b2a06f2be0419698407ab15c2f6, type: 3} m_Name: m_EditorClassIdentifier: - SceneToBeLoaded: mrtk_eyes_05_Visualizer + SceneToBeLoaded: EyeTrackingDemo-05-Visualizer audio_OnSelect: {fileID: 8300000, guid: 9c496bada7bf21e4eb17d275b19f4b25, type: 3} waitTimeInSecBeforeLoading: 0.1 --- !u!4 &5832900679992001443 @@ -20309,7 +20555,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 84fe9b2a06f2be0419698407ab15c2f6, type: 3} m_Name: m_EditorClassIdentifier: - SceneToBeLoaded: mrtk_eyes_04_TargetPositioning + SceneToBeLoaded: EyeTrackingDemo-04-TargetPositioning audio_OnSelect: {fileID: 8300000, guid: 9c496bada7bf21e4eb17d275b19f4b25, type: 3} waitTimeInSecBeforeLoading: 0.1 --- !u!1 &5877145301167673633 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_01_BasicSetup.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-01-BasicSetup.unity similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_01_BasicSetup.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-01-BasicSetup.unity diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_01_BasicSetup.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-01-BasicSetup.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_01_BasicSetup.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-01-BasicSetup.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity similarity index 96% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity index 55b04c84c6a..cac4819bc4e 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity @@ -1332,6 +1332,22 @@ PrefabInstance: propertyPath: timeToTriggerDwellInSec value: 0 objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: timeToTriggerDwellInSec + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.z + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} --- !u!4 &1922409774 stripped @@ -1439,6 +1455,22 @@ PrefabInstance: propertyPath: InitialModule.startColor.maxColor.b value: 0.109286 objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: timeToTriggerDwellInSec + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.z + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} --- !u!1 &2083958207 @@ -1593,6 +1625,22 @@ PrefabInstance: propertyPath: m_Center.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: timeToTriggerDwellInSec + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1296537311, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} + propertyPath: RotateByEulerAngles.z + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3bb48a5d259f580489a88ae17131acce, type: 3} --- !u!4 &325685550709208139 stripped @@ -1887,6 +1935,22 @@ PrefabInstance: propertyPath: keywords.Array.data[0].response.m_PersistentCalls.m_Calls.Array.data[0].m_CallState value: 2 objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: timeToTriggerDwellInSec + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 406701535, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} + propertyPath: RotateByEulerAngles.z + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8598aec6656a8cf4f91022b34f6abc0a, type: 3} --- !u!4 &1596560075207052235 stripped diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity index 51841216ae4..207cfb57dc5 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity @@ -4639,125 +4639,125 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 224634334} m_Modifications: - - target: {fileID: 100048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 100048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Name value: TheModule objectReference: {fileID: 0} - - target: {fileID: 400032, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 400032, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.y value: 0.58 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} - - target: {fileID: 2300002, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d808c628536649eaa61f2a2f2d16c6cc, type: 2} - - target: {fileID: 2300034, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} - - target: {fileID: 2300036, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d471797c0e430783230146721c3fcb, type: 2} - - target: {fileID: 2300038, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b0fcdc3322e34d9ea83e8399bd9f4031, type: 2} - - target: {fileID: 2300040, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300040, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d573ea4cb045cdadc98e56044f6d2c, type: 2} - - target: {fileID: 2300042, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 53ea63593b32415faf734536616f5fb3, type: 2} - - target: {fileID: 2300044, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[1] value: objectReference: {fileID: 2100000, guid: 71d573ea4cb045cdadc98e56044f6d2c, type: 2} - - target: {fileID: 2300046, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300046, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d471797c0e430783230146721c3fcb, type: 2} - - target: {fileID: 2300048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b0fcdc3322e34d9ea83e8399bd9f4031, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &775880684 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 775880683} m_PrefabAsset: {fileID: 0} --- !u!1 &775880685 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 775880683} m_PrefabAsset: {fileID: 0} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity similarity index 99% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity index 895199bdaeb..6c411e4a36e 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity @@ -28033,214 +28033,6 @@ ParticleSystem: m_PostInfinity: 2 m_RotationOrder: 4 vectorLabel1_3: W ---- !u!1 &1701657403 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1701657404} - - component: {fileID: 1701657408} - - component: {fileID: 1701657407} - - component: {fileID: 1701657406} - - component: {fileID: 1701657405} - m_Layer: 0 - m_Name: OutputLabel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1701657404 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1701657403} - m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: -2.7633336} - m_LocalScale: {x: 0.26708332, y: 0.26708338, z: 0.64100015} - m_Children: [] - m_Father: {fileID: 1931571675} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 12.124999, y: 1.049998} - m_SizeDelta: {x: 20, y: 5} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1701657405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1701657403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_text: 1,23 - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_sharedMaterial: {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 18 - m_fontSizeBase: 18 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 257 - m_isAlignmentEnumConverted: 1 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 0 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 15.908832, w: 2.0785923} - m_textInfo: - textComponent: {fileID: 1701657405} - characterCount: 4 - spriteCount: 0 - spaceCount: 0 - wordCount: 2 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_havePropertiesChanged: 0 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_isInputParsingRequired: 0 - m_inputSource: 0 - m_hasFontAssetChanged: 0 - m_renderer: {fileID: 1701657408} - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_maskType: 0 ---- !u!222 &1701657406 -CanvasRenderer: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1701657403} - m_CullTransparentMesh: 0 ---- !u!33 &1701657407 -MeshFilter: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1701657403} - m_Mesh: {fileID: 0} ---- !u!23 &1701657408 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1701657403} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 --- !u!1 &1737383532 GameObject: m_ObjectHideFlags: 0 @@ -28600,12 +28392,6 @@ Light: m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 ---- !u!4 &1931571675 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 8870521973379306992, guid: 71b8b2acb3a8f344abf91c2b102b0d74, - type: 3} - m_PrefabInstance: {fileID: 8870521973198618577} - m_PrefabAsset: {fileID: 0} --- !u!1 &1959001618 GameObject: m_ObjectHideFlags: 0 @@ -33864,36 +33650,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 90 objectReference: {fileID: 0} - - target: {fileID: 5293869239745969194, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: m_LocalScale.y - value: 0.16 - objectReference: {fileID: 0} - - target: {fileID: 3633831754249538969, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: txtOutput_sliderValue - value: - objectReference: {fileID: 0} - - target: {fileID: 1981544228620122561, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 6620893258549880666, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6620893258549880666, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6620893258549880666, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, - type: 3} - propertyPath: m_text - value: 1.23 - objectReference: {fileID: 0} - target: {fileID: 3633831753856508903, guid: 1a4bbe24b109c6e4aa21a517ad27ba95, type: 3} propertyPath: m_Mesh @@ -33990,26 +33746,6 @@ PrefabInstance: propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 8870521974202702741, guid: 71b8b2acb3a8f344abf91c2b102b0d74, - type: 3} - propertyPath: m_LocalScale.y - value: 0.16 - objectReference: {fileID: 0} - - target: {fileID: 7764835857267048014, guid: 71b8b2acb3a8f344abf91c2b102b0d74, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 8770542414431061229, guid: 71b8b2acb3a8f344abf91c2b102b0d74, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8770542414431061229, guid: 71b8b2acb3a8f344abf91c2b102b0d74, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 71b8b2acb3a8f344abf91c2b102b0d74, type: 3} --- !u!4 &8870521973726898540 stripped diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-05-Visualizer.unity similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-05-Visualizer.unity diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-05-Visualizer.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-05-Visualizer.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.meta deleted file mode 100644 index dab17fa65ff..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f7824721a591c474aa8a580e1fbbe497 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset deleted file mode 100644 index 54fa74e253d..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset.meta deleted file mode 100644 index fa31ce6840d..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/LightingData.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3317191fd70b74f4e91707a71694f12b -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 6475696996188705980 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr deleted file mode 100644 index 73bac30ef33..00000000000 Binary files a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr and /dev/null differ diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr.meta b/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr.meta deleted file mode 100644 index ae97a227876..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene/ReflectionProbe-0.exr.meta +++ /dev/null @@ -1,89 +0,0 @@ -fileFormatVersion: 2 -guid: 3e821b36cfa8c154e98606f0d8675e37 -TextureImporter: - fileIDToRecycleName: - 8900000: generatedCubemap - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 1 - seamlessCubemap: 1 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 2 - aniso: 0 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 2 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 100 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Glb-Loading-Demo.unity b/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Glb-Loading-Demo.unity index d00d2686d48..991dc56174d 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Glb-Loading-Demo.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Glb-Loading-Demo.unity @@ -288,7 +288,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1292482203 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Gltf-Loading-Demo.unity b/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Gltf-Loading-Demo.unity index 5c867d417b0..47c15c1759c 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Gltf-Loading-Demo.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/Gltf/Scenes/Gltf-Loading-Demo.unity @@ -199,7 +199,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &290616759 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset index 61eafcfc433..7ee4c2f45bd 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset @@ -9,13 +9,17 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 + m_GeneratorAsset: {fileID: 0} m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} m_Name: HandInteractionAllExampleMixedRealityToolkitConfigurationProfile - m_EditorClassIdentifier: + m_EditorClassIdentifier: isCustomProfile: 1 targetExperienceScale: 3 - enableCameraProfile: 1 + enableCameraSystem: 1 cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem enableInputSystem: 1 inputSystemProfile: {fileID: 11400000, guid: ad2080e8e71c35f4e8bcde94fa68f098, type: 2} inputSystemType: @@ -34,6 +38,7 @@ MonoBehaviour: spatialAwarenessSystemType: reference: Microsoft.MixedReality.Toolkit.SpatialAwareness.MixedRealitySpatialAwarenessSystem, Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem + spatialAwarenessSystemProfile: {fileID: 0} diagnosticsSystemProfile: {fileID: 11400000, guid: 478436bd1083882479a52d067e98e537, type: 2} enableDiagnosticsSystem: 1 @@ -42,3 +47,4 @@ MonoBehaviour: Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem registeredServiceProvidersProfile: {fileID: 11400000, guid: e0bbb696e100b0d4386ce57da2e4636d, type: 2} + useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset new file mode 100644 index 00000000000..5c34baa8139 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset @@ -0,0 +1,88 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b71cb900fa9dec5488df2deb180db58f, type: 3} + m_Name: HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + dataProviderConfigurations: + - componentType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityDeviceManager, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + componentName: Windows Mixed Reality Device Manager + priority: 0 + runtimePlatform: 8 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.OpenVRDeviceManager, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + componentName: OpenVR Device Manager + priority: 0 + runtimePlatform: 7 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Input.UnityInput.UnityJoystickManager, + Microsoft.MixedReality.Toolkit + componentName: Unity Joystick Manager + priority: 0 + runtimePlatform: -1 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Input.UnityInput.UnityTouchDeviceManager, + Microsoft.MixedReality.Toolkit + componentName: Unity Touch Device Manager + priority: 0 + runtimePlatform: -1 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Windows.Input.WindowsSpeechInputProvider, + Microsoft.MixedReality.Toolkit.Providers.WindowsVoiceInput + componentName: Windows Speech Input + priority: 0 + runtimePlatform: 25 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Windows.Input.WindowsDictationInputProvider, + Microsoft.MixedReality.Toolkit.Providers.WindowsVoiceInput + componentName: Windows Dictation Input + priority: 0 + runtimePlatform: 25 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Input.HandJointService, Microsoft.MixedReality.Toolkit + componentName: Hand Joint Service + priority: 0 + runtimePlatform: -1 + deviceManagerProfile: {fileID: 0} + - componentType: + reference: Microsoft.MixedReality.Toolkit.Input.InputSimulationService, Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor + componentName: Input Simulation Service + priority: 0 + runtimePlatform: 16 + deviceManagerProfile: {fileID: 11400000, guid: 41478039094d47641bf4e09c20e61a5a, + type: 2} + focusProviderType: + reference: Microsoft.MixedReality.Toolkit.Input.FocusProvider, Microsoft.MixedReality.Toolkit.Services.InputSystem + inputActionsProfile: {fileID: 11400000, guid: 723eb97b02944311b92861f473eee53e, + type: 2} + inputActionRulesProfile: {fileID: 11400000, guid: 03945385d89102f41855bc8f5116b199, + type: 2} + pointerProfile: {fileID: 11400000, guid: 48aa63a9725047b28d4137fd0834bc31, type: 2} + gesturesProfile: {fileID: 11400000, guid: bd7829a9b29409045a745b5a18299291, type: 2} + speechCommandsProfile: {fileID: 11400000, guid: c6b131fcb30ab9943a3adcb064d65cd0, + type: 2} + enableControllerMapping: 1 + controllerMappingProfile: {fileID: 11400000, guid: 39ded1fd0711a0c448413d0e1ec4f7f3, + type: 2} + controllerVisualizationProfile: {fileID: 11400000, guid: 345c06fdf3732db46b96299bd3cba653, + type: 2} + handTrackingProfile: {fileID: 11400000, guid: 7f1e3cd673742f94ca860ac7ae733024, + type: 2} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset.meta similarity index 64% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset.meta index 1c3fe6efdcf..beb355c7834 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Frame.mat.meta +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityInputSystemProfile.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: a600cb038d0dec240b22c780069549a5 +guid: 07beee01cd9724c4297151c4d30567d7 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 0 + mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset new file mode 100644 index 00000000000..ccf7b4e4d85 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset @@ -0,0 +1,60 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1f18fec9b55c4f818e284af454161962, type: 3} + m_Name: HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + startBehavior: 0 + recognitionConfidenceLevel: 1 + speechCommands: + - localizationKey: + keyword: Menu + keyCode: 9 + action: + id: 2 + description: Menu + axisConstraint: 2 + - localizationKey: + keyword: Toggle Diagnostics + keyCode: 100 + action: + id: 1 + description: Toggle Diagnostics + axisConstraint: 0 + - localizationKey: + keyword: Toggle Profiler + keyCode: 112 + action: + id: 7 + description: Grip Press + axisConstraint: 3 + - localizationKey: + keyword: Record Right Hand + keyCode: 0 + action: + id: 0 + description: Grip Press + axisConstraint: 3 + - localizationKey: + keyword: Record Left Hand + keyCode: 0 + action: + id: 0 + description: Grip Press + axisConstraint: 3 + - localizationKey: + keyword: Stop + keyCode: 0 + action: + id: 0 + description: Grip Press + axisConstraint: 3 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset.meta similarity index 64% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset.meta index 495f8b69cd7..86a6ae190e1 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat.meta +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealitySpeechCommandsProfile.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 5cc677447cb184a4c8e55564131a5131 +guid: c6b131fcb30ab9943a3adcb064d65cd0 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 2100000 + mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset new file mode 100644 index 00000000000..303d449098b --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset @@ -0,0 +1,50 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} + m_Name: HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + targetExperienceScale: 3 + enableCameraSystem: 1 + cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem + enableInputSystem: 1 + inputSystemProfile: {fileID: 11400000, guid: 07beee01cd9724c4297151c4d30567d7, type: 2} + inputSystemType: + reference: Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem, Microsoft.MixedReality.Toolkit.Services.InputSystem + enableBoundarySystem: 1 + boundarySystemType: + reference: Microsoft.MixedReality.Toolkit.Boundary.MixedRealityBoundarySystem, + Microsoft.MixedReality.Toolkit.Services.BoundarySystem + boundaryVisualizationProfile: {fileID: 11400000, guid: 6d28cce596b44bd3897ca86f8b24e076, + type: 2} + enableTeleportSystem: 1 + teleportSystemType: + reference: Microsoft.MixedReality.Toolkit.Teleport.MixedRealityTeleportSystem, + Microsoft.MixedReality.Toolkit.Services.TeleportSystem + enableSpatialAwarenessSystem: 1 + spatialAwarenessSystemType: + reference: Microsoft.MixedReality.Toolkit.SpatialAwareness.MixedRealitySpatialAwarenessSystem, + Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem + spatialAwarenessSystemProfile: {fileID: 11400000, guid: 97da727944a3d7b4caf42d2273271a24, + type: 2} + diagnosticsSystemProfile: {fileID: 11400000, guid: 478436bd1083882479a52d067e98e537, + type: 2} + enableDiagnosticsSystem: 1 + diagnosticsSystemType: + reference: Microsoft.MixedReality.Toolkit.Diagnostics.MixedRealityDiagnosticsSystem, + Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem + registeredServiceProvidersProfile: {fileID: 11400000, guid: efbaf6ea540c69f4fb75415a5d145a53, + type: 2} + useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset.meta similarity index 64% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset.meta index 794329cec5f..c58128f7d95 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02.mat.meta +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionRecordArticulatedHandPoseMixedRealityToolkitConfigurationProfile.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 1cc8db5121dbd91429929af117f28aa7 +guid: ec5f1cd6837ce634eb9dac5bb049962d NativeFormatImporter: externalObjects: {} - mainObjectFileID: 2100000 + mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Prefabs/PressableRoundButton.prefab b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Prefabs/PressableRoundButton.prefab index 91f4bd296d1..e54ec9af3a6 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Prefabs/PressableRoundButton.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Prefabs/PressableRoundButton.prefab @@ -1010,7 +1010,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7428662621041068899} - m_Mesh: {fileID: 4300002, guid: 5308c0eb5c6ed4647b3797671dc2e5f3, type: 3} + m_Mesh: {fileID: 4300002, guid: 728972833a3739d4fa5d234f7c91b4b2, type: 3} --- !u!23 &7428662621041068901 MeshRenderer: m_ObjectHideFlags: 0 @@ -1087,7 +1087,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7428662621253425500} - m_Mesh: {fileID: 4300000, guid: 5308c0eb5c6ed4647b3797671dc2e5f3, type: 3} + m_Mesh: {fileID: 4300000, guid: 728972833a3739d4fa5d234f7c91b4b2, type: 3} --- !u!23 &7428662621253425502 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity index 477b5a983a3..fbbd5c8e834 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity @@ -379,26 +379,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 377361798} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: PressableButtonPlated (1) - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -469,6 +449,26 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5000013 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: PressableButtonPlated (1) + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -1554,7 +1554,7 @@ RectTransform: --- !u!1 &223310247 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100004, guid: 5838ea95659d32943afec95550ac1ce1, + m_CorrespondingSourceObject: {fileID: 100004, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1577,7 +1577,7 @@ GameObject: --- !u!4 &223310248 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400004, guid: 5838ea95659d32943afec95550ac1ce1, + m_CorrespondingSourceObject: {fileID: 400004, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1782,7 +1782,7 @@ BoxCollider: --- !u!23 &223310253 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300000, guid: 5838ea95659d32943afec95550ac1ce1, + m_CorrespondingSourceObject: {fileID: 2300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1820,12 +1820,12 @@ MeshRenderer: --- !u!33 &223310254 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300000, guid: 5838ea95659d32943afec95550ac1ce1, + m_CorrespondingSourceObject: {fileID: 3300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 223310247} - m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_Mesh: {fileID: 4300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} --- !u!1 &235445000 GameObject: m_ObjectHideFlags: 0 @@ -2487,7 +2487,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 258672077} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!1 &271045611 GameObject: m_ObjectHideFlags: 0 @@ -2633,7 +2633,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 320359041} - m_Mesh: {fileID: 4300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_Mesh: {fileID: 4300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!1001 &326649935 PrefabInstance: m_ObjectHideFlags: 0 @@ -3627,26 +3627,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1167763431} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: PressableButtonPlated (1) - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -3717,6 +3697,26 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: PressableButtonPlated (1) + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -6440,125 +6440,125 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1717458036} m_Modifications: - - target: {fileID: 100048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 100048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Name value: LunarModule objectReference: {fileID: 0} - - target: {fileID: 400032, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 400032, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.y value: 0.58 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.x value: 0.3349921 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.y value: -0.37327412 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalPosition.z value: 0.5653166 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.y value: -0.70710677 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalRotation.w value: 0.7071069 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.x value: 0.08085192 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.y value: 0.08085181 objectReference: {fileID: 0} - - target: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_LocalScale.z value: 0.08085192 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} - - target: {fileID: 2300002, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d808c628536649eaa61f2a2f2d16c6cc, type: 2} - - target: {fileID: 2300034, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} - - target: {fileID: 2300036, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d471797c0e430783230146721c3fcb, type: 2} - - target: {fileID: 2300038, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b0fcdc3322e34d9ea83e8399bd9f4031, type: 2} - - target: {fileID: 2300040, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300040, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d573ea4cb045cdadc98e56044f6d2c, type: 2} - - target: {fileID: 2300042, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 53ea63593b32415faf734536616f5fb3, type: 2} - - target: {fileID: 2300044, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[1] value: objectReference: {fileID: 2100000, guid: 71d573ea4cb045cdadc98e56044f6d2c, type: 2} - - target: {fileID: 2300046, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300046, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d471797c0e430783230146721c3fcb, type: 2} - - target: {fileID: 2300048, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + - target: {fileID: 2300048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b0fcdc3322e34d9ea83e8399bd9f4031, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &775880684 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 775880683} m_PrefabAsset: {fileID: 0} --- !u!1 &775880685 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 775880683} m_PrefabAsset: {fileID: 0} @@ -8150,81 +8150,81 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 2145624440} m_Modifications: - - target: {fileID: 100000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 100000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_Name value: Model_Platonic objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalRotation.y value: -0.38268343 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalRotation.w value: 0.92387956 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: -45 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalScale.x value: 0.1 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalScale.y value: 0.1 objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_LocalScale.z value: 0.1 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + - target: {fileID: 2300000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b0fcdc3322e34d9ea83e8399bd9f4031, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 5942fa356be284c4a8d1d231519a7581, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} --- !u!4 &949313837 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400000, guid: 5942fa356be284c4a8d1d231519a7581, + m_CorrespondingSourceObject: {fileID: 400000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} m_PrefabInstance: {fileID: 949313836} m_PrefabAsset: {fileID: 0} --- !u!1 &949313838 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 5942fa356be284c4a8d1d231519a7581, + m_CorrespondingSourceObject: {fileID: 100000, guid: f9b1acc0404b53f45bffb480fefa205a, type: 3} m_PrefabInstance: {fileID: 949313836} m_PrefabAsset: {fileID: 0} @@ -8330,7 +8330,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 974814029} - m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_Mesh: {fileID: 4300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} --- !u!1 &997264634 GameObject: m_ObjectHideFlags: 0 @@ -8658,211 +8658,211 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1647389046} m_Modifications: - - target: {fileID: 1275815092924048, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 1275815092924048, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Name value: AppBar objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalPosition.x value: -0.2753 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalPosition.z value: -0.1879 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalRotation.y value: -0.92387956 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalRotation.w value: 0.38268343 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: -135 objectReference: {fileID: 0} - - target: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + - target: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 114050950401502068, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 114050950401502068, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: boundingBox value: objectReference: {fileID: 1647389047} - - target: {fileID: 5875670467222916739, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467222916739, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670467222916739, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467222916739, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613108518374441, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613108518374441, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613108518374441, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613108518374441, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670467545949592, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467545949592, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670467545949592, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467545949592, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613108195223346, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613108195223346, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613108195223346, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613108195223346, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670467076251584, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467076251584, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670467076251584, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467076251584, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613107725524330, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613107725524330, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613107725524330, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613107725524330, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670466231783511, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670466231783511, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 5875670466231783511, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670466231783511, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613107513021181, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613107513021181, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 3379613107513021181, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3379613107513021181, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 3260291378575425325, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3260291378575425325, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 3260291378575425325, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3260291378575425325, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 5932013269696855431, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5932013269696855431, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_havePropertiesChanged value: 1 objectReference: {fileID: 0} - - target: {fileID: 5932013269696855431, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5932013269696855431, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} - - target: {fileID: 8137400256400528926, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 8137400256400528926, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 8137400256674896265, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 8137400256674896265, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 8137400254997111761, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 8137400254997111761, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 8137400255244241098, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 8137400255244241098, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 3260291378575425363, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 3260291378575425363, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 5875670466231783465, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670466231783465, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 5875670467076251582, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467076251582, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 5875670467222916861, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467222916861, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 5875670467545949670, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 5875670467545949670, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} - - target: {fileID: 889928218802616676, guid: aa610ada334bff640a535f0d23a9a15c, + - target: {fileID: 889928218802616676, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa610ada334bff640a535f0d23a9a15c, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} --- !u!1 &1020372353 GameObject: m_ObjectHideFlags: 0 @@ -9221,7 +9221,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1087739258 MonoBehaviour: m_ObjectHideFlags: 0 @@ -10068,26 +10068,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1167763431} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: PressableButtonPlated (3) - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -10158,6 +10138,26 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: PressableButtonPlated (3) + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -10203,6 +10203,11 @@ PrefabInstance: propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState value: 1 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241341, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: InteractableOnClick + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} --- !u!4 &1213304232 stripped @@ -10731,46 +10736,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1471801280} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: ToggleProfilerButton - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_text - value: Profiler - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.characterCount - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.spaceCount - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.wordCount - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -10841,6 +10806,46 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: ToggleProfilerButton + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_text + value: Profiler + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.characterCount + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.spaceCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.wordCount + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -12237,46 +12242,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1471801280} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: ToggleHandMesh - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_text - value: Hand Mesh - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.characterCount - value: 9 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.spaceCount - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.wordCount - value: 2 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -12347,6 +12312,46 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5000002 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: ToggleHandMesh + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_text + value: Hand Mesh + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.characterCount + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.spaceCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.wordCount + value: 2 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -12536,7 +12541,7 @@ MonoBehaviour: --- !u!1 &1461408770 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100004, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 100004, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -12557,7 +12562,7 @@ GameObject: --- !u!4 &1461408771 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400004, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 400004, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -12599,7 +12604,7 @@ BoxCollider: --- !u!23 &1461408774 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 2300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -12637,12 +12642,12 @@ MeshRenderer: --- !u!33 &1461408775 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 3300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1461408770} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!1 &1471801279 GameObject: m_ObjectHideFlags: 0 @@ -13608,26 +13613,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1167763431} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: PressableButtonPlated (2) - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -13698,6 +13683,26 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: PressableButtonPlated (2) + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -13743,6 +13748,11 @@ PrefabInstance: propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState value: 1 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241341, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: InteractableOnClick + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} --- !u!4 &1579772516 stripped @@ -15052,103 +15062,103 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1717458036} m_Modifications: - - target: {fileID: 100002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 100002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_Name value: Model_Octa objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalPosition.x value: 0.3839048 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalPosition.y value: 0.47726744 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalPosition.z value: 0.7570522 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalRotation.y value: -0.6701781 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalRotation.w value: 0.7422003 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 5.8380003 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.x value: 0.18208495 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.y value: 0.18208496 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.z value: 0.18208495 objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400004, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.x value: 0.74686 objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400004, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.y value: 0.74686 objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400004, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalScale.z value: 0.74686 objectReference: {fileID: 0} - - target: {fileID: 400004, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 400004, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_LocalPosition.y value: -0.105 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + - target: {fileID: 2300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 71d471797c0e430783230146721c3fcb, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!4 &1666569905 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400002, guid: 1e23ec24c22068b4cbf47737c35e277b, + m_CorrespondingSourceObject: {fileID: 400002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} m_PrefabInstance: {fileID: 1666569904} m_PrefabAsset: {fileID: 0} --- !u!1 &1666569906 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100004, guid: 1e23ec24c22068b4cbf47737c35e277b, + m_CorrespondingSourceObject: {fileID: 100004, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} m_PrefabInstance: {fileID: 1666569904} m_PrefabAsset: {fileID: 0} --- !u!1 &1666569907 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100002, guid: 1e23ec24c22068b4cbf47737c35e277b, + m_CorrespondingSourceObject: {fileID: 100002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} m_PrefabInstance: {fileID: 1666569904} m_PrefabAsset: {fileID: 0} @@ -15530,26 +15540,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1167763431} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: PressableButtonPlated - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -15620,6 +15610,26 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: PressableButtonPlated + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh @@ -15628,12 +15638,12 @@ PrefabInstance: - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_havePropertiesChanged - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_isInputParsingRequired - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8779034279059886464, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} @@ -15665,11 +15675,6 @@ PrefabInstance: propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState value: 1 objectReference: {fileID: 0} - - target: {fileID: 2204069621426241341, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: InteractableOnClick - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2204069621426241340, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: maxPushDistance @@ -17020,75 +17025,75 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1941657964} m_Modifications: - - target: {fileID: 100002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 100002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.x value: 0.08599998 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.y value: 0.0019999873 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.z value: -0.043999948 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.x value: 0.0975555 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.y value: 0.09755545 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.z value: 0.09755544 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 45 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 2300000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 7ff1cc8e6d74d0b4a92df2bb2a2b9837, type: 2} - - target: {fileID: 2300002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 2300002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Enabled value: 1 objectReference: {fileID: 0} - - target: {fileID: 2300002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 2300002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!1 &1984437763 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100002, guid: aa39033344b08ce4bab10cc11dc6d6b8, + m_CorrespondingSourceObject: {fileID: 100002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} m_PrefabInstance: {fileID: 1984437762} m_PrefabAsset: {fileID: 0} @@ -17402,7 +17407,7 @@ MonoBehaviour: Version=0.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!4 &1984437770 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, + m_CorrespondingSourceObject: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} m_PrefabInstance: {fileID: 1984437762} m_PrefabAsset: {fileID: 0} @@ -17586,7 +17591,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2019239147} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!1 &2022423719 GameObject: m_ObjectHideFlags: 0 @@ -17802,85 +17807,85 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1717458036} m_Modifications: - - target: {fileID: 100002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 100002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 100002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 100002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Name value: CoffeeCup objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} + propertyPath: m_LocalPosition.y + value: 1.896 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.x value: -0.209 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.y value: -0.395 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalPosition.z value: 0.519 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_RootOrder value: 11 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.x value: 0.13469732 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.y value: 0.13469735 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalScale.z value: 0.13469732 objectReference: {fileID: 0} - - target: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 2300000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 7ff1cc8e6d74d0b4a92df2bb2a2b9837, type: 2} - - target: {fileID: 2300002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + - target: {fileID: 2300002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} - - target: {fileID: 400000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} - propertyPath: m_LocalPosition.y - value: 1.896 - objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!4 &2045373141 stripped Transform: - m_CorrespondingSourceObject: {fileID: 400002, guid: aa39033344b08ce4bab10cc11dc6d6b8, + m_CorrespondingSourceObject: {fileID: 400002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} m_PrefabInstance: {fileID: 2045373140} m_PrefabAsset: {fileID: 0} --- !u!1 &2045373142 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 100002, guid: aa39033344b08ce4bab10cc11dc6d6b8, + m_CorrespondingSourceObject: {fileID: 100002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} m_PrefabInstance: {fileID: 2045373140} m_PrefabAsset: {fileID: 0} @@ -18301,7 +18306,7 @@ MeshRenderer: m_SortingOrder: 0 --- !u!4 &2052229196 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4773597359991020, guid: aa610ada334bff640a535f0d23a9a15c, + m_CorrespondingSourceObject: {fileID: 4773597359991020, guid: 83c02591e2867124181bcd3bcb65e288, type: 3} m_PrefabInstance: {fileID: 1019324163} m_PrefabAsset: {fileID: 0} @@ -18403,46 +18408,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1471801280} m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: ToggleHandJoint - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_text - value: Hand Joint - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.characterCount - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.spaceCount - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_textInfo.wordCount - value: 2 - objectReference: {fileID: 0} - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -18513,6 +18478,46 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 1.5000002 objectReference: {fileID: 0} + - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Name + value: ToggleHandJoint + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992557, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_text + value: Hand Joint + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.characterCount + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.spaceCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204069621878992595, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, + type: 3} + propertyPath: m_textInfo.wordCount + value: 2 + objectReference: {fileID: 0} - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_Mesh diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionPanZoomExample.unity b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionPanZoomExample.unity index 3a54a766986..bfc1b359aeb 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionPanZoomExample.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionPanZoomExample.unity @@ -1926,7 +1926,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1140877734 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity new file mode 100644 index 00000000000..8c43f4a960e --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity @@ -0,0 +1,779 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &22990550 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 22990552} + - component: {fileID: 22990553} + - component: {fileID: 22990551} + m_Layer: 0 + m_Name: Recorder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &22990551 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 22990550} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45b3eff181cc4244a8a14234096e62fd, type: 3} + m_Name: + m_EditorClassIdentifier: + isFocusRequired: 0 + keywords: + - keyword: Record Right Hand + response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2089607027} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: 3c55769e893c4f4c8c51b7fa69bee2b9, + type: 2} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 988162584} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: 63df887775f744ff81b5498f43f24074, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 22990553} + m_MethodName: RecordRightHandStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + - keyword: Record Left Hand + response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2089607027} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: 63df887775f744ff81b5498f43f24074, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 988162584} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: cb74390ea57642f8b5ca0aa8f5fb38c1, + type: 2} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 22990553} + m_MethodName: RecordLeftHandStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + - keyword: Stop + response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2089607027} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: 63df887775f744ff81b5498f43f24074, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 988162584} + m_MethodName: set_material + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2100000, guid: 63df887775f744ff81b5498f43f24074, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Material, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 22990553} + m_MethodName: RecordHandStop + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + persistentKeywords: 0 +--- !u!4 &22990552 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 22990550} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.07364403, y: 0.08921043, z: 0.5194999} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &22990553 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 22990550} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ccabe4fb25df0f94babb85f213610a6c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &68578558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 68578559} + - component: {fileID: 68578564} + - component: {fileID: 68578563} + - component: {fileID: 68578562} + - component: {fileID: 68578561} + - component: {fileID: 68578560} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &68578559 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1992475347} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &68578560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf98dd1206224111a38765365e98e207, type: 3} + m_Name: + m_EditorClassIdentifier: + setCursorInvisibleWhenFocusLocked: 1 + maxGazeCollisionDistance: 10 + raycastLayerMasks: + - serializedVersion: 2 + m_Bits: 4294967291 + stabilizer: + storedStabilitySamples: 60 + gazeTransform: {fileID: 0} + minHeadVelocityThreshold: 0.5 + maxHeadVelocityThreshold: 2 + preferEyeTracking: 0 +--- !u!114 &68578561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a21b486d0bb44444b1418aaa38b44de, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &68578562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!81 &68578563 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_Enabled: 1 +--- !u!20 &68578564 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 68578558} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &571225264 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 571225266} + - component: {fileID: 571225265} + m_Layer: 0 + m_Name: AsyncCoroutineRunner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &571225265 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 571225264} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e6ecbbf0b5840b09d7b4ee7f0a62b7a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &571225266 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 571225264} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &741295895 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 741295897} + - component: {fileID: 741295896} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &741295896 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 741295895} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &741295897 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 741295895} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &988162582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 988162586} + - component: {fileID: 988162585} + - component: {fileID: 988162584} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &988162584 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988162582} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &988162585 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988162582} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &988162586 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988162582} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.84, y: -0.26137352, z: 4.36} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1677883330 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1677883332} + - component: {fileID: 1677883331} + m_Layer: 0 + m_Name: MixedRealityToolkit + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1677883331 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1677883330} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} + m_Name: + m_EditorClassIdentifier: + activeProfile: {fileID: 11400000, guid: ec5f1cd6837ce634eb9dac5bb049962d, type: 2} +--- !u!4 &1677883332 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1677883330} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1992475346 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1992475347} + m_Layer: 0 + m_Name: MixedRealityPlayspace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1992475347 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1992475346} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 68578559} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2089607026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2089607029} + - component: {fileID: 2089607028} + - component: {fileID: 2089607027} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2089607027 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2089607026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &2089607028 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2089607026} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2089607029 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2089607026} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.28, y: -0.26137352, z: 4.34} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity.meta new file mode 100644 index 00000000000..1e795f0a873 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionRecordArticulatedHandPose.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb5e8437c0c71d4468e0b70fe0c114c7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ColorChanger.cs b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ColorChanger.cs index fe02df211c6..d8da7224301 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ColorChanger.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ColorChanger.cs @@ -13,6 +13,14 @@ public class ColorChanger : MonoBehaviour public Material[] mats; public int cur; + public void Start() + { + if (rend == null) + { + rend = GetComponent(); + } + } + public void Increment() { if (mats != null && mats.Length > 0) @@ -24,5 +32,10 @@ public void Increment() } } } + + public void RandomColor() + { + rend.material.color = UnityEngine.Random.ColorHSV(); + } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/GestureTester.cs b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/GestureTester.cs index 3faa9fd5a6b..474f67517ce 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/GestureTester.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/GestureTester.cs @@ -21,6 +21,19 @@ public class GestureTester : MonoBehaviour, IMixedRealityGestureHandler public GameObject RailsAxisY = null; public GameObject RailsAxisZ = null; + private IMixedRealityInputSystem inputSystem = null; + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + void OnEnable() { HideRails(); @@ -148,7 +161,7 @@ private void SetIndicator(GameObject indicator, string label, Material material, private void ShowRails(Vector3 position) { - var gestureProfile = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile; + var gestureProfile = InputSystem.InputSystemProfile.GesturesProfile; var useRails = gestureProfile.UseRailsNavigation; if (RailsAxisX) @@ -181,4 +194,4 @@ private void HideRails() } } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ToggleHandVisualisation.cs b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ToggleHandVisualisation.cs index 20017f7f809..6e3777c1852 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ToggleHandVisualisation.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/ToggleHandVisualisation.cs @@ -11,9 +11,22 @@ public class ToggleHandVisualisation : MonoBehaviour public bool isHandMeshVisible = false; public bool isHandJointVisible = false; + private IMixedRealityInputSystem inputSystem = null; + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + void updateHandVisibility() { - MixedRealityHandTrackingProfile handTrackingProfile = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile; + MixedRealityHandTrackingProfile handTrackingProfile = InputSystem?.InputSystemProfile?.HandTrackingProfile; if (handTrackingProfile != null) { handTrackingProfile.EnableHandMeshVisualization = isHandMeshVisible; @@ -49,4 +62,4 @@ public void OnToggleHandJoint() } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.MixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.MixedRealityToolkitConfigurationProfile.asset index b261deb6348..cf1baad0160 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.MixedRealityToolkitConfigurationProfile.asset +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.MixedRealityToolkitConfigurationProfile.asset @@ -9,13 +9,17 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 + m_GeneratorAsset: {fileID: 0} m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} m_Name: Dictation.MixedRealityToolkitConfigurationProfile m_EditorClassIdentifier: isCustomProfile: 1 targetExperienceScale: 3 - enableCameraProfile: 1 + enableCameraSystem: 1 cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem enableInputSystem: 1 inputSystemProfile: {fileID: 11400000, guid: f01a8ddcc32be3d45aa46e1136131a66, type: 2} inputSystemType: @@ -44,3 +48,4 @@ MonoBehaviour: Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem registeredServiceProvidersProfile: {fileID: 11400000, guid: efbaf6ea540c69f4fb75415a5d145a53, type: 2} + useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.unity b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.unity index c0720dfb124..0b3e15aa073 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Dictation/Dictation.unity @@ -711,7 +711,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1325208058 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.MixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.MixedRealityToolkitConfigurationProfile.asset index 7e70da525e9..ccc152fed3a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.MixedRealityToolkitConfigurationProfile.asset +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.MixedRealityToolkitConfigurationProfile.asset @@ -9,13 +9,17 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 + m_GeneratorAsset: {fileID: 0} m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} m_Name: Speech.MixedRealityToolkitConfigurationProfile m_EditorClassIdentifier: isCustomProfile: 1 targetExperienceScale: 3 - enableCameraProfile: 1 + enableCameraSystem: 1 cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem enableInputSystem: 1 inputSystemProfile: {fileID: 11400000, guid: 2a6b327d88d172543b7526be8cb2018e, type: 2} inputSystemType: @@ -43,3 +47,4 @@ MonoBehaviour: Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem registeredServiceProvidersProfile: {fileID: 11400000, guid: efbaf6ea540c69f4fb75415a5d145a53, type: 2} + useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.unity b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.unity index c3d11db2f4e..87b8433673a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/Speech/Speech.unity @@ -880,7 +880,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1619951302 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/SpatialAwareness/Scripts/DemoSpatialMeshHandler.cs b/Assets/MixedRealityToolkit.Examples/Demos/SpatialAwareness/Scripts/DemoSpatialMeshHandler.cs index 5df58ee0891..2518fd8bcf3 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/SpatialAwareness/Scripts/DemoSpatialMeshHandler.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/SpatialAwareness/Scripts/DemoSpatialMeshHandler.cs @@ -14,6 +14,19 @@ namespace Microsoft.MixedReality.Toolkit.Examples.Demos /// public class DemoSpatialMeshHandler : MonoBehaviour, IMixedRealitySpatialAwarenessObservationHandler { + private IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem = null; + + private IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem + { + get + { + if (spatialAwarenessSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out spatialAwarenessSystem); + } + return spatialAwarenessSystem; + } + } /// /// Collection that tracks the IDs and count of updates for each active spatial awareness mesh. /// @@ -21,13 +34,13 @@ public class DemoSpatialMeshHandler : MonoBehaviour, IMixedRealitySpatialAwarene private async void OnEnable() { - await new WaitUntil(() => MixedRealityToolkit.SpatialAwarenessSystem != null); - MixedRealityToolkit.SpatialAwarenessSystem.Register(gameObject); + await new WaitUntil(() => SpatialAwarenessSystem != null); + SpatialAwarenessSystem.Register(gameObject); } private void OnDisable() { - MixedRealityToolkit.SpatialAwarenessSystem?.Unregister(gameObject); + SpatialAwarenessSystem?.Unregister(gameObject); } /// diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim new file mode 100644 index 00000000000..cc6433e6a09 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim @@ -0,0 +1,134 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VertexExtrusion + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: -0.00025422304 + outSlope: -0.00025422304 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.16047335 + - serializedVersion: 3 + time: 2 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 4 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._VertexExtrusionValue + path: + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 2152954766 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 4 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: -0.00025422304 + outSlope: -0.00025422304 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.16047335 + - serializedVersion: 3 + time: 2 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 4 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._VertexExtrusionValue + path: + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim.meta b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim.meta new file mode 100644 index 00000000000..c7c9bb9e077 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 16fcc0d430c59e640adf2c2b0bab9764 +timeCreated: 1541694820 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller new file mode 100644 index 00000000000..ee9c12c5b52 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VertexExtrusion + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107844086558836990} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &1102790358691785214 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VertexExtrusion + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 16fcc0d430c59e640adf2c2b0bab9764, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &1107844086558836990 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1102790358691785214} + m_Position: {x: 298, y: 360, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1102790358691785214} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller.meta b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller.meta new file mode 100644 index 00000000000..4282ca2f47f --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Animations/VertexExtrusion.controller.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8810eb9b5c91a9046ba8478aea9a6200 +timeCreated: 1510700893 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat similarity index 73% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat rename to Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat index 16ca2f7d91f..e76b2dd68fc 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01_preview.mat +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat @@ -7,16 +7,16 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Image01_preview + m_Name: VertexExtrusion m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _BORDER_LIGHT_USES_HOVER_COLOR - _DIRECTIONAL_LIGHT _EMISSION _HOVER_LIGHT _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 1 + m_ShaderKeywords: _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP _HOVER_LIGHT _INNER_GLOW + _REFLECTIONS _SPECULAR_HIGHLIGHTS _VERTEX_EXTRUSION + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 + m_CustomRenderQueue: 2000 stringTagMap: - RenderType: Transparent + RenderType: Opaque disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 @@ -45,23 +45,27 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 3bc246eb2f289bc4ca07a88ebda41cda, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _NormalMap: + - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _OcclusionMap: + - _NormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _ParallaxMap: + - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: + - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} @@ -71,7 +75,9 @@ Material: - _BlendOp: 0 - _BorderLight: 0 - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 - _BorderMinValue: 0.1 - _BorderWidth: 0.1 - _BumpScale: 1 @@ -79,20 +85,17 @@ Material: - _ClippingBorderWidth: 0.025 - _ClippingBox: 0 - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - _ClippingSphere: 0 - _ColorWriteMask: 15 - - _CullMode: 2 - - _CustomMode: 2 + - _CullMode: 0 + - _CustomMode: 0 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DirectionalLight: 1 - - _DstBlend: 10 + - _DstBlend: 0 - _EdgeSmoothingValue: 0.002 - _EnableChannelMap: 0 - - _EnableEmission: 1 - - _EnableHoverColorOpaqueOverride: 0 + - _EnableEmission: 0 - _EnableHoverColorOverride: 0 - _EnableLocalSpaceTriplanarMapping: 0 - _EnableNormalMap: 0 @@ -102,19 +105,27 @@ Material: - _EnvironmentColoring: 0 - _FadeBeginDistance: 0.85 - _FadeCompleteDistance: 0.5 + - _FadeMinValue: 0 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - _HoverLight: 1 - - _HoverLightOpaque: 0 - - _InnerGlow: 0 + - _InnerGlow: 1 + - _InnerGlowPower: 2 - _InstancedColor: 0 - - _Metallic: 0 - - _Mode: 2 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0.5 + - _Mode: 0 + - _NearLightFade: 0 - _NearPlaneFade: 0 - _NormalMapScale: 1 - _OcclusionStrength: 1 - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 - _Reflections: 1 - _Refraction: 0 - _RefractiveIndex: 0 @@ -124,30 +135,32 @@ Material: - _RoundCornerMargin: 0.01 - _RoundCornerRadius: 0.25 - _RoundCorners: 0 - - _Smoothness: 0.5 + - _Smoothness: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - - _SrcBlend: 5 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 - _Stencil: 0 - _StencilComparison: 0 - _StencilOperation: 0 - _StencilReference: 0 - _TriplanarMappingBlendSharpness: 4 - _UVSec: 0 + - _VertexColors: 0 + - _VertexExtrusion: 1 + - _VertexExtrusionValue: 0 + - _ZOffsetFactor: 0 + - _ZOffsetUnits: 0 - _ZTest: 4 - - _ZWrite: 0 + - _ZWrite: 1 m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 0.3137255} + - _Color: {r: 0.627451, g: 0.627451, b: 0.627451, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} + - _InnerGlowColor: {r: 0, g: 0.16743055, b: 0.9339623, a: 1} - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat.meta b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat.meta similarity index 79% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat.meta rename to Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat.meta index e6b10ebbbbd..04797f0814f 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat.meta +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Materials/VertexExtrusion.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 92210064419236546920339763390fee +guid: e7e8f42522979ae46b757e994f32af5e NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/MaterialGallery.unity b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/MaterialGallery.unity index 1f178db11a1..aefff694b4d 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/MaterialGallery.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/MaterialGallery.unity @@ -742,6 +742,8 @@ MonoBehaviour: - {fileID: 1179207373} - {fileID: 1494842152} clippingSide: 1 + useOnPreRender: 0 + cameraMethods: {fileID: 0} --- !u!4 &143898495 stripped Transform: m_CorrespondingSourceObject: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, @@ -778,7 +780,7 @@ Transform: - {fileID: 683618880} - {fileID: 1927701009} m_Father: {fileID: 1229001242} - m_RootOrder: 28 + m_RootOrder: 29 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &166359662 PrefabInstance: @@ -947,7 +949,7 @@ Transform: - {fileID: 2116835582} - {fileID: 1446620218} m_Father: {fileID: 1229001242} - m_RootOrder: 24 + m_RootOrder: 25 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &191389917 PrefabInstance: @@ -1207,7 +1209,7 @@ PrefabInstance: - target: {fileID: 102882196181455140, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} propertyPath: m_Text - value: 'Stenhcil Test + value: 'Stencil Test Portal' objectReference: {fileID: 0} @@ -2162,6 +2164,38 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} +--- !u!1 &333631497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 333631498} + m_Layer: 0 + m_Name: VertexExtrusion + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &333631498 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 333631497} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.5, y: 0, z: 4.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 924359330} + - {fileID: 1113921604} + m_Father: {fileID: 1229001242} + m_RootOrder: 23 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &366771502 GameObject: m_ObjectHideFlags: 0 @@ -3317,7 +3351,7 @@ Transform: - {fileID: 266502047} - {fileID: 2017557591} m_Father: {fileID: 1229001242} - m_RootOrder: 23 + m_RootOrder: 24 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &683618879 PrefabInstance: @@ -3758,6 +3792,8 @@ MonoBehaviour: renderers: - {fileID: 1481098058} clippingSide: 1 + useOnPreRender: 0 + cameraMethods: {fileID: 0} radius: 0.2 --- !u!4 &919952302 stripped Transform: @@ -3765,6 +3801,123 @@ Transform: type: 3} m_PrefabInstance: {fileID: 378182363} m_PrefabAsset: {fileID: 0} +--- !u!1001 &924359329 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 333631498} + m_Modifications: + - target: {fileID: 100002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_Name + value: Model_Bucky + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalPosition.y + value: 0.35 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalScale.x + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalScale.y + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_LocalScale.z + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e7e8f42522979ae46b757e994f32af5e, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} +--- !u!4 &924359330 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400002, guid: 24d47aad909b7114f99ea8657d2883d8, + type: 3} + m_PrefabInstance: {fileID: 924359329} + m_PrefabAsset: {fileID: 0} +--- !u!1 &924359331 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 100004, guid: 24d47aad909b7114f99ea8657d2883d8, + type: 3} + m_PrefabInstance: {fileID: 924359329} + m_PrefabAsset: {fileID: 0} +--- !u!135 &924359332 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 924359331} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.9633739 + m_Center: {x: -0.0000032186506, y: -0.0000013709067, z: 0.000004738569} +--- !u!95 &924359333 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 924359331} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 8810eb9b5c91a9046ba8478aea9a6200, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1001 &972457603 PrefabInstance: m_ObjectHideFlags: 0 @@ -4058,6 +4211,123 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} +--- !u!1001 &1113921603 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 333631498} + m_Modifications: + - target: {fileID: 1188282787330574, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_Name + value: Placard + objectReference: {fileID: 0} + - target: {fileID: 1188282787330574, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 102882196181455140, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_Text + value: 'Vertex + + Extrusion' + objectReference: {fileID: 0} + - target: {fileID: 23341247914484290, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 49805e9821bf499b9204a512120b3fb2, type: 2} + - target: {fileID: 23341247914484290, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23795050270161364, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_LightProbeUsage + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23795050270161364, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_ReflectionProbeUsage + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23795050270161364, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23795050270161364, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23795050270161364, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + propertyPath: m_MotionVectors + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1815568970368836, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1937578906433374, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4332148759565260, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalScale.x + value: 0.5070711 + objectReference: {fileID: 0} + - target: {fileID: 4332148759565260, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalScale.y + value: 0.25353554 + objectReference: {fileID: 0} + - target: {fileID: 4332148759565260, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} + propertyPath: m_LocalScale.z + value: 0.5070711 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 28f445004b874b329a03cd0e3cc63e5d, type: 3} +--- !u!4 &1113921604 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4085006294760784, guid: 28f445004b874b329a03cd0e3cc63e5d, + type: 3} + m_PrefabInstance: {fileID: 1113921603} + m_PrefabAsset: {fileID: 0} --- !u!1 &1133229264 GameObject: m_ObjectHideFlags: 0 @@ -4855,6 +5125,7 @@ Transform: - {fileID: 124892822} - {fileID: 1601762193} - {fileID: 2021114424} + - {fileID: 333631498} - {fileID: 650751961} - {fileID: 189888784} - {fileID: 2032623858} @@ -5420,7 +5691,7 @@ Transform: - {fileID: 426824859} - {fileID: 166359663} m_Father: {fileID: 1229001242} - m_RootOrder: 27 + m_RootOrder: 28 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1399274550 PrefabInstance: @@ -5841,6 +6112,8 @@ MonoBehaviour: renderers: - {fileID: 683618883} clippingSide: -1 + useOnPreRender: 0 + cameraMethods: {fileID: 0} --- !u!1001 &1479115759 PrefabInstance: m_ObjectHideFlags: 0 @@ -6179,6 +6452,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 + preferEyeTracking: 0 --- !u!114 &1491404206 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6191,6 +6465,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a21b486d0bb44444b1418aaa38b44de, type: 3} m_Name: m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 --- !u!81 &1491404207 AudioListener: m_ObjectHideFlags: 0 @@ -8073,7 +8354,7 @@ Transform: - {fileID: 615170460} - {fileID: 231732990} m_Father: {fileID: 1229001242} - m_RootOrder: 25 + m_RootOrder: 26 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2100551144 GameObject: @@ -8276,5 +8557,5 @@ Transform: - {fileID: 1494842150} - {fileID: 1941249169} m_Father: {fileID: 1229001242} - m_RootOrder: 26 + m_RootOrder: 27 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/CoffeeCup.prefab b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/CoffeeCup.prefab index 63abac67a46..e0a178b8e76 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/CoffeeCup.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/CoffeeCup.prefab @@ -179,14 +179,14 @@ MeshFilter: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1086727123993050} - m_Mesh: {fileID: 4300000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_Mesh: {fileID: 4300000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!33 &33932149283358908 MeshFilter: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1409004022357944} - m_Mesh: {fileID: 4300002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_Mesh: {fileID: 4300002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!114 &114664771837106342 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_Bucky.prefab b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_Bucky.prefab index 58ccea08ff1..c6d79714f02 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_Bucky.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_Bucky.prefab @@ -142,7 +142,7 @@ MeshFilter: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1029119715029460} - m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_Mesh: {fileID: 4300000, guid: 24d47aad909b7114f99ea8657d2883d8, type: 3} --- !u!114 &114141171559718660 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_PushButton.prefab b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_PushButton.prefab index 033659ac199..fc779ac6e90 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_PushButton.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/Model_PushButton.prefab @@ -179,14 +179,14 @@ MeshFilter: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1586752313079092} - m_Mesh: {fileID: 4300000, guid: 5308c0eb5c6ed4647b3797671dc2e5f3, type: 3} + m_Mesh: {fileID: 4300000, guid: 728972833a3739d4fa5d234f7c91b4b2, type: 3} --- !u!33 &33786917646565832 MeshFilter: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1698466255486918} - m_Mesh: {fileID: 4300002, guid: 5308c0eb5c6ed4647b3797671dc2e5f3, type: 3} + m_Mesh: {fileID: 4300002, guid: 728972833a3739d4fa5d234f7c91b4b2, type: 3} --- !u!65 &65437868389245264 BoxCollider: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/balloon.prefab b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/balloon.prefab index 0a85ec48af6..a8a6a671e30 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/balloon.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Prefabs/balloon.prefab @@ -332,21 +332,21 @@ MeshFilter: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1852769387633482} - m_Mesh: {fileID: 4300000, guid: 54f72652009c7574a96c8d088d1c78ef, type: 3} + m_Mesh: {fileID: 4300000, guid: 23d0d428664728f48bc426a2842ced95, type: 3} --- !u!33 &33581972815195846 MeshFilter: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1455067096291350} - m_Mesh: {fileID: 4300004, guid: 54f72652009c7574a96c8d088d1c78ef, type: 3} + m_Mesh: {fileID: 4300004, guid: 23d0d428664728f48bc426a2842ced95, type: 3} --- !u!33 &33960803321776138 MeshFilter: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1018326128813824} - m_Mesh: {fileID: 4300002, guid: 54f72652009c7574a96c8d088d1c78ef, type: 3} + m_Mesh: {fileID: 4300002, guid: 23d0d428664728f48bc426a2842ced95, type: 3} --- !u!114 &114664674115198144 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Scenes/InteractablesExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Scenes/InteractablesExamples.unity index 544009a09d7..ed8a912ae5a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Scenes/InteractablesExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Interactables/Scenes/InteractablesExamples.unity @@ -209,9 +209,9 @@ Transform: m_LocalPosition: {x: 0.04000002, y: 0.083, z: 0.47179997} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 2077684431} - - {fileID: 978914005} - - {fileID: 540275418} + - {fileID: 2023608830} + - {fileID: 1887329918} + - {fileID: 1798728701} m_Father: {fileID: 561651893} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -243,6 +243,151 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1582242360} m_PrefabAsset: {fileID: 0} +--- !u!1 &178554820 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1234542489422424, guid: 0ceaaf28e492a284fbf57901d04075ad, + type: 3} + m_PrefabInstance: {fileID: 1663320975} + m_PrefabAsset: {fileID: 0} +--- !u!114 &178554821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 178554820} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0.03, z: 0} + eventsToReceive: 1 + touchableSurface: 100 + bounds: {x: 0.03, y: 0.06} + touchableCollider: {fileID: 178554822} +--- !u!135 &178554822 stripped +SphereCollider: + m_CorrespondingSourceObject: {fileID: 135491218135748292, guid: 0ceaaf28e492a284fbf57901d04075ad, + type: 3} + m_PrefabInstance: {fileID: 1663320975} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &190671259 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1190688397} + m_Modifications: + - target: {fileID: 1850867357197028, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_Name + value: Toggle (2) + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0011 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} +--- !u!1001 &214507452 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1190688397} + m_Modifications: + - target: {fileID: 1850867357197028, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_Name + value: Toggle + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0712 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} --- !u!1 &281803363 GameObject: m_ObjectHideFlags: 0 @@ -347,6 +492,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 561651893} m_Modifications: + - target: {fileID: 1098841493691872912, guid: 51cc6641d88b49d46bd38572540efe6c, + type: 3} + propertyPath: eventsToReceive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 114718788154663760, guid: 51cc6641d88b49d46bd38572540efe6c, type: 3} propertyPath: Events.Array.size @@ -508,6 +658,12 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &315356022 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, + type: 3} + m_PrefabInstance: {fileID: 190671259} + m_PrefabAsset: {fileID: 0} --- !u!4 &392948878 Transform: m_ObjectHideFlags: 0 @@ -524,57 +680,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &405573173 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1190688397} - m_Modifications: - - target: {fileID: 1850867357197028, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_Name - value: Toggle (2) - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.y - value: -0.06999999 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} ---- !u!4 &405573174 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, - type: 3} - m_PrefabInstance: {fileID: 405573173} - m_PrefabAsset: {fileID: 0} --- !u!1 &469507211 GameObject: m_ObjectHideFlags: 0 @@ -638,57 +743,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 569537905} m_PrefabAsset: {fileID: 0} ---- !u!1001 &540275417 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 79737368} - m_Modifications: - - target: {fileID: 1775492867674862, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_Name - value: CheckBox (2) - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.y - value: -0.06999999 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: abb2df850d68f894d830c95c299cf10f, type: 3} ---- !u!4 &540275418 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, - type: 3} - m_PrefabInstance: {fileID: 540275417} - m_PrefabAsset: {fileID: 0} --- !u!1 &543097130 GameObject: m_ObjectHideFlags: 0 @@ -713,6 +767,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 561651893} m_Modifications: + - target: {fileID: 5253365468919551739, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, + type: 3} + propertyPath: eventsToReceive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4249060311757736, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, type: 3} propertyPath: m_LocalPosition.x value: -0.57 @@ -803,6 +862,27 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: 0} + - target: {fileID: 33150752503653204, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: 0} + - target: {fileID: 114041511408948086, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, + type: 3} + propertyPath: m_fontAsset + value: + objectReference: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, + type: 2} + - target: {fileID: 114041511408948086, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, + type: 3} + propertyPath: m_havePropertiesChanged + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114041511408948086, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, + type: 3} + propertyPath: m_isInputParsingRequired + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 80cec532ae7b6c1429d0f5494e7dbd8c, type: 3} --- !u!1 &561651892 @@ -1028,90 +1108,133 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 ---- !u!1 &792227567 +--- !u!1 &667308057 stripped GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 1117458272272208, guid: a900c08743a94c328074df8bbe3eb63c, + m_CorrespondingSourceObject: {fileID: 1128101275641750, guid: d12fcfca48d5bea4885b7957a82235f8, type: 3} - m_PrefabInstance: {fileID: 0} + m_PrefabInstance: {fileID: 635986447} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792227568} - m_Layer: 0 - m_Name: Panel1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &792227568 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 4866669652097362, guid: a900c08743a94c328074df8bbe3eb63c, +--- !u!136 &667308059 stripped +CapsuleCollider: + m_CorrespondingSourceObject: {fileID: 136734857329372230, guid: d12fcfca48d5bea4885b7957a82235f8, type: 3} + m_PrefabInstance: {fileID: 635986447} + m_PrefabAsset: {fileID: 0} +--- !u!114 &667308060 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792227567} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2, y: 2, z: 1} - m_Children: - - {fileID: 1626314868} - - {fileID: 1635786678} - m_Father: {fileID: 392948878} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &802010850 + m_GameObject: {fileID: 667308057} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 1.27, z: -0.01} + eventsToReceive: 1 + touchableSurface: 100 + bounds: {x: 2.87, y: 3.28} + touchableCollider: {fileID: 667308059} +--- !u!1001 &764258699 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1190688397} + m_TransformParent: {fileID: 79737368} m_Modifications: - - target: {fileID: 1850867357197028, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 1775492867674862, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_Name - value: Toggle (1) + value: CheckBox objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000000037252903 + value: -0.0707 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} propertyPath: m_RootOrder - value: 1 + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} ---- !u!4 &802010851 stripped + m_SourcePrefab: {fileID: 100100000, guid: 6f89876ff9050224f949c0490969219d, type: 3} +--- !u!1 &792227567 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 1117458272272208, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 792227568} + m_Layer: 0 + m_Name: Panel1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &792227568 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 4866669652097362, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 792227567} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 1} + m_Children: + - {fileID: 1626314868} + - {fileID: 1635786678} + m_Father: {fileID: 392948878} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &818800744 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, + m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} - m_PrefabInstance: {fileID: 802010850} + m_PrefabInstance: {fileID: 1002582892} m_PrefabAsset: {fileID: 0} --- !u!1 &863205415 GameObject: @@ -1203,6 +1326,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 561651893} m_Modifications: + - target: {fileID: 3354217369102256160, guid: 02c524b22137b5449904f5395141cc73, + type: 3} + propertyPath: localCenter.z + value: -0.012441337 + objectReference: {fileID: 0} - target: {fileID: 114818926546564510, guid: 02c524b22137b5449904f5395141cc73, type: 3} propertyPath: Events.Array.size @@ -1438,6 +1566,16 @@ PrefabInstance: propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} + - target: {fileID: 65501967504898374, guid: 02c524b22137b5449904f5395141cc73, + type: 3} + propertyPath: m_Size.z + value: 0.024882743 + objectReference: {fileID: 0} + - target: {fileID: 65501967504898374, guid: 02c524b22137b5449904f5395141cc73, + type: 3} + propertyPath: m_Center.z + value: 0.000000034458935 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 02c524b22137b5449904f5395141cc73, type: 3} --- !u!1 &944840462 @@ -1523,63 +1661,126 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 944840462} m_CullTransparentMesh: 0 ---- !u!1001 &978914004 +--- !u!1001 &1002582892 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 79737368} + m_TransformParent: {fileID: 1190688397} m_Modifications: - - target: {fileID: 1775492867674862, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 1850867357197028, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_Name - value: CheckBox (1) + value: Toggle (3) objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000000037252903 + value: -0.0696 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} propertyPath: m_RootOrder - value: 1 + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: abb2df850d68f894d830c95c299cf10f, type: 3} ---- !u!4 &978914005 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, - type: 3} - m_PrefabInstance: {fileID: 978914004} - m_PrefabAsset: {fileID: 0} + m_SourcePrefab: {fileID: 100100000, guid: a0dc4a34875700c4aba845405dc43a89, type: 3} --- !u!4 &1070904456 stripped Transform: m_CorrespondingSourceObject: {fileID: 4359496519673794, guid: d12fcfca48d5bea4885b7957a82235f8, type: 3} m_PrefabInstance: {fileID: 635986447} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1073938076 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 79737368} + m_Modifications: + - target: {fileID: 1775492867674862, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_Name + value: CheckBox (2) + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f89876ff9050224f949c0490969219d, type: 3} --- !u!114 &1093241601 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 114818926546564510, guid: 02c524b22137b5449904f5395141cc73, @@ -1620,9 +1821,9 @@ Transform: m_LocalPosition: {x: 0.25800002, y: 0.083, z: 0.47179997} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1688406054} - - {fileID: 802010851} - - {fileID: 405573174} + - {fileID: 1432546884} + - {fileID: 315356022} + - {fileID: 818800744} m_Father: {fileID: 561651893} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1648,6 +1849,37 @@ MonoBehaviour: rows: 3 cellWidth: 0.07 cellHeight: 0.07 +--- !u!1 &1193043582 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1439781781207532, guid: 29a6f5316e0868e47adff5eee8945193, + type: 3} + m_PrefabInstance: {fileID: 569537905} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1193043584 stripped +BoxCollider: + m_CorrespondingSourceObject: {fileID: 65437868389245264, guid: 29a6f5316e0868e47adff5eee8945193, + type: 3} + m_PrefabInstance: {fileID: 569537905} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1193043585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1193043582} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 1, z: 0} + localUp: {x: 0, y: 0, z: 1} + localCenter: {x: 0, y: 0.45, z: 0} + eventsToReceive: 1 + touchableSurface: 100 + bounds: {x: 1.31, y: 1.26} + touchableCollider: {fileID: 1193043584} --- !u!1001 &1324622404 PrefabInstance: m_ObjectHideFlags: 0 @@ -1696,6 +1928,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 561651893} m_Modifications: + - target: {fileID: 1856622667495492, guid: 8b83134143223104c9bc3865a565cab3, type: 3} + propertyPath: m_Name + value: RadialSet + objectReference: {fileID: 0} - target: {fileID: 4894033903586032, guid: 8b83134143223104c9bc3865a565cab3, type: 3} propertyPath: m_LocalPosition.x value: 0.44950002 @@ -1728,6 +1964,18 @@ PrefabInstance: propertyPath: m_RootOrder value: 8 objectReference: {fileID: 0} + - target: {fileID: 4894033903586032, guid: 8b83134143223104c9bc3865a565cab3, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894033903586032, guid: 8b83134143223104c9bc3865a565cab3, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894033903586032, guid: 8b83134143223104c9bc3865a565cab3, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8b83134143223104c9bc3865a565cab3, type: 3} --- !u!4 &1332690819 stripped @@ -1821,6 +2069,12 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1349932060} m_CullTransparentMesh: 0 +--- !u!4 &1432546884 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: a0dc4a34875700c4aba845405dc43a89, + type: 3} + m_PrefabInstance: {fileID: 214507452} + m_PrefabAsset: {fileID: 0} --- !u!1 &1437088830 GameObject: m_ObjectHideFlags: 0 @@ -1831,7 +2085,6 @@ GameObject: m_Component: - component: {fileID: 1437088831} - component: {fileID: 1437088833} - - component: {fileID: 1437088832} m_Layer: 0 m_Name: ReceiverExample m_TagString: Untagged @@ -1854,23 +2107,6 @@ Transform: m_Father: {fileID: 561651893} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1437088832 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437088830} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: afb3d203ea3ffed4dba2fddd2771cc64, type: 3} - m_Name: - m_EditorClassIdentifier: - Button: {fileID: 1093241601} - Focus: 0 - Down: 0 - Disabled: 0 - Clicked: 0 --- !u!114 &1437088833 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2123,6 +2359,11 @@ PrefabInstance: propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} + - target: {fileID: 1181576808188907290, guid: d5e0e8cc740eb134789fd1f6bb5bb80a, + type: 3} + propertyPath: eventsToReceive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: d5e0e8cc740eb134789fd1f6bb5bb80a, type: 3} --- !u!1 &1626314867 @@ -2248,47 +2489,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ff4e3b9019304b5aaec5664de0778d21, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &1627996128 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 79737368} - m_Modifications: - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.y - value: 0.07000001 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: abb2df850d68f894d830c95c299cf10f, type: 3} --- !u!1 &1635786677 GameObject: m_ObjectHideFlags: 0 @@ -2498,6 +2698,12 @@ PrefabInstance: propertyPath: m_isInputParsingRequired value: 1 objectReference: {fileID: 0} + - target: {fileID: 114293819691004426, guid: 4b1ffbebacd36694ebea9fb6d437c68f, + type: 3} + propertyPath: m_fontAsset + value: + objectReference: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, + type: 2} - target: {fileID: 114856665817931228, guid: 4b1ffbebacd36694ebea9fb6d437c68f, type: 3} propertyPath: InputActionId @@ -2521,53 +2727,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1672550135} m_PrefabAsset: {fileID: 0} ---- !u!1001 &1688406053 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1190688397} - m_Modifications: - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.y - value: 0.07000001 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: ce4801a284bc5c3488c631dcdba665df, type: 3} ---- !u!4 &1688406054 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4938574377845388, guid: ce4801a284bc5c3488c631dcdba665df, - type: 3} - m_PrefabInstance: {fileID: 1688406053} - m_PrefabAsset: {fileID: 0} --- !u!1 &1736250032 GameObject: m_ObjectHideFlags: 0 @@ -2662,6 +2821,12 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1736250032} m_CullTransparentMesh: 0 +--- !u!4 &1798728701 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, + type: 3} + m_PrefabInstance: {fileID: 1924442722} + m_PrefabAsset: {fileID: 0} --- !u!4 &1870333360 stripped Transform: m_CorrespondingSourceObject: {fileID: 4896987550614830, guid: 50eb8d97f29f335409ec2df393ed6cc5, @@ -2680,6 +2845,69 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!4 &1887329918 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, + type: 3} + m_PrefabInstance: {fileID: 1073938076} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1924442722 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 79737368} + m_Modifications: + - target: {fileID: 1775492867674862, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_Name + value: CheckBox (3) + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0707 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f89876ff9050224f949c0490969219d, type: 3} --- !u!1 &1954408010 GameObject: m_ObjectHideFlags: 0 @@ -2777,6 +3005,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1663320975} m_PrefabAsset: {fileID: 0} +--- !u!4 &2023608830 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: 6f89876ff9050224f949c0490969219d, + type: 3} + m_PrefabInstance: {fileID: 764258699} + m_PrefabAsset: {fileID: 0} --- !u!1 &2064343710 GameObject: m_ObjectHideFlags: 0 @@ -2808,11 +3042,36 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &2077684431 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4165280830115576, guid: abb2df850d68f894d830c95c299cf10f, +--- !u!1 &2121412493 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1705988989258782, guid: 50eb8d97f29f335409ec2df393ed6cc5, type: 3} - m_PrefabInstance: {fileID: 1627996128} + m_PrefabInstance: {fileID: 1324622404} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2121412494 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2121412493} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -1.06} + eventsToReceive: 1 + touchableSurface: 100 + bounds: {x: 2.13, y: 2.25} + touchableCollider: {fileID: 2121412495} +--- !u!135 &2121412495 stripped +SphereCollider: + m_CorrespondingSourceObject: {fileID: 135097812019856892, guid: 50eb8d97f29f335409ec2df393ed6cc5, + type: 3} + m_PrefabInstance: {fileID: 1324622404} m_PrefabAsset: {fileID: 0} --- !u!1 &2124803459 GameObject: @@ -2872,6 +3131,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 + useEyeTracking: 0 --- !u!114 &2124803462 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2884,6 +3144,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a21b486d0bb44444b1418aaa38b44de, type: 3} m_Name: m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 --- !u!81 &2124803463 AudioListener: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity index 4e29f93dc25..623dc57f251 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity @@ -1021,7 +1021,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &534669907 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes/SliderExample.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes/SliderExample.unity index 9b80e504ef3..39306595885 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes/SliderExample.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes/SliderExample.unity @@ -1822,7 +1822,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 877197729} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!1 &886953616 GameObject: m_ObjectHideFlags: 0 @@ -3186,7 +3186,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!114 &1607275050 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity index 1cde259d785..43bc2880080 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity @@ -188,7 +188,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23a70f6672029144c8d4c44a6fb6b213, type: 3} + m_Script: {fileID: 11500000, guid: 85b0e186e2c82324b83f3696c29cf697, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &148915820 @@ -993,7 +993,7 @@ Transform: --- !u!1 &281205021 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100052, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1012,7 +1012,7 @@ GameObject: --- !u!4 &281205022 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400052, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1027,7 +1027,7 @@ Transform: --- !u!23 &281205023 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300046, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300046, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1065,12 +1065,12 @@ MeshRenderer: --- !u!33 &281205024 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300046, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300046, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 281205021} - m_Mesh: {fileID: 4300030, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &281803363 GameObject: m_ObjectHideFlags: 0 @@ -1841,7 +1841,7 @@ Transform: --- !u!1 &365752473 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100004, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 100004, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1860,7 +1860,7 @@ GameObject: --- !u!4 &365752474 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400004, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 400004, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1875,7 +1875,7 @@ Transform: --- !u!23 &365752475 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 2300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1913,12 +1913,12 @@ MeshRenderer: --- !u!33 &365752476 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 3300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365752473} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!1 &375710582 GameObject: m_ObjectHideFlags: 0 @@ -1952,7 +1952,7 @@ Transform: --- !u!1 &383219469 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100006, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1971,7 +1971,7 @@ GameObject: --- !u!4 &383219470 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400006, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1986,7 +1986,7 @@ Transform: --- !u!23 &383219471 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300006, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2024,12 +2024,12 @@ MeshRenderer: --- !u!33 &383219472 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300006, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 383219469} - m_Mesh: {fileID: 4300010, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300010, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &392948878 Transform: m_ObjectHideFlags: 0 @@ -2080,7 +2080,7 @@ Transform: --- !u!1 &449611459 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100062, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100062, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2099,7 +2099,7 @@ GameObject: --- !u!4 &449611460 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400062, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400062, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2114,7 +2114,7 @@ Transform: --- !u!23 &449611461 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300052, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2152,12 +2152,12 @@ MeshRenderer: --- !u!33 &449611462 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300052, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 449611459} - m_Mesh: {fileID: 4300052, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &461715216 GameObject: m_ObjectHideFlags: 0 @@ -2283,7 +2283,7 @@ Transform: --- !u!1 &523188691 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100070, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100070, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2302,7 +2302,7 @@ GameObject: --- !u!4 &523188692 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400070, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400070, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2317,7 +2317,7 @@ Transform: --- !u!23 &523188693 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300060, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300060, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -2355,12 +2355,12 @@ MeshRenderer: --- !u!33 &523188694 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300060, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300060, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 523188691} - m_Mesh: {fileID: 4300060, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300060, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &536019416 GameObject: m_ObjectHideFlags: 0 @@ -3704,7 +3704,7 @@ MonoBehaviour: --- !u!1 &645727278 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100028, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3723,7 +3723,7 @@ GameObject: --- !u!4 &645727279 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400028, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3738,7 +3738,7 @@ Transform: --- !u!23 &645727280 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300028, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3776,12 +3776,12 @@ MeshRenderer: --- !u!33 &645727281 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300028, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 645727278} - m_Mesh: {fileID: 4300018, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300018, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &651834225 GameObject: m_ObjectHideFlags: 0 @@ -3867,7 +3867,7 @@ SpriteRenderer: --- !u!1 &666035457 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100064, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100064, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3886,7 +3886,7 @@ GameObject: --- !u!4 &666035458 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400064, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400064, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3901,7 +3901,7 @@ Transform: --- !u!23 &666035459 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300054, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -3939,12 +3939,12 @@ MeshRenderer: --- !u!33 &666035460 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300054, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 666035457} - m_Mesh: {fileID: 4300054, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &722345290 GameObject: m_ObjectHideFlags: 0 @@ -3985,7 +3985,7 @@ Transform: --- !u!1 &733610005 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100002, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -4004,7 +4004,7 @@ GameObject: --- !u!4 &733610006 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400002, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -4019,7 +4019,7 @@ Transform: --- !u!23 &733610007 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300002, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -4057,12 +4057,12 @@ MeshRenderer: --- !u!33 &733610008 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300002, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300002, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 733610005} - m_Mesh: {fileID: 4300004, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1001 &751443869 PrefabInstance: m_ObjectHideFlags: 0 @@ -5002,7 +5002,7 @@ MeshRenderer: --- !u!1 &836834070 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -5669,7 +5669,7 @@ Transform: --- !u!1 &902945836 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100044, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -5688,7 +5688,7 @@ GameObject: --- !u!23 &902945837 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300042, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -5728,16 +5728,16 @@ MeshRenderer: --- !u!33 &902945838 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300042, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 902945836} - m_Mesh: {fileID: 4300016, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300016, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &902945839 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400044, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -5908,7 +5908,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 959819892} - m_Mesh: {fileID: 4300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_Mesh: {fileID: 4300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!1001 &963765050 PrefabInstance: m_ObjectHideFlags: 0 @@ -6522,7 +6522,7 @@ Transform: --- !u!4 &1000547033 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6629,7 +6629,7 @@ MeshRenderer: --- !u!1 &1075983757 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100030, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6648,7 +6648,7 @@ GameObject: --- !u!23 &1075983758 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300030, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6687,16 +6687,16 @@ MeshRenderer: --- !u!33 &1075983759 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300030, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1075983757} - m_Mesh: {fileID: 4300022, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300022, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &1075983760 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400030, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6784,11 +6784,11 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1092355425} - m_Mesh: {fileID: 4300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_Mesh: {fileID: 4300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!1 &1102426501 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100038, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6807,7 +6807,7 @@ GameObject: --- !u!4 &1102426502 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400038, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6822,7 +6822,7 @@ Transform: --- !u!23 &1102426503 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300038, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -6860,12 +6860,12 @@ MeshRenderer: --- !u!33 &1102426504 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300038, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300038, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1102426501} - m_Mesh: {fileID: 4300006, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1001 &1115033900 PrefabInstance: m_ObjectHideFlags: 0 @@ -8211,7 +8211,7 @@ Transform: --- !u!1 &1257630937 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100054, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8230,7 +8230,7 @@ GameObject: --- !u!4 &1257630938 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400054, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8245,7 +8245,7 @@ Transform: --- !u!23 &1257630939 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8283,16 +8283,16 @@ MeshRenderer: --- !u!33 &1257630940 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300048, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300048, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1257630937} - m_Mesh: {fileID: 4300014, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300014, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &1286762432 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100002, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 100002, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8311,7 +8311,7 @@ GameObject: --- !u!4 &1286762433 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, + m_CorrespondingSourceObject: {fileID: 400002, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8491,7 +8491,7 @@ CanvasRenderer: --- !u!1 &1374492526 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100034, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8510,7 +8510,7 @@ GameObject: --- !u!23 &1374492527 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300034, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -8548,16 +8548,16 @@ MeshRenderer: --- !u!33 &1374492528 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300034, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1374492526} - m_Mesh: {fileID: 4300008, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300008, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &1374492529 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400034, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400034, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -9681,7 +9681,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1606036649} - m_Mesh: {fileID: 4300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_Mesh: {fileID: 4300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!1 &1626314867 GameObject: m_ObjectHideFlags: 0 @@ -9922,7 +9922,7 @@ MeshFilter: --- !u!1 &1697135928 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100000, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -9941,7 +9941,7 @@ GameObject: --- !u!4 &1697135929 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400000, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -9956,7 +9956,7 @@ Transform: --- !u!23 &1697135930 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300000, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -9995,16 +9995,16 @@ MeshRenderer: --- !u!33 &1697135931 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300000, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1697135928} - m_Mesh: {fileID: 4300020, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300020, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &1703052112 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100032, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10023,7 +10023,7 @@ GameObject: --- !u!4 &1703052113 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400032, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10038,7 +10038,7 @@ Transform: --- !u!23 &1703052114 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300032, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10076,12 +10076,12 @@ MeshRenderer: --- !u!33 &1703052115 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300032, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300032, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1703052112} - m_Mesh: {fileID: 4300012, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300012, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &1736250032 GameObject: m_ObjectHideFlags: 0 @@ -10181,7 +10181,7 @@ CanvasRenderer: --- !u!1 &1858518872 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100042, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10200,7 +10200,7 @@ GameObject: --- !u!4 &1858518873 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400042, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400042, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10215,7 +10215,7 @@ Transform: --- !u!23 &1858518874 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300040, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300040, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10254,12 +10254,12 @@ MeshRenderer: --- !u!33 &1858518875 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300040, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300040, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1858518872} - m_Mesh: {fileID: 4300000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &1943142429 GameObject: m_ObjectHideFlags: 0 @@ -10353,7 +10353,7 @@ Transform: --- !u!1 &2008337341 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100036, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10372,7 +10372,7 @@ GameObject: --- !u!4 &2008337342 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400036, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10387,7 +10387,7 @@ Transform: --- !u!23 &2008337343 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300036, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10425,12 +10425,12 @@ MeshRenderer: --- !u!33 &2008337344 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300036, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300036, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2008337341} - m_Mesh: {fileID: 4300026, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300026, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &2021116510 GameObject: m_ObjectHideFlags: 0 @@ -10489,7 +10489,7 @@ Transform: --- !u!1 &2047006155 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100004, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10508,7 +10508,7 @@ GameObject: --- !u!4 &2047006156 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400004, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10523,7 +10523,7 @@ Transform: --- !u!23 &2047006157 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300004, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10561,16 +10561,16 @@ MeshRenderer: --- !u!33 &2047006158 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300004, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2047006155} - m_Mesh: {fileID: 4300024, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300024, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &2052693451 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100068, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100068, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10589,7 +10589,7 @@ GameObject: --- !u!4 &2052693452 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400068, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400068, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10604,7 +10604,7 @@ Transform: --- !u!23 &2052693453 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300058, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300058, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10642,12 +10642,12 @@ MeshRenderer: --- !u!33 &2052693454 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300058, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300058, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2052693451} - m_Mesh: {fileID: 4300058, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300058, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!1 &2062840304 GameObject: m_ObjectHideFlags: 0 @@ -10742,7 +10742,7 @@ MeshRenderer: --- !u!1 &2066565500 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100050, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100050, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10761,7 +10761,7 @@ GameObject: --- !u!23 &2066565501 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300044, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10800,16 +10800,16 @@ MeshRenderer: --- !u!33 &2066565502 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300044, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300044, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2066565500} - m_Mesh: {fileID: 4300028, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!4 &2066565503 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400050, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400050, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10830,7 +10830,7 @@ Transform: --- !u!1 &2085988780 GameObject: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 100066, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 100066, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10849,7 +10849,7 @@ GameObject: --- !u!4 &2085988781 Transform: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 400066, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 400066, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10864,7 +10864,7 @@ Transform: --- !u!23 &2085988782 MeshRenderer: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 2300056, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 2300056, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -10902,9 +10902,9 @@ MeshRenderer: --- !u!33 &2085988783 MeshFilter: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 3300056, guid: 2c11bf713819a084d8cb4c35db20d042, + m_CorrespondingSourceObject: {fileID: 3300056, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2085988780} - m_Mesh: {fileID: 4300056, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300056, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity.meta index 648d9bf0a9b..2a40bd2f910 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity.meta +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes/TooltipExamples.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f3e468440f9093b4ab46ddfaeaab7405 +guid: de90a43947eced441b4c426e11f35f28 timeCreated: 1520445447 licenseType: Free DefaultImporter: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Utilities/InspectorFields/Scenes/InspectorFieldsExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/Utilities/InspectorFields/Scenes/InspectorFieldsExamples.unity index 4df2be82f08..a48e0e9b97c 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Utilities/InspectorFields/Scenes/InspectorFieldsExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/Utilities/InspectorFields/Scenes/InspectorFieldsExamples.unity @@ -931,7 +931,7 @@ MonoBehaviour: gazeTransform: {fileID: 0} minHeadVelocityThreshold: 0.5 maxHeadVelocityThreshold: 2 - preferEyeTracking: 0 + useEyeTracking: 0 --- !u!81 &1428889687 AudioListener: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Utilities/Prefabs/FingerChaser.prefab b/Assets/MixedRealityToolkit.Examples/Demos/Utilities/Prefabs/FingerChaser.prefab index 3edb107a730..ca8eb20450d 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/Utilities/Prefabs/FingerChaser.prefab +++ b/Assets/MixedRealityToolkit.Examples/Demos/Utilities/Prefabs/FingerChaser.prefab @@ -123,7 +123,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b55691ad5b034fe6966763a6e23818d2, type: 3} m_Name: m_EditorClassIdentifier: - trackedControllerElement: 0 handedness: 1 trackedObjectToReference: 3 trackedHandJoint: 5 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/CoffeeCup.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/CoffeeCup.fbx.meta index 48b71425f96..f8d22968d4a 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/CoffeeCup.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/CoffeeCup.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: aa39033344b08ce4bab10cc11dc6d6b8 +guid: e963263242b6cbb4bbbf279f0c0e7789 timeCreated: 1493052376 licenseType: Pro ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Bucky.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Bucky.fbx.meta index 93d20d76fce..260309cf046 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Bucky.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Bucky.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5838ea95659d32943afec95550ac1ce1 +guid: 24d47aad909b7114f99ea8657d2883d8 timeCreated: 1493153463 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Icosa.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Icosa.fbx.meta index 680d4bd8f8e..c886db230a5 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Icosa.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Icosa.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 284d5c2c421022e4f9056fb0a21ff91c +guid: bb88669a3463b36438d9225a3ecd3a35 timeCreated: 1493153463 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Octa.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Octa.fbx.meta index fbb07323bc0..b1203ecf367 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Octa.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Octa.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1e23ec24c22068b4cbf47737c35e277b +guid: 40bb9772594a93140a43a9a4f5cf9356 timeCreated: 1493153463 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Platonic.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Platonic.fbx.meta index ebaac730bb5..ce8c9ffd62e 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Platonic.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_Platonic.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5942fa356be284c4a8d1d231519a7581 +guid: f9b1acc0404b53f45bffb480fefa205a timeCreated: 1486081727 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_PushButton.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_PushButton.fbx.meta index 9cb3256d3a3..35c4ab6cab2 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_PushButton.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/Model_PushButton.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5308c0eb5c6ed4647b3797671dc2e5f3 +guid: 728972833a3739d4fa5d234f7c91b4b2 timeCreated: 1486081427 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/MouseandCheese.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/MouseandCheese.fbx.meta index 7fe258d74f0..6929ce3b2a5 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/MouseandCheese.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/MouseandCheese.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3f8a3164171bcba42b1e2b051b994a3c +guid: 1d3a8429b0db5df4ab258018baf2466b timeCreated: 1493847758 licenseType: Pro ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/TheModule.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/TheModule.fbx.meta index a13ea19bcb2..442edb3e811 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/TheModule.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/TheModule.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2c11bf713819a084d8cb4c35db20d042 +guid: 9b8d622e06b5ddc47bfd77b86d50527c ModelImporter: serializedVersion: 23 fileIDToRecycleName: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/balloon.fbx.meta b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/balloon.fbx.meta index d90f718b517..ebfc4abd49c 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/balloon.fbx.meta +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Models/balloon.fbx.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 54f72652009c7574a96c8d088d1c78ef +guid: 23d0d428664728f48bc426a2842ced95 timeCreated: 1486079922 licenseType: Free ModelImporter: diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/CoffeeCup.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/CoffeeCup.prefab index c7525e82a94..63da5272366 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/CoffeeCup.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/CoffeeCup.prefab @@ -178,14 +178,14 @@ MeshFilter: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1633848865826384} - m_Mesh: {fileID: 4300002, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_Mesh: {fileID: 4300002, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!33 &33247592164334194 MeshFilter: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1663010501428764} - m_Mesh: {fileID: 4300000, guid: aa39033344b08ce4bab10cc11dc6d6b8, type: 3} + m_Mesh: {fileID: 4300000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!65 &65660317952228020 BoxCollider: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/LunarModuleWithFuelLevel.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/LunarModuleWithFuelLevel.prefab index f186d66018b..5b8fbbcabf1 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/LunarModuleWithFuelLevel.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/LunarModuleWithFuelLevel.prefab @@ -211,7 +211,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 31330388428217207} - m_Mesh: {fileID: 4300052, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300052, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &185076258307274526 MeshRenderer: m_ObjectHideFlags: 0 @@ -288,7 +288,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 362603336440431581} - m_Mesh: {fileID: 4300006, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300006, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &6892305319622083106 MeshRenderer: m_ObjectHideFlags: 0 @@ -365,7 +365,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 412364246646587726} - m_Mesh: {fileID: 4300014, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300014, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &377627052389387293 MeshRenderer: m_ObjectHideFlags: 0 @@ -442,7 +442,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 628842201180960158} - m_Mesh: {fileID: 4300054, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300054, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &186496555591240852 MeshRenderer: m_ObjectHideFlags: 0 @@ -519,7 +519,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 790236247342459382} - m_Mesh: {fileID: 4300026, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300026, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &7883867401209774220 MeshRenderer: m_ObjectHideFlags: 0 @@ -596,7 +596,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1294059011793669402} - m_Mesh: {fileID: 4300030, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300030, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &3838390516351610217 MeshRenderer: m_ObjectHideFlags: 0 @@ -673,7 +673,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1491466562629070411} - m_Mesh: {fileID: 4300004, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300004, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &6977919199865098171 MeshRenderer: m_ObjectHideFlags: 0 @@ -750,7 +750,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1876355047604283016} - m_Mesh: {fileID: 4300028, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300028, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &7826292960529721805 MeshRenderer: m_ObjectHideFlags: 0 @@ -828,7 +828,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2165551159833789947} - m_Mesh: {fileID: 4300000, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300000, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &1124291442454608683 MeshRenderer: m_ObjectHideFlags: 0 @@ -906,7 +906,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3522094229576267783} - m_Mesh: {fileID: 4300010, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300010, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &8596134387734192470 MeshRenderer: m_ObjectHideFlags: 0 @@ -983,7 +983,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3780193034834240950} - m_Mesh: {fileID: 4300018, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300018, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &3988028319841651304 MeshRenderer: m_ObjectHideFlags: 0 @@ -1060,7 +1060,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4476793620728521900} - m_Mesh: {fileID: 4300022, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300022, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &4250729894513476205 MeshRenderer: m_ObjectHideFlags: 0 @@ -1140,7 +1140,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4696814289105623127} - m_Mesh: {fileID: 4300008, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300008, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &5504161517399569708 MeshRenderer: m_ObjectHideFlags: 0 @@ -1217,7 +1217,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5885978181408445487} - m_Mesh: {fileID: 4300060, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300060, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &8111683763418726535 MeshRenderer: m_ObjectHideFlags: 0 @@ -1294,7 +1294,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5893080385543302118} - m_Mesh: {fileID: 4300058, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300058, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &5567259309005111798 MeshRenderer: m_ObjectHideFlags: 0 @@ -1371,7 +1371,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6290748173869265290} - m_Mesh: {fileID: 4300016, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300016, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &3538226077150232692 MeshRenderer: m_ObjectHideFlags: 0 @@ -1450,7 +1450,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6534118494866041325} - m_Mesh: {fileID: 4300024, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300024, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &4683150980299035772 MeshRenderer: m_ObjectHideFlags: 0 @@ -1527,7 +1527,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6707536617465586392} - m_Mesh: {fileID: 4300020, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300020, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &2077541491978661995 MeshRenderer: m_ObjectHideFlags: 0 @@ -1605,7 +1605,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6937162097146330501} - m_Mesh: {fileID: 4300056, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300056, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &5234161271210030157 MeshRenderer: m_ObjectHideFlags: 0 @@ -1743,7 +1743,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8228388394291187528} - m_Mesh: {fileID: 4300012, guid: 2c11bf713819a084d8cb4c35db20d042, type: 3} + m_Mesh: {fileID: 4300012, guid: 9b8d622e06b5ddc47bfd77b86d50527c, type: 3} --- !u!23 &5535613442388595555 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Icosa.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Icosa.prefab index 9a5243718e1..ffab21f2902 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Icosa.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Icosa.prefab @@ -141,7 +141,7 @@ MeshFilter: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1107561726728306} - m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_Mesh: {fileID: 4300000, guid: bb88669a3463b36438d9225a3ecd3a35, type: 3} --- !u!65 &65182117896798144 BoxCollider: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Octa.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Octa.prefab index c5e226221ab..306490bcd7b 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Octa.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Prototyping/Octa.prefab @@ -141,7 +141,7 @@ MeshFilter: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1455026207544230} - m_Mesh: {fileID: 4300000, guid: 1e23ec24c22068b4cbf47737c35e277b, type: 3} + m_Mesh: {fileID: 4300000, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!65 &65133113148387750 BoxCollider: m_ObjectHideFlags: 1 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/SceneDescriptionPanel.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/SceneDescriptionPanel.prefab index 9e75a5b43d7..1e0587552c0 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/SceneDescriptionPanel.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/SceneDescriptionPanel.prefab @@ -817,7 +817,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 835cb4a58f172d7478801db95e510f56, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Version.txt b/Assets/MixedRealityToolkit.Examples/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit.Examples/Version.txt +++ b/Assets/MixedRealityToolkit.Examples/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Providers/OpenVR/GenericOpenVRController.cs b/Assets/MixedRealityToolkit.Providers/OpenVR/GenericOpenVRController.cs index b80e1bffb5e..643d4f724a5 100644 --- a/Assets/MixedRealityToolkit.Providers/OpenVR/GenericOpenVRController.cs +++ b/Assets/MixedRealityToolkit.Providers/OpenVR/GenericOpenVRController.cs @@ -185,12 +185,8 @@ protected void UpdateControllerData(XRNodeState state) // Devices are considered tracked if we receive position OR rotation data from the sensors. TrackingState = (IsPositionAvailable || IsRotationAvailable) ? TrackingState.Tracked : TrackingState.NotTracked; - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - if (playspace != null) - { - CurrentControllerPosition = playspace.TransformPoint(CurrentControllerPosition); - CurrentControllerRotation = playspace.rotation * CurrentControllerRotation; - } + CurrentControllerPosition = MixedRealityPlayspace.TransformPoint(CurrentControllerPosition); + CurrentControllerRotation = MixedRealityPlayspace.Rotation * CurrentControllerRotation; } else { @@ -204,22 +200,22 @@ protected void UpdateControllerData(XRNodeState state) // Raise input system events if it is enabled. if (lastState != TrackingState) { - MixedRealityToolkit.InputSystem?.RaiseSourceTrackingStateChanged(InputSource, this, TrackingState); + InputSystem?.RaiseSourceTrackingStateChanged(InputSource, this, TrackingState); } if (TrackingState == TrackingState.Tracked && LastControllerPose != CurrentControllerPose) { if (IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePoseChanged(InputSource, this, CurrentControllerPose); + InputSystem?.RaiseSourcePoseChanged(InputSource, this, CurrentControllerPose); } else if (IsPositionAvailable && !IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, CurrentControllerPosition); + InputSystem?.RaiseSourcePositionChanged(InputSource, this, CurrentControllerPosition); } else if (!IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourceRotationChanged(InputSource, this, CurrentControllerRotation); + InputSystem?.RaiseSourceRotationChanged(InputSource, this, CurrentControllerRotation); } } } diff --git a/Assets/MixedRealityToolkit.Providers/OpenVR/OpenVRDeviceManager.cs b/Assets/MixedRealityToolkit.Providers/OpenVR/OpenVRDeviceManager.cs index ff25f692d53..86ede8e5c80 100644 --- a/Assets/MixedRealityToolkit.Providers/OpenVR/OpenVRDeviceManager.cs +++ b/Assets/MixedRealityToolkit.Providers/OpenVR/OpenVRDeviceManager.cs @@ -23,19 +23,15 @@ public class OpenVRDeviceManager : UnityJoystickManager /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public OpenVRDeviceManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } #region Controller Utilities diff --git a/Assets/MixedRealityToolkit.Providers/Version.txt b/Assets/MixedRealityToolkit.Providers/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit.Providers/Version.txt +++ b/Assets/MixedRealityToolkit.Providers/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityArticulatedHand.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityArticulatedHand.cs index 226189cfa7e..4473b46a9ed 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityArticulatedHand.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityArticulatedHand.cs @@ -237,7 +237,7 @@ protected override void UpdateControllerData(InteractionSourceState interactionS { HandPose handPose = sourceState.TryGetHandPose(); - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile.EnableHandMeshVisualization) + if (InputSystem.InputSystemProfile.HandTrackingProfile.EnableHandMeshVisualization) { // Accessing the hand mesh data involves copying quite a bit of data, so only do it if application requests it. if (handMeshObserver == null && !hasRequestedHandMeshObserver) @@ -303,7 +303,7 @@ protected override void UpdateControllerData(InteractionSourceState interactionS rotation = WindowsMixedRealityUtilities.SystemQuaternionToUnity(rotation) }; - MixedRealityToolkit.InputSystem?.RaiseHandMeshUpdated(InputSource, ControllerHandedness, handMeshInfo); + InputSystem?.RaiseHandMeshUpdated(InputSource, ControllerHandedness, handMeshInfo); } } } @@ -314,7 +314,7 @@ protected override void UpdateControllerData(InteractionSourceState interactionS { // notify that hand mesh has been updated (cleared) HandMeshInfo handMeshInfo = new HandMeshInfo(); - MixedRealityToolkit.InputSystem?.RaiseHandMeshUpdated(InputSource, ControllerHandedness, handMeshInfo); + InputSystem?.RaiseHandMeshUpdated(InputSource, ControllerHandedness, handMeshInfo); hasRequestedHandMeshObserver = false; handMeshObserver = null; } @@ -329,12 +329,8 @@ protected override void UpdateControllerData(InteractionSourceState interactionS // We want the controller to follow the Playspace, so fold in the playspace transform here to // put the controller pose into world space. - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - if (playspace != null) - { - unityJointPositions[i] = playspace.TransformPoint(unityJointPositions[i]); - unityJointOrientations[i] = playspace.rotation * unityJointOrientations[i]; - } + unityJointPositions[i] = MixedRealityPlayspace.TransformPoint(unityJointPositions[i]); + unityJointOrientations[i] = MixedRealityPlayspace.Rotation * unityJointOrientations[i]; if (jointIndices[i] == HandJointKind.IndexTip) { @@ -352,7 +348,7 @@ protected override void UpdateControllerData(InteractionSourceState interactionS unityJointPoses[handJoint] = new MixedRealityPose(unityJointPositions[i], unityJointOrientations[i]); } } - MixedRealityToolkit.InputSystem?.RaiseHandJointsUpdated(InputSource, ControllerHandedness, unityJointPoses); + InputSystem?.RaiseHandJointsUpdated(InputSource, ControllerHandedness, unityJointPoses); } } } @@ -371,7 +367,7 @@ private void UpdateIndexFingerData(InteractionSourceState interactionSourceState if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentIndexPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentIndexPose); } #endif // WINDOWS_UWP } diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityController.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityController.cs index b414070ca88..b592b7d039b 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityController.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityController.cs @@ -199,22 +199,22 @@ protected virtual void UpdateControllerData(InteractionSourceState interactionSo // Raise input system events if it is enabled. if (lastState != TrackingState) { - MixedRealityToolkit.InputSystem?.RaiseSourceTrackingStateChanged(InputSource, this, TrackingState); + InputSystem?.RaiseSourceTrackingStateChanged(InputSource, this, TrackingState); } if (TrackingState == TrackingState.Tracked && lastControllerPose != currentControllerPose) { if (IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePoseChanged(InputSource, this, currentControllerPose); + InputSystem?.RaiseSourcePoseChanged(InputSource, this, currentControllerPose); } else if (IsPositionAvailable && !IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentControllerPosition); + InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentControllerPosition); } else if (!IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourceRotationChanged(InputSource, this, currentControllerRotation); + InputSystem?.RaiseSourceRotationChanged(InputSource, this, currentControllerRotation); } } } @@ -233,17 +233,8 @@ protected void UpdatePointerData(InteractionSourceState interactionSourceState, // We want the controller to follow the Playspace, so fold in the playspace transform here to // put the controller pose into world space. - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - if (playspace != null) - { - currentPointerPose.Position = playspace.TransformPoint(currentPointerPosition); - currentPointerPose.Rotation = playspace.rotation * currentPointerRotation; - } - else - { - currentPointerPose.Position = currentPointerPosition; - currentPointerPose.Rotation = currentPointerRotation; - } + currentPointerPose.Position = MixedRealityPlayspace.TransformPoint(currentPointerPosition); + currentPointerPose.Rotation = MixedRealityPlayspace.Rotation * currentPointerRotation; } // Update the interaction data source @@ -253,7 +244,7 @@ protected void UpdatePointerData(InteractionSourceState interactionSourceState, if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentPointerPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentPointerPose); } } @@ -271,17 +262,8 @@ protected void UpdateGripData(InteractionSourceState interactionSourceState, Mix interactionSourceState.sourcePose.TryGetPosition(out currentGripPosition, InteractionSourceNode.Grip); interactionSourceState.sourcePose.TryGetRotation(out currentGripRotation, InteractionSourceNode.Grip); - var playspace = GetPlayspace(); - if (playspace != null) - { - currentGripPose.Position = playspace.TransformPoint(currentGripPosition); - currentGripPose.Rotation = Quaternion.Euler(playspace.TransformDirection(currentGripRotation.eulerAngles)); - } - else - { - currentGripPose.Position = currentGripPosition; - currentGripPose.Rotation = currentGripRotation; - } + currentGripPose.Position = MixedRealityPlayspace.TransformPoint(currentGripPosition); + currentGripPose.Rotation = Quaternion.Euler(MixedRealityPlayspace.TransformDirection(currentGripRotation.eulerAngles)); // Update the interaction data source interactionMapping.PoseData = currentGripPose; @@ -290,7 +272,7 @@ protected void UpdateGripData(InteractionSourceState interactionSourceState, Mix if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentGripPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, currentGripPose); } } break; @@ -317,11 +299,11 @@ private void UpdateTouchPadData(InteractionSourceState interactionSourceState, M // Raise input system Event if it enabled if (interactionSourceState.touchpadTouched) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; @@ -337,11 +319,11 @@ private void UpdateTouchPadData(InteractionSourceState interactionSourceState, M // Raise input system Event if it enabled if (interactionSourceState.touchpadPressed) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; @@ -355,7 +337,7 @@ private void UpdateTouchPadData(InteractionSourceState interactionSourceState, M if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.touchpadPosition); + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.touchpadPosition); } break; } @@ -382,11 +364,11 @@ private void UpdateThumbStickData(InteractionSourceState interactionSourceState, // Raise input system Event if it enabled if (interactionSourceState.thumbstickPressed) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; @@ -400,7 +382,7 @@ private void UpdateThumbStickData(InteractionSourceState interactionSourceState, if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.thumbstickPosition); + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.thumbstickPosition); } break; } @@ -426,30 +408,32 @@ protected void UpdateTriggerData(InteractionSourceState interactionSourceState, // Raise input system Event if it enabled if (interactionMapping.BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; case DeviceInputType.Select: { - // Update the interaction data source - interactionMapping.BoolData = interactionSourceState.selectPressed; + // Get the select pressed state, factoring in a workaround for Unity issue #1033526. + // When that issue is fixed, it should be possible change the line below to: + // interactionMapping.BoolData = interactionSourceState.selectPressed; + interactionMapping.BoolData = GetSelectPressedWorkaround(interactionSourceState); // If our value changed raise it. if (interactionMapping.Changed) { // Raise input system Event if it enabled - if (interactionSourceState.selectPressed) + if (interactionMapping.BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; @@ -463,7 +447,7 @@ protected void UpdateTriggerData(InteractionSourceState interactionSourceState, if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaiseFloatInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.selectPressedAmount); + InputSystem?.RaiseFloatInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionSourceState.selectPressedAmount); } break; } @@ -478,11 +462,11 @@ protected void UpdateTriggerData(InteractionSourceState interactionSourceState, // Raise input system Event if it enabled if (interactionSourceState.selectPressedAmount > 0) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } break; @@ -506,11 +490,11 @@ private void UpdateMenuData(InteractionSourceState interactionSourceState, Mixed // Raise input system Event if it enabled if (interactionSourceState.menuPressed) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } } @@ -533,6 +517,34 @@ private void EnsureControllerModel(InteractionSourceState interactionSourceState CreateControllerModelFromPlatformSDK(interactionSourceState.source.id); } + /// + /// Gets the whether or not 'select' has been pressed. + /// + /// + /// This includes a workaround to fix air-tap gestures in HoloLens 1 remoting, to work around the following Unity issue: + /// https://issuetracker.unity3d.com/issues/hololens-interactionsourcestate-dot-selectpressed-is-false-when-air-tap-and-hold + /// Bug was discovered May 2018 and still exists as of May 2019 in version 2018.3.11f1. This workaround is scoped to only + /// cases where remoting is active. + /// + private bool GetSelectPressedWorkaround(InteractionSourceState interactionSourceState) + { + bool selectPressed = interactionSourceState.selectPressed; + if (interactionSourceState.source.kind == InteractionSourceKind.Hand && + UnityEngine.XR.WSA.HolographicRemoting.ConnectionState == UnityEngine.XR.WSA.HolographicStreamerConnectionState.Connected) + { + // This workaround is safe as long as all these assumptions hold: + Debug.Assert(!interactionSourceState.selectPressed, "Unity issue #1033526 seems to have been resolved. Please remove this workaround!"); + Debug.Assert(!interactionSourceState.source.supportsGrasp); + Debug.Assert(!interactionSourceState.source.supportsMenu); + Debug.Assert(!interactionSourceState.source.supportsPointing); + Debug.Assert(!interactionSourceState.source.supportsThumbstick); + Debug.Assert(!interactionSourceState.source.supportsTouchpad); + + selectPressed = interactionSourceState.anyPressed; + } + return selectPressed; + } + #endregion Update data functions #region Controller model functions diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs index a28831299d0..1e0a3aba750 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs @@ -5,6 +5,7 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Windows.Input; using UnityEngine; +using System; #if UNITY_WSA using System.Collections.Generic; @@ -26,28 +27,36 @@ public class WindowsMixedRealityDeviceManager : BaseInputDeviceManager /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public WindowsMixedRealityDeviceManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } #if UNITY_WSA /// - /// The max expected sources is two - two controllers and/or two hands. - /// We'll set it to 20 just to be certain we can't run out of sources. + /// The initial size of interactionmanagerStates. /// + /// + /// This value is arbitrary but chosen to be a number larger than the typical expected number (to avoid + /// having to do further allocations). + /// public const int MaxInteractionSourceStates = 20; + /// + /// This number controls how much the interactionmanagerStates array should grow by each time it must + /// be resized (larger) in order to accommodate more InteractionSourceState values. + /// + /// + /// This must be a value greater than 1. + /// + private const int InteractionManagerStatesGrowthFactor = 2; + /// /// Dictionary to capture all active controllers detected /// @@ -288,7 +297,7 @@ public override void Enable() InteractionManager.InteractionSourcePressed += InteractionManager_InteractionSourcePressed; InteractionManager.InteractionSourceReleased += InteractionManager_InteractionSourceReleased; - numInteractionManagerStates = InteractionManager.GetCurrentReading(interactionmanagerStates); + UpdateInteractionManagerReading(); // Avoids a Unity Editor bug detecting a controller from the previous run during the first frame #if !UNITY_EDITOR @@ -318,7 +327,7 @@ public override void Update() { base.Update(); - numInteractionManagerStates = InteractionManager.GetCurrentReading(interactionmanagerStates); + UpdateInteractionManagerReading(); for (var i = 0; i < numInteractionManagerStates; i++) { @@ -592,7 +601,16 @@ private void InteractionManager_InteractionSourcePressed(InteractionSourcePresse { if (args.state.source.kind == InteractionSourceKind.Voice) { - GetController(args.state.source)?.UpdateController(args.state); + var controller = GetController(args.state.source); + if (controller != null) + { + controller.UpdateController(args.state); + // On WMR, the voice recognizer does not actually register the phrase 'select' + // when you add it to the speech commands profile. Therefore, simulate + // the "select" voice command running to ensure that we get a select voice command + // registered. This is used by FocusProvider to detect when the select pointer is active + InputSystem?.RaiseSpeechCommandRecognized(controller.InputSource, RecognitionConfidenceLevel.High, TimeSpan.MinValue, DateTime.Now, new SpeechCommands("select", KeyCode.Alpha1, MixedRealityInputAction.None)); + } } } @@ -737,6 +755,39 @@ private void NavigationGestureRecognizer_NavigationCanceled(NavigationCanceledEv #endregion Navigation Recognizer Events + #region Private Methods + + /// + /// Gets the latest interaction manager states and counts from InteractionManager + /// + /// + /// Abstracts away some of the array resize handling and another underlying Unity issue + /// when InteractionManager.GetCurrentReading is called when there are no detected sources. + /// + private void UpdateInteractionManagerReading() + { + int newSourceStateCount = InteractionManager.numSourceStates; + // If there isn't enough space in the cache to hold the results, we should grow it so that it can, but also + // grow it in a way that is unlikely to require re-allocations each time. + if (newSourceStateCount > interactionmanagerStates.Length) + { + interactionmanagerStates = new InteractionSourceState[newSourceStateCount * InteractionManagerStatesGrowthFactor]; + } + + // Note that InteractionManager.GetCurrentReading throws when invoked when the number of + // source states is zero. In that case, we want to just update the number of read states to be zero. + if (newSourceStateCount == 0) + { + numInteractionManagerStates = 0; + } + else + { + numInteractionManagerStates = InteractionManager.GetCurrentReading(interactionmanagerStates); + } + } + + #endregion Private Methods + #endif // UNITY_WSA } diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityEyeGazeDataProvider.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityEyeGazeDataProvider.cs index 59d84f60aa1..ab1dfee4bcd 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityEyeGazeDataProvider.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityEyeGazeDataProvider.cs @@ -26,17 +26,17 @@ public class WindowsMixedRealityEyeGazeDataProvider : BaseInputDeviceManager, IM /// /// Constructor. /// + /// The instance that loaded the data provider. + /// The instance that receives data from this provider. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public WindowsMixedRealityEyeGazeDataProvider( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name, uint priority, - BaseMixedRealityProfile profile) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile) : base(registrar, inputSystem, name, priority, profile) { } public bool SmoothEyeTracking { get; set; } = false; @@ -89,7 +89,7 @@ public override void Update() newGaze = SmoothGaze(newGaze); } - MixedRealityToolkit.InputSystem?.EyeGazeProvider?.UpdateEyeGaze(this, newGaze, eyes.UpdateTimestamp.TargetTime.UtcDateTime); + InputSystem?.EyeGazeProvider?.UpdateEyeGaze(this, newGaze, eyes.UpdateTimestamp.TargetTime.UtcDateTime); } } #endif // WINDOWS_UWP diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs new file mode 100644 index 00000000000..f17c8a79aca --- /dev/null +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input; +using System; +using System.Collections.Generic; +using UnityEngine; + +#if WINDOWS_UWP +using System.IO; +using System.Threading.Tasks; +using Windows.Storage; +using Windows.Storage.Pickers; +using Windows.Storage.Provider; +#endif + +namespace Microsoft.MixedReality.Toolkit.Input +{ + + /// + /// Record joint positions of a hand and log them for use in simulated hands. + /// + public class WindowsMixedRealityHandRecorder : MonoBehaviour + { + private static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; + + /// + /// The joint positioned at the origin at the start of the recording. + /// + /// + /// If the reference joint moves between start and stop of recording then final position is used as an offset. + /// Example: A "poke" gesture can be simulated by moving the index finger forward between start and stop, + /// giving an offset that creates a poking motion when interpolated. + /// + public TrackedHandJoint ReferenceJoint { get; set; } = TrackedHandJoint.IndexTip; + + /// + /// Default output filename for saving the recorded pose. + /// + public string OutputFileName { get; } = "ArticulatedHandPose"; + + private Vector3 offset = Vector3.zero; + private Handedness recordingHand = Handedness.None; + + public void RecordLeftHandStart() + { + RecordHandStart(Handedness.Left); + } + + public void RecordRightHandStart() + { + RecordHandStart(Handedness.Right); + } + + private void RecordHandStart(Handedness handedness) + { + HandJointUtils.TryGetJointPose(ReferenceJoint, handedness, out MixedRealityPose joint); + offset = joint.Position; + recordingHand = handedness; + } + + public void RecordHandStop() + { + MixedRealityPose[] jointPoses = new MixedRealityPose[jointCount]; + for (int i = 0; i < jointCount; ++i) + { + HandJointUtils.TryGetJointPose((TrackedHandJoint)i, recordingHand, out jointPoses[i]); + } + + ArticulatedHandPose pose = new ArticulatedHandPose(); + pose.ParseFromJointPoses(jointPoses, recordingHand, Quaternion.identity, offset); + + recordingHand = Handedness.None; + + var filename = String.Format("{0}-{1}.json", OutputFileName, DateTime.UtcNow.ToString("yyyyMMdd-HHmmss")); + StoreRecordedHandPose(pose.ToJson(), filename); + } + + #if WINDOWS_UWP + private static void StoreRecordedHandPose(string data, string filename) + { + string path = Path.Combine(Application.persistentDataPath, filename); + using (TextWriter writer = File.CreateText(path)) + { + writer.Write(data); + } + } + #else + private static void StoreRecordedHandPose(string data, string filename) + { + Debug.Log(data); + } + #endif + } + +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs.meta b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs.meta new file mode 100644 index 00000000000..5da2e148bbc --- /dev/null +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityHandRecorder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ccabe4fb25df0f94babb85f213610a6c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index 0742063980c..1b0251488f0 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs @@ -18,6 +18,7 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality.SpatialAwareness "Windows Mixed Reality Spatial Mesh Observer", "Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset", "MixedRealityToolkit.SDK")] + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/SpatialAwareness/SpatialAwarenessGettingStarted.html")] public class WindowsMixedRealitySpatialMeshObserver : BaseSpatialObserver, IMixedRealitySpatialAwarenessMeshObserver { /// @@ -76,9 +77,6 @@ private void ReadProfile() /// public override void Initialize() { - // Only initialize if the Spatial Awareness system has been enabled in the configuration profile. - if (!MixedRealityToolkit.Instance.ActiveProfile.IsSpatialAwarenessSystemEnabled) { return; } - CreateObserver(); // Apply the initial observer volume settings. @@ -129,13 +127,6 @@ public override void Destroy() /// private GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = SpatialAwarenessSystem?.CreateSpatialAwarenessObjectParent("WindowsMixedRealitySpatialMeshObserver")); - private IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem = null; - - /// - /// The currently active instance of . - /// - private IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem => spatialAwarenessSystem ?? (spatialAwarenessSystem = MixedRealityToolkit.SpatialAwarenessSystem); - #if UNITY_WSA /// protected override void Dispose(bool disposing) @@ -373,8 +364,7 @@ private void DisposeObserver() /// private void UpdateObserver() { - if (!MixedRealityToolkit.Instance.ActiveProfile.IsSpatialAwarenessSystemEnabled || - (SpatialAwarenessSystem == null)) + if (SpatialAwarenessSystem == null) { return; } diff --git a/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsDictationInputProvider.cs b/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsDictationInputProvider.cs index 914c355d29f..2b5465689d4 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsDictationInputProvider.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsDictationInputProvider.cs @@ -3,11 +3,11 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Utilities; -using System.Text; using System.Threading.Tasks; using UnityEngine; #if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN +using System.Text; using UnityEngine.Windows.Speech; #endif // UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN @@ -17,6 +17,7 @@ namespace Microsoft.MixedReality.Toolkit.Windows.Input typeof(IMixedRealityInputSystem), SupportedPlatforms.WindowsStandalone | SupportedPlatforms.WindowsUniversal | SupportedPlatforms.WindowsEditor, "Windows Dictation Input")] + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Input/Dictation.html")] public class WindowsDictationInputProvider : BaseInputDeviceManager, IMixedRealityDictationSystem { /// @@ -24,23 +25,132 @@ public class WindowsDictationInputProvider : BaseInputDeviceManager, IMixedReali /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public WindowsDictationInputProvider( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } /// public bool IsListening { get; private set; } = false; + /// + public async void StartRecording(GameObject listener, float initialSilenceTimeout = 5, float autoSilenceTimeout = 20, int recordingTime = 10, string micDeviceName = "") + { + await StartRecordingAsync(listener, initialSilenceTimeout, autoSilenceTimeout, recordingTime, micDeviceName); + } + + /// + public async void StopRecording() + { + await StopRecordingAsync(); + } + + /// + public async Task StartRecordingAsync(GameObject listener = null, float initialSilenceTimeout = 5f, float autoSilenceTimeout = 20f, int recordingTime = 10, string micDeviceName = "") + { +#if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN + IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; + + if (IsListening || isTransitioning || inputSystem == null || !Application.isPlaying) + { + Debug.LogWarning("Unable to start recording"); + return; + } + + hasFailed = false; + IsListening = true; + isTransitioning = true; + + if (listener != null) + { + hasListener = true; + inputSystem.PushModalInputHandler(listener); + } + + if (PhraseRecognitionSystem.Status == SpeechSystemStatus.Running) + { + PhraseRecognitionSystem.Shutdown(); + } + + await waitUntilPhraseRecognitionSystemHasStopped; + Debug.Assert(PhraseRecognitionSystem.Status == SpeechSystemStatus.Stopped); + + // Query the maximum frequency of the default microphone. + int minSamplingRate; // Not used. + deviceName = micDeviceName; + Microphone.GetDeviceCaps(deviceName, out minSamplingRate, out samplingRate); + + dictationRecognizer.InitialSilenceTimeoutSeconds = initialSilenceTimeout; + dictationRecognizer.AutoSilenceTimeoutSeconds = autoSilenceTimeout; + dictationRecognizer.Start(); + + await waitUntilDictationRecognizerHasStarted; + Debug.Assert(dictationRecognizer.Status == SpeechSystemStatus.Running); + + if (dictationRecognizer.Status == SpeechSystemStatus.Failed) + { + inputSystem.RaiseDictationError(inputSource, "Dictation recognizer failed to start!"); + return; + } + + // Start recording from the microphone. + dictationAudioClip = Microphone.Start(deviceName, false, recordingTime, samplingRate); + textSoFar = new StringBuilder(); + isTransitioning = false; +#else + await Task.CompletedTask; +#endif + } + + /// + public async Task StopRecordingAsync() + { +#if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN + if (!IsListening || isTransitioning || !Application.isPlaying) + { + Debug.LogWarning("Unable to stop recording"); + return null; + } + + IsListening = false; + isTransitioning = true; + + IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; + + if (hasListener) + { + inputSystem?.PopModalInputHandler(); + hasListener = false; + } + + Microphone.End(deviceName); + + if (dictationRecognizer.Status == SpeechSystemStatus.Running) + { + dictationRecognizer.Stop(); + } + + await waitUntilDictationRecognizerHasStopped; + Debug.Assert(dictationRecognizer.Status == SpeechSystemStatus.Stopped); + + PhraseRecognitionSystem.Restart(); + + await waitUntilPhraseRecognitionSystemHasStarted; + Debug.Assert(PhraseRecognitionSystem.Status == SpeechSystemStatus.Running); + + isTransitioning = false; + return dictationAudioClip; +#else + await Task.CompletedTask; + return null; +#endif + } + #if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN private bool hasFailed; private bool hasListener; @@ -57,8 +167,8 @@ public class WindowsDictationInputProvider : BaseInputDeviceManager, IMixedReali /// /// The device audio sampling rate. - /// Set by UnityEngine.Microphone. /// + /// Set by UnityEngine.Microphone. private int samplingRate; /// @@ -178,115 +288,15 @@ public override void Destroy() UnityEditor.PlayerSettings.WSA.SetCapability(UnityEditor.PlayerSettings.WSACapability.InternetClient, false); } #endif // UNITY_EDITOR - - if (Application.isPlaying) - { - dictationRecognizer?.Dispose(); - } } /// - public async void StartRecording(GameObject listener, float initialSilenceTimeout = 5, float autoSilenceTimeout = 20, int recordingTime = 10, string micDeviceName = "") - { - await StartRecordingAsync(listener, initialSilenceTimeout, autoSilenceTimeout, recordingTime, micDeviceName); - } - - /// - public async Task StartRecordingAsync(GameObject listener = null, float initialSilenceTimeout = 5f, float autoSilenceTimeout = 20f, int recordingTime = 10, string micDeviceName = "") + protected override void Dispose(bool disposing) { - IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; - - if (IsListening || isTransitioning || inputSystem == null || !Application.isPlaying) - { - Debug.LogWarning("Unable to start recording"); - return; - } - - hasFailed = false; - IsListening = true; - isTransitioning = true; - - if (listener != null) + if (disposing) { - hasListener = true; - inputSystem.PushModalInputHandler(listener); - } - - if (PhraseRecognitionSystem.Status == SpeechSystemStatus.Running) - { - PhraseRecognitionSystem.Shutdown(); - } - - await waitUntilPhraseRecognitionSystemHasStopped; - Debug.Assert(PhraseRecognitionSystem.Status == SpeechSystemStatus.Stopped); - - // Query the maximum frequency of the default microphone. - int minSamplingRate; // Not used. - deviceName = micDeviceName; - Microphone.GetDeviceCaps(deviceName, out minSamplingRate, out samplingRate); - - dictationRecognizer.InitialSilenceTimeoutSeconds = initialSilenceTimeout; - dictationRecognizer.AutoSilenceTimeoutSeconds = autoSilenceTimeout; - dictationRecognizer.Start(); - - await waitUntilDictationRecognizerHasStarted; - Debug.Assert(dictationRecognizer.Status == SpeechSystemStatus.Running); - - if (dictationRecognizer.Status == SpeechSystemStatus.Failed) - { - inputSystem.RaiseDictationError(inputSource, "Dictation recognizer failed to start!"); - return; - } - - // Start recording from the microphone. - dictationAudioClip = Microphone.Start(deviceName, false, recordingTime, samplingRate); - textSoFar = new StringBuilder(); - isTransitioning = false; - } - - /// - public async void StopRecording() - { - await StopRecordingAsync(); - } - - /// - public async Task StopRecordingAsync() - { - if (!IsListening || isTransitioning || !Application.isPlaying) - { - Debug.LogWarning("Unable to stop recording"); - return null; - } - - IsListening = false; - isTransitioning = true; - - IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; - - if (hasListener) - { - inputSystem?.PopModalInputHandler(); - hasListener = false; - } - - Microphone.End(deviceName); - - if (dictationRecognizer.Status == SpeechSystemStatus.Running) - { - dictationRecognizer.Stop(); + dictationRecognizer?.Dispose(); } - - await waitUntilDictationRecognizerHasStopped; - Debug.Assert(dictationRecognizer.Status == SpeechSystemStatus.Stopped); - - PhraseRecognitionSystem.Restart(); - - await waitUntilPhraseRecognitionSystemHasStarted; - Debug.Assert(PhraseRecognitionSystem.Status == SpeechSystemStatus.Running); - - isTransitioning = false; - return dictationAudioClip; } /// diff --git a/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsSpeechInputProvider.cs b/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsSpeechInputProvider.cs index 6ec95b49c4a..88a9062d296 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsSpeechInputProvider.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsVoiceInput/WindowsSpeechInputProvider.cs @@ -3,10 +3,10 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Utilities; +using UnityEngine; #if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN using System; -using UnityEngine; using UnityEngine.Windows.Speech; using UInput = UnityEngine.Input; #endif // UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN @@ -17,23 +17,23 @@ namespace Microsoft.MixedReality.Toolkit.Windows.Input typeof(IMixedRealityInputSystem), SupportedPlatforms.WindowsStandalone | SupportedPlatforms.WindowsUniversal | SupportedPlatforms.WindowsEditor, "Windows Speech Input")] + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Input/Speech.html")] public class WindowsSpeechInputProvider : BaseInputDeviceManager, IMixedRealitySpeechSystem { /// /// Constructor. /// /// The instance that loaded the service. + /// The instance that receives data from this provider. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public WindowsSpeechInputProvider( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } /// /// The keywords to be recognized and optional keyboard shortcuts. @@ -50,15 +50,38 @@ public class WindowsSpeechInputProvider : BaseInputDeviceManager, IMixedRealityS /// public RecognitionConfidenceLevel RecognitionConfidenceLevel { get; set; } + /// + public bool IsRecognitionActive => #if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN - private KeywordRecognizer keywordRecognizer; + keywordRecognizer?.IsRunning ?? +#endif + false; + + /// + public void StartRecognition() + { +#if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN + if (keywordRecognizer != null && !keywordRecognizer.IsRunning) + { + keywordRecognizer.Start(); + } +#endif + } /// - public bool IsRecognitionActive + public void StopRecognition() { - get { return keywordRecognizer != null && keywordRecognizer.IsRunning; } +#if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN + if (keywordRecognizer != null && keywordRecognizer.IsRunning) + { + keywordRecognizer.Stop(); + } +#endif } +#if UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_EDITOR_WIN + private KeywordRecognizer keywordRecognizer; + #if UNITY_EDITOR /// public override void Initialize() @@ -74,7 +97,7 @@ public override void Initialize() public override void Enable() { if (!Application.isPlaying || Commands.Length == 0) { return; } - + if (InputSystemProfile == null) { return; } IMixedRealityInputSystem inputSystem = Service as IMixedRealityInputSystem; @@ -134,7 +157,6 @@ public override void Disable() { StopRecognition(); keywordRecognizer.OnPhraseRecognized -= KeywordRecognizer_OnPhraseRecognized; - keywordRecognizer.Dispose(); } } @@ -150,20 +172,11 @@ public override void Destroy() #endif // UNITY_EDITOR /// - public void StartRecognition() - { - if (keywordRecognizer != null && !keywordRecognizer.IsRunning) - { - keywordRecognizer.Start(); - } - } - - /// - public void StopRecognition() + protected override void Dispose(bool disposing) { - if (keywordRecognizer != null && keywordRecognizer.IsRunning) + if (disposing) { - keywordRecognizer.Stop(); + keywordRecognizer?.Dispose(); } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Events/ManipulationEventData.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/ManipulationEventData.cs index 19850c9720a..b631e093515 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Input/Events/ManipulationEventData.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/ManipulationEventData.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using UnityEngine; + namespace Microsoft.MixedReality.Toolkit.UI { /// @@ -8,6 +10,29 @@ namespace Microsoft.MixedReality.Toolkit.UI /// public class ManipulationEventData { + /// + /// Source of ManipulationEvent. + /// + public ManipulationHandler ManipulationSource { get; set; } + + /// + /// Whether the Manipulation is a NearInteration or not. + /// public bool IsNearInteraction {get; set; } + + /// + /// Center of the 's Pointer in world space + /// + public Vector3 PointerCentroid { get; set; } + + /// + /// Pointer's Velocity. + /// + public Vector3 PointerVelocity { get; set; } + + /// + /// Pointer's Angular Velocity in Eulers. + /// + public Vector3 PointerAngularVelocity { get; set; } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ControllerPoseSynchronizer.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ControllerPoseSynchronizer.cs index 5a4094675f0..415be27d7a3 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ControllerPoseSynchronizer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ControllerPoseSynchronizer.cs @@ -104,7 +104,7 @@ public virtual void OnSourceLost(SourceStateEventData eventData) if (destroyOnSourceLost) { - if (Application.isEditor) + if (!Application.isPlaying) { DestroyImmediate(gameObject); } diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs index d9098bf4e82..04a16602d92 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs @@ -59,7 +59,11 @@ public enum ReleaseBehaviorType [Tooltip("Transform that will be dragged. Defaults to the object of the component.")] private Transform hostTransform = null; - public Transform HostTransform => hostTransform; + public Transform HostTransform + { + get => hostTransform; + set => hostTransform = value; + } [Header("Manipulation")] [SerializeField] @@ -86,16 +90,32 @@ public TwoHandedManipulation TwoHandedManipulationType [Tooltip("Specifies whether manipulation can be done using far interaction with pointers.")] private bool allowFarManipulation = true; - public bool AllowFarManipulation => allowFarManipulation; + public bool AllowFarManipulation + { + get => allowFarManipulation; + set => allowFarManipulation = value; + } [SerializeField] [Tooltip("Rotation behavior of object when using one hand near")] private RotateInOneHandType oneHandRotationModeNear = RotateInOneHandType.RotateAboutGrabPoint; + public RotateInOneHandType OneHandRotationModeNear + { + get => oneHandRotationModeNear; + set => oneHandRotationModeNear = value; + } + [SerializeField] [Tooltip("Rotation behavior of object when using one hand at distance")] private RotateInOneHandType oneHandRotationModeFar = RotateInOneHandType.RotateAboutGrabPoint; + public RotateInOneHandType OneHandRotationModeFar + { + get => oneHandRotationModeFar; + set => oneHandRotationModeFar = value; + } + [SerializeField] [EnumFlags] [Tooltip("Rigid body behavior of the dragged object when releasing it.")] @@ -154,10 +174,10 @@ public float SmoothingAmoutOneHandManip #region Event handlers [Header("Manipulation Events")] - public ManipulationEvent OnManipulationStarted; - public ManipulationEvent OnManipulationEnded; - public ManipulationEvent OnHoverEntered; - public ManipulationEvent OnHoverExited; + public ManipulationEvent OnManipulationStarted = new ManipulationEvent(); + public ManipulationEvent OnManipulationEnded = new ManipulationEvent(); + public ManipulationEvent OnHoverEntered = new ManipulationEvent(); + public ManipulationEvent OnHoverExited = new ManipulationEvent(); #endregion #region Private Properties @@ -176,9 +196,9 @@ private enum State }; private State currentState = State.Start; - private TwoHandMoveLogic m_moveLogic; - private TwoHandScaleLogic m_scaleLogic; - private TwoHandRotateLogic m_rotateLogic; + private TwoHandMoveLogic moveLogic; + private TwoHandScaleLogic scaleLogic; + private TwoHandRotateLogic rotateLogic; private Dictionary pointerIdToPointerMap = new Dictionary(); private Quaternion objectToHandRotation; @@ -198,9 +218,9 @@ private enum State #region MonoBehaviour Functions private void Awake() { - m_moveLogic = new TwoHandMoveLogic(constraintOnMovement); - m_rotateLogic = new TwoHandRotateLogic(); - m_scaleLogic = new TwoHandScaleLogic(); + moveLogic = new TwoHandMoveLogic(constraintOnMovement); + rotateLogic = new TwoHandRotateLogic(); + scaleLogic = new TwoHandScaleLogic(); } private void Start() { @@ -227,21 +247,33 @@ private Vector3 GetPointersCentroid() private Vector3 GetPointersVelocity() { Vector3 sum = Vector3.zero; + int numControllers = 0; foreach (var p in pointerIdToPointerMap.Values) { - sum += p.Controller.Velocity; + // Check pointer has a valid controller (e.g. gaze pointer doesn't) + if (p.Controller != null) + { + numControllers++; + sum += p.Controller.Velocity; + } } - return sum / Math.Max(1, pointerIdToPointerMap.Count); + return sum / Math.Max(1, numControllers); } private Vector3 GetPointersAngularVelocity() { Vector3 sum = Vector3.zero; + int numControllers = 0; foreach (var p in pointerIdToPointerMap.Values) { - sum += p.Controller.AngularVelocity; + // Check pointer has a valid controller (e.g. gaze pointer doesn't) + if (p.Controller != null) + { + numControllers++; + sum += p.Controller.AngularVelocity; + } } - return sum / Math.Max(1, pointerIdToPointerMap.Count); + return sum / Math.Max(1, numControllers); } private bool IsNearManipulation() @@ -305,7 +337,6 @@ private void UpdateStateMachine() case State.MovingRotating: case State.RotatingScaling: case State.MovingRotatingScaling: - // TODO: if < 2, make this go to start state ('drop it') if (handsPressedCount == 0) { newState = State.Start; @@ -383,16 +414,6 @@ private void InvokeStateUpdateFunctions(State oldState, State newState) #region Hand Event Handlers - private MixedRealityInteractionMapping GetSpatialGripInfoForController(IMixedRealityController controller) - { - if (controller == null) - { - return null; - } - - return controller.Interactions?.First(x => x.InputType == DeviceInputType.SpatialGrip); - } - /// public void OnPointerDown(MixedRealityPointerEventData eventData) { @@ -481,18 +502,18 @@ private void HandleTwoHandManipulationUpdated() if ((currentState & State.Moving) > 0) { - targetPosition = m_moveLogic.Update(GetPointersCentroid(), IsNearManipulation()); + targetPosition = moveLogic.Update(GetPointersCentroid(), IsNearManipulation()); } var handPositionMap = GetHandPositionMap(); if ((currentState & State.Rotating) > 0) { - targetRotationTwoHands = m_rotateLogic.Update(handPositionMap, targetRotationTwoHands, constraintOnRotation); + targetRotationTwoHands = rotateLogic.Update(handPositionMap, targetRotationTwoHands, constraintOnRotation); } if ((currentState & State.Scaling) > 0) { - targetScale = m_scaleLogic.UpdateMap(handPositionMap); + targetScale = scaleLogic.UpdateMap(handPositionMap); } float lerpAmount = GetLerpAmount(); @@ -501,80 +522,76 @@ private void HandleTwoHandManipulationUpdated() hostTransform.rotation = Quaternion.Lerp(hostTransform.rotation, targetRotationTwoHands, lerpAmount); hostTransform.localScale = Vector3.Lerp(hostTransform.localScale, targetScale, lerpAmount); } - + private void HandleOneHandMoveUpdated() { Debug.Assert(pointerIdToPointerMap.Count == 1); IMixedRealityPointer pointer = pointerIdToPointerMap.Values.First(); - var interactionMapping = GetSpatialGripInfoForController(pointer.Controller); - if (interactionMapping != null) + Quaternion targetRotation = Quaternion.identity; + RotateInOneHandType rotateInOneHandType = isNearManipulation ? oneHandRotationModeNear : oneHandRotationModeFar; + if (rotateInOneHandType == RotateInOneHandType.MaintainOriginalRotation) { - Quaternion targetRotation = Quaternion.identity; - RotateInOneHandType rotateInOneHandType = isNearManipulation ? oneHandRotationModeNear : oneHandRotationModeFar; - if (rotateInOneHandType == RotateInOneHandType.MaintainOriginalRotation) - { - targetRotation = hostTransform.rotation; - } - else if (rotateInOneHandType == RotateInOneHandType.MaintainRotationToUser) - { - targetRotation = CameraCache.Main.transform.rotation * startObjectRotationCameraSpace; - } - else if (rotateInOneHandType == RotateInOneHandType.GravityAlignedMaintainRotationToUser) - { - var cameraForwardFlat = CameraCache.Main.transform.forward; - cameraForwardFlat.y = 0; - targetRotation = Quaternion.LookRotation(cameraForwardFlat, Vector3.up) * startObjectRotationFlatCameraSpace; - } - else if (rotateInOneHandType == RotateInOneHandType.FaceUser) - { - Vector3 directionToTarget = hostTransform.position - CameraCache.Main.transform.position; - targetRotation = Quaternion.LookRotation(-directionToTarget); - } - else if (rotateInOneHandType == RotateInOneHandType.FaceAwayFromUser) - { - Vector3 directionToTarget = hostTransform.position - CameraCache.Main.transform.position; - targetRotation = Quaternion.LookRotation(directionToTarget); - } - else + targetRotation = hostTransform.rotation; + } + else if (rotateInOneHandType == RotateInOneHandType.MaintainRotationToUser) + { + targetRotation = CameraCache.Main.transform.rotation * startObjectRotationCameraSpace; + } + else if (rotateInOneHandType == RotateInOneHandType.GravityAlignedMaintainRotationToUser) + { + var cameraForwardFlat = CameraCache.Main.transform.forward; + cameraForwardFlat.y = 0; + targetRotation = Quaternion.LookRotation(cameraForwardFlat, Vector3.up) * startObjectRotationFlatCameraSpace; + } + else if (rotateInOneHandType == RotateInOneHandType.FaceUser) + { + Vector3 directionToTarget = hostTransform.position - CameraCache.Main.transform.position; + targetRotation = Quaternion.LookRotation(-directionToTarget); + } + else if (rotateInOneHandType == RotateInOneHandType.FaceAwayFromUser) + { + Vector3 directionToTarget = hostTransform.position - CameraCache.Main.transform.position; + targetRotation = Quaternion.LookRotation(directionToTarget); + } + else + { + targetRotation = pointer.Rotation * objectToHandRotation; + switch (constraintOnRotation) { - targetRotation = interactionMapping.PoseData.Rotation * objectToHandRotation; - switch (constraintOnRotation) - { - case RotationConstraintType.XAxisOnly: - targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.right); - break; - case RotationConstraintType.YAxisOnly: - targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.up); - break; - case RotationConstraintType.ZAxisOnly: - targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.forward); - break; - } + case RotationConstraintType.XAxisOnly: + targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.right); + break; + case RotationConstraintType.YAxisOnly: + targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.up); + break; + case RotationConstraintType.ZAxisOnly: + targetRotation.eulerAngles = Vector3.Scale(targetRotation.eulerAngles, Vector3.forward); + break; } + } - Vector3 targetPosition; - if (IsNearManipulation()) + Vector3 targetPosition; + if (IsNearManipulation()) + { + if (oneHandRotationModeNear == RotateInOneHandType.RotateAboutGrabPoint) { - if (oneHandRotationModeNear == RotateInOneHandType.RotateAboutGrabPoint) - { - targetPosition = (interactionMapping.PoseData.Rotation * objectToHandTranslation) + interactionMapping.PoseData.Position; - } - else // RotateAboutCenter or DoNotRotateInOneHand - { - targetPosition = objectToHandTranslation + interactionMapping.PoseData.Position; - } + targetPosition = (pointer.Rotation * objectToHandTranslation) + pointer.Position; } - else + else // RotateAboutCenter or DoNotRotateInOneHand { - targetPosition = m_moveLogic.Update(GetPointersCentroid(), IsNearManipulation()); + targetPosition = objectToHandTranslation + pointer.Position; } - - float lerpAmount = GetLerpAmount(); - Quaternion smoothedRotation = Quaternion.Lerp(hostTransform.rotation, targetRotation, lerpAmount); - Vector3 smoothedPosition = Vector3.Lerp(hostTransform.position, targetPosition, lerpAmount); - hostTransform.SetPositionAndRotation(smoothedPosition, smoothedRotation); } + else + { + targetPosition = moveLogic.Update(GetPointersCentroid(), IsNearManipulation()); + } + + float lerpAmount = GetLerpAmount(); + Quaternion smoothedRotation = Quaternion.Lerp(hostTransform.rotation, targetRotation, lerpAmount); + Vector3 smoothedPosition = Vector3.Lerp(hostTransform.position, targetPosition, lerpAmount); + hostTransform.SetPositionAndRotation(smoothedPosition, smoothedRotation); } private void HandleTwoHandManipulationStarted(State newState) @@ -584,15 +601,15 @@ private void HandleTwoHandManipulationStarted(State newState) if ((newState & State.Rotating) > 0) { - m_rotateLogic.Setup(handPositionMap, hostTransform, ConstraintOnRotation); + rotateLogic.Setup(handPositionMap, hostTransform, ConstraintOnRotation); } if ((newState & State.Moving) > 0) { - m_moveLogic.Setup(GetPointersCentroid(), hostTransform.position); + moveLogic.Setup(GetPointersCentroid(), hostTransform.position); } if ((newState & State.Scaling) > 0) { - m_scaleLogic.Setup(handPositionMap, hostTransform); + scaleLogic.Setup(handPositionMap, hostTransform); } } private void HandleTwoHandManipulationEnded() { } @@ -602,20 +619,17 @@ private void HandleOneHandMoveStarted() Assert.IsTrue(pointerIdToPointerMap.Count == 1); IMixedRealityPointer pointer = pointerIdToPointerMap.Values.First(); - m_moveLogic.Setup(GetPointersCentroid(), hostTransform.position); + moveLogic.Setup(GetPointersCentroid(), hostTransform.position); - var interactionMapping = GetSpatialGripInfoForController(pointer.Controller); - if (interactionMapping != null) + // Calculate relative transform from object to hand. + Quaternion worldToPalmRotation = Quaternion.Inverse(pointer.Rotation); + objectToHandRotation = worldToPalmRotation * hostTransform.rotation; + objectToHandTranslation = (hostTransform.position - pointer.Position); + if (oneHandRotationModeNear == RotateInOneHandType.RotateAboutGrabPoint) { - // Calculate relative transform from object to hand. - Quaternion worldToPalmRotation = Quaternion.Inverse(interactionMapping.PoseData.Rotation); - objectToHandRotation = worldToPalmRotation * hostTransform.rotation; - objectToHandTranslation = (hostTransform.position - interactionMapping.PoseData.Position); - if (oneHandRotationModeNear == RotateInOneHandType.RotateAboutGrabPoint) - { - objectToHandTranslation = worldToPalmRotation * objectToHandTranslation; - } + objectToHandTranslation = worldToPalmRotation * objectToHandTranslation; } + startObjectRotationCameraSpace = Quaternion.Inverse(CameraCache.Main.transform.rotation) * hostTransform.rotation; var cameraFlat = CameraCache.Main.transform.forward; cameraFlat.y = 0; @@ -630,16 +644,36 @@ private void HandleManipulationStarted() isNearManipulation = IsNearManipulation(); // TODO: If we are on HoloLens 1, push and pop modal input handler so that we can use old // gaze/gesture/voice manipulation. For HoloLens 2, we don't want to do this. - OnManipulationStarted.Invoke(new ManipulationEventData { IsNearInteraction = isNearManipulation }); - + if (OnManipulationStarted != null) + { + OnManipulationStarted.Invoke(new ManipulationEventData + { + ManipulationSource = this, + IsNearInteraction = isNearManipulation, + PointerCentroid = GetPointersCentroid(), + PointerVelocity = GetPointersVelocity(), + PointerAngularVelocity = GetPointersAngularVelocity() + }); + } } + private void HandleManipulationEnded() { // TODO: If we are on HoloLens 1, push and pop modal input handler so that we can use old // gaze/gesture/voice manipulation. For HoloLens 2, we don't want to do this. - OnManipulationEnded.Invoke(new ManipulationEventData { IsNearInteraction = isNearManipulation }); - + if (OnManipulationEnded != null) + { + OnManipulationEnded.Invoke(new ManipulationEventData + { + ManipulationSource = this, + IsNearInteraction = isNearManipulation, + PointerCentroid = GetPointersCentroid(), + PointerVelocity = GetPointersVelocity(), + PointerAngularVelocity = GetPointersAngularVelocity() + }); + } } + #endregion Private Event Handlers #region Unused Event Handlers @@ -678,7 +712,10 @@ public void OnFocusEnter(FocusEventData eventData) { return; } - OnHoverEntered.Invoke(new ManipulationEventData { IsNearInteraction = !isFar }); + if (OnHoverEntered != null) + { + OnHoverEntered.Invoke(new ManipulationEventData { IsNearInteraction = !isFar }); + } } public void OnFocusExit(FocusEventData eventData) @@ -688,7 +725,10 @@ public void OnFocusExit(FocusEventData eventData) { return; } - OnHoverExited.Invoke(new ManipulationEventData { IsNearInteraction = !isFar }); + if (OnHoverExited != null) + { + OnHoverExited.Invoke(new ManipulationEventData { IsNearInteraction = !isFar }); + } } #endregion } diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/SpeechInputHandler.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/SpeechInputHandler.cs index 93b6f949d30..f543ec72c13 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/SpeechInputHandler.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/SpeechInputHandler.cs @@ -93,6 +93,7 @@ void IMixedRealitySpeechHandler.OnSpeechKeywordRecognized(SpeechEventData eventD if (enabled && responses.TryGetValue(eventData.Command.Keyword.ToLower(), out keywordResponse)) { keywordResponse.Invoke(); + eventData.Use(); } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/TeleportHotSpot.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/TeleportHotSpot.cs index e96105439bc..aa8a65b0514 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/TeleportHotSpot.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/TeleportHotSpot.cs @@ -12,6 +12,21 @@ namespace Microsoft.MixedReality.Toolkit.Teleport /// public class TeleportHotSpot : BaseFocusHandler, IMixedRealityTeleportHotSpot { + private IMixedRealityTeleportSystem teleportSystem = null; + + private IMixedRealityTeleportSystem TeleportSystem + { + get + { + if (teleportSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out teleportSystem); + } + + return teleportSystem; + } + } + #region IMixedRealityFocusHandler Implementation /// @@ -32,8 +47,8 @@ public override void OnBeforeFocusChange(FocusEventData eventData) if (teleportPointer.IsInteractionEnabled) { - MixedRealityToolkit.TeleportSystem?.RaiseTeleportCanceled(eventData.Pointer, this); - MixedRealityToolkit.TeleportSystem?.RaiseTeleportRequest(eventData.Pointer, this); + TeleportSystem?.RaiseTeleportCanceled(eventData.Pointer, this); + TeleportSystem?.RaiseTeleportRequest(eventData.Pointer, this); } } else if (eventData.OldFocusedObject == gameObject) @@ -42,7 +57,7 @@ public override void OnBeforeFocusChange(FocusEventData eventData) if (teleportPointer.IsInteractionEnabled) { - MixedRealityToolkit.TeleportSystem?.RaiseTeleportCanceled(eventData.Pointer, this); + TeleportSystem?.RaiseTeleportCanceled(eventData.Pointer, this); } } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleBackground.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleBackground.mat.meta index 078051acff2..f35f0dedf8c 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleBackground.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleBackground.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 970c8a6564852574f9ba8959ffcd47f8 +guid: a07d81f563d59544fb6ae5588f5bd0be timeCreated: 1493238935 licenseType: Pro NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleButton.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleButton.mat.meta index f4a375b3968..b4c4a47b4fa 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleButton.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleButton.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 471cd2931ade3d147b640131e71d9ad9 +guid: 09c36cbdc8249664dacdf98f70d27be7 timeCreated: 1493238936 licenseType: Pro NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleIcon.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleIcon.mat.meta index 60da3f4c816..747a4a3cbb8 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleIcon.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Materials/ToggleIcon.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 02183eecee283e647b4e8660f71bb271 +guid: 6801601dde9962843aa1336de93505f0 timeCreated: 1493238936 licenseType: Pro NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/AnimationButton.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/AnimationButton.prefab index fa4fe580902..6a38d293585 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/AnimationButton.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/AnimationButton.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1795626731574084} - m_IsPrefabParent: 1 --- !u!1 &1229886398368936 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4040562404856448} - component: {fileID: 95855903953761124} @@ -27,96 +17,12 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1333278584856272 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4528902181121194} - - component: {fileID: 23547974686474686} - - component: {fileID: 102006639917048896} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1376592175035822 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4476385621938454} - - component: {fileID: 33793825543083212} - - component: {fileID: 65681085170139784} - - component: {fileID: 23188114083987784} - - component: {fileID: 114962202791201416} - m_Layer: 0 - m_Name: FrontPlate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1795626731574084 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4607159678781596} - - component: {fileID: 65169310230401214} - - component: {fileID: 114750426120364918} - m_Layer: 0 - m_Name: AnimationButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1927372669350608 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4017873985773760} - - component: {fileID: 33407310223781796} - - component: {fileID: 65088712743152404} - - component: {fileID: 23020392040719048} - - component: {fileID: 114365820831752002} - m_Layer: 0 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4017873985773760 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1927372669350608} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.005} - m_LocalScale: {x: 0.21484375, y: 0.05859375, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4040562404856448} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4040562404856448 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1229886398368936} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -128,24 +34,49 @@ Transform: m_Father: {fileID: 4607159678781596} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4476385621938454 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1376592175035822} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4040562404856448} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &95855903953761124 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1229886398368936} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 3984e7415e5be5a45886f4e09cb35542, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &1333278584856272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4528902181121194} + - component: {fileID: 23547974686474686} + - component: {fileID: 102006639917048896} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 --- !u!4 &4528902181121194 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1333278584856272} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0.003, z: -0.003} @@ -154,26 +85,13 @@ Transform: m_Father: {fileID: 4040562404856448} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!4 &4607159678781596 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1795626731574084} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4040562404856448} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &23020392040719048 +--- !u!23 &23547974686474686 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1927372669350608} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1333278584856272} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -182,8 +100,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -191,7 +110,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 - m_PreserveUVs: 1 + m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 @@ -203,11 +122,89 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!102 &102006639917048896 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1333278584856272} + m_Text: Animator Button + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 42 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!1 &1376592175035822 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4476385621938454} + - component: {fileID: 33793825543083212} + - component: {fileID: 65681085170139784} + - component: {fileID: 23188114083987784} + - component: {fileID: 114962202791201416} + m_Layer: 0 + m_Name: FrontPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4476385621938454 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376592175035822} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4040562404856448} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33793825543083212 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376592175035822} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65681085170139784 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376592175035822} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!23 &23188114083987784 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1376592175035822} m_Enabled: 1 m_CastShadows: 1 @@ -217,6 +214,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: 3b3d487d6722afe489a882284f787bbd, type: 2} m_StaticBatchInfo: @@ -238,72 +236,63 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23547974686474686 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1333278584856272} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &33407310223781796 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1927372669350608} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33793825543083212 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} +--- !u!114 &114962202791201416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1376592175035822} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &65088712743152404 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1927372669350608} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4017873985773760} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -20, y: -20, z: 0} + OnlyInEditMode: 0 +--- !u!1 &1795626731574084 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4607159678781596} + - component: {fileID: 65169310230401214} + - component: {fileID: 114750426120364918} + - component: {fileID: 1181576808188907290} + m_Layer: 0 + m_Name: AnimationButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4607159678781596 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1795626731574084} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4040562404856448} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &65169310230401214 BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1795626731574084} m_Material: {fileID: 0} m_IsTrigger: 0 @@ -311,76 +300,12 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.22007813, y: 0.063828126, z: 0.024882812} m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65681085170139784 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1376592175035822} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!95 &95855903953761124 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1229886398368936} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 3984e7415e5be5a45886f4e09cb35542, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!102 &102006639917048896 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1333278584856272} - m_Text: Animator Button - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 4 - m_Alignment: 0 - m_TabSize: 4 - m_FontSize: 42 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} - m_Color: - serializedVersion: 2 - rgba: 4294967295 ---- !u!114 &114365820831752002 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1927372669350608} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 440, y: 120, z: 10} - OnlyInEditMode: 0 --- !u!114 &114750426120364918 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1795626731574084} m_Enabled: 1 m_EditorHideFlags: 0 @@ -399,7 +324,7 @@ MonoBehaviour: CanSelect: 1 CanDeselect: 1 VoiceCommand: - RequiresGaze: 1 + RequiresFocus: 1 Profiles: - Target: {fileID: 1229886398368936} Themes: @@ -411,19 +336,129 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114962202791201416 +--- !u!114 &1181576808188907290 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1376592175035822} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1795626731574084} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.012441406} + eventsToReceive: 0 + touchableSurface: 0 + bounds: {x: 0.22007813, y: 0.063828126} + touchableCollider: {fileID: 65169310230401214} +--- !u!1 &1927372669350608 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4017873985773760} + - component: {fileID: 33407310223781796} + - component: {fileID: 65088712743152404} + - component: {fileID: 23020392040719048} + - component: {fileID: 114365820831752002} + m_Layer: 0 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4017873985773760 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1927372669350608} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.005} + m_LocalScale: {x: 0.21484375, y: 0.05859375, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4040562404856448} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33407310223781796 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1927372669350608} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65088712743152404 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1927372669350608} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23020392040719048 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1927372669350608} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114365820831752002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1927372669350608} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} m_Name: m_EditorClassIdentifier: BasePixelScale: 2048 - AnchorTransform: {fileID: 4017873985773760} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -20, y: -20, z: 0} + ItemSize: {x: 440, y: 120, z: 10} OnlyInEditMode: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Button.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Button.prefab index bf4922a1446..fd4601e38c6 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Button.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Button.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1129523842154474} - m_IsPrefabParent: 1 --- !u!1 &1117314873095580 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4888946412176522} - component: {fileID: 33992021502377378} @@ -30,16 +20,105 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4888946412176522 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1117314873095580} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.0049} + m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4076509787018116} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33992021502377378 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1117314873095580} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65591877655842180 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1117314873095580} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23487570599995180 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1117314873095580} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114392427489639844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1117314873095580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + ItemSize: {x: 420, y: 100, z: 10} + OnlyInEditMode: 0 --- !u!1 &1129523842154474 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4899954742063566} - component: {fileID: 65501967504898374} - component: {fileID: 114818926546564510} + - component: {fileID: 3354217369102256160} m_Layer: 0 m_Name: Button m_TagString: Untagged @@ -47,12 +126,104 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4899954742063566 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1129523842154474} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4457593704773214} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65501967504898374 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1129523842154474} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.22007813, y: 0.063828126, z: 0.024882812} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &114818926546564510 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1129523842154474} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: + Enabled: 1 + States: {fileID: 11400000, guid: 5eac1712038236e4b8ffdb3893804fe1, type: 2} + InputAction: + id: 0 + description: + axisConstraint: 0 + InputActionId: 0 + IsGlobal: 0 + Dimensions: 1 + CanSelect: 1 + CanDeselect: 1 + VoiceCommand: + RequiresFocus: 1 + Profiles: + - Target: {fileID: 1373633673004372} + Themes: + - {fileID: 11400000, guid: 61962e4d95d843842bb2dee96b41da6c, type: 2} + HadDefaultTheme: 1 + - Target: {fileID: 1701107333441922} + Themes: + - {fileID: 11400000, guid: b1ef68ffe69fad14a8d8401f7bd17db5, type: 2} + HadDefaultTheme: 1 + - Target: {fileID: 1981214534506362} + Themes: + - {fileID: 11400000, guid: 210ecfb82b9f09c4d835184cd0034155, type: 2} + HadDefaultTheme: 1 + OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + Events: [] +--- !u!114 &3354217369102256160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1129523842154474} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.012441406} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.22007813, y: 0.063828126} + touchableCollider: {fileID: 65501967504898374} --- !u!1 &1326063555775678 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4457593704773214} m_Layer: 0 @@ -62,12 +233,30 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4457593704773214 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1326063555775678} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4006037907185286} + - {fileID: 4750079459773098} + - {fileID: 4076509787018116} + m_Father: {fileID: 4899954742063566} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1373633673004372 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4750079459773098} - component: {fileID: 33747880585099068} @@ -81,12 +270,102 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4750079459773098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1373633673004372} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4457593704773214} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33747880585099068 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1373633673004372} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65697264773083508 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1373633673004372} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23921117442800242 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1373633673004372} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3b3d487d6722afe489a882284f787bbd, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114697700997837616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1373633673004372} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4888946412176522} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: 0, y: 0, z: 0} + OnlyInEditMode: 0 --- !u!1 &1450622951675032 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4283610823276578} - component: {fileID: 33701908487399382} @@ -100,144 +379,12 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1554726048461812 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4463216719235936} - - component: {fileID: 33223236520391178} - - component: {fileID: 65965631397944180} - - component: {fileID: 23526071733757326} - - component: {fileID: 114100542745781632} - m_Layer: 0 - m_Name: Top - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1701107333441922 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4076509787018116} - m_Layer: 0 - m_Name: Borders - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1850983680486268 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4274117614729588} - - component: {fileID: 33615031388294458} - - component: {fileID: 65453959424712320} - - component: {fileID: 23222228283142944} - - component: {fileID: 114509078727615392} - m_Layer: 0 - m_Name: Bottom - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1871147712450402 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4778682523773738} - - component: {fileID: 33699456751370276} - - component: {fileID: 65511204890081376} - - component: {fileID: 23530474296008534} - - component: {fileID: 114315904620530884} - m_Layer: 0 - m_Name: Right - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1981214534506362 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4006037907185286} - - component: {fileID: 23176595217100076} - - component: {fileID: 102556874199586456} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4006037907185286 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1981214534506362} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.003, z: -0.003} - m_LocalScale: {x: 0.005, y: 0.005000004, z: 0.005000003} - m_Children: [] - m_Father: {fileID: 4457593704773214} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!4 &4076509787018116 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1701107333441922} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4888946412176522} - - {fileID: 4283610823276578} - - {fileID: 4778682523773738} - - {fileID: 4463216719235936} - - {fileID: 4274117614729588} - m_Father: {fileID: 4457593704773214} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4274117614729588 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850983680486268} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.026855469, z: 0.0024585938} - m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4076509787018116} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4283610823276578 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1450622951675032} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.10498047, y: 0, z: 0.0024585938} @@ -246,94 +393,34 @@ Transform: m_Father: {fileID: 4076509787018116} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4457593704773214 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1326063555775678} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4006037907185286} - - {fileID: 4750079459773098} - - {fileID: 4076509787018116} - m_Father: {fileID: 4899954742063566} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4463216719235936 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1554726048461812} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.026855469, z: 0.0024585938} - m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4076509787018116} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4750079459773098 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1373633673004372} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4457593704773214} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4778682523773738 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1871147712450402} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.10498047, y: 0, z: 0.0024585938} - m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4076509787018116} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4888946412176522 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1117314873095580} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.0049} - m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4076509787018116} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4899954742063566 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1129523842154474} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4457593704773214} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &23176595217100076 +--- !u!33 &33701908487399382 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1450622951675032} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65660822846676256 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1450622951675032} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23538518560789514 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1981214534506362} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1450622951675032} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -342,8 +429,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -351,7 +439,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 - m_PreserveUVs: 0 + m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 @@ -363,12 +451,88 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23222228283142944 +--- !u!114 &114278716807683266 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1450622951675032} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4888946412176522} + Weight: 10 + Depth: 20 + Alignment: {x: -1, y: 0, z: 0} + PositionOffset: {x: 0, y: 0, z: -5} + AddCorner: 1 + OnlyInEditMode: 0 +--- !u!1 &1554726048461812 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4463216719235936} + - component: {fileID: 33223236520391178} + - component: {fileID: 65965631397944180} + - component: {fileID: 23526071733757326} + - component: {fileID: 114100542745781632} + m_Layer: 0 + m_Name: Top + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4463216719235936 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1554726048461812} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.026855469, z: 0.0024585938} + m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4076509787018116} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33223236520391178 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1554726048461812} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65965631397944180 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1554726048461812} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23526071733757326 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850983680486268} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1554726048461812} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -377,6 +541,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} m_StaticBatchInfo: @@ -398,47 +563,123 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23487570599995180 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1117314873095580} +--- !u!114 &114100542745781632 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1554726048461812} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23526071733757326 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4888946412176522} + Weight: 10 + Depth: 20 + Alignment: {x: 0, y: 1, z: 0} + PositionOffset: {x: 0, y: 0, z: -5} + AddCorner: 1 + OnlyInEditMode: 0 +--- !u!1 &1701107333441922 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4076509787018116} + m_Layer: 0 + m_Name: Borders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4076509787018116 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701107333441922} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4888946412176522} + - {fileID: 4283610823276578} + - {fileID: 4778682523773738} + - {fileID: 4463216719235936} + - {fileID: 4274117614729588} + m_Father: {fileID: 4457593704773214} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1850983680486268 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4274117614729588} + - component: {fileID: 33615031388294458} + - component: {fileID: 65453959424712320} + - component: {fileID: 23222228283142944} + - component: {fileID: 114509078727615392} + m_Layer: 0 + m_Name: Bottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4274117614729588 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850983680486268} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.026855469, z: 0.0024585938} + m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4076509787018116} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33615031388294458 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850983680486268} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65453959424712320 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850983680486268} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23222228283142944 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1554726048461812} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850983680486268} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -447,6 +688,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} m_StaticBatchInfo: @@ -468,11 +710,87 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!114 &114509078727615392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850983680486268} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4888946412176522} + Weight: 10 + Depth: 20 + Alignment: {x: 0, y: -1, z: 0} + PositionOffset: {x: 0, y: 0, z: -5} + AddCorner: 1 + OnlyInEditMode: 0 +--- !u!1 &1871147712450402 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4778682523773738} + - component: {fileID: 33699456751370276} + - component: {fileID: 65511204890081376} + - component: {fileID: 23530474296008534} + - component: {fileID: 114315904620530884} + m_Layer: 0 + m_Name: Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4778682523773738 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1871147712450402} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.10498047, y: 0, z: 0.0024585938} + m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4076509787018116} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33699456751370276 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1871147712450402} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65511204890081376 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1871147712450402} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!23 &23530474296008534 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1871147712450402} m_Enabled: 1 m_CastShadows: 1 @@ -482,6 +800,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} m_StaticBatchInfo: @@ -503,47 +822,65 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23538518560789514 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1450622951675032} +--- !u!114 &114315904620530884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1871147712450402} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23921117442800242 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4888946412176522} + Weight: 10 + Depth: 20 + Alignment: {x: 1, y: 0, z: 0} + PositionOffset: {x: 0, y: 0, z: -5} + AddCorner: 1 + OnlyInEditMode: 0 +--- !u!1 &1981214534506362 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4006037907185286} + - component: {fileID: 23176595217100076} + - component: {fileID: 102556874199586456} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4006037907185286 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981214534506362} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.003, z: -0.003} + m_LocalScale: {x: 0.005, y: 0.005000004, z: 0.005000003} + m_Children: [] + m_Father: {fileID: 4457593704773214} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23176595217100076 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1373633673004372} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981214534506362} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -552,8 +889,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 3b3d487d6722afe489a882284f787bbd, type: 2} + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -561,7 +899,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 - m_PreserveUVs: 1 + m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 @@ -573,138 +911,13 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33223236520391178 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1554726048461812} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33615031388294458 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850983680486268} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33699456751370276 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1871147712450402} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33701908487399382 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1450622951675032} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33747880585099068 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1373633673004372} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33992021502377378 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1117314873095580} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &65453959424712320 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850983680486268} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65501967504898374 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1129523842154474} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22007813, y: 0.063828126, z: 0.024882812} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65511204890081376 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1871147712450402} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65591877655842180 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1117314873095580} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65660822846676256 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1450622951675032} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65697264773083508 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1373633673004372} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65965631397944180 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1554726048461812} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} --- !u!102 &102556874199586456 TextMesh: serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1981214534506362} m_Text: Button m_OffsetZ: 0 @@ -720,152 +933,3 @@ TextMesh: m_Color: serializedVersion: 2 rgba: 4294967295 ---- !u!114 &114100542745781632 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1554726048461812} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4888946412176522} - Weight: 10 - Depth: 20 - Alignment: {x: 0, y: 1, z: 0} - PositionOffset: {x: 0, y: 0, z: -5} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114278716807683266 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1450622951675032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4888946412176522} - Weight: 10 - Depth: 20 - Alignment: {x: -1, y: 0, z: 0} - PositionOffset: {x: 0, y: 0, z: -5} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114315904620530884 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1871147712450402} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4888946412176522} - Weight: 10 - Depth: 20 - Alignment: {x: 1, y: 0, z: 0} - PositionOffset: {x: 0, y: 0, z: -5} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114392427489639844 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1117314873095580} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 420, y: 100, z: 10} - OnlyInEditMode: 0 ---- !u!114 &114509078727615392 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850983680486268} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4888946412176522} - Weight: 10 - Depth: 20 - Alignment: {x: 0, y: -1, z: 0} - PositionOffset: {x: 0, y: 0, z: -5} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114697700997837616 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1373633673004372} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4888946412176522} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: 0, y: 0, z: 0} - OnlyInEditMode: 0 ---- !u!114 &114818926546564510 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1129523842154474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} - m_Name: - m_EditorClassIdentifier: - Enabled: 1 - States: {fileID: 11400000, guid: 5eac1712038236e4b8ffdb3893804fe1, type: 2} - InputAction: - id: 0 - description: - axisConstraint: 0 - InputActionId: 0 - IsGlobal: 0 - Dimensions: 1 - CanSelect: 1 - CanDeselect: 1 - VoiceCommand: - RequiresGaze: 1 - Profiles: - - Target: {fileID: 1373633673004372} - Themes: - - {fileID: 11400000, guid: 61962e4d95d843842bb2dee96b41da6c, type: 2} - HadDefaultTheme: 1 - - Target: {fileID: 1701107333441922} - Themes: - - {fileID: 11400000, guid: b1ef68ffe69fad14a8d8401f7bd17db5, type: 2} - HadDefaultTheme: 1 - - Target: {fileID: 1981214534506362} - Themes: - - {fileID: 11400000, guid: 210ecfb82b9f09c4d835184cd0034155, type: 2} - HadDefaultTheme: 1 - OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - Events: [] diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab index 18e5800203c..7b68439f896 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1775492867674862} - m_IsPrefabParent: 1 --- !u!1 &1098505392087678 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4781408151868912} - component: {fileID: 33641935424540274} @@ -30,215 +20,12 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1495934348724120 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4416126026153628} - - component: {fileID: 33275854933592506} - - component: {fileID: 23444226779442190} - m_Layer: 0 - m_Name: CheckBoxX - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!1 &1645441935900780 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4858878450608414} - - component: {fileID: 33415806475787660} - - component: {fileID: 23929879725500384} - m_Layer: 0 - m_Name: CheckBoxCheck - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1720786229012536 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4627392316691604} - - component: {fileID: 23038202191139816} - - component: {fileID: 102667059822850586} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1728092390328272 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4402144810473256} - m_Layer: 0 - m_Name: ButtonContent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1750987048839070 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4540306399422938} - - component: {fileID: 33728591499608816} - - component: {fileID: 23496164554082634} - m_Layer: 0 - m_Name: Arrow - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!1 &1767278312977966 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4136500160732746} - - component: {fileID: 33653120745121860} - - component: {fileID: 23661315812672838} - - component: {fileID: 65527622757459022} - - component: {fileID: 114302202869515260} - m_Layer: 0 - m_Name: Button - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1775492867674862 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4165280830115576} - - component: {fileID: 65394494458541452} - - component: {fileID: 114359879210576386} - m_Layer: 0 - m_Name: CheckBox - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4136500160732746 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1767278312977966} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.034179688, y: 0.034179688, z: 0.0073242188} - m_Children: [] - m_Father: {fileID: 4402144810473256} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4165280830115576 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1775492867674862} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4402144810473256} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4402144810473256 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1728092390328272} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4627392316691604} - - {fileID: 4781408151868912} - - {fileID: 4136500160732746} - - {fileID: 4540306399422938} - - {fileID: 4416126026153628} - - {fileID: 4858878450608414} - m_Father: {fileID: 4165280830115576} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4416126026153628 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1495934348724120} - m_LocalRotation: {x: -0.6532815, y: 0.270598, z: -0.270598, w: 0.6532815} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} - m_Children: [] - m_Father: {fileID: 4402144810473256} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4540306399422938 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1750987048839070} - m_LocalRotation: {x: -0.6532815, y: 0.270598, z: -0.270598, w: 0.6532815} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} - m_Children: [] - m_Father: {fileID: 4402144810473256} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4627392316691604 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1720786229012536} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.02974999, y: 0, z: 0} - m_LocalScale: {x: 0.005, y: 0.005000006, z: 0.005000005} - m_Children: [] - m_Father: {fileID: 4402144810473256} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &4781408151868912 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1098505392087678} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0.005} @@ -247,25 +34,21 @@ Transform: m_Father: {fileID: 4402144810473256} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4858878450608414 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1645441935900780} - m_LocalRotation: {x: 0.27059805, y: -0.6532815, z: -0.6532815, w: 0.27059805} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} - m_Children: [] - m_Father: {fileID: 4402144810473256} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: -45, y: -90, z: -90} ---- !u!23 &23038202191139816 +--- !u!33 &33641935424540274 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098505392087678} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23589133403261092 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1720786229012536} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098505392087678} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -274,8 +57,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -295,11 +79,80 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!65 &65203283302196396 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098505392087678} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &114604455477286672 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098505392087678} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + ItemSize: {x: 90, y: 90, z: 15} + OnlyInEditMode: 1 +--- !u!1 &1495934348724120 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4416126026153628} + - component: {fileID: 33275854933592506} + - component: {fileID: 23444226779442190} + m_Layer: 0 + m_Name: CheckBoxX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4416126026153628 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495934348724120} + m_LocalRotation: {x: -0.6532815, y: 0.270598, z: -0.270598, w: 0.6532815} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_Children: [] + m_Father: {fileID: 4402144810473256} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33275854933592506 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1495934348724120} + m_Mesh: {fileID: 4300008, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} --- !u!23 &23444226779442190 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1495934348724120} m_Enabled: 1 m_CastShadows: 1 @@ -309,8 +162,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -330,12 +184,53 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23496164554082634 +--- !u!1 &1645441935900780 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4858878450608414} + - component: {fileID: 33415806475787660} + - component: {fileID: 23929879725500384} + m_Layer: 0 + m_Name: CheckBoxCheck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4858878450608414 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645441935900780} + m_LocalRotation: {x: 0.27059805, y: -0.6532815, z: -0.6532815, w: 0.27059805} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_Children: [] + m_Father: {fileID: 4402144810473256} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: -45, y: -90, z: -90} +--- !u!33 &33415806475787660 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645441935900780} + m_Mesh: {fileID: 4300010, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23929879725500384 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1750987048839070} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1645441935900780} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -344,8 +239,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -365,12 +261,45 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23589133403261092 +--- !u!1 &1720786229012536 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4627392316691604} + - component: {fileID: 23038202191139816} + - component: {fileID: 102667059822850586} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4627392316691604 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1720786229012536} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.02974999, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.005000006, z: 0.005000005} + m_Children: [] + m_Father: {fileID: 4402144810473256} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23038202191139816 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1098505392087678} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1720786229012536} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -379,8 +308,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,12 +330,111 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23661315812672838 +--- !u!102 &102667059822850586 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1720786229012536} + m_Text: CheckBox + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 3 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 42 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4292335575 +--- !u!1 &1728092390328272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4402144810473256} + m_Layer: 0 + m_Name: ButtonContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4402144810473256 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728092390328272} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4627392316691604} + - {fileID: 4781408151868912} + - {fileID: 4136500160732746} + - {fileID: 4540306399422938} + - {fileID: 4416126026153628} + - {fileID: 4858878450608414} + m_Father: {fileID: 4165280830115576} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1750987048839070 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4540306399422938} + - component: {fileID: 33728591499608816} + - component: {fileID: 23496164554082634} + m_Layer: 0 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4540306399422938 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1750987048839070} + m_LocalRotation: {x: -0.6532815, y: 0.270598, z: -0.270598, w: 0.6532815} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_Children: [] + m_Father: {fileID: 4402144810473256} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33728591499608816 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1750987048839070} + m_Mesh: {fileID: 4300014, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23496164554082634 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1767278312977966} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1750987048839070} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -414,8 +443,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -435,12 +465,55 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23929879725500384 +--- !u!1 &1767278312977966 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4136500160732746} + - component: {fileID: 33653120745121860} + - component: {fileID: 23661315812672838} + - component: {fileID: 65527622757459022} + - component: {fileID: 114302202869515260} + m_Layer: 0 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4136500160732746 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1767278312977966} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.034179688, y: 0.034179688, z: 0.0073242188} + m_Children: [] + m_Father: {fileID: 4402144810473256} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33653120745121860 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1767278312977966} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23661315812672838 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1645441935900780} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1767278312977966} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -449,8 +522,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} + - {fileID: 2100000, guid: 09c36cbdc8249664dacdf98f70d27be7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -470,70 +544,12 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33275854933592506 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1495934348724120} - m_Mesh: {fileID: 4300008, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33415806475787660 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1645441935900780} - m_Mesh: {fileID: 4300010, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33641935424540274 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1098505392087678} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33653120745121860 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1767278312977966} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33728591499608816 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1750987048839070} - m_Mesh: {fileID: 4300014, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!65 &65203283302196396 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1098505392087678} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65394494458541452 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1775492867674862} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22, y: 0.05, z: 0.025} - m_Center: {x: 0.08, y: 0, z: 0} --- !u!65 &65527622757459022 BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1767278312977966} m_Material: {fileID: 0} m_IsTrigger: 0 @@ -541,32 +557,12 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!102 &102667059822850586 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1720786229012536} - m_Text: CheckBox - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 3 - m_Alignment: 0 - m_TabSize: 4 - m_FontSize: 42 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} - m_Color: - serializedVersion: 2 - rgba: 4292335575 --- !u!114 &114302202869515260 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1767278312977966} m_Enabled: 1 m_EditorHideFlags: 0 @@ -578,11 +574,59 @@ MonoBehaviour: Scale: {x: 1, y: 1, z: 1} Offset: {x: -20, y: -20, z: 0} OnlyInEditMode: 1 +--- !u!1 &1775492867674862 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4165280830115576} + - component: {fileID: 65394494458541452} + - component: {fileID: 114359879210576386} + - component: {fileID: 8868109116265699985} + m_Layer: 0 + m_Name: CheckBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4165280830115576 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1775492867674862} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4402144810473256} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65394494458541452 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1775492867674862} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.22, y: 0.05, z: 0.025} + m_Center: {x: 0.08, y: 0, z: 0} --- !u!114 &114359879210576386 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1775492867674862} m_Enabled: 1 m_EditorHideFlags: 0 @@ -601,7 +645,7 @@ MonoBehaviour: CanSelect: 1 CanDeselect: 1 VoiceCommand: - RequiresGaze: 1 + RequiresFocus: 1 Profiles: - Target: {fileID: 1098505392087678} Themes: @@ -629,17 +673,22 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114604455477286672 +--- !u!114 &8868109116265699985 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1098505392087678} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1775492867674862} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} m_Name: m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 90, y: 90, z: 15} - OnlyInEditMode: 1 + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0.08, y: 0, z: -0.0125} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.22, y: 0.05} + touchableCollider: {fileID: 65394494458541452} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab.meta index db12b113b95..0dc4d301745 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/CheckBox.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: abb2df850d68f894d830c95c299cf10f +guid: 6f89876ff9050224f949c0490969219d NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButton.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButton.prefab index 5ed60882af1..1ac46c12d8b 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButton.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButton.prefab @@ -146,7 +146,7 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_text: Say "Button" m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 0} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} @@ -327,6 +327,7 @@ GameObject: - component: {fileID: 4249060311757736} - component: {fileID: 65091470401894616} - component: {fileID: 114809329666163580} + - component: {fileID: 5253365468919551739} m_Layer: 5 m_Name: HolographicButton m_TagString: Untagged @@ -409,6 +410,25 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] +--- !u!114 &5253365468919551739 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210820392543280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.01} + eventsToReceive: 0 + touchableSurface: 0 + bounds: {x: 0.12, y: 0.12} + touchableCollider: {fileID: 65091470401894616} --- !u!1 &1264397046495974 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButtonToggle.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButtonToggle.prefab index b9e7c006eb6..f2315c90f5b 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButtonToggle.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/HolographicButtonToggle.prefab @@ -1,26 +1,17 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1107482477660006} - m_IsPrefabParent: 1 --- !u!1 &1107482477660006 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4852819729683114} - component: {fileID: 65155074209115082} - component: {fileID: 114856665817931228} + - component: {fileID: 4389918657735180436} m_Layer: 5 m_Name: HolographicButtonToggle m_TagString: Untagged @@ -28,12 +19,110 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4852819729683114 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1107482477660006} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4547374579776232} + - {fileID: 4678865536261668} + - {fileID: 4391902128074524} + - {fileID: 4010832588203214} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65155074209115082 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1107482477660006} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.12, y: 0.12, z: 0.02} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &114856665817931228 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1107482477660006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: + Enabled: 1 + States: {fileID: 11400000, guid: 5eac1712038236e4b8ffdb3893804fe1, type: 2} + InputAction: + id: 0 + description: + axisConstraint: 0 + InputActionId: 0 + IsGlobal: 0 + Dimensions: 2 + CanSelect: 1 + CanDeselect: 1 + VoiceCommand: Button + RequiresFocus: 1 + Profiles: + - Target: {fileID: 1391235132048104} + Themes: + - {fileID: 11400000, guid: d37afabc007bf774d9431b9a7cbe6fba, type: 2} + - {fileID: 11400000, guid: 29b20ecfcc16eef4dad8989c360f2988, type: 2} + HadDefaultTheme: 1 + - Target: {fileID: 1925978215027266} + Themes: + - {fileID: 11400000, guid: cbde7890146c3024d928b7afc2e16065, type: 2} + - {fileID: 11400000, guid: cbde7890146c3024d928b7afc2e16065, type: 2} + HadDefaultTheme: 1 + - Target: {fileID: 1687922239424002} + Themes: + - {fileID: 11400000, guid: 0c4c73f326f602744bdcfff481fd6f20, type: 2} + - {fileID: 11400000, guid: 0c4c73f326f602744bdcfff481fd6f20, type: 2} + HadDefaultTheme: 1 + OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + Events: [] +--- !u!114 &4389918657735180436 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1107482477660006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.01} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.12, y: 0.12} + touchableCollider: {fileID: 65155074209115082} --- !u!1 &1210628502256192 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 224756769914577510} - component: {fileID: 23859773054077766} @@ -47,189 +136,43 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1324908095779744 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4391902128074524} - - component: {fileID: 33363749308810454} - - component: {fileID: 23756887827218384} - m_Layer: 5 - m_Name: UIButtonSquareIcon - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1391235132048104 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4547374579776232} - - component: {fileID: 33748067954246100} - - component: {fileID: 23684444748209922} - m_Layer: 0 - m_Name: BackPlate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1687922239424002 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4010832588203214} - m_Layer: 5 - m_Name: SeeItSayItLabel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1729569338548398 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4711648706694572} - - component: {fileID: 33871035123459390} - - component: {fileID: 23232249014457786} - m_Layer: 0 - m_Name: BackPlate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1925978215027266 -GameObject: +--- !u!224 &224756769914577510 +RectTransform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4678865536261668} - - component: {fileID: 33947682782068674} - - component: {fileID: 23354682799087526} - m_Layer: 0 - m_Name: FrontPlate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4010832588203214 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1687922239424002} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.0157, z: -0.0112} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 224756769914577510} - - {fileID: 4711648706694572} - m_Father: {fileID: 4852819729683114} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4391902128074524 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1324908095779744} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210628502256192} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.0014, z: -0.015822735} + m_LocalPosition: {x: 0, y: 0, z: -0.0306} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 4852819729683114} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4547374579776232 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1391235132048104} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.00027746707, z: 0} - m_LocalScale: {x: 0.12, y: 0.12, z: 0.01} - m_Children: [] - m_Father: {fileID: 4852819729683114} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4678865536261668 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925978215027266} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.00027746707, z: -0.0103} - m_LocalScale: {x: 0.12, y: 0.12, z: 0.01} - m_Children: [] - m_Father: {fileID: 4852819729683114} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4711648706694572 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1729569338548398} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.03904, z: -0.025900006} - m_LocalScale: {x: 0.107539825, y: 0.032499358, z: 0.003} - m_Children: [] m_Father: {fileID: 4010832588203214} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4852819729683114 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1107482477660006} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4547374579776232} - - {fileID: 4678865536261668} - - {fileID: 4391902128074524} - - {fileID: 4010832588203214} - m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &23232249014457786 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.00034, y: -0.03873} + m_SizeDelta: {x: 20, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &23859773054077766 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1729569338548398} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210628502256192} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 - m_MotionVectors: 2 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 19bfc37fa7629b842a220853f7f60782, type: 2} + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -237,7 +180,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 - m_PreserveUVs: 1 + m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 @@ -249,199 +192,29 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23354682799087526 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925978215027266} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 2 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 1ad68daec9ac6374cb32214e55dc158e, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23684444748209922 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1391235132048104} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 2 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 19bfc37fa7629b842a220853f7f60782, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23756887827218384 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1324908095779744} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: fa419ab56051229449e3b813df8f295f, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23859773054077766 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1210628502256192} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &33363749308810454 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1324908095779744} - m_Mesh: {fileID: 4300010, guid: b566bbce04d66f4428421e81a3af0299, type: 3} ---- !u!33 &33411799682539724 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1210628502256192} - m_Mesh: {fileID: 0} ---- !u!33 &33748067954246100 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1391235132048104} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33871035123459390 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1729569338548398} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33947682782068674 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1925978215027266} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &65155074209115082 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1107482477660006} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.12, y: 0.12, z: 0.02} - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &114293819691004426 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1210628502256192} +--- !u!33 &33411799682539724 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210628502256192} + m_Mesh: {fileID: 0} +--- !u!222 &222482900338425014 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210628502256192} + m_CullTransparentMesh: 0 +--- !u!114 &114293819691004426 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210628502256192} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} @@ -457,7 +230,7 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_text: Say "Button" m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 0} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} @@ -467,6 +240,7 @@ MonoBehaviour: rgba: 4294967295 m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 + m_colorMode: 3 m_fontColorGradient: topLeft: {r: 1, g: 1, b: 1, a: 1} topRight: {r: 1, g: 1, b: 1, a: 1} @@ -549,73 +323,343 @@ MonoBehaviour: - {fileID: 0} - {fileID: 0} m_maskType: 0 ---- !u!114 &114856665817931228 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1107482477660006} +--- !u!1 &1324908095779744 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4391902128074524} + - component: {fileID: 33363749308810454} + - component: {fileID: 23756887827218384} + m_Layer: 5 + m_Name: UIButtonSquareIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4391902128074524 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324908095779744} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.0014, z: -0.015822735} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4852819729683114} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33363749308810454 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324908095779744} + m_Mesh: {fileID: 4300010, guid: b566bbce04d66f4428421e81a3af0299, type: 3} +--- !u!23 &23756887827218384 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324908095779744} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} - m_Name: - m_EditorClassIdentifier: - Enabled: 1 - States: {fileID: 11400000, guid: 5eac1712038236e4b8ffdb3893804fe1, type: 2} - InputAction: - id: 0 - description: - axisConstraint: 0 - InputActionId: 0 - IsGlobal: 0 - Dimensions: 2 - CanSelect: 1 - CanDeselect: 1 - VoiceCommand: Button - RequiresGaze: 1 - Profiles: - - Target: {fileID: 1391235132048104} - Themes: - - {fileID: 11400000, guid: d37afabc007bf774d9431b9a7cbe6fba, type: 2} - - {fileID: 11400000, guid: 29b20ecfcc16eef4dad8989c360f2988, type: 2} - HadDefaultTheme: 1 - - Target: {fileID: 1925978215027266} - Themes: - - {fileID: 11400000, guid: cbde7890146c3024d928b7afc2e16065, type: 2} - - {fileID: 11400000, guid: cbde7890146c3024d928b7afc2e16065, type: 2} - HadDefaultTheme: 1 - - Target: {fileID: 1687922239424002} - Themes: - - {fileID: 11400000, guid: 0c4c73f326f602744bdcfff481fd6f20, type: 2} - - {fileID: 11400000, guid: 0c4c73f326f602744bdcfff481fd6f20, type: 2} - HadDefaultTheme: 1 - OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - Events: [] ---- !u!222 &222482900338425014 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1210628502256192} ---- !u!224 &224756769914577510 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1210628502256192} + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fa419ab56051229449e3b813df8f295f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1391235132048104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4547374579776232} + - component: {fileID: 33748067954246100} + - component: {fileID: 23684444748209922} + m_Layer: 0 + m_Name: BackPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4547374579776232 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1391235132048104} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.0306} + m_LocalPosition: {x: 0, y: -0.00027746707, z: 0} + m_LocalScale: {x: 0.12, y: 0.12, z: 0.01} + m_Children: [] + m_Father: {fileID: 4852819729683114} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33748067954246100 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1391235132048104} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23684444748209922 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1391235132048104} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 19bfc37fa7629b842a220853f7f60782, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1687922239424002 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4010832588203214} + m_Layer: 5 + m_Name: SeeItSayItLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4010832588203214 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1687922239424002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.0157, z: -0.0112} m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224756769914577510} + - {fileID: 4711648706694572} + m_Father: {fileID: 4852819729683114} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1729569338548398 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4711648706694572} + - component: {fileID: 33871035123459390} + - component: {fileID: 23232249014457786} + m_Layer: 0 + m_Name: BackPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4711648706694572 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1729569338548398} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.03904, z: -0.025900006} + m_LocalScale: {x: 0.107539825, y: 0.032499358, z: 0.003} m_Children: [] m_Father: {fileID: 4010832588203214} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0.00034, y: -0.03873} - m_SizeDelta: {x: 20, y: 5} - m_Pivot: {x: 0.5, y: 0.5} +--- !u!33 &33871035123459390 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1729569338548398} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23232249014457786 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1729569338548398} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 19bfc37fa7629b842a220853f7f60782, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1925978215027266 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4678865536261668} + - component: {fileID: 33947682782068674} + - component: {fileID: 23354682799087526} + m_Layer: 0 + m_Name: FrontPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4678865536261668 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925978215027266} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.00027746707, z: -0.0103} + m_LocalScale: {x: 0.12, y: 0.12, z: 0.01} + m_Children: [] + m_Father: {fileID: 4852819729683114} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33947682782068674 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925978215027266} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23354682799087526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925978215027266} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1ad68daec9ac6374cb32214e55dc158e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab index ccee1426da3..0e0f2263958 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab @@ -146,6 +146,7 @@ MonoBehaviour: pressDistance: 0.006 releaseDistanceDelta: 0.001 returnRate: 25 + enforceFrontPush: 1 TouchBegin: m_PersistentCalls: m_Calls: @@ -249,7 +250,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: routingTarget: {fileID: 7440800412470431853} - InteractableOnClick: 0 + InteractableOnClick: 1 --- !u!114 &7440800412470431853 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab index 4230e875e5c..181ef0f25ab 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab @@ -19,6 +19,10 @@ PrefabInstance: propertyPath: source value: objectReference: {fileID: 2204069621426241314} + - target: {fileID: 316800720, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} + propertyPath: InteractableOnClick + value: 1 + objectReference: {fileID: 0} - target: {fileID: 316800721, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} propertyPath: handlerTarget value: @@ -128,7 +132,7 @@ PrefabInstance: type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: 2100000, guid: e676303390b2ee941b658c1d04ccdc57, type: 2} + objectReference: {fileID: 0} - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} propertyPath: Profiles.Array.data[0].Target diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab index 7a8f4b9de4f..2280615c2ed 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab @@ -212,7 +212,7 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -247,7 +247,7 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} + - {fileID: 2100000, guid: 09c36cbdc8249664dacdf98f70d27be7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -282,7 +282,7 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab.meta index 52e6019b757..b984df46840 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Radial.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7a09758e059eb59468ca9b69ac560cd9 +guid: 0f83fa6afa56ead46bbd762156f1137e NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/RadialSet.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/RadialSet.prefab index 2d31dfbe0d3..92a5f7a063c 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/RadialSet.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/RadialSet.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1856622667495492} - m_IsPrefabParent: 1 --- !u!1 &1036220935859626 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4498792646055616} - component: {fileID: 33612332569445068} @@ -29,12 +19,89 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4498792646055616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036220935859626} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4432073617162062} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33612332569445068 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036220935859626} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23478870251386834 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036220935859626} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 09c36cbdc8249664dacdf98f70d27be7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114449448570466402 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036220935859626} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4610967451646196} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -150, y: -150, z: 0} + OnlyInEditMode: 1 --- !u!1 &1046143521135576 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4128609104152444} - component: {fileID: 33629270549943170} @@ -47,12 +114,89 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4128609104152444 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046143521135576} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4647876641913000} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33629270549943170 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046143521135576} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23529417614970466 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046143521135576} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 09c36cbdc8249664dacdf98f70d27be7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114444584393320186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046143521135576} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4891684840272184} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -150, y: -150, z: 0} + OnlyInEditMode: 1 --- !u!1 &1054774868291492 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4847774398274440} - component: {fileID: 23826616375438668} @@ -64,12 +208,86 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4847774398274440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1054774868291492} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.03150004, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} + m_Children: [] + m_Father: {fileID: 4062735191839930} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23826616375438668 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1054774868291492} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &102741463006760918 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1054774868291492} + m_Text: RadialButton 3 + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 3 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 42 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4292335575 --- !u!1 &1125011747071552 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4039300547343950} - component: {fileID: 33382437760520770} @@ -82,12 +300,89 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4039300547343950 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1125011747071552} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4062735191839930} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33382437760520770 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1125011747071552} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23934557266937184 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1125011747071552} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 09c36cbdc8249664dacdf98f70d27be7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114274573459176476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1125011747071552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4417578656984056} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -150, y: -150, z: 0} + OnlyInEditMode: 1 --- !u!1 &1248210251507844 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4062735191839930} m_Layer: 0 @@ -97,12 +392,31 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1285187314504466 +--- !u!4 &4062735191839930 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1248210251507844} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4847774398274440} + - {fileID: 4417578656984056} + - {fileID: 4039300547343950} + - {fileID: 4385557203199492} + m_Father: {fileID: 4670100275137830} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1285187314504466 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4385557203199492} - component: {fileID: 33549316980938452} @@ -115,12 +429,89 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4385557203199492 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285187314504466} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4062735191839930} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33549316980938452 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285187314504466} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23900630428102612 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285187314504466} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114904851918543228 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285187314504466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4417578656984056} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -500, y: -500, z: 0} + OnlyInEditMode: 1 --- !u!1 &1301037372891736 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4417578656984056} - component: {fileID: 33003255011325444} @@ -133,12 +524,87 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4417578656984056 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1301037372891736} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.005} + m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4062735191839930} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33003255011325444 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1301037372891736} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23193427373388880 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1301037372891736} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114164912295568314 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1301037372891736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + ItemSize: {x: 700, y: 700, z: 500} + OnlyInEditMode: 1 --- !u!1 &1396014649234296 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4647876641913000} m_Layer: 0 @@ -148,12 +614,31 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4647876641913000 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1396014649234296} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4228330118182740} + - {fileID: 4891684840272184} + - {fileID: 4128609104152444} + - {fileID: 4653581019401118} + m_Father: {fileID: 4153068939576982} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1451676569574848 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4868521844009230} - component: {fileID: 33217288588886140} @@ -166,12 +651,89 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4868521844009230 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451676569574848} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4432073617162062} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33217288588886140 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451676569574848} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23613526893777652 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451676569574848} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114008923228833042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451676569574848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4610967451646196} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: -500, y: -500, z: 0} + OnlyInEditMode: 1 --- !u!1 &1555211353607136 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4653581019401118} - component: {fileID: 33821142072174868} @@ -184,814 +746,35 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1563572027337304 -GameObject: +--- !u!4 &4653581019401118 +Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4670100275137830} - - component: {fileID: 65613013962320470} - - component: {fileID: 114560737601403782} - m_Layer: 0 - m_Name: Radial (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1695999621761422 -GameObject: + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555211353607136} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.005} + m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4647876641913000} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33821142072174868 +MeshFilter: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4153068939576982} - - component: {fileID: 65735667765749806} - - component: {fileID: 114200093395354822} - m_Layer: 0 - m_Name: Radial (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1698597023288528 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4228330118182740} - - component: {fileID: 23786972114772960} - - component: {fileID: 102888677059595956} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1791457084802870 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4193987172810734} - - component: {fileID: 23694892559024444} - - component: {fileID: 102355601117475586} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1819661643076908 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4204519244856280} - - component: {fileID: 65959922074838590} - - component: {fileID: 114214013505314002} - m_Layer: 0 - m_Name: Radial (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1842973494018042 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4891684840272184} - - component: {fileID: 33828830408101482} - - component: {fileID: 23561516995102276} - - component: {fileID: 114311822256676912} - m_Layer: 0 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1856622667495492 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4894033903586032} - - component: {fileID: 114437542460993462} - m_Layer: 0 - m_Name: RadialSet - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1902042423272936 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4432073617162062} - m_Layer: 0 - m_Name: ButtonContent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1903041749280706 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4610967451646196} - - component: {fileID: 33630129146270250} - - component: {fileID: 23028649312369616} - - component: {fileID: 114474189900081526} - m_Layer: 0 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4039300547343950 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1125011747071552} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4062735191839930} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4062735191839930 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1248210251507844} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4847774398274440} - - {fileID: 4417578656984056} - - {fileID: 4039300547343950} - - {fileID: 4385557203199492} - m_Father: {fileID: 4670100275137830} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4128609104152444 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1046143521135576} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4647876641913000} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4153068939576982 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1695999621761422} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.072, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4647876641913000} - m_Father: {fileID: 4894033903586032} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4193987172810734 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1791457084802870} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.03150004, y: 0, z: 0} - m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} - m_Children: [] - m_Father: {fileID: 4432073617162062} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!4 &4204519244856280 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1819661643076908} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4432073617162062} - m_Father: {fileID: 4894033903586032} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4228330118182740 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1698597023288528} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.03150004, y: 0, z: 0} - m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} - m_Children: [] - m_Father: {fileID: 4647876641913000} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!4 &4385557203199492 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285187314504466} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4062735191839930} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4417578656984056 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1301037372891736} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.005} - m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4062735191839930} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4432073617162062 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1902042423272936} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4193987172810734} - - {fileID: 4610967451646196} - - {fileID: 4498792646055616} - - {fileID: 4868521844009230} - m_Father: {fileID: 4204519244856280} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4498792646055616 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1036220935859626} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.2685547, y: 0.2685547, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4432073617162062} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4610967451646196 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903041749280706} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.005} - m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4432073617162062} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4647876641913000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1396014649234296} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4228330118182740} - - {fileID: 4891684840272184} - - {fileID: 4128609104152444} - - {fileID: 4653581019401118} - m_Father: {fileID: 4153068939576982} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4653581019401118 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1555211353607136} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4647876641913000} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4670100275137830 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1563572027337304} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.1406, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4062735191839930} - m_Father: {fileID: 4894033903586032} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4847774398274440 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1054774868291492} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.03150004, y: 0, z: 0} - m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} - m_Children: [] - m_Father: {fileID: 4062735191839930} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!4 &4868521844009230 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1451676569574848} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.005} - m_LocalScale: {x: 0.09765625, y: 0.09765625, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4432073617162062} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4891684840272184 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1842973494018042} - m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.005} - m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} - m_Children: [] - m_Father: {fileID: 4647876641913000} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4894033903586032 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1856622667495492} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4204519244856280} - - {fileID: 4153068939576982} - - {fileID: 4670100275137830} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &23028649312369616 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903041749280706} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23193427373388880 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1301037372891736} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23478870251386834 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1036220935859626} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23529417614970466 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1046143521135576} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23561516995102276 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1842973494018042} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23613526893777652 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1451676569574848} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23694892559024444 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1791457084802870} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23786972114772960 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1698597023288528} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23826616375438668 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1054774868291492} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23900630428102612 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285187314504466} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23916007660781850 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1555211353607136} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23934557266937184 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555211353607136} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23916007660781850 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1125011747071552} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555211353607136} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -1000,8 +783,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1021,204 +805,77 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33003255011325444 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1301037372891736} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33217288588886140 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1451676569574848} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33382437760520770 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1125011747071552} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33549316980938452 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285187314504466} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33612332569445068 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1036220935859626} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33629270549943170 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1046143521135576} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33630129146270250 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903041749280706} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33821142072174868 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1555211353607136} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33828830408101482 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1842973494018042} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!65 &65613013962320470 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1563572027337304} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22, y: 0.05, z: 0.025} - m_Center: {x: 0.08, y: 0, z: 0} ---- !u!65 &65735667765749806 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1695999621761422} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22, y: 0.05, z: 0.025} - m_Center: {x: 0.08, y: 0, z: 0} ---- !u!65 &65959922074838590 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1819661643076908} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22, y: 0.05, z: 0.025} - m_Center: {x: 0.08, y: 0, z: 0} ---- !u!102 &102355601117475586 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1791457084802870} - m_Text: RadialButton 1 - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 3 - m_Alignment: 0 - m_TabSize: 4 - m_FontSize: 42 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} - m_Color: - serializedVersion: 2 - rgba: 4292335575 ---- !u!102 &102741463006760918 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1054774868291492} - m_Text: RadialButton 3 - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 3 - m_Alignment: 0 - m_TabSize: 4 - m_FontSize: 42 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} - m_Color: - serializedVersion: 2 - rgba: 4292335575 ---- !u!102 &102888677059595956 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1698597023288528} - m_Text: RadialButton 2 - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 3 - m_Alignment: 0 - m_TabSize: 4 - m_FontSize: 42 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} - m_Color: - serializedVersion: 2 - rgba: 4292335575 ---- !u!114 &114008923228833042 +--- !u!114 &114824864212426710 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1451676569574848} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555211353607136} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} m_Name: m_EditorClassIdentifier: BasePixelScale: 2048 - AnchorTransform: {fileID: 4610967451646196} + AnchorTransform: {fileID: 4891684840272184} Scale: {x: 1, y: 1, z: 1} Offset: {x: -500, y: -500, z: 0} OnlyInEditMode: 1 ---- !u!114 &114164912295568314 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1301037372891736} +--- !u!1 &1563572027337304 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4670100275137830} + - component: {fileID: 65613013962320470} + - component: {fileID: 114560737601403782} + - component: {fileID: 4754899564184264502} + m_Layer: 0 + m_Name: Radial (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4670100275137830 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1563572027337304} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.1406, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4062735191839930} + m_Father: {fileID: 4894033903586032} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65613013962320470 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1563572027337304} + m_Material: {fileID: 0} + m_IsTrigger: 0 m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 700, y: 700, z: 500} - OnlyInEditMode: 1 ---- !u!114 &114200093395354822 + serializedVersion: 2 + m_Size: {x: 0.22, y: 0.05, z: 0.025} + m_Center: {x: 0.08, y: 0, z: 0} +--- !u!114 &114560737601403782 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1695999621761422} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1563572027337304} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} @@ -1235,25 +892,25 @@ MonoBehaviour: Dimensions: 2 CanSelect: 1 CanDeselect: 0 - VoiceCommand: Radial Two - RequiresGaze: 0 + VoiceCommand: Radial Three + RequiresFocus: 1 Profiles: - - Target: {fileID: 1842973494018042} + - Target: {fileID: 1301037372891736} Themes: - {fileID: 11400000, guid: 5753d89c205814542ba3fef191dc4682, type: 2} - {fileID: 11400000, guid: 25fd4afc60b411a4899da8c48e287906, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1046143521135576} + - Target: {fileID: 1125011747071552} Themes: - {fileID: 11400000, guid: 6c08928bdf950d54390c1346d23d422b, type: 2} - {fileID: 11400000, guid: cb5abaa7279811d409e5bac06ad02a1f, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1698597023288528} + - Target: {fileID: 1054774868291492} Themes: - {fileID: 11400000, guid: 0eea8a8be0e42494083a2dc52fab717f, type: 2} - {fileID: 11400000, guid: 077f50c510dd803449e2247b7fbe3122, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1555211353607136} + - Target: {fileID: 1285187314504466} Themes: - {fileID: 11400000, guid: c5fe122d2d821434894bbf06f71057d3, type: 2} - {fileID: 11400000, guid: dae413b1fffbbf841ae1176deb55d3c0, type: 2} @@ -1264,12 +921,79 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114214013505314002 +--- !u!114 &4754899564184264502 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1819661643076908} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1563572027337304} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0.08, y: 0, z: -0.0125} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.22, y: 0.05} + touchableCollider: {fileID: 65613013962320470} +--- !u!1 &1695999621761422 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4153068939576982} + - component: {fileID: 65735667765749806} + - component: {fileID: 114200093395354822} + - component: {fileID: 3360437626877041567} + m_Layer: 0 + m_Name: Radial (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4153068939576982 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695999621761422} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.072, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4647876641913000} + m_Father: {fileID: 4894033903586032} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65735667765749806 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695999621761422} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.22, y: 0.05, z: 0.025} + m_Center: {x: 0.08, y: 0, z: 0} +--- !u!114 &114200093395354822 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695999621761422} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} @@ -1286,25 +1010,25 @@ MonoBehaviour: Dimensions: 2 CanSelect: 1 CanDeselect: 0 - VoiceCommand: Radial One - RequiresGaze: 0 + VoiceCommand: Radial Two + RequiresFocus: 1 Profiles: - - Target: {fileID: 1903041749280706} + - Target: {fileID: 1842973494018042} Themes: - {fileID: 11400000, guid: 5753d89c205814542ba3fef191dc4682, type: 2} - {fileID: 11400000, guid: 25fd4afc60b411a4899da8c48e287906, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1036220935859626} + - Target: {fileID: 1046143521135576} Themes: - {fileID: 11400000, guid: 6c08928bdf950d54390c1346d23d422b, type: 2} - {fileID: 11400000, guid: cb5abaa7279811d409e5bac06ad02a1f, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1791457084802870} + - Target: {fileID: 1698597023288528} Themes: - {fileID: 11400000, guid: 0eea8a8be0e42494083a2dc52fab717f, type: 2} - {fileID: 11400000, guid: 077f50c510dd803449e2247b7fbe3122, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1451676569574848} + - Target: {fileID: 1555211353607136} Themes: - {fileID: 11400000, guid: c5fe122d2d821434894bbf06f71057d3, type: 2} - {fileID: 11400000, guid: dae413b1fffbbf841ae1176deb55d3c0, type: 2} @@ -1315,109 +1039,261 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114274573459176476 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1125011747071552} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4417578656984056} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -150, y: -150, z: 0} - OnlyInEditMode: 1 ---- !u!114 &114311822256676912 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1842973494018042} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 700, y: 700, z: 500} - OnlyInEditMode: 1 ---- !u!114 &114437542460993462 +--- !u!114 &3360437626877041567 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1856622667495492} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1695999621761422} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8adeb8b21c6d120408d0aea984f6b26d, type: 3} + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} m_Name: m_EditorClassIdentifier: - ToggleList: - - {fileID: 114214013505314002} - - {fileID: 114200093395354822} - - {fileID: 114560737601403782} - CurrentIndex: 0 - OnSelectionEvents: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &114444584393320186 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1046143521135576} + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0.08, y: 0, z: -0.0125} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.22, y: 0.05} + touchableCollider: {fileID: 65735667765749806} +--- !u!1 &1698597023288528 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4228330118182740} + - component: {fileID: 23786972114772960} + - component: {fileID: 102888677059595956} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4228330118182740 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1698597023288528} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.03150004, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} + m_Children: [] + m_Father: {fileID: 4647876641913000} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23786972114772960 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1698597023288528} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4891684840272184} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -150, y: -150, z: 0} - OnlyInEditMode: 1 ---- !u!114 &114449448570466402 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1036220935859626} + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &102888677059595956 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1698597023288528} + m_Text: RadialButton 2 + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 3 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 42 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4292335575 +--- !u!1 &1791457084802870 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4193987172810734} + - component: {fileID: 23694892559024444} + - component: {fileID: 102355601117475586} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4193987172810734 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1791457084802870} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.03150004, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} + m_Children: [] + m_Father: {fileID: 4432073617162062} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23694892559024444 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1791457084802870} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4610967451646196} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -150, y: -150, z: 0} - OnlyInEditMode: 1 ---- !u!114 &114474189900081526 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1903041749280706} + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &102355601117475586 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1791457084802870} + m_Text: RadialButton 1 + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 3 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 42 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: e48b920555144c6da3ee2ab03f0fda88, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4292335575 +--- !u!1 &1819661643076908 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4204519244856280} + - component: {fileID: 65959922074838590} + - component: {fileID: 114214013505314002} + - component: {fileID: 5855375433444044948} + m_Layer: 0 + m_Name: Radial (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4204519244856280 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819661643076908} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4432073617162062} + m_Father: {fileID: 4894033903586032} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65959922074838590 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819661643076908} + m_Material: {fileID: 0} + m_IsTrigger: 0 m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 700, y: 700, z: 500} - OnlyInEditMode: 1 ---- !u!114 &114560737601403782 + serializedVersion: 2 + m_Size: {x: 0.22, y: 0.05, z: 0.025} + m_Center: {x: 0.08, y: 0, z: 0} +--- !u!114 &114214013505314002 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1563572027337304} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819661643076908} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} @@ -1434,25 +1310,25 @@ MonoBehaviour: Dimensions: 2 CanSelect: 1 CanDeselect: 0 - VoiceCommand: Radial Three - RequiresGaze: 0 + VoiceCommand: Radial One + RequiresFocus: 1 Profiles: - - Target: {fileID: 1301037372891736} + - Target: {fileID: 1903041749280706} Themes: - {fileID: 11400000, guid: 5753d89c205814542ba3fef191dc4682, type: 2} - {fileID: 11400000, guid: 25fd4afc60b411a4899da8c48e287906, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1125011747071552} + - Target: {fileID: 1036220935859626} Themes: - {fileID: 11400000, guid: 6c08928bdf950d54390c1346d23d422b, type: 2} - {fileID: 11400000, guid: cb5abaa7279811d409e5bac06ad02a1f, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1054774868291492} + - Target: {fileID: 1791457084802870} Themes: - {fileID: 11400000, guid: 0eea8a8be0e42494083a2dc52fab717f, type: 2} - {fileID: 11400000, guid: 077f50c510dd803449e2247b7fbe3122, type: 2} HadDefaultTheme: 1 - - Target: {fileID: 1285187314504466} + - Target: {fileID: 1451676569574848} Themes: - {fileID: 11400000, guid: c5fe122d2d821434894bbf06f71057d3, type: 2} - {fileID: 11400000, guid: dae413b1fffbbf841ae1176deb55d3c0, type: 2} @@ -1463,35 +1339,298 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114824864212426710 +--- !u!114 &5855375433444044948 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1555211353607136} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819661643076908} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0.08, y: 0, z: -0.0125} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.22, y: 0.05} + touchableCollider: {fileID: 65959922074838590} +--- !u!1 &1842973494018042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4891684840272184} + - component: {fileID: 33828830408101482} + - component: {fileID: 23561516995102276} + - component: {fileID: 114311822256676912} + m_Layer: 0 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4891684840272184 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1842973494018042} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.005} + m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4647876641913000} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33828830408101482 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1842973494018042} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23561516995102276 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1842973494018042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114311822256676912 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1842973494018042} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} m_Name: m_EditorClassIdentifier: BasePixelScale: 2048 - AnchorTransform: {fileID: 4891684840272184} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -500, y: -500, z: 0} + ItemSize: {x: 700, y: 700, z: 500} OnlyInEditMode: 1 ---- !u!114 &114904851918543228 +--- !u!1 &1856622667495492 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4894033903586032} + - component: {fileID: 114437542460993462} + m_Layer: 0 + m_Name: RadialSet + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4894033903586032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1856622667495492} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4204519244856280} + - {fileID: 4153068939576982} + - {fileID: 4670100275137830} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114437542460993462 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1285187314504466} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1856622667495492} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Script: {fileID: 11500000, guid: 8adeb8b21c6d120408d0aea984f6b26d, type: 3} + m_Name: + m_EditorClassIdentifier: + ToggleList: + - {fileID: 114214013505314002} + - {fileID: 114200093395354822} + - {fileID: 114560737601403782} + CurrentIndex: 0 + OnSelectionEvents: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1902042423272936 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4432073617162062} + m_Layer: 0 + m_Name: ButtonContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4432073617162062 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1902042423272936} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4193987172810734} + - {fileID: 4610967451646196} + - {fileID: 4498792646055616} + - {fileID: 4868521844009230} + m_Father: {fileID: 4204519244856280} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1903041749280706 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4610967451646196} + - component: {fileID: 33630129146270250} + - component: {fileID: 23028649312369616} + - component: {fileID: 114474189900081526} + m_Layer: 0 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4610967451646196 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903041749280706} + m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.005} + m_LocalScale: {x: 0.34179688, y: 0.34179688, z: 0.24414062} + m_Children: [] + m_Father: {fileID: 4432073617162062} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33630129146270250 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903041749280706} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23028649312369616 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903041749280706} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114474189900081526 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903041749280706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} m_Name: m_EditorClassIdentifier: BasePixelScale: 2048 - AnchorTransform: {fileID: 4417578656984056} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: -500, y: -500, z: 0} + ItemSize: {x: 700, y: 700, z: 500} OnlyInEditMode: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab index 473420f5a1f..35fe4f31698 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1850867357197028} - m_IsPrefabParent: 1 --- !u!1 &1154866262212832 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4948195924566534} - component: {fileID: 33709230853127302} @@ -28,164 +18,12 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1184366718457058 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4342218283175970} - - component: {fileID: 33686093196321662} - - component: {fileID: 23107482921913324} - m_Layer: 0 - m_Name: ToggleButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1452929679037900 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4704573713465032} - - component: {fileID: 33009986628730542} - - component: {fileID: 23038249234850652} - m_Layer: 0 - m_Name: ToggleBackground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1491894523937538 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4810659548472064} - - component: {fileID: 23524926626777716} - - component: {fileID: 102895803057417886} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1850867357197028 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4938574377845388} - - component: {fileID: 65620022048249504} - - component: {fileID: 114402419347283100} - m_Layer: 0 - m_Name: Toggle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1935185642534412 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4303610339839266} - m_Layer: 0 - m_Name: ButtonContent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4303610339839266 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1935185642534412} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4810659548472064} - - {fileID: 4704573713465032} - - {fileID: 4342218283175970} - - {fileID: 4948195924566534} - m_Father: {fileID: 4938574377845388} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4342218283175970 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1184366718457058} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.27, y: 0.27, z: 0.27} - m_Children: [] - m_Father: {fileID: 4303610339839266} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4704573713465032 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1452929679037900} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.004999995} - m_LocalScale: {x: 0.28, y: 0.28, z: 0.28} - m_Children: [] - m_Father: {fileID: 4303610339839266} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4810659548472064 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1491894523937538} - m_LocalRotation: {x: -0, y: -0, z: -0, w: -1} - m_LocalPosition: {x: 0.0436, y: 0, z: 0} - m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} - m_Children: [] - m_Father: {fileID: 4303610339839266} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} ---- !u!4 &4938574377845388 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850867357197028} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4303610339839266} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4948195924566534 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1154866262212832} m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.01, y: 0, z: -0.004999995} @@ -194,12 +32,21 @@ Transform: m_Father: {fileID: 4303610339839266} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &23038249234850652 +--- !u!33 &33709230853127302 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154866262212832} + m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23948125221770110 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1452929679037900} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154866262212832} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -208,8 +55,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 970c8a6564852574f9ba8959ffcd47f8, type: 2} + - {fileID: 2100000, guid: 6801601dde9962843aa1336de93505f0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -229,11 +77,52 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!1 &1184366718457058 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4342218283175970} + - component: {fileID: 33686093196321662} + - component: {fileID: 23107482921913324} + m_Layer: 0 + m_Name: ToggleButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4342218283175970 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1184366718457058} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.27, y: 0.27, z: 0.27} + m_Children: [] + m_Father: {fileID: 4303610339839266} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33686093196321662 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1184366718457058} + m_Mesh: {fileID: 4300006, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} --- !u!23 &23107482921913324 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1184366718457058} m_Enabled: 1 m_CastShadows: 1 @@ -243,8 +132,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 471cd2931ade3d147b640131e71d9ad9, type: 2} + - {fileID: 2100000, guid: f40914b49f8741e39df5b08d3db15497, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -264,12 +154,53 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23524926626777716 +--- !u!1 &1452929679037900 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4704573713465032} + - component: {fileID: 33009986628730542} + - component: {fileID: 23038249234850652} + m_Layer: 0 + m_Name: ToggleBackground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4704573713465032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1452929679037900} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.004999995} + m_LocalScale: {x: 0.28, y: 0.28, z: 0.28} + m_Children: [] + m_Father: {fileID: 4303610339839266} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33009986628730542 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1452929679037900} + m_Mesh: {fileID: 4300004, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} +--- !u!23 &23038249234850652 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1491894523937538} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1452929679037900} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -278,8 +209,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + - {fileID: 2100000, guid: a07d81f563d59544fb6ae5588f5bd0be, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -299,12 +231,45 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23948125221770110 +--- !u!1 &1491894523937538 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4810659548472064} + - component: {fileID: 23524926626777716} + - component: {fileID: 102895803057417886} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4810659548472064 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1491894523937538} + m_LocalRotation: {x: -0, y: -0, z: -0, w: -1} + m_LocalPosition: {x: 0.0436, y: 0, z: 0} + m_LocalScale: {x: 0.005, y: 0.0050000036, z: 0.0050000027} + m_Children: [] + m_Father: {fileID: 4303610339839266} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!23 &23524926626777716 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1154866262212832} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1491894523937538} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -313,8 +278,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 02183eecee283e647b4e8660f71bb271, type: 2} + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -334,45 +300,13 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33009986628730542 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1452929679037900} - m_Mesh: {fileID: 4300004, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33686093196321662 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1184366718457058} - m_Mesh: {fileID: 4300006, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!33 &33709230853127302 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1154866262212832} - m_Mesh: {fileID: 4300000, guid: 3d93f7219bba0634a9ee26865f9d6a3c, type: 3} ---- !u!65 &65620022048249504 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1850867357197028} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.18, y: 0.05, z: 0.025} - m_Center: {x: 0.05, y: 0, z: 0} --- !u!102 &102895803057417886 TextMesh: serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1491894523937538} m_Text: Off m_OffsetZ: 0 @@ -388,11 +322,59 @@ TextMesh: m_Color: serializedVersion: 2 rgba: 4292335575 +--- !u!1 &1850867357197028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4938574377845388} + - component: {fileID: 65620022048249504} + - component: {fileID: 114402419347283100} + - component: {fileID: 1565874583813688473} + m_Layer: 0 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4938574377845388 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850867357197028} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4303610339839266} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65620022048249504 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850867357197028} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.18, y: 0.05, z: 0.025} + m_Center: {x: 0.05, y: 0, z: 0} --- !u!114 &114402419347283100 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1850867357197028} m_Enabled: 1 m_EditorHideFlags: 0 @@ -411,7 +393,7 @@ MonoBehaviour: CanSelect: 1 CanDeselect: 1 VoiceCommand: - RequiresGaze: 1 + RequiresFocus: 1 Profiles: - Target: {fileID: 1452929679037900} Themes: @@ -439,3 +421,56 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] +--- !u!114 &1565874583813688473 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1850867357197028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0.05, y: 0, z: -0.0125} + eventsToReceive: 1 + touchableSurface: 0 + bounds: {x: 0.18, y: 0.05} + touchableCollider: {fileID: 65620022048249504} +--- !u!1 &1935185642534412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4303610339839266} + m_Layer: 0 + m_Name: ButtonContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4303610339839266 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1935185642534412} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4810659548472064} + - {fileID: 4704573713465032} + - {fileID: 4342218283175970} + - {fileID: 4948195924566534} + m_Father: {fileID: 4938574377845388} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab.meta index 9011f720c26..438ad10725c 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Toggle.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ce4801a284bc5c3488c631dcdba665df +guid: a0dc4a34875700c4aba845405dc43a89 NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/ToggleButton.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/ToggleButton.prefab index 606a4a39b82..e799a0f5c67 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/ToggleButton.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/ToggleButton.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1881066023246956} - m_IsPrefabParent: 1 --- !u!1 &1058005695581158 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4377713256703586} - component: {fileID: 33548128256994372} @@ -30,12 +20,100 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4377713256703586 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1058005695581158} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.0049} + m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4542459865956834} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33548128256994372 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1058005695581158} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65083823395553856 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1058005695581158} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23702473510938092 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1058005695581158} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114868511504163272 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1058005695581158} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + ItemSize: {x: 420, y: 100, z: 10} + OnlyInEditMode: 0 --- !u!1 &1340827229095316 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4802447016311760} - component: {fileID: 33065436917137698} @@ -49,12 +127,105 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4802447016311760 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1340827229095316} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.10498047, y: 0, z: 0.0049} + m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4542459865956834} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33065436917137698 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1340827229095316} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65875745735313914 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1340827229095316} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23486867518579320 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1340827229095316} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114868299459976492 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1340827229095316} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4377713256703586} + Weight: 10 + Depth: 20 + Alignment: {x: 1, y: 0, z: 0} + PositionOffset: {x: 0, y: 0, z: 0} + AddCorner: 1 + OnlyInEditMode: 0 --- !u!1 &1353471469579004 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4394170382473808} - component: {fileID: 33203352155991174} @@ -68,12 +239,105 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4394170382473808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1353471469579004} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.10498047, y: 0, z: 0.0049} + m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4542459865956834} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33203352155991174 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1353471469579004} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65752405886479572 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1353471469579004} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23218699004104790 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1353471469579004} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114979487542106970 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1353471469579004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4377713256703586} + Weight: 10 + Depth: 20 + Alignment: {x: -1, y: 0, z: 0} + PositionOffset: {x: 0, y: 0, z: 0} + AddCorner: 1 + OnlyInEditMode: 0 --- !u!1 &1654755775890460 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4429849564245046} m_Layer: 0 @@ -83,12 +347,30 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &4429849564245046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1654755775890460} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4810821566980424} + - {fileID: 4252580368580698} + - {fileID: 4542459865956834} + m_Father: {fileID: 4582855949261192} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1701243716490594 GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4226397729588416} - component: {fileID: 33657061140847094} @@ -102,111 +384,12 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &1731322542945762 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4252580368580698} - - component: {fileID: 33538324146524724} - - component: {fileID: 65954402972278744} - - component: {fileID: 23310066986799668} - - component: {fileID: 114602454650795392} - m_Layer: 0 - m_Name: FrontPlate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1835907919169782 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4810821566980424} - - component: {fileID: 23329857144203482} - - component: {fileID: 102859053046776500} - m_Layer: 0 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1881066023246956 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4582855949261192} - - component: {fileID: 65451765068380320} - - component: {fileID: 114718788154663760} - m_Layer: 0 - m_Name: ToggleButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1915336767748402 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4179942201169962} - - component: {fileID: 33113373532832408} - - component: {fileID: 65602222999254052} - - component: {fileID: 23917807693897754} - - component: {fileID: 114382749481769538} - m_Layer: 0 - m_Name: Top - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &1968190776631966 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 - m_Component: - - component: {fileID: 4542459865956834} - m_Layer: 0 - m_Name: Borders - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4179942201169962 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1915336767748402} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.026855469, z: 0.0049} - m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4542459865956834} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4226397729588416 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1701243716490594} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: -0.026855469, z: 0.0049} @@ -215,229 +398,33 @@ Transform: m_Father: {fileID: 4542459865956834} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4252580368580698 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1731322542945762} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4429849564245046} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4377713256703586 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1058005695581158} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.0049} - m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} - m_Children: [] - m_Father: {fileID: 4542459865956834} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4394170382473808 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1353471469579004} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.10498047, y: 0, z: 0.0049} - m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4542459865956834} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4429849564245046 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1654755775890460} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4810821566980424} - - {fileID: 4252580368580698} - - {fileID: 4542459865956834} - m_Father: {fileID: 4582855949261192} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4542459865956834 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1968190776631966} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4377713256703586} - - {fileID: 4394170382473808} - - {fileID: 4802447016311760} - - {fileID: 4179942201169962} - - {fileID: 4226397729588416} - m_Father: {fileID: 4429849564245046} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4582855949261192 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1881066023246956} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 4429849564245046} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4802447016311760 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1340827229095316} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.10498047, y: 0, z: 0.0049} - m_LocalScale: {x: 0.0048828125, y: 0.05859375, z: 0.009765625} - m_Children: [] - m_Father: {fileID: 4542459865956834} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &4810821566980424 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1835907919169782} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.003, z: -0.003} - m_LocalScale: {x: 0.005, y: 0.005000004, z: 0.005000003} - m_Children: [] - m_Father: {fileID: 4429849564245046} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!23 &23218699004104790 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1353471469579004} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23310066986799668 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1731322542945762} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 3b3d487d6722afe489a882284f787bbd, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23329857144203482 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1835907919169782} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 +--- !u!33 &33657061140847094 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701243716490594} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65604673904555102 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701243716490594} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!23 &23441028186990814 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1701243716490594} m_Enabled: 1 m_CastShadows: 1 @@ -447,6 +434,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} m_StaticBatchInfo: @@ -468,82 +456,88 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!23 &23486867518579320 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1340827229095316} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23702473510938092 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1058005695581158} +--- !u!114 &114115885122573574 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701243716490594} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!23 &23917807693897754 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4377713256703586} + Weight: 10 + Depth: 20 + Alignment: {x: 0, y: -1, z: 0} + PositionOffset: {x: 0, y: 0, z: 0} + AddCorner: 1 + OnlyInEditMode: 0 +--- !u!1 &1731322542945762 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4252580368580698} + - component: {fileID: 33538324146524724} + - component: {fileID: 65954402972278744} + - component: {fileID: 23310066986799668} + - component: {fileID: 114602454650795392} + m_Layer: 0 + m_Name: FrontPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4252580368580698 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731322542945762} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.20507812, y: 0.048828125, z: 0.0048828125} + m_Children: [] + m_Father: {fileID: 4429849564245046} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33538324146524724 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731322542945762} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65954402972278744 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731322542945762} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23310066986799668 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1915336767748402} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731322542945762} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -552,8 +546,9 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + - {fileID: 2100000, guid: 3b3d487d6722afe489a882284f787bbd, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -573,138 +568,99 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33065436917137698 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1340827229095316} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33113373532832408 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1915336767748402} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33203352155991174 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1353471469579004} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33538324146524724 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} +--- !u!114 &114602454650795392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1731322542945762} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33548128256994372 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1058005695581158} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &33657061140847094 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1701243716490594} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &65083823395553856 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1058005695581158} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65451765068380320 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1881066023246956} - m_Material: {fileID: 0} - m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 0.22007813, y: 0.063828126, z: 0.024882812} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65602222999254052 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1915336767748402} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65604673904555102 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1701243716490594} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65752405886479572 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1353471469579004} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65875745735313914 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1340827229095316} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!65 &65954402972278744 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1731322542945762} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} + m_Name: + m_EditorClassIdentifier: + BasePixelScale: 2048 + AnchorTransform: {fileID: 4377713256703586} + Scale: {x: 1, y: 1, z: 1} + Offset: {x: 0, y: 0, z: 0} + OnlyInEditMode: 0 +--- !u!1 &1835907919169782 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4810821566980424} + - component: {fileID: 23329857144203482} + - component: {fileID: 102859053046776500} + m_Layer: 0 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4810821566980424 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1835907919169782} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.003, z: -0.003} + m_LocalScale: {x: 0.005, y: 0.005000004, z: 0.005000003} + m_Children: [] + m_Father: {fileID: 4429849564245046} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!23 &23329857144203482 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1835907919169782} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 27e8d7c95f97434681887029d5c7a928, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 --- !u!102 &102859053046776500 TextMesh: serializedVersion: 3 - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1835907919169782} m_Text: Toggle Button m_OffsetZ: 0 @@ -720,65 +676,59 @@ TextMesh: m_Color: serializedVersion: 2 rgba: 4294967295 ---- !u!114 &114115885122573574 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1701243716490594} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4377713256703586} - Weight: 10 - Depth: 20 - Alignment: {x: 0, y: -1, z: 0} - PositionOffset: {x: 0, y: 0, z: 0} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114382749481769538 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1915336767748402} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4377713256703586} - Weight: 10 - Depth: 20 - Alignment: {x: 0, y: 1, z: 0} - PositionOffset: {x: 0, y: 0, z: 0} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114602454650795392 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1731322542945762} +--- !u!1 &1881066023246956 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4582855949261192} + - component: {fileID: 65451765068380320} + - component: {fileID: 114718788154663760} + - component: {fileID: 1098841493691872912} + m_Layer: 0 + m_Name: ToggleButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4582855949261192 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881066023246956} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4429849564245046} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &65451765068380320 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881066023246956} + m_Material: {fileID: 0} + m_IsTrigger: 0 m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b7450a7c8dc3a5f4bb0bab1dc83c3354, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4377713256703586} - Scale: {x: 1, y: 1, z: 1} - Offset: {x: 0, y: 0, z: 0} - OnlyInEditMode: 0 + serializedVersion: 2 + m_Size: {x: 0.22007813, y: 0.063828126, z: 0.024882812} + m_Center: {x: 0, y: 0, z: 0} --- !u!114 &114718788154663760 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1881066023246956} m_Enabled: 1 m_EditorHideFlags: 0 @@ -797,7 +747,7 @@ MonoBehaviour: CanSelect: 1 CanDeselect: 1 VoiceCommand: - RequiresGaze: 1 + RequiresFocus: 1 Profiles: - Target: {fileID: 1731322542945762} Themes: @@ -820,45 +770,124 @@ MonoBehaviour: m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Events: [] ---- !u!114 &114868299459976492 +--- !u!114 &1098841493691872912 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1340827229095316} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1881066023246956} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} m_Name: m_EditorClassIdentifier: - BasePixelScale: 2048 - AnchorTransform: {fileID: 4377713256703586} - Weight: 10 - Depth: 20 - Alignment: {x: 1, y: 0, z: 0} - PositionOffset: {x: 0, y: 0, z: 0} - AddCorner: 1 - OnlyInEditMode: 0 ---- !u!114 &114868511504163272 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1058005695581158} + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.012441406} + eventsToReceive: 0 + touchableSurface: 0 + bounds: {x: 0.22007813, y: 0.063828126} + touchableCollider: {fileID: 65451765068380320} +--- !u!1 &1915336767748402 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4179942201169962} + - component: {fileID: 33113373532832408} + - component: {fileID: 65602222999254052} + - component: {fileID: 23917807693897754} + - component: {fileID: 114382749481769538} + m_Layer: 0 + m_Name: Top + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4179942201169962 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915336767748402} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.026855469, z: 0.0049} + m_LocalScale: {x: 0.21484375, y: 0.0048828125, z: 0.009765625} + m_Children: [] + m_Father: {fileID: 4542459865956834} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33113373532832408 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915336767748402} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &65602222999254052 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915336767748402} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &23917807693897754 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915336767748402} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18715f9b6e2e86c42902a892a35010dc, type: 3} - m_Name: - m_EditorClassIdentifier: - BasePixelScale: 2048 - ItemSize: {x: 420, y: 100, z: 10} - OnlyInEditMode: 0 ---- !u!114 &114979487542106970 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b861d27e49afd724286961e0f6a1de52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &114382749481769538 MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1353471469579004} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915336767748402} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e284c41c72ed62145b1ae10cfedd1196, type: 3} @@ -868,7 +897,42 @@ MonoBehaviour: AnchorTransform: {fileID: 4377713256703586} Weight: 10 Depth: 20 - Alignment: {x: -1, y: 0, z: 0} + Alignment: {x: 0, y: 1, z: 0} PositionOffset: {x: 0, y: 0, z: 0} AddCorner: 1 OnlyInEditMode: 0 +--- !u!1 &1968190776631966 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4542459865956834} + m_Layer: 0 + m_Name: Borders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4542459865956834 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1968190776631966} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4377713256703586} + - {fileID: 4394170382473808} + - {fileID: 4802447016311760} + - {fileID: 4179942201169962} + - {fileID: 4226397729588416} + m_Father: {fileID: 4429849564245046} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs index befdca5b272..3d9dde83854 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs @@ -26,7 +26,6 @@ public class Interactable : MonoBehaviour, IMixedRealityFocusChangedHandler, IMixedRealityFocusHandler, - IMixedRealityInputHandler, IMixedRealityPointerHandler, IMixedRealitySpeechHandler, IMixedRealityTouchHandler @@ -35,7 +34,17 @@ public class Interactable : /// Setup the input system /// private static IMixedRealityInputSystem inputSystem = null; - protected static IMixedRealityInputSystem InputSystem => inputSystem ?? (inputSystem = MixedRealityToolkit.Instance.GetService()); + protected static IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } // list of pointers protected List pointers = new List(); @@ -74,7 +83,7 @@ public class Interactable : // list of profiles can match themes with gameObjects public List Profiles = new List(); // Base onclick event - public UnityEvent OnClick; + public UnityEvent OnClick = new UnityEvent(); // list of events added to this interactable public List Events = new List(); // the list of running theme instances to receive state changes @@ -155,7 +164,7 @@ public static bool TryGetInputActions(out string[] descriptionsArray) return false; } - MixedRealityInputAction[] actions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + MixedRealityInputAction[] actions = InputSystem.InputSystemProfile.InputActionsProfile.InputActions; descriptionsArray = new string[actions.Length]; for (int i = 0; i < actions.Length; i++) @@ -181,11 +190,15 @@ public State[] GetStates() } #endregion InspectorHelpers - #region MonoBehaviorImplimentation + #region MonoBehaviorImplementation protected virtual void Awake() { - //State = new InteractableStates(InteractableStates.Default); + + if (States == null) + { + States = States.GetDefaultInteractableStates(); + } InputAction = ResolveInputAction(InputActionId); SetupEvents(); SetupThemes(); @@ -680,66 +693,6 @@ protected void StartInputTimer(bool isInput = false) #region MixedRealityInputHandlers - /// - /// Used for click events for actions not processed by pointer events - /// - /// - public void OnInputUp(InputEventData eventData) - { - // check global and focus - if (!CanInteract()) - { - return; - } - - if (StateManager != null) - { - // check if the InputAction matches - and - if the pointer event did not fire first or is handling these actions, - if (eventData != null && ShouldListen(eventData.MixedRealityInputAction) && inputTimer != null && (eventData.MixedRealityInputAction != pointerInputAction || pointerInputAction == MixedRealityInputAction.None)) - { - if (GlobalClickOrder[0] == 0) - { - GlobalClickOrder[1] = 1; - } - StopCoroutine(inputTimer); - inputTimer = null; - SetPress(false); - - IncreaseDimensionIndex(); - SendOnClick(null); - SetVisited(true); - - eventData.Use(); - } - } - } - - /// - /// Used to handle global events really, using pointer events for most things - /// - /// - public void OnInputDown(InputEventData eventData) - { - if (!CanInteract()) - { - return; - } - - if (StateManager != null) - { - if (eventData != null && ShouldListen(eventData.MixedRealityInputAction) && (eventData.MixedRealityInputAction != pointerInputAction || pointerInputAction == MixedRealityInputAction.None)) - { - StartInputTimer(true); - SetPress(true); - eventData.Use(); - } - } - } - - public void OnInputPressed(InputEventData eventData) - { - } - public void OnPositionInputChanged(InputEventData eventData) { // ignore @@ -837,7 +790,7 @@ protected void IncreaseDimensionIndex() /// public static MixedRealityInputAction ResolveInputAction(int index) { - MixedRealityInputAction[] actions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + MixedRealityInputAction[] actions = InputSystem.InputSystemProfile.InputActionsProfile.InputActions; index = Mathf.Clamp(index, 0, actions.Length - 1); return actions[index]; } @@ -1050,6 +1003,7 @@ protected int GetVoiceCommandIndex(string command) #endregion VoiceCommands + #region IMixedRealityTouchHandler void IMixedRealityTouchHandler.OnTouchStarted(HandTrackingInputEventData eventData) { SetPress(true); @@ -1063,5 +1017,6 @@ void IMixedRealityTouchHandler.OnTouchCompleted(HandTrackingInputEventData event } void IMixedRealityTouchHandler.OnTouchUpdated(HandTrackingInputEventData eventData) { } + #endregion } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/InteractableToggleCollection.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/InteractableToggleCollection.cs index 420e0a988b2..e21ea6d1b96 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/InteractableToggleCollection.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/InteractableToggleCollection.cs @@ -45,7 +45,7 @@ public void SetSelection(int index) return; } - ToggleList[index].OnPointerClicked(null); + OnSelection(index, true); } /// diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStateModel.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStateModel.cs index dc60d563911..4c09af693b9 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStateModel.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStateModel.cs @@ -8,18 +8,6 @@ namespace Microsoft.MixedReality.Toolkit.UI /// /// State data model, state management and comparison instructions /// - - /* - * Have an enum with all the button states - - * Create a list using the enums as the state type - - * Setup the bit and index automatically - - * Store the values for all the states - - * Have a sub state with only the states we care about - - * On update, set those states and update the current state - * The other states can be checked anytime through the Interactive. - * - */ - [System.Serializable] public class State { @@ -120,6 +108,10 @@ public State GetState(int index) return new State(); } + public InteractableStateModel() + { + } + public InteractableStateModel(State defaultState) { currentState = defaultState; diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStates.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStates.cs index fef2bfc1fd8..3c106442c82 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStates.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/InteractableStates.cs @@ -2,6 +2,8 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. +using System.Collections.Generic; + namespace Microsoft.MixedReality.Toolkit.UI { /// @@ -96,6 +98,12 @@ public enum InteractableStateEnum new State(){ Index = 13, Name = "Custom", ActiveIndex = -1, Bit = 0, Value = 0} }; + public InteractableStates() + { + base.allStates = allStates; + currentState = allStates[0]; + } + public InteractableStates(State defaultState) : base(defaultState) { base.allStates = allStates; @@ -144,5 +152,22 @@ public override State[] GetStates() { return stateList.ToArray(); } + + /// + /// Returns the default states for InteractableStates. + /// Default states are set on an interactable when it is created and no other list of + /// states is specified. + /// Default States should match "DefaultStates" scriptable object in Interactable + /// + /// + public virtual List GetDefaultStates() + { + List result = new List(); + result.Add(GetState(InteractableStateEnum.Default)); + result.Add(GetState(InteractableStateEnum.Focus)); + result.Add(GetState(InteractableStateEnum.Pressed)); + result.Add(GetState(InteractableStateEnum.Disabled)); + return result; + } } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/States.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/States.cs index c78db40b195..98ae5636771 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/States.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/States/States.cs @@ -23,12 +23,25 @@ public class States : ScriptableObject /// private static readonly List candidateStateTypes = new List() { typeof(InteractableStates) }; + public static States GetDefaultInteractableStates() + { + States result = new States(); + + InteractableStates allInteractableStates = new InteractableStates(); + + result.StateType = Type.GetType(typeof(InteractableStates).AssemblyQualifiedName); + result.StateOptions = InteractableTypeFinder.Find(candidateStateTypes, TypeRestriction.AllowBase); + result.StateList = allInteractableStates.GetDefaultStates(); + result.DefaultIndex = 0; + return result; + } + //!!! finish making states work, they should initiate the type and run the logic during play mode. private void OnEnable() { SetupStateOptions(); } - + public State[] GetStates() { return StateList.ToArray(); @@ -50,7 +63,7 @@ public InteractableStates SetupLogic() stateListCopy.Add(state); } stateLogic.ImportStates(stateListCopy); - + return stateLogic; } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Themes/InteractableThemeShaderUtils.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Themes/InteractableThemeShaderUtils.cs index a8aa9864868..ade1e5fc352 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Themes/InteractableThemeShaderUtils.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Themes/InteractableThemeShaderUtils.cs @@ -97,7 +97,9 @@ public static MaterialPropertyBlock GetPropertyBlock(GameObject gameObject) } /// - /// Grab a valid Material from an object, if in the editor, use the shared material + /// Grab the shared material to avoid creating new material instances and breaking batching. + /// Because MaterialPropertyBlocks are used for setting material properties the shared material is + /// used to set the initial state of the MaterialPropertyBlock(s) before mutating state. /// /// /// @@ -107,18 +109,7 @@ public static Material GetValidMaterial(Renderer renderer) if (renderer != null) { -#if UNITY_EDITOR - if (!Application.isPlaying) - { - material = renderer.sharedMaterial; - } - else - { - material = renderer.material; - } -#else - material = renderer.material; -#endif + material = renderer.sharedMaterial; } return material; } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/DefaultInteractableStates.asset b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/DefaultInteractableStates.asset index ffd245c1b7d..97a6bee5244 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/DefaultInteractableStates.asset +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/DefaultInteractableStates.asset @@ -3,8 +3,9 @@ --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 @@ -33,8 +34,5 @@ MonoBehaviour: Value: 0 ActiveIndex: 3 DefaultIndex: 0 - StateOptions: - - InteractableStates StateLogicName: InteractableStates - AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableStates, - Microsoft.MixedReality.Toolkit.SDK + AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableStates, Microsoft.MixedReality.Toolkit.SDK diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/HoloLensInteractableStates.asset b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/HoloLensInteractableStates.asset index a385d5218a2..cd25c9bb509 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/HoloLensInteractableStates.asset +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/States/HoloLensInteractableStates.asset @@ -3,8 +3,9 @@ --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 @@ -43,8 +44,5 @@ MonoBehaviour: Value: 0 ActiveIndex: 5 DefaultIndex: 0 - StateOptions: - - InteractableStates StateLogicName: InteractableStates - AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableStates, - Microsoft.MixedReality.Toolkit.SDK \ No newline at end of file + AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableStates, Microsoft.MixedReality.Toolkit.SDK diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Textures/Iridescent_spectrum.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/StandardAssets/Textures/Iridescent_spectrum.png rename to Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum.png diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Textures/Iridescent_spectrum.png.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/StandardAssets/Textures/Iridescent_spectrum.png.meta rename to Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum.png.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Textures/Iridescent_spectrum.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum_rainbow.png similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Textures/Iridescent_spectrum.png rename to Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum_rainbow.png diff --git a/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Textures/Iridescent_spectrum.png.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum_rainbow.png.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Textures/Iridescent_spectrum.png.meta rename to Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Textures/Iridescent_spectrum_rainbow.png.meta diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBox.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBox.mat index da1e533d7b0..dde50f399bf 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBox.mat +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBox.mat @@ -9,11 +9,10 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: BoundingBox m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _ALPHABLEND_ON _BORDER_LIGHT_USES_HOVER_COLOR _DISABLE_ALBEDO_MAP - _HOVER_LIGHT _INNER_GLOW _NEAR_PLANE_FADE _NEAR_PLANE_FADE_REVERSE _NEAR_LIGHT_FADE - _PROXIMITY_LIGHT + m_ShaderKeywords: _ALPHABLEND_ON _BORDER_LIGHT _BORDER_LIGHT_USES_HOVER_COLOR _DISABLE_ALBEDO_MAP + _HOVER_LIGHT _NEAR_LIGHT_FADE _NEAR_PLANE_FADE _NEAR_PLANE_FADE_REVERSE _PROXIMITY_LIGHT m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: @@ -42,13 +41,13 @@ Material: - _AlbedoAlphaMode: 0 - _AlbedoAssignedAtRuntime: 0 - _BlendOp: 0 - - _BorderLight: 0 + - _BorderLight: 1 - _BorderLightOpaque: 0 - _BorderLightOpaqueAlpha: 1 - _BorderLightReplacesAlbedo: 0 - _BorderLightUsesHoverColor: 1 - - _BorderMinValue: 0.1 - - _BorderWidth: 0.1 + - _BorderMinValue: 1 + - _BorderWidth: 0.016 - _ClippingBorder: 0 - _ClippingBorderWidth: 0.025 - _ClippingBox: 0 @@ -71,12 +70,13 @@ Material: - _EnvironmentColorIntensity: 0.5 - _EnvironmentColorThreshold: 1.5 - _EnvironmentColoring: 0 - - _FadeBeginDistance: 0.1 - - _FadeCompleteDistance: 0.25 + - _FadeBeginDistance: 0.01 + - _FadeCompleteDistance: 0.18 + - _FadeMinValue: 0 - _HoverLight: 1 - _HoverLightOpaque: 0 - - _InnerGlow: 1 - - _InnerGlowPower: 18 + - _InnerGlow: 0 + - _InnerGlowPower: 14.8 - _InstancedColor: 0 - _Iridescence: 0 - _IridescenceAngle: -0.78 @@ -109,6 +109,10 @@ Material: - _StencilReference: 0 - _TriplanarMappingBlendSharpness: 4 - _VertexColors: 0 + - _VertexExtrusion: 0 + - _VertexExtrusionValue: 0 + - _ZOffsetFactor: 0 + - _ZOffsetUnits: 0 - _ZTest: 4 - _ZWrite: 0 m_Colors: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBoxGrabbed.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBoxGrabbed.mat index 774cb22c802..8ca0e17aeb5 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBoxGrabbed.mat +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Materials/BoundingBoxGrabbed.mat @@ -43,10 +43,11 @@ Material: - _BlendOp: 0 - _BorderLight: 1 - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 - _BorderLightReplacesAlbedo: 0 - _BorderLightUsesHoverColor: 1 - _BorderMinValue: 1 - - _BorderWidth: 0.025 + - _BorderWidth: 0.015 - _ClippingBorder: 0 - _ClippingBorderWidth: 0.025 - _ClippingBox: 0 @@ -58,7 +59,7 @@ Material: - _Cutoff: 0.5 - _DirectionalLight: 0 - _DstBlend: 1 - - _EdgeSmoothingValue: 0.0001 + - _EdgeSmoothingValue: 0.002 - _EnableChannelMap: 0 - _EnableEmission: 0 - _EnableHoverColorOpaqueOverride: 0 @@ -71,10 +72,11 @@ Material: - _EnvironmentColoring: 0 - _FadeBeginDistance: 0.5 - _FadeCompleteDistance: 2 + - _FadeMinValue: 0 - _HoverLight: 1 - _HoverLightOpaque: 0 - _InnerGlow: 0 - - _InnerGlowPower: 23.1 + - _InnerGlowPower: 9.4 - _InstancedColor: 0 - _Iridescence: 0 - _IridescenceAngle: -0.78 @@ -82,10 +84,12 @@ Material: - _IridescenceThreshold: 0.05 - _Metallic: 0 - _Mode: 4 + - _NearLightFade: 0 - _NearPlaneFade: 0 - _NearPlaneFadeReverse: 1 - _NormalMapScale: 1 - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 - _Reflections: 0 - _Refraction: 0 - _RefractiveIndex: 0 @@ -105,6 +109,10 @@ Material: - _StencilReference: 0 - _TriplanarMappingBlendSharpness: 4 - _VertexColors: 0 + - _VertexExtrusion: 0 + - _VertexExtrusionValue: 0 + - _ZOffsetFactor: 0 + - _ZOffsetUnits: 0 - _ZTest: 4 - _ZWrite: 0 m_Colors: @@ -115,6 +123,6 @@ Material: - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - - _HoverColorOverride: {r: 0, g: 0.4082811, b: 1, a: 1} + - _HoverColorOverride: {r: 0, g: 0.5595665, b: 1, a: 1} - _InnerGlowColor: {r: 0, g: 0.45917034, b: 1, a: 1} - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab index 53b66a89822..cdc73915169 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab @@ -41,7 +41,7 @@ MonoBehaviour: m_GameObject: {fileID: 1275815092924048} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 80c870726057bb743b9c4f8faa604b98, type: 3} + m_Script: {fileID: 11500000, guid: d69b1d008a22b774b89e04ac11b7d79b, type: 3} m_Name: m_EditorClassIdentifier: boundingBox: {fileID: 0} @@ -584,7 +584,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &3260291378581300121 @@ -1030,7 +1030,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &5875670466145020634 stripped @@ -1462,7 +1462,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &5875670467141923854 stripped @@ -1925,7 +1925,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: --- !u!82 &5875670468132926569 stripped @@ -2481,7 +2481,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: --- !u!4 &3260291379582806076 stripped diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab.meta index 7b9c3c72b91..283c1fa37db 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: aa610ada334bff640a535f0d23a9a15c +guid: 83c02591e2867124181bcd3bcb65e288 timeCreated: 1519284601 licenseType: Free NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/PressableButtonAppBar.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/PressableButtonAppBar.prefab index c9b3311cb9e..77cd73a44f9 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/PressableButtonAppBar.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/PressableButtonAppBar.prefab @@ -9,7 +9,7 @@ MonoBehaviour: m_GameObject: {fileID: 8985933138729378366} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb66df91526e2034e94cac3868625598, type: 3} + m_Script: {fileID: 11500000, guid: aca87582bbf9b0d4cba5ddbd5c31055d, type: 3} m_Name: m_EditorClassIdentifier: button: {fileID: 8985933138729378337} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader.meta similarity index 77% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures.meta rename to Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader.meta index 27ceafac9e0..b6cf9ad8f8d 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 71e0da08f928ae5499ad8c6b31d3add3 +guid: 7f3dcf209068f224bb8d4a88407e916f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab new file mode 100644 index 00000000000..02d550452fb --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab @@ -0,0 +1,514 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5300938422787319101 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5303500797416939619} + - component: {fileID: 5324364718848989251} + - component: {fileID: 5315655372490099409} + - component: {fileID: 5221410113753897139} + m_Layer: 0 + m_Name: DotA01 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5303500797416939619 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300938422787319101} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 5303244268216408365} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5324364718848989251 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300938422787319101} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5315655372490099409 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300938422787319101} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8f2fb2809320347428c67ea7c78ef4c5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &5221410113753897139 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300938422787319101} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5300947753590287601 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5302999880818760101} + - component: {fileID: 5327353420954928511} + - component: {fileID: 5314842576326223705} + - component: {fileID: 5221682478766375259} + m_Layer: 0 + m_Name: DotB02 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5302999880818760101 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300947753590287601} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} + m_Children: [] + m_Father: {fileID: 5297971052918311827} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5327353420954928511 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300947753590287601} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5314842576326223705 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300947753590287601} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8f2fb2809320347428c67ea7c78ef4c5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &5221682478766375259 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5300947753590287601} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5301300862202498753 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5303080464073729427} + - component: {fileID: 5323366939570646375} + - component: {fileID: 5315495018063561149} + - component: {fileID: 5220819096802989653} + m_Layer: 0 + m_Name: DotB01 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5303080464073729427 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301300862202498753} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 5297971052918311827} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5323366939570646375 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301300862202498753} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5315495018063561149 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301300862202498753} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8f2fb2809320347428c67ea7c78ef4c5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &5220819096802989653 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301300862202498753} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5301351100929939167 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5303487442624465837} + m_Layer: 0 + m_Name: IndeterminateLoader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5303487442624465837 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301351100929939167} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5303244268216408365} + - {fileID: 5297971052918311827} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5301465178092818439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5297971052918311827} + - component: {fileID: 5188397032688346245} + m_Layer: 0 + m_Name: GroupB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5297971052918311827 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301465178092818439} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5303080464073729427} + - {fileID: 5302999880818760101} + m_Father: {fileID: 5303487442624465837} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5188397032688346245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301465178092818439} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 667b8706f1f4d84458d01b20e174e2a4, type: 3} + m_Name: + m_EditorClassIdentifier: + amplitude: 0.022 + frequency: 2.78 + dotOffset: 0.022 + dotSetScale: 0.022 + lFOsin: 0 + lFOcos: 0 + lFOfreq: 1 + lFOamp: 0.1 + reverseOrbit: 1 + invertOrbitOffset: 0 + dotSpinMultiplier: -0.36 + dotScaleMultipler: 0.008 + sinCosSplitScale: 1 +--- !u!1 &5301649066244700767 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5297966474681864155} + - component: {fileID: 5323397673886633339} + - component: {fileID: 5315575630581461019} + - component: {fileID: 5221393003217425909} + m_Layer: 0 + m_Name: DotA02 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5297966474681864155 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301649066244700767} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} + m_Children: [] + m_Father: {fileID: 5303244268216408365} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5323397673886633339 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301649066244700767} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5315575630581461019 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301649066244700767} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8f2fb2809320347428c67ea7c78ef4c5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &5221393003217425909 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5301649066244700767} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5302221732004095925 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5303244268216408365} + - component: {fileID: 5189220325548495855} + m_Layer: 0 + m_Name: GroupA + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5303244268216408365 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5302221732004095925} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5303500797416939619} + - {fileID: 5297966474681864155} + m_Father: {fileID: 5303487442624465837} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5189220325548495855 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5302221732004095925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 667b8706f1f4d84458d01b20e174e2a4, type: 3} + m_Name: + m_EditorClassIdentifier: + amplitude: 0.022 + frequency: 2.78 + dotOffset: 0.022 + dotSetScale: 0.022 + lFOsin: 0 + lFOcos: 0 + lFOfreq: 1 + lFOamp: 0.1 + reverseOrbit: 0 + invertOrbitOffset: 0 + dotSpinMultiplier: 0.36 + dotScaleMultipler: 0.008 + sinCosSplitScale: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab.meta new file mode 100644 index 00000000000..5300a1d93ad --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Loader/IndeterminateLoader.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9c4ddc0ec93e1df449e9984dca497355 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers/MousePointer.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers/MousePointer.prefab index 493645b055f..6854bbc153a 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers/MousePointer.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers/MousePointer.prefab @@ -52,7 +52,7 @@ MonoBehaviour: axisConstraint: 4 cursorPrefab: {fileID: 1151083198953756, guid: 667821d88830305449757690d22f71e0, type: 3} - disableCursorOnStart: 1 + disableCursorOnStart: 0 setCursorVisibilityOnSourceDetected: 0 raycastOrigin: {fileID: 0} activeHoldAction: @@ -69,7 +69,7 @@ MonoBehaviour: pointerExtent: 10 defaultPointerExtent: 10 sphereCastRadius: 0.1 - pointerOrientation: 0 hideCursorWhenInactive: 1 movementThresholdToUnHide: 0.5 hideTimeout: 3 + speed: 3.38 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Bezier ToolTip.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Bezier ToolTip.prefab index 58b067316e2..d95de1619a7 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Bezier ToolTip.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Bezier ToolTip.prefab @@ -80,7 +80,7 @@ MonoBehaviour: m_GameObject: {fileID: 4014241828956980662} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23a70f6672029144c8d4c44a6fb6b213, type: 3} + m_Script: {fileID: 11500000, guid: 85b0e186e2c82324b83f3696c29cf697, type: 3} m_Name: m_EditorClassIdentifier: showBackground: 1 @@ -110,7 +110,7 @@ MonoBehaviour: m_GameObject: {fileID: 4014241828956980662} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95fc46e61b058e54ab022d6f28b0ec6c, type: 3} + m_Script: {fileID: 11500000, guid: 60e108b635a73db40a8d3c02d87c249f, type: 3} m_Name: m_EditorClassIdentifier: target: {fileID: 0} @@ -131,7 +131,7 @@ MonoBehaviour: m_GameObject: {fileID: 4014241828956980662} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c83ed6c999201214ea3faae09b7325a8, type: 3} + m_Script: {fileID: 11500000, guid: a86b28bfea793ef4ea0e3956e5ba03a9, type: 3} m_Name: m_EditorClassIdentifier: backgroundTransform: {fileID: 2678580519635420171} @@ -176,6 +176,7 @@ MonoBehaviour: - {x: 0, y: 1, z: 0} velocitySearchRange: 0.02 distorters: [] + distortionEnabled: 1 distortionMode: 0 distortionStrength: serializedVersion: 2 @@ -515,7 +516,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 151c96065fff785478dd7e3d33953d55, type: 2} + - {fileID: 2100000, guid: bf8139ce01f74164bb3003ed8a498e41, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -562,6 +563,7 @@ MonoBehaviour: - {x: 0, y: 1, z: 0} velocitySearchRange: 0.02 distorters: [] + distortionEnabled: 1 distortionMode: 0 distortionStrength: serializedVersion: 2 @@ -880,7 +882,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + - {fileID: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -938,8 +940,9 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_text: Tooltip Text m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 11400000, guid: afc8299d5d5bbd440a0616c8ecbc7217, type: 2} + m_sharedMaterial: {fileID: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, + type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Constrained Parabola Tooltip.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Constrained Parabola Tooltip.prefab index 1a007eb2068..f268987af03 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Constrained Parabola Tooltip.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Constrained Parabola Tooltip.prefab @@ -141,7 +141,7 @@ MonoBehaviour: m_GameObject: {fileID: 1439306413935240} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23a70f6672029144c8d4c44a6fb6b213, type: 3} + m_Script: {fileID: 11500000, guid: 85b0e186e2c82324b83f3696c29cf697, type: 3} m_Name: m_EditorClassIdentifier: showBackground: 1 @@ -170,7 +170,7 @@ MonoBehaviour: m_GameObject: {fileID: 1439306413935240} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95fc46e61b058e54ab022d6f28b0ec6c, type: 3} + m_Script: {fileID: 11500000, guid: 60e108b635a73db40a8d3c02d87c249f, type: 3} m_Name: m_EditorClassIdentifier: target: {fileID: 0} @@ -191,7 +191,7 @@ MonoBehaviour: m_GameObject: {fileID: 1439306413935240} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c83ed6c999201214ea3faae09b7325a8, type: 3} + m_Script: {fileID: 11500000, guid: a86b28bfea793ef4ea0e3956e5ba03a9, type: 3} m_Name: m_EditorClassIdentifier: backgroundTransform: {fileID: 4104249324394746} @@ -550,7 +550,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 151c96065fff785478dd7e3d33953d55, type: 2} + - {fileID: 2100000, guid: bf8139ce01f74164bb3003ed8a498e41, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Simple Line ToolTip.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Simple Line ToolTip.prefab index 1b9341eb83a..0f34ac99c56 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Simple Line ToolTip.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Simple Line ToolTip.prefab @@ -48,7 +48,7 @@ MonoBehaviour: m_GameObject: {fileID: 1083549605185280} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23a70f6672029144c8d4c44a6fb6b213, type: 3} + m_Script: {fileID: 11500000, guid: 85b0e186e2c82324b83f3696c29cf697, type: 3} m_Name: m_EditorClassIdentifier: showBackground: 1 @@ -67,6 +67,7 @@ MonoBehaviour: contentScale: 2 fontSize: 30 attachPointType: 9 + attachPointOffset: {x: 0, y: 0, z: 0} toolTipLine: {fileID: 114254035704318198} --- !u!114 &114957968741241876 MonoBehaviour: @@ -77,7 +78,7 @@ MonoBehaviour: m_GameObject: {fileID: 1083549605185280} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95fc46e61b058e54ab022d6f28b0ec6c, type: 3} + m_Script: {fileID: 11500000, guid: 60e108b635a73db40a8d3c02d87c249f, type: 3} m_Name: m_EditorClassIdentifier: target: {fileID: 0} @@ -98,7 +99,7 @@ MonoBehaviour: m_GameObject: {fileID: 1083549605185280} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c83ed6c999201214ea3faae09b7325a8, type: 3} + m_Script: {fileID: 11500000, guid: a86b28bfea793ef4ea0e3956e5ba03a9, type: 3} m_Name: m_EditorClassIdentifier: backgroundTransform: {fileID: 4892726138630008} @@ -143,6 +144,7 @@ MonoBehaviour: - {x: 0, y: 1, z: 0} velocitySearchRange: 0.02 distorters: [] + distortionEnabled: 1 distortionMode: 0 distortionStrength: serializedVersion: 2 @@ -436,7 +438,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + - {fileID: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -494,8 +496,9 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_text: Tooltip Text m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 11400000, guid: afc8299d5d5bbd440a0616c8ecbc7217, type: 2} + m_sharedMaterial: {fileID: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, + type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -569,12 +572,12 @@ MonoBehaviour: lineCount: 1 pageCount: 1 materialCount: 1 - m_havePropertiesChanged: 1 + m_havePropertiesChanged: 0 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_spriteAnimator: {fileID: 0} m_isInputParsingRequired: 0 - m_inputSource: 3 + m_inputSource: 0 m_hasFontAssetChanged: 0 m_renderer: {fileID: 179178002932158396} m_subTextObjects: @@ -650,7 +653,7 @@ Transform: m_GameObject: {fileID: 1524834073222450} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0.001} - m_LocalScale: {x: 0.075, y: 0.015, z: 1} + m_LocalScale: {x: 0.14953244, y: 0.031755086, z: 1} m_Children: [] m_Father: {fileID: 4411840848280898} m_RootOrder: 1 @@ -680,7 +683,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 151c96065fff785478dd7e3d33953d55, type: 2} + - {fileID: 2100000, guid: bf8139ce01f74164bb3003ed8a498e41, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -727,6 +730,7 @@ MonoBehaviour: - {x: 0, y: 1, z: 0} velocitySearchRange: 0.02 distorters: [] + distortionEnabled: 1 distortionMode: 0 distortionStrength: serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Spline ToolTip.prefab b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Spline ToolTip.prefab index 7662fea86be..a00d850e415 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Spline ToolTip.prefab +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips/Spline ToolTip.prefab @@ -61,7 +61,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 151c96065fff785478dd7e3d33953d55, type: 2} + - {fileID: 2100000, guid: bf8139ce01f74164bb3003ed8a498e41, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -657,7 +657,7 @@ MonoBehaviour: m_GameObject: {fileID: 1379707608131922} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23a70f6672029144c8d4c44a6fb6b213, type: 3} + m_Script: {fileID: 11500000, guid: 85b0e186e2c82324b83f3696c29cf697, type: 3} m_Name: m_EditorClassIdentifier: showBackground: 1 @@ -686,7 +686,7 @@ MonoBehaviour: m_GameObject: {fileID: 1379707608131922} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95fc46e61b058e54ab022d6f28b0ec6c, type: 3} + m_Script: {fileID: 11500000, guid: 60e108b635a73db40a8d3c02d87c249f, type: 3} m_Name: m_EditorClassIdentifier: target: {fileID: 0} @@ -707,7 +707,7 @@ MonoBehaviour: m_GameObject: {fileID: 1379707608131922} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c83ed6c999201214ea3faae09b7325a8, type: 3} + m_Script: {fileID: 11500000, guid: a86b28bfea793ef4ea0e3956e5ba03a9, type: 3} m_Name: m_EditorClassIdentifier: backgroundTransform: {fileID: 4357967319665148} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs.meta index ca77ed787a9..c31606f701a 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 80c870726057bb743b9c4f8faa604b98 +guid: d69b1d008a22b774b89e04ac11b7d79b MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBarButton.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBarButton.cs.meta index ec267a05e42..f1e8f5f4487 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBarButton.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBarButton.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fb66df91526e2034e94cac3868625598 +guid: aca87582bbf9b0d4cba5ddbd5c31055d MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 23b157849d4..d25e9e6fa42 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -87,7 +87,7 @@ private enum BoundsCalculationMethod Renderers, MeshFilters } - private enum BoundingBoxActivationType + public enum BoundingBoxActivationType { ActivateOnStart = 0, ActivateByProximity, @@ -110,6 +110,18 @@ private enum BoundingBoxActivationType [Header("Behavior")] [SerializeField] private BoundingBoxActivationType activation = BoundingBoxActivationType.ActivateManually; + public BoundingBoxActivationType BoundingBoxActivation + { + get { return activation; } + set + { + if (activation != value) + { + activation = value; + ResetHandleVisibility(); + } + } + } [SerializeField] [Tooltip("Maximum scaling allowed relative to the initial size")] @@ -118,6 +130,30 @@ private enum BoundingBoxActivationType [Tooltip("Minimum scaling allowed relative to the initial size")] private float scaleMinimum = 0.2f; + /// + /// Public property for the scale maximum, in the target's local scale. + /// Set this value with SetScaleLimits. + /// + public float ScaleMaximum + { + get + { + return maximumScale != null ? maximumScale.x : scaleMaximum; + } + } + + /// + /// Public property for the scale minimum, in the target's local scale. + /// Set this value with SetScaleLimits. + /// + public float ScaleMinimum + { + get + { + return minimumScale != null ? minimumScale.x : scaleMinimum; + } + } + [Header("Box Display")] [SerializeField] [Tooltip("Flatten bounds in the specified axis or flatten the smallest one if 'auto' is selected")] @@ -164,7 +200,7 @@ private enum BoundingBoxActivationType [Tooltip("Size of the cube collidable used in scale handles")] private float scaleHandleSize = 0.03f; [SerializeField] - [Tooltip("Prefab used to display rotation handles in the midpoint of each edge. If not set, spheres will be displayed instead")] + [Tooltip("Prefab used to display rotation handles in the midpoint of each edge. Aligns the Y axis of the prefab with the pivot axis, and the X and Z axes pointing outward. If not set, spheres will be displayed instead")] GameObject rotationHandlePrefab = null; [SerializeField] [FormerlySerializedAs("ballRadius")] @@ -315,8 +351,8 @@ public bool ShowRotationHandleForZ // Current position of the grab point private Vector3 currentGrabPoint; - // Initial origin of the current pointer - private Vector3 initialPointerPosition; + // Grab point position in pointer space. Used to calculate the current grab point from the current pointer pose. + private Vector3 grabPointInPointer; private CardinalAxisType[] edgeAxes; private int[] flattenedHandles; @@ -390,6 +426,34 @@ public void UnhighlightWires() ResetHandleVisibility(); } + /// + /// Sets the minimum/maximum scale for the bounding box at runtime. + /// + /// Minimum scale + /// Maximum scale + /// If true the values will be multiplied by the current target scale. If false they will be in absolute local scale. + public void SetScaleLimits(float min, float max, bool relativeToInitialState = true) + { + scaleMaximum = max; + scaleMinimum = min; + + // Update the absolute min/max + var target = Target; + if (target != null) + { + if (relativeToInitialState) + { + maximumScale = target.transform.localScale * scaleMaximum; + minimumScale = target.transform.localScale * scaleMinimum; + } + else + { + maximumScale = new Vector3(scaleMaximum, scaleMaximum, scaleMaximum); + minimumScale = new Vector3(scaleMinimum, scaleMinimum, scaleMinimum); + } + } + } + #endregion #region MonoBehaviour Methods @@ -503,7 +567,7 @@ private void TransformTarget() if (currentHandleType != HandleType.None) { Vector3 prevGrabPoint = currentGrabPoint; - currentGrabPoint = initialGrabPoint + currentPointer.Position - initialPointerPosition; + currentGrabPoint = (currentPointer.Rotation * grabPointInPointer) + currentPointer.Position; if (currentHandleType == HandleType.Rotation) { @@ -706,18 +770,6 @@ private void AddLinks() ball.name = "midpoint_" + i.ToString(); ball.transform.localPosition = edgeCenters[i]; - // Align handle with its edge assuming that the prefab is initially aligned with the up direction - if (edgeAxes[i] == CardinalAxisType.X) - { - Quaternion realignment = Quaternion.FromToRotation(Vector3.up, Vector3.right); - ball.transform.localRotation = realignment * ball.transform.localRotation; - } - else if (edgeAxes[i] == CardinalAxisType.Z) - { - Quaternion realignment = Quaternion.FromToRotation(Vector3.up, Vector3.forward); - ball.transform.localRotation = realignment * ball.transform.localRotation; - } - SphereCollider collider = ball.AddComponent(); collider.radius = 0.5f * rotationHandleDiameter; @@ -737,6 +789,22 @@ private void AddLinks() } } + // Aligns each rotation handle with the Y axis along the edge and the X and Z axis pointing + // out from the bounding box. + // Y axis of the prefab will point toward the positive direction of the pivot axis. + balls[0].localRotation = Quaternion.Euler(90, 90, 0) * balls[0].localRotation; + balls[1].localRotation = Quaternion.Euler(0, 180, 0) * balls[1].localRotation; + balls[2].localRotation = Quaternion.Euler(0, 180, 90) * balls[2].localRotation; + balls[3].localRotation = Quaternion.Euler(0, 90, 0) * balls[3].localRotation; + balls[4].localRotation = Quaternion.Euler(0, 0, -90) * balls[4].localRotation; + balls[5].localRotation = Quaternion.Euler(0, -90, 0) * balls[5].localRotation; + balls[6].localRotation = Quaternion.Euler(-90, 0, -90) * balls[6].localRotation; + balls[7].localRotation = Quaternion.Euler(0, 0, 0) * balls[7].localRotation; + balls[8].localRotation = Quaternion.Euler(180, 90, 90) * balls[8].localRotation; + balls[9].localRotation = Quaternion.Euler(90, 0, 0) * balls[9].localRotation; + balls[10].localRotation = Quaternion.Euler(-90, -90, -90) * balls[10].localRotation; + balls[11].localRotation = Quaternion.Euler(180, -90, -90) * balls[11].localRotation; + if (links != null) { GameObject link; @@ -1455,7 +1523,7 @@ void IMixedRealityFocusHandler.OnFocusExit(FocusEventData eventData) void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData) { - if (currentPointer != null && eventData.SourceId == currentPointer.InputSourceParent.SourceId) + if (currentPointer != null && eventData.Pointer == currentPointer) { DropController(); @@ -1495,9 +1563,9 @@ void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData even currentPointer = eventData.Pointer; initialGrabPoint = currentPointer.Result.Details.Point; currentGrabPoint = initialGrabPoint; - initialPointerPosition = eventData.Pointer.Position; initialScale = Target.transform.localScale; initialPosition = Target.transform.position; + grabPointInPointer = Quaternion.Inverse(eventData.Pointer.Rotation) * (initialGrabPoint - currentPointer.Position); SetHighlighted(grabbedHandleTransform); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/BaseObjectCollection.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/BaseObjectCollection.cs index 4c1831c5822..63df3c28ed0 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/BaseObjectCollection.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/BaseObjectCollection.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using UnityEditor; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Utilities @@ -74,7 +75,9 @@ public virtual void UpdateCollection() for (int i = 0; i < transform.childCount; i++) { Transform child = transform.GetChild(i); - +#if UNITY_EDITOR + Undo.RecordObject(child, "ObjectCollection modify transform"); +#endif if (!ContainsNode(child) && (child.gameObject.activeSelf || !IgnoreInactiveTransforms)) { NodeList.Add(new ObjectCollectionNode { Name = child.name, Transform = child }); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/CollectionEnums/ObjectOrientationSurfaceType.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/CollectionEnums/ObjectOrientationSurfaceType.cs.meta index 24fb3412e5d..a0af1bf35e4 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/CollectionEnums/ObjectOrientationSurfaceType.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/CollectionEnums/ObjectOrientationSurfaceType.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c6f08a4a536b0e941acc54d44b1082f6 +guid: 7d6ee51630dccd84680ffd8626c634ac MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs index 2fbeec888b2..e1b05413950 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs @@ -27,7 +27,7 @@ public ObjectOrientationSurfaceType SurfaceType [Tooltip("Should the objects in the collection be rotated / how should they be rotated")] [SerializeField] - private OrientationType orientType = OrientationType.FaceOrigin; + private OrientationType orientType = OrientationType.None; /// /// Should the objects in the collection face the origin of the collection diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Controllers/README.md b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Controllers/README.md index 98702824634..07a4aa33892 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Controllers/README.md +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Controllers/README.md @@ -4,10 +4,6 @@ As part of the Mixed Reality Toolkit SDK, we provide scripts / controls for mana Currently we provide components for: -## AttachToController - -Manages child gameobjects that are bound to a controller and enables / disables them when controllers are attached or removed. Ensures controller UI is only available when there is a controller. - ## Controller Visualizer Provides a singular function for rendering controller models in a scene, whether it's a generic model for all controller, or controller specific models. diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/BaseCursor.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/BaseCursor.cs index e71fe48f052..f368987b215 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/BaseCursor.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/BaseCursor.cs @@ -7,7 +7,7 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// - /// Object that represents a cursor in 3D space controlled by gaze. + /// Object that represents a cursor in 3D space. /// public class BaseCursor : InputSystemGlobalListener, IMixedRealityCursor { @@ -318,10 +318,10 @@ private void OnDestroy() protected virtual void RegisterManagers() { // Register the cursor as a listener, so that it can always get input events it cares about - MixedRealityToolkit.InputSystem.Register(gameObject); + InputSystem.Register(gameObject); // Setup the cursor to be able to respond to input being globally enabled / disabled - if (MixedRealityToolkit.InputSystem.IsInputEnabled) + if (InputSystem.IsInputEnabled) { OnInputEnabled(); } @@ -330,8 +330,8 @@ protected virtual void RegisterManagers() OnInputDisabled(); } - MixedRealityToolkit.InputSystem.InputEnabled += OnInputEnabled; - MixedRealityToolkit.InputSystem.InputDisabled += OnInputDisabled; + InputSystem.InputEnabled += OnInputEnabled; + InputSystem.InputDisabled += OnInputDisabled; } /// @@ -339,11 +339,11 @@ protected virtual void RegisterManagers() /// protected virtual void UnregisterManagers() { - if (MixedRealityToolkit.InputSystem != null) + if (InputSystem != null) { - MixedRealityToolkit.InputSystem.InputEnabled -= OnInputEnabled; - MixedRealityToolkit.InputSystem.InputDisabled -= OnInputDisabled; - MixedRealityToolkit.InputSystem.Unregister(gameObject); + InputSystem.InputEnabled -= OnInputEnabled; + InputSystem.InputDisabled -= OnInputDisabled; + InputSystem.Unregister(gameObject); } } @@ -360,9 +360,9 @@ protected virtual void UpdateCursorTransform() FocusDetails focusDetails; - if (!MixedRealityToolkit.InputSystem.FocusProvider.TryGetFocusDetails(Pointer, out focusDetails)) + if (!InputSystem.FocusProvider.TryGetFocusDetails(Pointer, out focusDetails)) { - if (MixedRealityToolkit.InputSystem.FocusProvider.IsPointerRegistered(Pointer)) + if (InputSystem.FocusProvider.IsPointerRegistered(Pointer)) { Debug.LogError($"{name}: Unable to get focus details for {pointer.GetType().Name}!"); } @@ -370,7 +370,7 @@ protected virtual void UpdateCursorTransform() return; } - GameObject newTargetedObject = MixedRealityToolkit.InputSystem.FocusProvider.GetFocusedObject(Pointer); + GameObject newTargetedObject = InputSystem.FocusProvider.GetFocusedObject(Pointer); Vector3 lookForward; // Normalize scale on before update diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/CursorModifier.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/CursorModifier.cs index 637fa55f503..2f5edc9b58a 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/CursorModifier.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/CursorModifier.cs @@ -8,7 +8,10 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// - /// Component that can be added to any GameObject with a Collider to Modifies either the reacts when focused by a . + /// Component that can be added to any GameObject + /// with a Collider to + /// modify the reacts when + /// focused by a . /// public class CursorModifier : MonoBehaviour, ICursorModifier { @@ -146,6 +149,23 @@ public bool HideCursorOnFocus public bool GetCursorVisibility() => HideCursorOnFocus; /// + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + public Vector3 GetModifiedPosition(IMixedRealityCursor cursor) { if (SnapCursorPosition) @@ -161,7 +181,8 @@ public Vector3 GetModifiedPosition(IMixedRealityCursor cursor) } FocusDetails focusDetails; - if (MixedRealityToolkit.InputSystem != null && MixedRealityToolkit.InputSystem.FocusProvider.TryGetFocusDetails(cursor.Pointer, out focusDetails)) + if (InputSystem?.FocusProvider != null && + InputSystem.FocusProvider.TryGetFocusDetails(cursor.Pointer, out focusDetails)) { // Else, consider the modifiers on the cursor modifier, but don't snap return focusDetails.Point + HostTransform.TransformVector(CursorPositionOffset); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/FingerCursor.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/FingerCursor.cs index d88446d5b85..1d0fd8a9952 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/FingerCursor.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/FingerCursor.cs @@ -188,7 +188,7 @@ protected virtual void UpdateVisuals(Renderer ringRenderer, float deltaTime, flo /// True if associated sphere pointer is near any grabbable objects, else false. protected virtual bool IsNearGrabbableObject() { - var focusProvider = MixedRealityToolkit.InputSystem?.FocusProvider; + var focusProvider = InputSystem?.FocusProvider; if (focusProvider != null) { var spherePointers = focusProvider.GetPointers(); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/InteractiveMeshCursor.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/InteractiveMeshCursor.cs index 647716b59a8..57295c6cce7 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/InteractiveMeshCursor.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/InteractiveMeshCursor.cs @@ -140,7 +140,7 @@ protected override void UpdateCursorTransform() } // handle scale of main cursor go - float distance = Vector3.Distance(MixedRealityToolkit.InputSystem.GazeProvider.GazeOrigin, transform.position); + float distance = Vector3.Distance(InputSystem.GazeProvider.GazeOrigin, transform.position); float smoothScaling = 1 - DefaultCursorDistance * distanceScaleFactor; transform.localScale = initialScale * (distance * distanceScaleFactor + smoothScaling); } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/TeleportCursor.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/TeleportCursor.cs index f9724ae8b67..750b5609d4f 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/TeleportCursor.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Cursors/TeleportCursor.cs @@ -85,9 +85,9 @@ protected override void UpdateCursorTransform() FocusDetails focusDetails; - if (!MixedRealityToolkit.InputSystem.FocusProvider.TryGetFocusDetails(Pointer, out focusDetails)) + if (!InputSystem.FocusProvider.TryGetFocusDetails(Pointer, out focusDetails)) { - if (MixedRealityToolkit.InputSystem.FocusProvider.IsPointerRegistered(Pointer)) + if (InputSystem.FocusProvider.IsPointerRegistered(Pointer)) { Debug.LogError($"{gameObject.name}: Unable to get focus details for {pointer.GetType().Name}!"); } diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader.meta similarity index 77% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame.meta rename to Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader.meta index 6fe50bb56b5..bc037c70df2 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Textures/Frame.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 68d83d4cbe0deb740bebc29d18527102 +guid: a1edcbe1ad06c6040927c49f57debe29 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs new file mode 100644 index 00000000000..8eebbda9a98 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.UI +{ + /// + /// Controls how the standard indeterminate loader moves and behaves over time. + /// + /// + /// This loader is calculated dynamically based on Sine and Cosine + /// + public class LoaderController : MonoBehaviour + { + + /// + /// Total strength of momvent of the loading animation + /// + [SerializeField] + [Tooltip("Total strength of momvent of the loading animation")] + private float amplitude = 0.05f; + + public float Amplitude + { + get => amplitude; + set => amplitude = value; + } + + /// + /// How often happens + /// + [SerializeField] + [Tooltip("How often 'amplitude' happens")] + private float frequency = 3.0f; + + public float Frequency + { + get => frequency; + set => frequency = value; + } + + /// + /// The base local position for the dots' parent + /// + [SerializeField] + [Tooltip("The base local position for the dots' parent")] + private float dotOffset = 0.05f; + + public float DotOffset + { + get => dotOffset; + set => dotOffset = value; + } + + /// + /// The base scale unit for the dots' parent + /// + [SerializeField] + [Tooltip("The base scale unit for the dots' parent")] + private float dotSetScale = 0.06f; + + public float DotSetScale + { + get => dotSetScale; + set => dotSetScale = value; + } + + /// + /// Use low frequency oscilation with the Sine calculation. + /// + [SerializeField] + [Tooltip("Use low frequency oscilation with the Sine calculation.")] + private bool lFOsin = false; + + public bool LFOsin + { + get => lFOsin; + set => lFOsin = value; + } + + /// + /// Use low frequency oscilation with the Cosine calculation. + /// + [SerializeField] + [Tooltip("Use low frequency oscilation with the Cosine calculation.")] + private bool lFOcos = false; + + public bool LFOcos + { + get => lFOcos; + set => lFOcos = value; + } + + /// + /// Low Frequency oscilation frequency + /// + [SerializeField] + [Tooltip("Low frequency oscilation frequency")] + private float lFOfreq = 1.0f; + + public float LFOfreq + { + get => lFOfreq; + set => lFOfreq = value; + } + + /// + /// Low Frequency oscilation amplitude + /// + [SerializeField] + [Tooltip("Low Frequency oscilation amplitude")] + private float lFOamp = 0.1f; + + public float LFOamp + { + get => lFOamp; + set => lFOamp = value; + } + + /// + /// Reverses dots' orbit rotation path + /// + [SerializeField] + [Tooltip("Reverses dots' orbit rotation path")] + private bool reverseOrbit = false; + + public bool ReverseOrbit + { + get => reverseOrbit; + set => reverseOrbit = value; + } + + /// + /// Inverts dots' position in orbit + /// + [SerializeField] + [Tooltip("Inverts dots' position in orbit")] + private bool invertOrbitOffset = false; + + public bool InvertOrbitOffset + { + get => invertOrbitOffset; + set => invertOrbitOffset = value; + } + + /// + /// Multiplier to dot's rotation calculation + /// + [SerializeField] + [Tooltip("Multiplier to dot's rotation calculation")] + private float dotSpinMultiplier = 0.3f; + + public float DotSpinMultiplier + { + get => dotSpinMultiplier; + set => dotSpinMultiplier = value; + } + + /// + /// Multiplier to dot's scale calculation + /// + [SerializeField] + [Tooltip("Multiplier to dot's scale calculation")] + private float dotScaleMultipler = 0.0f; + + public float DotScaleMultipler + { + get => dotScaleMultipler; + set => dotScaleMultipler = value; + } + + /// + /// When enabled, the dot scale uses Cosine to determine scale with including . + /// Otherwise, it will use Sine. + /// + [SerializeField] + [Tooltip("When enabled, the dot scale uses Cosine to determine scale with including 'dotSetScale'. Otherwise, it will use Sine.")] + private bool sinCosSplitScale = false; + + public bool SinCosSplitScale + { + get => sinCosSplitScale; + set => sinCosSplitScale = value; + } + + /// + /// Calculates the time cycle for the trigonometric functions + /// + private float Cycles + { + get + { + if (reverseOrbit) + { + return (frequency < 0.0f) ? (Time.time / 0.000001f) * -1.0f : (Time.time / frequency) * -1.0f; + } + else + { + return (frequency < 0.0f) ? Time.time / 0.000001f : Time.time / frequency; + } + } + } + + private float degPerSec; + + private Vector3 parentNewPos = Vector3.zero; + + private Transform dot01; + private Vector3 dot01NewPos = Vector3.zero; + private Vector3 dot01NewScale = Vector3.zero; + private Vector3 dot01NewRot = Vector3.zero; + + private Transform dot02; + private Vector3 dot02NewPos = Vector3.zero; + private Vector3 dot02NewScale = Vector3.zero; + private Vector3 dot02NewRot = Vector3.zero; + + private const float tau = Mathf.PI * 2.0f; + + private void OnEnable() + { + if (dot01 == null) + { + dot01 = gameObject.transform.GetChild(0); + } + + if (dot02 == null) + { + dot02 = gameObject.transform.GetChild(1); + } + } + + private void Update() + { + degPerSec = Time.deltaTime * 360f; + + AnimateParent(); + AnimateDotTransforms(); + } + + private void AnimateParent() + { + float cosX = Mathf.Cos(Cycles * tau) * amplitude; + float sinY = Mathf.Sin(Cycles * tau) * amplitude; + + if (invertOrbitOffset == true) + { + cosX = -cosX; + sinY = -sinY; + } + + parentNewPos.Set(cosX, sinY, 0f); + transform.localPosition = parentNewPos; + + if (lFOsin == true) + { + dotSpinMultiplier = Mathf.Sin(Time.time * lFOfreq) * lFOamp; + } + else if (lFOcos == true) + { + dotSpinMultiplier = Mathf.Cos(Time.time * lFOfreq) * lFOamp; + } + + transform.Rotate(Vector3.forward * (degPerSec * dotSpinMultiplier)); + + } + + private void AnimateDotTransforms() + { + //Set dot groups' scale + float sinScaleCalc = dotSetScale + Mathf.Sin(Cycles * tau / 2) * dotScaleMultipler; + float cosScaleCalc = dotSetScale + Mathf.Cos(Cycles * tau / 2) * dotScaleMultipler; + + if (sinCosSplitScale == true) + { + dot01NewPos.Set(cosScaleCalc, cosScaleCalc, cosScaleCalc); + } + else + { + dot01NewPos.Set(sinScaleCalc, sinScaleCalc, sinScaleCalc); + } + + dot01.localScale = dot01NewPos; + + dot02NewPos.Set(sinScaleCalc, sinScaleCalc, sinScaleCalc); + dot02.localScale = dot02NewPos; + + // Set dot groups' position Offset from Parent-Null Center + dot01NewPos.Set(dotOffset, dotOffset, 0f); + dot02NewPos.Set(-dotOffset, -dotOffset, 0f); + + dot01.transform.localPosition = dot01NewPos; + dot02.transform.localPosition = dot02NewPos; + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs.meta new file mode 100644 index 00000000000..0b279bb64a6 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Loader/LoaderController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 667b8706f1f4d84458d01b20e174e2a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/BaseControllerPointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/BaseControllerPointer.cs index 50918fddda3..490d5496ee1 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/BaseControllerPointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/BaseControllerPointer.cs @@ -129,10 +129,7 @@ protected override async void Start() { base.Start(); - if (MixedRealityToolkit.InputSystem == null) - { - await WaitUntilInputSystemValid; - } + await EnsureInputSystemValid(); // We've been destroyed during the await. if (this == null) @@ -152,9 +149,9 @@ protected override async void Start() protected override void OnDisable() { - if (IsSelectPressed && MixedRealityToolkit.InputSystem != null) + if (IsSelectPressed && InputSystem != null) { - MixedRealityToolkit.InputSystem.RaisePointerUp(this, pointerAction, Handedness); + InputSystem.RaisePointerUp(this, pointerAction, Handedness); } base.OnDisable(); @@ -194,7 +191,7 @@ public uint PointerId { if (pointerId == 0) { - pointerId = MixedRealityToolkit.InputSystem.FocusProvider.GenerateNewPointerId(); + pointerId = InputSystem.FocusProvider.GenerateNewPointerId(); } return pointerId; @@ -277,9 +274,9 @@ public float PointerExtent { if (overrideGlobalPointerExtent) { - if (MixedRealityToolkit.InputSystem?.FocusProvider != null) + if (InputSystem?.FocusProvider != null) { - return MixedRealityToolkit.InputSystem.FocusProvider.GlobalPointingExtent; + return InputSystem.FocusProvider.GlobalPointingExtent; } } @@ -349,7 +346,7 @@ public virtual void OnPostSceneQuery() { if (IsSelectPressed) { - MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); + InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); } } @@ -422,7 +419,7 @@ public override void OnSourceLost(SourceStateEventData eventData) if (IsSelectPressed) { - MixedRealityToolkit.InputSystem.RaisePointerUp(this, pointerAction, Handedness); + InputSystem.RaisePointerUp(this, pointerAction, Handedness); } IsSelectPressed = false; @@ -449,8 +446,8 @@ public override void OnInputUp(InputEventData eventData) { IsSelectPressed = false; - MixedRealityToolkit.InputSystem.RaisePointerClicked(this, pointerAction, 0, Handedness); - MixedRealityToolkit.InputSystem.RaisePointerUp(this, pointerAction, Handedness); + InputSystem.RaisePointerClicked(this, pointerAction, 0, Handedness); + InputSystem.RaisePointerUp(this, pointerAction, Handedness); } } } @@ -474,7 +471,7 @@ public override void OnInputDown(InputEventData eventData) if (IsInteractionEnabled) { - MixedRealityToolkit.InputSystem.RaisePointerDown(this, pointerAction, Handedness); + InputSystem.RaisePointerDown(this, pointerAction, Handedness); } } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/DefaultPointerMediator.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/DefaultPointerMediator.cs index a8a0268167b..f4a175ff07d 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/DefaultPointerMediator.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/DefaultPointerMediator.cs @@ -146,6 +146,14 @@ public void UpdatePointers() continue; } + if (otherPointer is IMixedRealityNearPointer) + { + // Only disable far interaction pointers + // It is okay for example to have two near pointers active on a single controller + // like a poke pointer and a grab pointer + continue; + } + otherPointer.IsActive = false; unassignedPointers.Remove(otherPointer); } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs index 42faa4a074d..f561630b8c9 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs @@ -54,7 +54,7 @@ public uint PointerId { if (pointerId == 0) { - pointerId = MixedRealityToolkit.InputSystem.FocusProvider.GenerateNewPointerId(); + pointerId = InputSystem.FocusProvider.GenerateNewPointerId(); } return pointerId; @@ -164,14 +164,14 @@ public void OnPostSceneQuery() { if (isSelectPressed && IsInteractionEnabled) { - MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Controller.ControllerHandedness); + InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Controller.ControllerHandedness); } } public void OnPreSceneQuery() { Vector3 newGazeOrigin = gazeProvider.GazePointer.Rays[0].Origin; - Vector3 endPoint = newGazeOrigin + (gazeProvider.GazePointer.Rays[0].Direction * MixedRealityToolkit.InputSystem.FocusProvider.GlobalPointingExtent); + Vector3 endPoint = newGazeOrigin + (gazeProvider.GazePointer.Rays[0].Direction * InputSystem.FocusProvider.GlobalPointingExtent); Rays[0].UpdateRayStep(ref newGazeOrigin, ref endPoint); } @@ -216,8 +216,8 @@ public void OnInputUp(InputEventData eventData) { c.IsPointerDown = false; } - MixedRealityToolkit.InputSystem.RaisePointerClicked(this, selectAction, 0, Controller.ControllerHandedness); - MixedRealityToolkit.InputSystem.RaisePointerUp(this, selectAction, Controller.ControllerHandedness); + InputSystem.RaisePointerClicked(this, selectAction, 0, Controller.ControllerHandedness); + InputSystem.RaisePointerUp(this, selectAction, Controller.ControllerHandedness); } } } @@ -239,7 +239,7 @@ public void OnInputDown(InputEventData eventData) { c.IsPointerDown = true; } - MixedRealityToolkit.InputSystem.RaisePointerDown(this, selectAction, Controller.ControllerHandedness); + InputSystem.RaisePointerDown(this, selectAction, Controller.ControllerHandedness); } } } @@ -250,7 +250,7 @@ public void OnInputDown(InputEventData eventData) protected override void Start() { base.Start(); - this.gazeProvider = MixedRealityToolkit.InputSystem.GazeProvider as GazeProvider; + this.gazeProvider = InputSystem.GazeProvider as GazeProvider; BaseCursor c = gazeProvider.GazePointer.BaseCursor as BaseCursor; if (c != null) { @@ -300,7 +300,7 @@ public void OnSourceLost(SourceStateEventData eventData) if (isSelectPressed) { // Raise OnInputUp if pointer is lost while select is pressed - MixedRealityToolkit.InputSystem.RaisePointerUp(this, selectAction, lastControllerHandedness); + InputSystem.RaisePointerUp(this, selectAction, lastControllerHandedness); } if (gazeProvider != null) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/MousePointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/MousePointer.cs index 18432539618..068cf027a11 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/MousePointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/MousePointer.cs @@ -3,6 +3,7 @@ using Microsoft.MixedReality.Toolkit.Physics; using Microsoft.MixedReality.Toolkit.Utilities; +using Microsoft.MixedReality.Toolkit.Input.UnityInput; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input @@ -53,6 +54,9 @@ public class MousePointer : BaseControllerPointer, IMixedRealityMousePointer public override bool IsInteractionEnabled => isInteractionEnabled; private IMixedRealityController controller; + private MixedRealityMouseInputProfile mouseInputProfile = null; + private MixedRealityMouseInputProfile MouseInputProfile => mouseInputProfile ?? (mouseInputProfile = MixedRealityToolkit.Instance.GetService()?.MouseInputProfile); + /// public override IMixedRealityController Controller @@ -75,15 +79,27 @@ public override IMixedRealityController Controller /// public override void OnPreSceneQuery() { + // screenspace to ray conversion transform.position = CameraCache.Main.transform.position; - Ray ray = new Ray(Position, Rotation * Vector3.forward); + Ray ray = new Ray(transform.position, transform.forward); Rays[0].CopyRay(ray, PointerExtent); if (MixedRealityRaycaster.DebugEnabled) { Debug.DrawRay(ray.origin, ray.direction * PointerExtent, Color.green); } + + // ray to worldspace conversion + gameObject.transform.position = transform.position + transform.forward * DefaultPointerExtent; + } + + public override Vector3 Position + { + get + { + return gameObject.transform.position; + } } #endregion IMixedRealityPointer Implementation @@ -105,6 +121,7 @@ public override void OnSourceDetected(SourceStateEventData eventData) isInteractionEnabled = true; } } + /// public override void OnSourceLost(SourceStateEventData eventData) @@ -117,22 +134,6 @@ public override void OnSourceLost(SourceStateEventData eventData) } } - /// - public override void OnSourcePoseChanged(SourcePoseEventData eventData) - { - if (Controller == null || - eventData.Controller == null || - eventData.Controller.InputSource.SourceId != Controller.InputSource.SourceId) - { - return; - } - - if (UseSourcePoseData) - { - UpdateMousePosition(eventData.SourceData.x, eventData.SourceData.y); - } - } - #endregion IMixedRealitySourcePoseHandler Implementation #region IMixedRealityInputHandler Implementation @@ -167,10 +168,27 @@ public override void OnInputChanged(InputEventData eventData) { if (eventData.SourceId == Controller?.InputSource.SourceId) { - if (!UseSourcePoseData && - PoseAction == eventData.MixedRealityInputAction) + if (PoseAction == eventData.MixedRealityInputAction && !UseSourcePoseData) + { + Vector3 mouseDeltaRotation = Vector3.zero; + mouseDeltaRotation.x += eventData.InputData.x; + mouseDeltaRotation.y += eventData.InputData.y; + if (MouseInputProfile != null) + { + mouseDeltaRotation *= MouseInputProfile.MouseSpeed; + } + UpdateMouseRotation(mouseDeltaRotation); + } + } + } + + public override void OnInputChanged(InputEventData eventData) + { + if (eventData.SourceId == Controller?.InputSource.SourceId) + { + if (UseSourcePoseData) { - UpdateMousePosition(eventData.InputData.x, eventData.InputData.y); + UpdateMouseRotation(eventData.InputData.Rotation.eulerAngles); } } } @@ -190,7 +208,7 @@ protected override void Start() RayStabilizer = null; } - foreach (var inputSource in MixedRealityToolkit.InputSystem.DetectedInputSources) + foreach (var inputSource in InputSystem.DetectedInputSources) { if (inputSource.SourceId == Controller.InputSource.SourceId) { @@ -216,13 +234,13 @@ private void Update() #endregion MonoBehaviour Implementation - private void UpdateMousePosition(float mouseX, float mouseY) + private void UpdateMouseRotation(Vector3 mouseDeltaRotation) { - if (Mathf.Abs(mouseX) >= movementThresholdToUnHide || - Mathf.Abs(mouseY) >= movementThresholdToUnHide) - { + if (mouseDeltaRotation.magnitude >= movementThresholdToUnHide) + { if (isDisabled) { + // if cursor was hidden reset to center BaseCursor?.SetVisibility(true); transform.rotation = CameraCache.Main.transform.rotation; } @@ -235,10 +253,7 @@ private void UpdateMousePosition(float mouseX, float mouseY) timeoutTimer = 0.0f; } - var newRotation = Vector3.zero; - newRotation.x += mouseX; - newRotation.y += mouseY; - transform.Rotate(newRotation, Space.World); + transform.Rotate(mouseDeltaRotation, Space.World); } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs index 154c531e7f4..5f1a1cc18d0 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs @@ -157,11 +157,11 @@ private void TryRaisePokeDown(GameObject targetObject, Vector3 touchPosition) if (closestProximityTouchable.EventsToReceive == TouchableEventType.Pointer) { - MixedRealityToolkit.InputSystem?.RaisePointerDown(this, pointerAction, Handedness); + InputSystem?.RaisePointerDown(this, pointerAction, Handedness); } else if (closestProximityTouchable.EventsToReceive == TouchableEventType.Touch) { - MixedRealityToolkit.InputSystem?.RaiseOnTouchStarted(InputSourceParent, Controller, Handedness, touchPosition); + InputSystem?.RaiseOnTouchStarted(InputSourceParent, Controller, Handedness, touchPosition); } } } @@ -179,11 +179,12 @@ private void TryRaisePokeUp(GameObject targetObject, Vector3 touchPosition) if (closestProximityTouchable.EventsToReceive == TouchableEventType.Pointer) { - MixedRealityToolkit.InputSystem?.RaisePointerUp(this, pointerAction, Handedness); + InputSystem.RaisePointerClicked(this, pointerAction, 0, Handedness); + InputSystem?.RaisePointerUp(this, pointerAction, Handedness); } else if (closestProximityTouchable.EventsToReceive == TouchableEventType.Touch) { - MixedRealityToolkit.InputSystem?.RaiseOnTouchCompleted(InputSourceParent, Controller, Handedness, touchPosition); + InputSystem?.RaiseOnTouchCompleted(InputSourceParent, Controller, Handedness, touchPosition); } currentTouchableObjectDown = null; @@ -206,7 +207,7 @@ private void RaiseTouchUpdated(GameObject targetObject, Vector3 touchPosition) if (closestProximityTouchable.EventsToReceive == TouchableEventType.Touch) { - MixedRealityToolkit.InputSystem?.RaiseOnTouchUpdated(InputSourceParent, Controller, Handedness, touchPosition); + InputSystem?.RaiseOnTouchUpdated(InputSourceParent, Controller, Handedness, touchPosition); } } } @@ -249,5 +250,17 @@ public override void OnSourceLost(SourceStateEventData eventData) base.OnSourceLost(eventData); } + + public override void OnInputDown(InputEventData eventData) + { + // Poke pointer should not respond when a button is pressed or hand is pinched + // It should only dispatch events based on collision with touchables. + } + + public override void OnInputUp(InputEventData eventData) + { + // Poke pointer should not respond when a button is released or hand is un-pinched + // It should only dispatch events based on collision with touchables. + } } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/ShellHandRayPointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/ShellHandRayPointer.cs index 6be3a71db6f..12d0c76f750 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/ShellHandRayPointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/ShellHandRayPointer.cs @@ -42,7 +42,7 @@ public override void OnPostSceneQuery() { if (IsSelectPressed) { - MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); + InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); } Gradient lineColor = LineColorNoTarget; diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointer.cs index a5f1aa9f64c..b1811c84382 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointer.cs @@ -103,7 +103,7 @@ public bool TryGetNearGraspPoint(out Vector3 result) /// public bool TryGetDistanceToNearestSurface(out float distance) { - var focusProvider = MixedRealityToolkit.InputSystem?.FocusProvider; + var focusProvider = InputSystem?.FocusProvider; if (focusProvider != null) { FocusDetails focusDetails; @@ -120,7 +120,7 @@ public bool TryGetDistanceToNearestSurface(out float distance) /// public bool TryGetNormalToNearestSurface(out Vector3 normal) { - var focusProvider = MixedRealityToolkit.InputSystem?.FocusProvider; + var focusProvider = InputSystem?.FocusProvider; if (focusProvider != null) { FocusDetails focusDetails; diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointerVisual.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointerVisual.cs index 45804581297..8478a503b3b 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointerVisual.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/SpherePointerVisual.cs @@ -46,7 +46,7 @@ public void OnDestroy() public void Start() { // put it at root of scene - visualsRoot.transform.parent = MixedRealityToolkit.Instance.MixedRealityPlayspace; + MixedRealityPlayspace.AddChild(visualsRoot.transform); visualsRoot.gameObject.name = $"{gameObject.name}_NearTetherVisualsRoot"; } @@ -99,7 +99,14 @@ public void Update() private NearInteractionGrabbable GetGrabbedObject() { - return pointer.Result?.Details.Object?.GetComponent(); + if (pointer.Result?.Details.Object != null) + { + return pointer.Result.Details.Object.GetComponent(); + } + else + { + return null; + } } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/TeleportPointer.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/TeleportPointer.cs index 5641c5e2da5..cbe95ce4e17 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/TeleportPointer.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/TeleportPointer.cs @@ -76,6 +76,20 @@ public class TeleportPointer : LinePointer, IMixedRealityTeleportPointer, IMixed /// public DistorterGravity GravityDistorter => gravityDistorter; + private IMixedRealityTeleportSystem teleportSystem = null; + + protected IMixedRealityTeleportSystem TeleportSystem + { + get + { + if (teleportSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out teleportSystem); + } + return teleportSystem; + } + } + protected override void OnEnable() { base.OnEnable(); @@ -85,9 +99,9 @@ protected override void OnEnable() gravityDistorter = GetComponent(); } - if (MixedRealityToolkit.IsInitialized && MixedRealityToolkit.TeleportSystem != null && !lateRegisterTeleport) + if (MixedRealityToolkit.IsInitialized && TeleportSystem != null && !lateRegisterTeleport) { - MixedRealityToolkit.TeleportSystem.Register(gameObject); + TeleportSystem.Register(gameObject); } } @@ -97,9 +111,9 @@ protected override async void Start() if (lateRegisterTeleport && MixedRealityToolkit.Instance.ActiveProfile.IsTeleportSystemEnabled) { - if (MixedRealityToolkit.TeleportSystem == null) + if (TeleportSystem == null) { - await new WaitUntil(() => MixedRealityToolkit.TeleportSystem != null); + await new WaitUntil(() => TeleportSystem != null); // We've been destroyed during the await. if (this == null) @@ -116,7 +130,7 @@ protected override async void Start() } lateRegisterTeleport = false; - MixedRealityToolkit.TeleportSystem.Register(gameObject); + TeleportSystem.Register(gameObject); } } @@ -124,7 +138,7 @@ protected override void OnDisable() { base.OnDisable(); - MixedRealityToolkit.TeleportSystem?.Unregister(gameObject); + TeleportSystem?.Unregister(gameObject); } private Vector2 currentInputPosition = Vector2.zero; @@ -231,7 +245,7 @@ public override void OnPostSceneQuery() { if (IsSelectPressed) { - MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); + InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness); } // Use the results from the last update to set our NavigationResult @@ -337,7 +351,7 @@ public override void OnInputChanged(InputEventData eventData) { teleportEnabled = true; - MixedRealityToolkit.TeleportSystem?.RaiseTeleportRequest(this, TeleportHotSpot); + TeleportSystem?.RaiseTeleportRequest(this, TeleportHotSpot); } else if (canMove) { @@ -362,7 +376,7 @@ public override void OnInputChanged(InputEventData eventData) { canMove = false; // Rotate the camera by the rotation amount. If our angle is positive then rotate in the positive direction, otherwise in the opposite direction. - MixedRealityToolkit.Instance.MixedRealityPlayspace.RotateAround(CameraCache.Main.transform.position, Vector3.up, angle >= 0.0f ? rotationAmount : -rotationAmount); + MixedRealityPlayspace.RotateAround(CameraCache.Main.transform.position, Vector3.up, angle >= 0.0f ? rotationAmount : -rotationAmount); } else // We may be trying to strafe backwards. { @@ -376,10 +390,10 @@ public override void OnInputChanged(InputEventData eventData) if (offsetStrafeAngle > 0 && offsetStrafeAngle < backStrafeActivationAngle) { canMove = false; - var height = MixedRealityToolkit.Instance.MixedRealityPlayspace.position.y; - var newPosition = -CameraCache.Main.transform.forward * strafeAmount + MixedRealityToolkit.Instance.MixedRealityPlayspace.position; + var height = MixedRealityPlayspace.Position.y; + var newPosition = -CameraCache.Main.transform.forward * strafeAmount + MixedRealityPlayspace.Position; newPosition.y = height; - MixedRealityToolkit.Instance.MixedRealityPlayspace.position = newPosition; + MixedRealityPlayspace.Position = newPosition; } } } @@ -403,7 +417,7 @@ public override void OnInputChanged(InputEventData eventData) if (TeleportSurfaceResult == TeleportSurfaceResult.Valid || TeleportSurfaceResult == TeleportSurfaceResult.HotSpot) { - MixedRealityToolkit.TeleportSystem?.RaiseTeleportStarted(this, TeleportHotSpot); + TeleportSystem?.RaiseTeleportStarted(this, TeleportHotSpot); } } @@ -411,7 +425,7 @@ public override void OnInputChanged(InputEventData eventData) { canTeleport = false; teleportEnabled = false; - MixedRealityToolkit.TeleportSystem?.RaiseTeleportCanceled(this, TeleportHotSpot); + TeleportSystem?.RaiseTeleportCanceled(this, TeleportHotSpot); } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/PressableButtons/PressableButton.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/PressableButtons/PressableButton.cs index 91f170ff3ce..1f64f90f2e6 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/PressableButtons/PressableButton.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/PressableButtons/PressableButton.cs @@ -130,6 +130,12 @@ private void Start() } } + void OnDisable() + { + // clear touch points in case we get disabled and can't receive the touch end event anymore + touchPoints.Clear(); + } + private void Update() { IsTouching = (touchPoints.Count != 0); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs index f7850c7424c..4cbea6213c1 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs @@ -8,10 +8,14 @@ using UnityEngine.SceneManagement; using UnityEngine.Serialization; + namespace Microsoft.MixedReality.Toolkit.Input { public class HandInteractionPanZoom : BaseFocusHandler, IMixedRealityTouchHandler, IMixedRealityInputHandler, IMixedRealitySourceStateHandler { + /// + /// Internal data stored for each hand or pointer. + /// protected class HandPanData { public bool IsActive = true; @@ -34,8 +38,10 @@ protected class HandPanData [SerializeField] [FormerlySerializedAs("enabled")] private bool isEnabled = true; + /// + /// This Property sets and gets whether a the pan/zoom behavior is active. + /// public bool Enabled { get => isEnabled; set => isEnabled = value; } - [Header("Behavior")] [SerializeField] private bool enableZoom = false; @@ -44,15 +50,28 @@ protected class HandPanData [SerializeField] private bool lockVertical = false; [SerializeField] - private bool wrapTexture = false; + [Tooltip("If this is checked, Max Pan Horizontal and Max Pan Vertical are ignored.")] + private bool unlimitedPan = true; + [SerializeField] + [Range(1.0f, 20.0f)] + private float maxPanHorizontal = 2; + [SerializeField] + [Range(1.0f, 20.0f)] + private float maxPanVertical = 2; + [SerializeField] + [Range(0.1f, 1.0f)] + private float minScale = 0.2f; [SerializeField] - private bool velocityActive = false; + [Range(1.0f, 10.0f)] + private float maxScale = 1.5f; [SerializeField] [Range(0.0f, 0.99f)] - private float velocityDampingX = 0.9f; + [Tooltip("a value of 0 results in panning coming to a complete stop when released.")] + private float momentumHorizontal = 0.9f; [SerializeField] + [Tooltip("a value of 0 results in panning coming to a complete stop when released.")] [Range(0.0f, 0.99f)] - private float velocityDampingY = 0.9f; + private float momentumVertical = 0.9f; [SerializeField] [Range(0.0f, 99.0f)] private float panZoomSmoothing = 80.0f; @@ -62,7 +81,6 @@ protected class HandPanData [Tooltip("Each object listed must have a script that implements the IHandPanHandler interface or it will not receive events")] private GameObject[] panEventReceivers = null; - [Header("Geometry")] [SerializeField] [Tooltip("If affordace geometry is desired to emphasize the touch points(leftPoint and rightPoint) and the center point between them (reticle), assign them here.")] @@ -72,6 +90,13 @@ protected class HandPanData [SerializeField] private GameObject rightPoint = null; + [SerializeField] + [Tooltip("Current scale value. 1 is the original 100%.")] + private float currentScale; + public float CurrentScale + { + get { return currentScale; } + } #endregion Serialized Fields @@ -97,19 +122,32 @@ private bool scaleActive private float initialTouchDistance = 0.0f; private float lastTouchDistance = 0.0f; private Vector2 totalUVOffset = Vector2.zero; + private Vector2 totalUVScale = Vector2.one; private bool affordancesVisible = false; private float runningAverageSmoothing = 0.0f; private const float percentToDecimal = 0.01f; + private Material currentMaterial; private List unTransformedUVs = new List(); private Dictionary handDataMap = new Dictionary(); private List handlerInterfaces = new List(); #endregion Private Properties + /// + /// This function sets the pan and zoom back to their starting settings. + /// + public void Reset() + { + mesh.SetUVs(0, unTransformedUVs); + totalUVOffset = Vector2.zero; + totalUVScale = Vector2.one; + initialTouchDistance = 0.0f; + } + #region MonoBehaviour Handlers private void Awake() { - ValidityCheck(); + Initialize(); } private void Update() { @@ -208,7 +246,7 @@ private bool TryGetHandRayPoint(IMixedRealityController controller, out Vector3 handRayPoint = Vector3.zero; return false; } - private void ValidityCheck() + private void Initialize() { SetAffordancesActive(false); @@ -223,6 +261,9 @@ private void ValidityCheck() this.GetComponent().material.mainTexture.wrapMode = TextureWrapMode.Repeat; } + //get material + currentMaterial = this.gameObject.GetComponent().material; + //get event targets foreach (GameObject gameObject in panEventReceivers) { @@ -259,79 +300,78 @@ private void UpdateIdle() } else { - if (velocityActive == true) - { - totalUVOffset = new Vector2(totalUVOffset.x * velocityDampingX, totalUVOffset.y * velocityDampingY); - FirePanning(0); - } + totalUVOffset = new Vector2(totalUVOffset.x * momentumHorizontal, totalUVOffset.y * momentumVertical); + FirePanning(0); } } } private void UpdateUVMapping() - { - if (velocityActive) - { - bool oobX = false; - bool oobY = false; - Vector2 tiling = new Vector2(1.0f, 1.0f); - List uvs = new List(); - List uvsOrig = new List(); - mesh.GetUVs(0, uvs); - uvsOrig.AddRange(uvs); - float scaleUVDelta = 0.0f; - Vector2 scaleUVCentroid = Vector2.zero; - float currentContactRatio = 0.0f; - - if (scaleActive) - { - //scaleUVCentroid = GetScaleUVCentroid(); - scaleUVCentroid = GetDisplayedUVCentroid(); - currentContactRatio = GetUVScaleFromTouches(); + { + Vector2 tiling = currentMaterial != null ? currentMaterial.mainTextureScale : new Vector2(1.0f, 1.0f); + List uvs = new List(); + List uvsOrig = new List(); + Vector2 uvTestValue; + mesh.GetUVs(0, uvs); + uvsOrig.AddRange(uvs); + float scaleUVDelta = 0.0f; + Vector2 scaleUVCentroid = Vector2.zero; + float currentContactRatio = 0.0f; - //todo fix this- totalUVScale resets to 1 when second hand touches. + if (scaleActive) + { + scaleUVCentroid = GetDisplayedUVCentroid(); + currentContactRatio = GetUVScaleFromTouches(); + scaleUVDelta = currentContactRatio / previousContactRatio; + previousContactRatio = currentContactRatio; - //hint: totalUVOffset works correctly- make scaleUVDelta work the same way - scaleUVDelta = currentContactRatio / previousContactRatio; - previousContactRatio = currentContactRatio; - } + currentScale = totalUVScale.x / scaleUVDelta; - for (int i = 0; i < uvs.Count; ++i) + //test for scale limits + if (currentScale > minScale && currentScale < maxScale) { - if (scaleActive) + //track total scale + totalUVScale /= scaleUVDelta; + for (int i = 0; i < uvs.Count; ++i) { //this is where zoom is applied if Active uvs[i] = ((uvs[i] - scaleUVCentroid) / scaleUVDelta) + scaleUVCentroid; } + } + } - - //this is where the Pan is applied - uvs[i] = new Vector2(uvs[i].x - (totalUVOffset.x / previousContactRatio), uvs[i].y + (totalUVOffset.y / previousContactRatio)); - - - //Pan limits are applied here if specified - if (wrapTexture == false) + //test for pan limits + Vector2 uvDelta = new Vector2(totalUVOffset.x, -totalUVOffset.y); + if (!unlimitedPan) + { + bool xLimited = false; + bool yLimited = false; + for (int i = 0; i < uvs.Count; ++i) + { + uvTestValue = uvs[i] - uvDelta; + if (uvTestValue.x > tiling.x * maxPanHorizontal || uvTestValue.x < -(tiling.x * maxPanHorizontal)) { - if (uvs[i].x > (1.0f / tiling.x) || uvs[i].x < -0.001f) - { - oobX = true; - totalUVOffset.x = 0.0f; - } - - if (uvs[i].y > (1.0f / tiling.y) || uvs[i].y < -0.001f) - { - oobY = true; - totalUVOffset.y = 0.0f; - } + xLimited = true; + } + if (uvTestValue.y > tiling.y * maxPanVertical || uvTestValue.y < -(tiling.y * maxPanVertical)) + { + yLimited = true; } } for (int i = 0; i < uvs.Count; ++i) { - uvs[i] = new Vector2(oobX ? uvsOrig[i].x : uvs[i].x, oobY ? uvsOrig[i].y : uvs[i].y); + uvs[i] = new Vector2(xLimited ? uvs[i].x : uvs[i].x - uvDelta.x, yLimited ? uvs[i].y : uvs[i].y - uvDelta.y); } - - mesh.uv = uvs.ToArray(); } + else + { + for (int i = 0; i < uvs.Count; ++i) + { + uvs[i] -= uvDelta; + } + } + + mesh.uv = uvs.ToArray(); } private float GetUVScaleFromTouches() { @@ -603,21 +643,11 @@ private void SetHandDataFromController(IMixedRealityController controller, bool } private bool TryGetHandPositionFromController(IMixedRealityController controller, TrackedHandJoint joint, out Vector3 position) { - if (controller != null && controller.Visualizer is IMixedRealityHandVisualizer) - { - if ((controller.Visualizer as IMixedRealityHandVisualizer).TryGetJointTransform(joint, out Transform palm) == true) - { - position = palm.position; - return true; - } - } - else if (controller != null) + if (controller != null && + HandJointUtils.TryGetJointPose(joint, controller.ControllerHandedness, out MixedRealityPose pose)) { - if (true == HandJointUtils.TryGetJointPose(joint, controller.ControllerHandedness, out MixedRealityPose pose)) - { - position = pose.Position; - return true; - } + position = pose.Position; + return true; } position = Vector3.zero; @@ -762,12 +792,16 @@ public void OnInputUp(InputEventData eventData) } public void OnPositionInputChanged(InputEventData eventData) { } public void OnInputPressed(InputEventData eventData) { } + #endregion IMixedRealityInputHandler Methods + + + #region IMixedRealitySourceStateHandler Methods public void OnSourceDetected(SourceStateEventData eventData) { } public void OnSourceLost(SourceStateEventData eventData) { EndTouch(eventData.SourceId); eventData.Use(); } - #endregion IMixedRealityInputHandler Methods + #endregion IMixedRealitySourceStateHandler Methods } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTip.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTip.cs.meta index f1053c376ba..50c741ee528 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTip.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTip.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 23a70f6672029144c8d4c44a6fb6b213 +guid: 85b0e186e2c82324b83f3696c29cf697 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundBlob.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundBlob.cs.meta index 59393c5a4e2..ea75e10c95a 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundBlob.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundBlob.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a81cab8e62ed88140bcaef521530bb6b +guid: 83ddd8a40db85e747bd2f39403410c8c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundCorners.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundCorners.cs.meta index 505d296bff3..5c9a14bb484 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundCorners.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundCorners.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9611259d7233bcb46aed6b8e01e85292 +guid: 81fef38b97123a741be3f6b499285366 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundMesh.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundMesh.cs.meta index a2198d4dab9..0ed0f70c2b0 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundMesh.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipBackgroundMesh.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c83ed6c999201214ea3faae09b7325a8 +guid: a86b28bfea793ef4ea0e3956e5ba03a9 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipConnector.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipConnector.cs.meta index 58014fd75dc..4d7623ec0bd 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipConnector.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipConnector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 95fc46e61b058e54ab022d6f28b0ec6c +guid: 60e108b635a73db40a8d3c02d87c249f MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipUtility.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipUtility.cs.meta index ef57077dae5..371733f7a29 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipUtility.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipUtility.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 50b310129c4a25b49bf30647ad50314d +guid: 38222fd319389e7459c0b2b0d1ac753c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/TooltipEnums/ConnectorFollowType.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/TooltipEnums/ConnectorFollowType.cs.meta index c061711e3c3..7a9d16f2e73 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/TooltipEnums/ConnectorFollowType.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/TooltipEnums/ConnectorFollowType.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ac7a93bf91c29a64a8ca19a8fd23ce0a +guid: 191497538646da24faf639335962f64c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Utilities/InteractableHighlight.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Utilities/InteractableHighlight.cs index c9e35af3b53..e7b24c9d996 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Utilities/InteractableHighlight.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Utilities/InteractableHighlight.cs @@ -10,8 +10,8 @@ namespace Microsoft.MixedReality.Toolkit.UI { /// /// Adds or removes materials to target renderer for highlighting Focused GameObjects. - /// Useful with focusable GameObjects /// + /// Useful with focusable GameObjects public class InteractableHighlight : BaseFocusHandler { [Flags] diff --git a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs deleted file mode 100644 index 3dfb54b8765..00000000000 --- a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Utilities.Solvers -{ - /// - /// Waits for a controller to be instantiated, then attaches itself to a specified element - /// - public class AttachToController : ControllerFinder - { - public bool SetChildrenInactiveWhenDetached = true; - - [SerializeField] - protected Vector3 PositionOffset = Vector3.zero; - - [SerializeField] - protected Vector3 RotationOffset = Vector3.zero; - - [SerializeField] - protected Vector3 ScaleOffset = Vector3.one; - - [SerializeField] - protected bool SetScaleOnAttach = false; - - public bool IsAttached { get { return transform.parent == null; } } - - protected virtual void OnAttachToController() { } - protected virtual void OnDetachFromController() { } - - // TODO: Implement ControllerFinder properly on vNext. - - //protected override void OnEnable() - //{ - // SetChildrenActive(false); - - // base.OnEnable(); - //} - - //protected override void OnControllerFound() - //{ - // // Parent ourselves under the element and set our offsets - // transform.parent = ElementTransform; - // transform.localPosition = PositionOffset; - // transform.localEulerAngles = RotationOffset; - - // if (SetScaleOnAttach) - // { - // transform.localScale = ScaleOffset; - // } - - // SetChildrenActive(true); - - // // Announce that we're attached - // OnAttachToController(); - //} - - //protected override void OnControllerLost() - //{ - // OnDetachFromController(); - - // SetChildrenActive(false); - - // transform.parent = null; - //} - - //private void SetChildrenActive(bool isActive) - //{ - // if (SetChildrenInactiveWhenDetached) - // { - // foreach (Transform child in transform) - // { - // child.gameObject.SetActive(isActive); - // } - // } - //} - - protected void Reset() - { - // We want the default value of Handedness of Controller finders to be Unknown so it doesn't attach to random object. - // But we also want the Editor to start with a useful default, so we set a Left handedness on inspector reset. - Handedness = Handedness.Left; - } - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/ControllerFinder.cs b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/ControllerFinder.cs index fc06070203d..1d06229a063 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/ControllerFinder.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/ControllerFinder.cs @@ -37,6 +37,23 @@ public Handedness Handedness /// protected Transform ControllerTransform; + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + #region MonoBehaviour Implementation protected virtual void OnEnable() @@ -81,13 +98,13 @@ protected virtual void TryAndAddControllerTransform() { // Look if the controller was already loaded. This could happen if the // GameObject was instantiated at runtime and the model loaded event has already fired. - if (MixedRealityToolkit.InputSystem == null) + if (InputSystem == null) { // The InputSystem could not be found. return; } - foreach (IMixedRealityController controller in MixedRealityToolkit.InputSystem.DetectedControllers) + foreach (IMixedRealityController controller in InputSystem.DetectedControllers) { if (controller.ControllerHandedness == handedness) { diff --git a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/RadialView.cs b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/RadialView.cs index 3834b7cdfab..2e19a58a582 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/RadialView.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/RadialView.cs @@ -137,8 +137,8 @@ public bool OrientToReferenceDirection /// /// The up direction to use for orientation. - /// Cone may roll with head, or not. /// + /// Cone may roll with head, or not. private Vector3 UpReference { get diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/InteractableInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/InteractableInspector.cs index 0019ca83818..61da7a11a10 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/InteractableInspector.cs +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/InteractableInspector.cs @@ -75,29 +75,10 @@ public sealed override void OnInspectorGUI() public virtual void RenderCustomInspector() { - // TODO: extend the preference array to handle multiple themes open and scroll values!!! - // TODO: add messaging!!! - // TODO: handle dimensions - // TODO: add profiles - // TODO: add themes - // TODO: handle/display properties from themes - - // TODO: !!!!! need to make sure we refresh the shader list when the target changes - - // TODO: !!!!! finish incorporating States - // TODO: add the default states by default - // TODO: let flow into rest of themes and events. - // TODO: events should target the state logic they support. - - // FIX: when deleting a theme property, the value resets or the item that's deleted is wrong - - //base.DrawDefaultInspector(); - serializedObject.Update(); EditorGUILayout.Space(); InspectorUIUtility.DrawTitle("Interactable"); - //EditorGUILayout.LabelField(new GUIContent("Interactable Settings")); EditorGUILayout.BeginVertical("Box"); @@ -177,11 +158,7 @@ public virtual void RenderCustomInspector() actionId.intValue = newActionId; } } - - //selected.enumValueIndex = (int)(MixedRealityInputAction)EditorGUILayout.EnumPopup(new GUIContent("Input Action", "Input source for this Interactable, Default: Select"), (MixedRealityInputAction)selected.enumValueIndex); - - // TODO: should IsGlobal only show up on specific press types and indent? - // TODO: should we show handedness on certain press types? + SerializedProperty isGlobal = serializedObject.FindProperty("IsGlobal"); isGlobal.boolValue = EditorGUILayout.Toggle(new GUIContent("Is Global", "Like a modal, does not require focus"), isGlobal.boolValue); @@ -296,8 +273,7 @@ public virtual void RenderCustomInspector() { themes.InsertArrayElementAtIndex(themes.arraySize); SerializedProperty theme = themes.GetArrayElementAtIndex(themes.arraySize - 1); - - // TODO: make sure there is only one or make unique + string[] themeLocations = AssetDatabase.FindAssets("DefaultTheme"); if (themeLocations.Length > 0) { @@ -318,10 +294,9 @@ public virtual void RenderCustomInspector() for (int t = 0; t < themes.arraySize; t++) { SerializedProperty themeItem = themes.GetArrayElementAtIndex(t); + EditorGUI.indentLevel = indentOnSectionStart + 2; EditorGUILayout.PropertyField(themeItem, new GUIContent("Theme", "Theme properties for interaction feedback")); - - // TODO: we need the theme and target in order to figure out what properties to expose in the list - // TODO: or do we show them all and show alerts when a theme property is not compatible + if (themeItem.objectReferenceValue != null && gameObject.objectReferenceValue) { if (themeItem.objectReferenceValue.name == "DefaultTheme") @@ -338,11 +313,11 @@ public virtual void RenderCustomInspector() SerializedProperty hadDefault = sItem.FindPropertyRelative("HadDefaultTheme"); hadDefault.boolValue = true; - EditorGUI.indentLevel = indentOnSectionStart + 2; + EditorGUI.indentLevel = indentOnSectionStart + 3; string prefKey = themeItem.objectReferenceValue.name + "Profiles" + i + "_Theme" + t + "_Edit"; bool showSettings = EditorPrefs.GetBool(prefKey); - + InspectorUIUtility.ListSettings settings = listSettings[i]; bool show = InspectorUIUtility.DrawSectionStart(themeItem.objectReferenceValue.name + " (Click to edit)", indentOnSectionStart + 3, showSettings, FontStyle.Normal, false); diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/ThemeInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/ThemeInspector.cs index ef782c0c4b8..32c3597f0aa 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/ThemeInspector.cs +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/ThemeInspector.cs @@ -14,11 +14,7 @@ namespace Microsoft.MixedReality.Toolkit.UI /// /// Inspector for themes, and used by Interactable /// - - // TODO: !!!!! need to make sure we refresh the shader list when the target changes - - // FIX : when adding a new setting, the rendered values is a dupe of the previous values in the list, but the dropdown is default. - + #if UNITY_EDITOR [CustomEditor(typeof(Theme))] public class ThemeInspector : UnityEditor.Editor @@ -355,9 +351,7 @@ public static SerializedProperty ChangeThemeProperty(int index, SerializedProper } } } - - //TODO: make sure shader has currently selected property - + List shaderPropFilter = new List(); // do we need a propId? if (properties[i].Type == InteractableThemePropertyValueTypes.Color) @@ -767,7 +761,7 @@ public static void RenderThemeSettings(SerializedProperty themeSettings, Seriali GUIStyle box = InspectorUIUtility.Box(0); if (themeObj != null) { - box = InspectorUIUtility.Box(30); + box = InspectorUIUtility.Box(34); themeObj.Update(); } diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs deleted file mode 100644 index 3af289ba35e..00000000000 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using Microsoft.MixedReality.Toolkit.Utilities.Solvers; -using UnityEditor; -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Utilities.Editor.Solvers -{ - [CustomEditor(typeof(AttachToController))] - public class AttachToControllerInspector : ControllerFinderInspector - { - private SerializedProperty positionOffsetProperty; - private SerializedProperty rotationOffsetProperty; - private SerializedProperty scaleOffsetProperty; - private SerializedProperty setScaleOnAttachProperty; - private SerializedProperty setChildrenInactiveWhenDetachedProperty; - - protected override void OnEnable() - { - base.OnEnable(); - - positionOffsetProperty = serializedObject.FindProperty("PositionOffset"); - rotationOffsetProperty = serializedObject.FindProperty("RotationOffset"); - scaleOffsetProperty = serializedObject.FindProperty("ScaleOffset"); - setScaleOnAttachProperty = serializedObject.FindProperty("SetScaleOnAttach"); - setChildrenInactiveWhenDetachedProperty = serializedObject.FindProperty("SetChildrenInactiveWhenDetached"); - } - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - serializedObject.Update(); - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Attachment Options", new GUIStyle("Label") { fontStyle = FontStyle.Bold }); - EditorGUILayout.Space(); - EditorGUI.indentLevel++; - - EditorGUILayout.PropertyField(positionOffsetProperty); - EditorGUILayout.PropertyField(rotationOffsetProperty); - EditorGUILayout.PropertyField(scaleOffsetProperty); - EditorGUILayout.PropertyField(setScaleOnAttachProperty); - EditorGUILayout.PropertyField(setChildrenInactiveWhenDetachedProperty); - - EditorGUI.indentLevel--; - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/InBetweenInspector.cs.meta b/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/InBetweenInspector.cs.meta index c1e6384f003..20ec3e4f095 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/InBetweenInspector.cs.meta +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/InBetweenInspector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7dd43529b59a96142876f56ee473360f +guid: 5903af227b66a6f47ad2ab65d11c1520 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/SolverHandlerInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/SolverHandlerInspector.cs index f834458e7d5..91df481d6be 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/SolverHandlerInspector.cs +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/SolverHandlerInspector.cs @@ -50,13 +50,6 @@ public override void OnInspectorGUI() { EditorGUILayout.PropertyField(trackedHandJointProperty); } - else if (trackedObjectProperty.enumValueIndex == (int)TrackedObjectType.MotionControllerLeft || - trackedObjectProperty.enumValueIndex == (int)TrackedObjectType.MotionControllerRight) - { - // TODO: Add tracked controller element back in. Pending visualization system updates. - // EditorGUILayout.PropertyField(trackedControllerElementProperty); - } - trackedObjectChanged = EditorGUI.EndChangeCheck(); } diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityControllerVisualizationProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityControllerVisualizationProfile.asset index 93d89751b6f..58c7c12e838 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityControllerVisualizationProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityControllerVisualizationProfile.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 514da61389c049c0bdaf31b7f6970d33, type: 3} m_Name: DefaultMixedRealityControllerVisualizationProfile m_EditorClassIdentifier: - isCustomProfile: 1 + isCustomProfile: 0 renderMotionControllers: 1 defaultControllerVisualizationType: reference: Microsoft.MixedReality.Toolkit.Input.MixedRealityControllerVisualizer, diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset index c45c6e2b99c..3d100190371 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset @@ -15,4 +15,12 @@ MonoBehaviour: isCustomProfile: 0 showDiagnostics: 1 showProfiler: 1 - frameRateDuration: 0.1 + showFrameInfo: 1 + showMemoryStats: 1 + frameSampleRate: 0.1 + windowAnchor: 7 + windowOffset: {x: 0.1, y: 0.1} + windowScale: 1 + windowFollowSpeed: 5 + defaultInstancedMaterial: {fileID: 2100000, guid: 5b6fc83077d74fd4ca4c675623942a3e, + type: 2} diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityEyeTrackingProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityEyeTrackingProfile.asset index b3d76beeca1..c1d9e78eff1 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityEyeTrackingProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityEyeTrackingProfile.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e534d3d8fbada634785d567d8fe8562c, type: 3} m_Name: DefaultMixedRealityEyeTrackingProfile m_EditorClassIdentifier: - isCustomProfile: 1 + isCustomProfile: 0 smoothEyeTracking: 1 saccadeThreshInDegree: 2 minDwellInMs: 600 diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityInputPointerProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityInputPointerProfile.asset index 5ebd60a54de..77a41fee72c 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityInputPointerProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityInputPointerProfile.asset @@ -19,7 +19,11 @@ MonoBehaviour: m_Bits: 4294967291 debugDrawPointingRays: 1 debugDrawPointingRayColors: - - {r: 0, g: 1, b: 0, a: 1} + - {r: 1, g: 0.58280706, b: 0, a: 1} + - {r: 0.86426115, g: 1, b: 0, a: 1} + - {r: 0, g: 1, b: 0.2163105, a: 1} + - {r: 0, g: 0.3028021, b: 1, a: 1} + - {r: 0.44855833, g: 0, b: 1, a: 1} gazeCursorPrefab: {fileID: 1000012072213228, guid: 5b3e2856904e43c680f84f326861032a, type: 3} gazeProviderType: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset new file mode 100644 index 00000000000..e8dd7d87eb4 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset @@ -0,0 +1,16 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 55135ad05bc8df24b95e28584db89751, type: 3} + m_Name: DefaultMixedRealityMouseInputProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + mouseSpeed: 0.25 diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset.meta b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset.meta new file mode 100644 index 00000000000..48cd8e3d8e3 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityMouseInputProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc2a0fa97d2f9f14996ffd20776bab57 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset index 4f9ef762247..695474b3eba 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset @@ -16,21 +16,17 @@ MonoBehaviour: startBehavior: 0 recognitionConfidenceLevel: 1 speechCommands: - - keyword: Menu - keyCode: 9 + - localizationKey: + keyword: Menu + keyCode: 51 action: id: 2 description: Menu axisConstraint: 2 - - keyword: Toggle Diagnostics - keyCode: 100 + - localizationKey: + keyword: Select + keyCode: 49 action: id: 1 - description: Toggle Diagnostics - axisConstraint: 0 - - keyword: Toggle Profiler - keyCode: 112 - action: - id: 7 - description: Grip Press - axisConstraint: 3 + description: Select + axisConstraint: 2 diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityToolkitConfigurationProfile.asset index 5c95cfea0a6..c30956c0437 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityToolkitConfigurationProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityToolkitConfigurationProfile.asset @@ -14,8 +14,11 @@ MonoBehaviour: m_EditorClassIdentifier: isCustomProfile: 0 targetExperienceScale: 3 - enableCameraProfile: 1 + enableCameraSystem: 1 cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem enableInputSystem: 1 inputSystemProfile: {fileID: 11400000, guid: ad2080e8e71c35f4e8bcde94fa68f098, type: 2} inputSystemType: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat similarity index 76% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat rename to Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat index d84f8f32e9e..311eaffa78a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image04_preview.mat +++ b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat @@ -7,16 +7,16 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Image04_preview + m_Name: MRTK_Standard_UnlitWhite m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _BORDER_LIGHT_USES_HOVER_COLOR - _DIRECTIONAL_LIGHT _HOVER_LIGHT _REFLECTIONS _SPECULAR_HIGHLIGHTS - m_LightmapFlags: 4 + m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DISABLE_ALBEDO_MAP _LIGHTMAPPING_REALTIME + _SPECULAR_HIGHLIGHTS + m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 + m_CustomRenderQueue: 2000 stringTagMap: - RenderType: Transparent + RenderType: Opaque disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 @@ -45,23 +45,27 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 5bc99d97eb86d094d8a8a71c7f7d95f3, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _NormalMap: + - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _OcclusionMap: + - _NormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _ParallaxMap: + - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: + - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} @@ -71,6 +75,8 @@ Material: - _BlendOp: 0 - _BorderLight: 0 - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 - _BorderLightUsesHoverColor: 1 - _BorderMinValue: 0.1 - _BorderWidth: 0.1 @@ -84,12 +90,13 @@ Material: - _ClippingSphere: 0 - _ColorWriteMask: 15 - _CullMode: 2 - - _CustomMode: 2 + - _CustomMode: 0 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 10 + - _DirectionalLight: 0 + - _DstBlend: 0 - _EdgeSmoothingValue: 0.002 + - _EmissionScaleUI: 0 - _EnableChannelMap: 0 - _EnableEmission: 0 - _EnableHoverColorOpaqueOverride: 0 @@ -103,45 +110,57 @@ Material: - _FadeBeginDistance: 0.85 - _FadeCompleteDistance: 0.5 - _GlossMapScale: 1 - - _Glossiness: 0.5 + - _Glossiness: 0 - _GlossyReflections: 1 - - _HoverLight: 1 + - _HoverLight: 0 - _HoverLightOpaque: 0 - _InnerGlow: 0 + - _InnerGlowPower: 4 - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Lightmapping: 1 - _Metallic: 0 - - _Mode: 2 + - _Mode: 0 + - _NearLightFade: 0 - _NearPlaneFade: 0 - _NormalMapScale: 1 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _Reflections: 1 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 0 - _Refraction: 0 - - _RefractiveIndex: 0 + - _RefractiveIndex: 1.1 - _RenderQueueOverride: -1 - _RimLight: 0 - _RimPower: 0.25 - - _RoundCornerMargin: 0.01 + - _RoundCornerMargin: 0 - _RoundCornerRadius: 0.25 - _RoundCorners: 0 - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - - _SrcBlend: 5 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 - _Stencil: 0 - _StencilComparison: 0 - _StencilOperation: 0 - _StencilReference: 0 - _TriplanarMappingBlendSharpness: 4 - _UVSec: 0 + - _VertexColors: 0 - _ZTest: 4 - - _ZWrite: 0 + - _ZWrite: 1 m_Colors: - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 0.3137255} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} @@ -150,4 +169,3 @@ Material: - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat.meta b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat.meta similarity index 54% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat.meta rename to Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat.meta index 669a353e188..6c27e31f30f 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image_Frame.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/MRTK_Standard_UnlitWhite.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 033d197a82ff5bd4ab1c5e5261e9d37e +guid: 8f2fb2809320347428c67ea7c78ef4c5 +timeCreated: 1435687483 +licenseType: Pro NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipLines.mat.meta b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipLines.mat.meta index 44b5208c001..80cf0e6a1dd 100644 --- a/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipLines.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipLines.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3c8f5655de1232549bc616142c6119d7 +guid: 424283b2185ed5045bf2b621e2ca6950 timeCreated: 1520965306 licenseType: Pro NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipWithBorder.mat.meta b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipWithBorder.mat.meta index 67321387f55..67f1a10d6ef 100644 --- a/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipWithBorder.mat.meta +++ b/Assets/MixedRealityToolkit.SDK/StandardAssets/Materials/TooltipWithBorder.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 151c96065fff785478dd7e3d33953d55 +guid: bf8139ce01f74164bb3003ed8a498e41 timeCreated: 1435687483 licenseType: Pro NativeFormatImporter: diff --git a/Assets/MixedRealityToolkit.SDK/Version.txt b/Assets/MixedRealityToolkit.SDK/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit.SDK/Version.txt +++ b/Assets/MixedRealityToolkit.SDK/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs b/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs index 13e305096f8..04804ae106e 100644 --- a/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs +++ b/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs @@ -14,21 +14,15 @@ namespace Microsoft.MixedReality.Toolkit.Boundary /// /// The Boundary system controls the presentation and display of the users boundary in a scene. /// + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Boundary/BoundarySystemGettingStarted.html")] public class MixedRealityBoundarySystem : BaseCoreSystem, IMixedRealityBoundarySystem { public MixedRealityBoundarySystem( IMixedRealityServiceRegistrar registrar, MixedRealityBoundaryVisualizationProfile profile, - Transform playspace, ExperienceScale scale) : base(registrar, profile) { Scale = scale; - - if (playspace == null) - { - Debug.LogError("The MixedRealityBoundarySystem object requires a valid playspace Transform."); - } - Playspace = playspace; } #region IMixedRealityService Implementation @@ -257,13 +251,6 @@ public int GetHashCode(object obj) #region IMixedRealityBoundarySystem Implementation - /// - /// The transform of the playspace scene object. We use this transform to parent - /// boundary visualizations that teleport with the user and to perform calculations - /// to ensure proper alignment with the world. - /// - private Transform Playspace = null; - /// /// The thickness of three dimensional generated boundary objects. /// @@ -292,7 +279,7 @@ private GameObject BoundaryVisualizationParent } var visualizationParent = new GameObject("Boundary System Visualizations"); - visualizationParent.transform.parent = Playspace; + MixedRealityPlayspace.AddChild(visualizationParent.transform); return boundaryVisualizationParent = visualizationParent; } } @@ -302,6 +289,21 @@ private GameObject BoundaryVisualizationParent /// private int ignoreRaycastLayerValue = 2; + private MixedRealityBoundaryVisualizationProfile boundaryVisualizationProfile = null; + + /// + public MixedRealityBoundaryVisualizationProfile BoundaryVisualizationProfile + { + get + { + if (boundaryVisualizationProfile == null) + { + boundaryVisualizationProfile = ConfigurationProfile as MixedRealityBoundaryVisualizationProfile; + } + return boundaryVisualizationProfile; + } + } + /// public ExperienceScale Scale { get; set; } @@ -589,7 +591,7 @@ public bool Contains(Vector3 location, UnityBoundary.Type boundaryType = UnityBo } // Handle the user teleporting (boundary moves with them). - location = Playspace.InverseTransformPoint(location); + location = MixedRealityPlayspace.InverseTransformPoint(location); if (FloorHeight.Value > location.y || BoundaryHeight < location.y) @@ -632,7 +634,7 @@ public bool TryGetRectangularBoundsParams(out Vector2 center, out float angle, o } // Handle the user teleporting (boundary moves with them). - Vector3 transformedCenter = Playspace.TransformPoint( + Vector3 transformedCenter = MixedRealityPlayspace.TransformPoint( new Vector3(rectangularBounds.Center.x, 0f, rectangularBounds.Center.y)); center = new Vector2(transformedCenter.x, transformedCenter.z); @@ -668,9 +670,9 @@ public GameObject GetFloorVisualization() currentFloorObject.name = "Boundary System Floor"; currentFloorObject.transform.localScale = new Vector3(floorScale.x, boundaryObjectThickness, floorScale.y); currentFloorObject.transform.Translate(new Vector3( - Playspace.position.x, + MixedRealityPlayspace.Position.x, FloorHeight.Value - (currentFloorObject.transform.localScale.y * 0.5f), - Playspace.position.z)); + MixedRealityPlayspace.Position.z)); currentFloorObject.layer = FloorPhysicsLayer; currentFloorObject.GetComponent().sharedMaterial = profile.FloorMaterial; @@ -755,9 +757,9 @@ public GameObject GetTrackedAreaVisualization() currentTrackedAreaObject.layer = ignoreRaycastLayerValue; currentTrackedAreaObject.AddComponent(); currentTrackedAreaObject.transform.Translate(new Vector3( - Playspace.position.x, + MixedRealityPlayspace.Position.x, boundaryObjectRenderOffset, - Playspace.position.z)); + MixedRealityPlayspace.Position.z)); currentPlayAreaObject.layer = TrackedAreaPhysicsLayer; // Configure the renderer properties. diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models.meta b/Assets/MixedRealityToolkit.Services/CameraSystem.meta similarity index 77% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models.meta rename to Assets/MixedRealityToolkit.Services/CameraSystem.meta index 873ab3d2fff..d49b1c9121e 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models.meta +++ b/Assets/MixedRealityToolkit.Services/CameraSystem.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cb43bdc3135952540abb87a50713d443 +guid: a1547c8746957c84da3625814301bfcc folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs new file mode 100644 index 00000000000..229b9b295e4 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using System.Collections; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.CameraSystem +{ + /// + /// The Camera system controls the settings of the main camera. + /// + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/MixedRealityConfigurationGuide.html#camera")] + public class MixedRealityCameraSystem : BaseCoreSystem, IMixedRealityCameraSystem + { + private enum DisplayType + { + Opaque = 0, + Transparent + } + + public MixedRealityCameraSystem( + IMixedRealityServiceRegistrar registrar, + BaseMixedRealityProfile profile = null) : base(registrar, profile) + { + } + + /// + /// Is the current camera displaying on an Opaque (AR) device or a VR / immersive device + /// + public bool IsOpaque + { + get + { + currentDisplayType = DisplayType.Opaque; +#if UNITY_WSA + if (!UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque) + { + currentDisplayType = DisplayType.Transparent; + } +#endif + return currentDisplayType == DisplayType.Opaque; + } + } + + /// + public uint SourceId { get; } = 0; + + /// + public string SourceName { get; } = "Mixed Reality Camera System"; + + private MixedRealityCameraProfile cameraProfile = null; + + /// + public MixedRealityCameraProfile CameraProfile + { + get + { + if (cameraProfile == null) + { + cameraProfile = ConfigurationProfile as MixedRealityCameraProfile; + } + return cameraProfile; + } + } + + private DisplayType currentDisplayType; + private bool cameraOpaqueLastFrame = false; + + /// + public override void Initialize() + { + cameraOpaqueLastFrame = IsOpaque; + + if (IsOpaque) + { + ApplySettingsForOpaqueDisplay(); + } + else + { + ApplySettingsForTransparentDisplay(); + } + } + + /// + public override void Update() + { + if (IsOpaque != cameraOpaqueLastFrame) + { + cameraOpaqueLastFrame = IsOpaque; + + if (IsOpaque) + { + ApplySettingsForOpaqueDisplay(); + } + else + { + ApplySettingsForTransparentDisplay(); + } + } + } + + /// + /// Applies opaque settings from camera profile. + /// + private void ApplySettingsForOpaqueDisplay() + { + CameraCache.Main.clearFlags = CameraProfile.CameraClearFlagsOpaqueDisplay; + CameraCache.Main.nearClipPlane = CameraProfile.NearClipPlaneOpaqueDisplay; + CameraCache.Main.backgroundColor = CameraProfile.BackgroundColorOpaqueDisplay; + QualitySettings.SetQualityLevel(CameraProfile.OpaqueQualityLevel, false); + } + + /// + /// Applies transparent settings from camera profile. + /// + private void ApplySettingsForTransparentDisplay() + { + CameraCache.Main.clearFlags = CameraProfile.CameraClearFlagsTransparentDisplay; + CameraCache.Main.backgroundColor = CameraProfile.BackgroundColorTransparentDisplay; + CameraCache.Main.nearClipPlane = CameraProfile.NearClipPlaneTransparentDisplay; + QualitySettings.SetQualityLevel(CameraProfile.HoloLensQualityLevel, false); + } + + /// + bool IEqualityComparer.Equals(object x, object y) + { + // There shouldn't be other Camera Systems to compare to. + return false; + } + + /// + int IEqualityComparer.GetHashCode(object obj) + { + return Mathf.Abs(SourceName.GetHashCode()); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs.meta b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs.meta new file mode 100644 index 00000000000..eb86ad9350c --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityCameraSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2fb3357945b61c44ade0e3010e91d8a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6eccdbd0228d47ab9ac6ca58258f9112, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef new file mode 100644 index 00000000000..99bb3bf203d --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef @@ -0,0 +1,14 @@ +{ + "name": "MixedRealityToolkit.Services.CameraSystem", + "references": [ + "Microsoft.MixedReality.Toolkit" + ], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef.meta b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef.meta new file mode 100644 index 00000000000..f229e63b05b --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/CameraSystem/MixedRealityToolkit.Services.CameraSystem.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9c79f578bc8e43b418f1656db2cbba3e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1.meta b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta similarity index 77% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1.meta rename to Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta index 21892c085f4..7fd16ff4b64 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Models/PaintingCollection1.meta +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7e34e3e8a4de565428d51fa80ea9a54a +guid: bcc2aa871ed4de44dab31b3d82287a07 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat similarity index 77% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat rename to Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat index 390d47850e7..774a0a09a49 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image02_preview.mat +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat @@ -7,16 +7,15 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Image02_preview - m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} - m_ShaderKeywords: _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _BORDER_LIGHT_USES_HOVER_COLOR - _DIRECTIONAL_LIGHT _GLOSSYREFLECTIONS_OFF _HOVER_LIGHT _SPECULARHIGHLIGHTS_OFF + m_Name: DiagnosticsInstancedColored + m_Shader: {fileID: 4800000, guid: d199a2ca60343bb49ad9a41ddb45a083, type: 3} + m_ShaderKeywords: _DISABLE_ALBEDO_MAP _HOVER_LIGHT m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 + m_CustomRenderQueue: 2000 stringTagMap: - RenderType: Transparent + RenderType: Opaque disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 @@ -45,23 +44,27 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 8902c3c9a9cbaff43a9fc5737cb9192c, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _NormalMap: + - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _OcclusionMap: + - _NormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _ParallaxMap: + - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: + - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} @@ -71,7 +74,9 @@ Material: - _BlendOp: 0 - _BorderLight: 0 - _BorderLightOpaque: 0 - - _BorderLightUsesHoverColor: 1 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 - _BorderMinValue: 0.1 - _BorderWidth: 0.1 - _BumpScale: 1 @@ -79,20 +84,18 @@ Material: - _ClippingBorderWidth: 0.025 - _ClippingBox: 0 - _ClippingPlane: 0 - - _ClippingPlaneBorder: 0 - - _ClippingPlaneBorderWidth: 0.025 - _ClippingSphere: 0 - _ColorWriteMask: 15 + - _Cull: 0 - _CullMode: 2 - - _CustomMode: 2 + - _CustomMode: 0 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - - _DirectionalLight: 1 - - _DstBlend: 10 + - _DirectionalLight: 0 + - _DstBlend: 0 - _EdgeSmoothingValue: 0.002 - _EnableChannelMap: 0 - _EnableEmission: 0 - - _EnableHoverColorOpaqueOverride: 0 - _EnableHoverColorOverride: 0 - _EnableLocalSpaceTriplanarMapping: 0 - _EnableNormalMap: 0 @@ -104,17 +107,24 @@ Material: - _FadeCompleteDistance: 0.5 - _GlossMapScale: 1 - _Glossiness: 0.5 - - _GlossyReflections: 0 + - _GlossyReflections: 1 - _HoverLight: 1 - - _HoverLightOpaque: 0 - _InnerGlow: 0 + - _InnerGlowPower: 4 - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 - _Metallic: 0 - - _Mode: 2 + - _Mode: 0 + - _NearLightFade: 0 - _NearPlaneFade: 0 - _NormalMapScale: 1 - _OcclusionStrength: 1 - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 - _Reflections: 0 - _Refraction: 0 - _RefractiveIndex: 0 @@ -127,27 +137,25 @@ Material: - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 0 - - _SrcBlend: 5 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 - _Stencil: 0 - _StencilComparison: 0 - _StencilOperation: 0 - _StencilReference: 0 - _TriplanarMappingBlendSharpness: 4 - _UVSec: 0 + - _VertexColors: 0 - _ZTest: 4 - - _ZWrite: 0 + - _ZWrite: 1 m_Colors: - - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 0.3137255} + - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} - - _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1} - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} - _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat.meta b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta similarity index 79% rename from Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat.meta rename to Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta index da75f67ceb3..00e76272c60 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_TargetPositioning/Materials/Image01.mat.meta +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ca9073d113c81494988fb4c06e0dc13a +guid: 5b6fc83077d74fd4ca4c675623942a3e NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs index da2073b11f4..494ff366b6c 100644 --- a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs @@ -9,19 +9,13 @@ namespace Microsoft.MixedReality.Toolkit.Diagnostics /// /// The default implementation of the /// + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Diagnostics/DiagnosticsSystemGettingStarted.html")] public class MixedRealityDiagnosticsSystem : BaseCoreSystem, IMixedRealityDiagnosticsSystem { public MixedRealityDiagnosticsSystem( IMixedRealityServiceRegistrar registrar, - MixedRealityDiagnosticsProfile profile, - Transform playspace) : base(registrar, profile) - { - if (playspace == null) - { - Debug.LogError("The MixedRealityDiagnosticSystem object requires a valid playspace Transform."); - } - Playspace = playspace; - } + MixedRealityDiagnosticsProfile profile) : base(registrar, profile) + { } /// /// The parent object under which all visualization game objects will be placed. @@ -34,13 +28,15 @@ public class MixedRealityDiagnosticsSystem : BaseCoreSystem, IMixedRealityDiagno private void CreateVisualizations() { diagnosticVisualizationParent = new GameObject("Diagnostics"); - diagnosticVisualizationParent.transform.parent = Playspace.transform; + MixedRealityPlayspace.AddChild(diagnosticVisualizationParent.transform); diagnosticVisualizationParent.SetActive(ShowDiagnostics); // visual profiler settings visualProfiler = diagnosticVisualizationParent.AddComponent(); visualProfiler.WindowParent = diagnosticVisualizationParent.transform; visualProfiler.IsVisible = ShowProfiler; + visualProfiler.FrameInfoVisible = ShowFrameInfo; + visualProfiler.MemoryStatsVisible = ShowMemoryStats; visualProfiler.FrameSampleRate = FrameSampleRate; visualProfiler.WindowAnchor = WindowAnchor; visualProfiler.WindowOffset = WindowOffset; @@ -65,6 +61,8 @@ public override void Initialize() // Apply profile settings ShowDiagnostics = profile.ShowDiagnostics; ShowProfiler = profile.ShowProfiler; + ShowFrameInfo = profile.ShowFrameInfo; + ShowMemoryStats = profile.ShowMemoryStats; FrameSampleRate = profile.FrameSampleRate; WindowAnchor = profile.WindowAnchor; WindowOffset = profile.WindowOffset; @@ -96,15 +94,25 @@ public override void Destroy() #endregion IMixedRealityService #region IMixedRealityDiagnosticsSystem - /// - /// The transform of the playspace scene object. We use this transform to parent - /// diagnostic visualizations that teleport with the user and to perform calculations - /// to ensure proper alignment with the world. - /// - private Transform Playspace = null; + + private MixedRealityDiagnosticsProfile diagnosticsSystemProfile = null; + + /// + public MixedRealityDiagnosticsProfile DiagnosticsSystemProfile + { + get + { + if (diagnosticsSystemProfile == null) + { + diagnosticsSystemProfile = ConfigurationProfile as MixedRealityDiagnosticsProfile; + } + return diagnosticsSystemProfile; + } + } private bool showDiagnostics; + /// public bool ShowDiagnostics { get { return showDiagnostics; } @@ -146,6 +154,52 @@ public bool ShowProfiler } } + private bool showFrameInfo; + + /// + public bool ShowFrameInfo + { + get + { + return showFrameInfo; + } + + set + { + if (value != showFrameInfo) + { + showFrameInfo = value; + if (visualProfiler != null) + { + visualProfiler.FrameInfoVisible = value; + } + } + } + } + + private bool showMemoryStats; + + /// + public bool ShowMemoryStats + { + get + { + return showMemoryStats; + } + + set + { + if (value != showMemoryStats) + { + showMemoryStats = value; + if (visualProfiler != null) + { + visualProfiler.MemoryStatsVisible = value; + } + } + } + } + private float frameSampleRate = 0.1f; /// diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs index b2f0418cc89..c2482c47ebb 100644 --- a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs @@ -31,6 +31,8 @@ public class MixedRealityToolkitVisualProfiler : MonoBehaviour private static readonly int frameRange = 30; private static readonly Vector2 defaultWindowRotation = new Vector2(10.0f, 20.0f); private static readonly Vector3 defaultWindowScale = new Vector3(0.2f, 0.04f, 1.0f); + private static readonly Vector3[] backgroundScales = { new Vector3(1.0f, 1.0f, 1.0f), new Vector3(1.0f, 0.5f, 1.0f), new Vector3(1.0f, 0.25f, 1.0f) }; + private static readonly Vector3[] backgroundOffsets = { new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.25f, 0.0f), new Vector3(0.0f, 0.375f, 0.0f) }; private static readonly string usedMemoryString = "Used: "; private static readonly string peakMemoryString = "Peak: "; private static readonly string limitMemoryString = "Limit: "; @@ -47,6 +49,24 @@ public bool IsVisible set { isVisible = value; } } + [SerializeField, Tooltip("Should the frame info (colored bars) be displayed.")] + private bool frameInfoVisible = true; + + public bool FrameInfoVisible + { + get { return frameInfoVisible; } + set { frameInfoVisible = value; } + } + + [SerializeField, Tooltip("Should memory stats (used, peak, and limit) be displayed.")] + private bool memoryStatsVisible = true; + + public bool MemoryStatsVisible + { + get { return memoryStatsVisible; } + set { memoryStatsVisible = value; } + } + [SerializeField, Tooltip("The amount of time, in seconds, to collect frames for frame rate calculation.")] private float frameSampleRate = 0.1f; @@ -96,12 +116,29 @@ public float WindowFollowSpeed [Header("UI Settings")] [SerializeField, Range(0, 3), Tooltip("How many decimal places to display on numeric strings.")] private int displayedDecimalDigits = 1; + + [System.Serializable] + private struct FrameRateColor + { + [Range(0.0f, 1.0f), Tooltip("The percentage of the target frame rate.")] + public float percentageOfTarget; + [Tooltip("The color to display for frames which meet or exceed the percentage of the target frame rate.")] + public Color color; + } + + [SerializeField, Tooltip("A list of colors to display for different percentage of target frame rates.")] + private FrameRateColor[] frameRateColors = new FrameRateColor[] + { + // Green + new FrameRateColor() { percentageOfTarget = 0.95f, color = new Color(127 / 256.0f, 186 / 256.0f, 0 / 256.0f, 1.0f) }, + // Yellow + new FrameRateColor() { percentageOfTarget = 0.75f, color = new Color(255 / 256.0f, 185 / 256.0f, 0 / 256.0f, 1.0f) }, + // Red + new FrameRateColor() { percentageOfTarget = 0.0f, color = new Color(255 / 256.0f, 0 / 256.0f, 0 / 256.0f, 1.0f) }, + }; + [SerializeField, Tooltip("The color of the window backplate.")] private Color baseColor = new Color(80 / 256.0f, 80 / 256.0f, 80 / 256.0f, 1.0f); - [SerializeField, Tooltip("The color to display on frames which meet or exceed the target frame rate.")] - private Color targetFrameRateColor = new Color(127 / 256.0f, 186 / 256.0f, 0 / 256.0f, 1.0f); - [SerializeField, Tooltip("The color to display on frames which fall below the target frame rate.")] - private Color missedFrameRateColor = new Color(242 / 256.0f, 80 / 256.0f, 34 / 256.0f, 1.0f); [SerializeField, Tooltip("The color to display for current memory usage values.")] private Color memoryUsedColor = new Color(0 / 256.0f, 164 / 256.0f, 239 / 256.0f, 1.0f); [SerializeField, Tooltip("The color to display for peak (aka max) memory usage values.")] @@ -109,9 +146,11 @@ public float WindowFollowSpeed [SerializeField, Tooltip("The color to display for the platforms memory usage limit.")] private Color memoryLimitColor = new Color(150 / 256.0f, 150 / 256.0f, 150 / 256.0f, 1.0f); - private GameObject window; + private Transform window; + private Transform background; private TextMesh cpuFrameRateText; private TextMesh gpuFrameRateText; + private Transform memoryStats; private TextMesh usedMemoryText; private TextMesh peakMemoryText; private TextMesh limitMemoryText; @@ -218,7 +257,10 @@ private void Start() private void OnDestroy() { - Destroy(window); + if (window != null) + { + Destroy(window.gameObject); + } } private void LateUpdate() @@ -231,12 +273,13 @@ private void LateUpdate() // Update window transformation. Transform cameraTransform = Camera.main ? Camera.main.transform : null; - if (window.activeSelf && cameraTransform != null) + if (isVisible && cameraTransform != null) { float t = Time.deltaTime * windowFollowSpeed; - window.transform.position = Vector3.Lerp(window.transform.position, CalculateWindowPosition(cameraTransform), t); - window.transform.rotation = Quaternion.Slerp(window.transform.rotation, CalculateWindowRotation(cameraTransform), t); - window.transform.localScale = defaultWindowScale * windowScale; + window.position = Vector3.Lerp(window.position, CalculateWindowPosition(cameraTransform), t); + window.rotation = Quaternion.Slerp(window.rotation, CalculateWindowRotation(cameraTransform), t); + window.localScale = defaultWindowScale * windowScale; + CalculateBackgroundSize(); } // Capture frame timings every frame and read from it depending on the frameSampleRate. @@ -272,16 +315,16 @@ private void LateUpdate() } // Update frame colors. - for (int i = frameRange - 1; i > 0; --i) + if (frameInfoVisible) { - frameInfoColors[i] = frameInfoColors[i - 1]; - } + for (int i = frameRange - 1; i > 0; --i) + { + frameInfoColors[i] = frameInfoColors[i - 1]; + } - // Ideally we would query a device specific API (like the HolographicFramePresentationReport) to detect missed frames. - // But, many of these APIs are inaccessible in Unity. Currently missed frames are assumed when the average cpuFrameRate - // is under the target frame rate. - frameInfoColors[0] = (cpuFrameRate < ((int)(AppFrameRate) - 1)) ? missedFrameRateColor : targetFrameRateColor; - frameInfoPropertyBlock.SetVectorArray(colorID, frameInfoColors); + frameInfoColors[0] = CalculateFrameColor(cpuFrameRate); + frameInfoPropertyBlock.SetVectorArray(colorID, frameInfoColors); + } // Reset timers. frameCount = 0; @@ -290,9 +333,9 @@ private void LateUpdate() } // Draw frame info. - if (window.activeSelf) + if (isVisible && frameInfoVisible) { - Matrix4x4 parentLocalToWorldMatrix = window.transform.localToWorldMatrix; + Matrix4x4 parentLocalToWorldMatrix = window.localToWorldMatrix; if (defaultInstancedMaterial != null) { @@ -311,45 +354,50 @@ private void LateUpdate() } // Update memory statistics. - ulong limit = AppMemoryUsageLimit; - - if (limit != limitMemoryUsage) + if (isVisible && memoryStatsVisible) { - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(limitMemoryUsage, limit, displayedDecimalDigits)) + ulong limit = AppMemoryUsageLimit; + + if (limit != limitMemoryUsage) { - MemoryUsageToString(stringBuffer, displayedDecimalDigits, limitMemoryText, limitMemoryString, limit); + if (WillDisplayedMemoryUsageDiffer(limitMemoryUsage, limit, displayedDecimalDigits)) + { + MemoryUsageToString(stringBuffer, displayedDecimalDigits, limitMemoryText, limitMemoryString, limit); + } + + limitMemoryUsage = limit; } - limitMemoryUsage = limit; - } + ulong usage = AppMemoryUsage; - ulong usage = AppMemoryUsage; + if (usage != memoryUsage) + { + usedAnchor.localScale = new Vector3((float)usage / limitMemoryUsage, usedAnchor.localScale.y, usedAnchor.localScale.z); - if (usage != memoryUsage) - { - usedAnchor.localScale = new Vector3((float)usage / limitMemoryUsage, usedAnchor.localScale.y, usedAnchor.localScale.z); + if (WillDisplayedMemoryUsageDiffer(memoryUsage, usage, displayedDecimalDigits)) + { + MemoryUsageToString(stringBuffer, displayedDecimalDigits, usedMemoryText, usedMemoryString, usage); + } - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(memoryUsage, usage, displayedDecimalDigits)) - { - MemoryUsageToString(stringBuffer, displayedDecimalDigits, usedMemoryText, usedMemoryString, usage); + memoryUsage = usage; } - memoryUsage = usage; - } + if (memoryUsage > peakMemoryUsage) + { + peakAnchor.localScale = new Vector3((float)memoryUsage / limitMemoryUsage, peakAnchor.localScale.y, peakAnchor.localScale.z); - if (memoryUsage > peakMemoryUsage) - { - peakAnchor.localScale = new Vector3((float)memoryUsage / limitMemoryUsage, peakAnchor.localScale.y, peakAnchor.localScale.z); + if (WillDisplayedMemoryUsageDiffer(peakMemoryUsage, memoryUsage, displayedDecimalDigits)) + { + MemoryUsageToString(stringBuffer, displayedDecimalDigits, peakMemoryText, peakMemoryString, memoryUsage); + } - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(peakMemoryUsage, memoryUsage, displayedDecimalDigits)) - { - MemoryUsageToString(stringBuffer, displayedDecimalDigits, peakMemoryText, peakMemoryString, memoryUsage); + peakMemoryUsage = memoryUsage; } - - peakMemoryUsage = memoryUsage; } - window.SetActive(isVisible); + // Update visibility state. + window.gameObject.SetActive(isVisible); + memoryStats.gameObject.SetActive(memoryStatsVisible); } private Vector3 CalculateWindowPosition(Transform cameraTransform) @@ -393,6 +441,52 @@ private Quaternion CalculateWindowRotation(Transform cameraTransform) return rotation; } + private Color CalculateFrameColor(int frameRate) + { + // Ideally we would query a device specific API (like the HolographicFramePresentationReport) to detect missed frames. + // But, many of these APIs are inaccessible in Unity. Currently missed frames are assumed when the average cpuFrameRate + // is under the target frame rate. + + int colorCount = frameRateColors.Length; + + if (colorCount == 0) + { + return baseColor; + } + + float percentageOfTarget = frameRate / AppTargetFrameRate; + int lastColor = colorCount - 1; + + for (int i = 0; i < lastColor; ++i) + { + if (percentageOfTarget >= frameRateColors[i].percentageOfTarget) + { + return frameRateColors[i].color; + } + } + + return frameRateColors[lastColor].color; + } + + private void CalculateBackgroundSize() + { + if (frameInfoVisible && memoryStatsVisible || memoryStatsVisible) + { + background.localPosition = backgroundOffsets[0]; + background.localScale = backgroundScales[0]; + } + else if (frameInfoVisible) + { + background.localPosition = backgroundOffsets[1]; + background.localScale = backgroundScales[1]; + } + else + { + background.localPosition = backgroundOffsets[2]; + background.localScale = backgroundScales[2]; + } + } + private void BuildWindow() { // Initialize property block state. @@ -401,20 +495,26 @@ private void BuildWindow() // Build the window root. { - window = CreateQuad("VisualProfiler", null); - window.transform.parent = WindowParent; - InitializeRenderer(window, backgroundMaterial, colorID, baseColor); - window.transform.localScale = defaultWindowScale; + window = new GameObject("VisualProfiler").transform; + window.parent = WindowParent; + window.localScale = defaultWindowScale; windowHorizontalRotation = Quaternion.AngleAxis(defaultWindowRotation.y, Vector3.right); windowHorizontalRotationInverse = Quaternion.Inverse(windowHorizontalRotation); windowVerticalRotation = Quaternion.AngleAxis(defaultWindowRotation.x, Vector3.up); windowVerticalRotationInverse = Quaternion.Inverse(windowVerticalRotation); } + // Build the window boackground. + { + background = CreateQuad("Background", window).transform; + InitializeRenderer(background.gameObject, backgroundMaterial, colorID, baseColor); + CalculateBackgroundSize(); + } + // Add frame rate text and frame indicators. { - cpuFrameRateText = CreateText("CPUFrameRateText", new Vector3(-0.495f, 0.5f, 0.0f), window.transform, TextAnchor.UpperLeft, textMaterial, Color.white, string.Empty); - gpuFrameRateText = CreateText("GPUFrameRateText", new Vector3(0.495f, 0.5f, 0.0f), window.transform, TextAnchor.UpperRight, textMaterial, Color.white, string.Empty); + cpuFrameRateText = CreateText("CPUFrameRateText", new Vector3(-0.495f, 0.5f, 0.0f), window, TextAnchor.UpperLeft, textMaterial, Color.white, string.Empty); + gpuFrameRateText = CreateText("GPUFrameRateText", new Vector3(0.495f, 0.5f, 0.0f), window, TextAnchor.UpperRight, textMaterial, Color.white, string.Empty); gpuFrameRateText.gameObject.SetActive(false); frameInfoMatrices = new Matrix4x4[frameRange]; @@ -426,7 +526,7 @@ private void BuildWindow() { frameInfoMatrices[i] = Matrix4x4.TRS(position, Quaternion.identity, new Vector3(scale.x * 0.8f, scale.y, scale.z)); position.x -= scale.x; - frameInfoColors[i] = targetFrameRateColor; + frameInfoColors[i] = CalculateFrameColor((int)AppTargetFrameRate); } frameInfoPropertyBlock = new MaterialPropertyBlock(); @@ -435,11 +535,15 @@ private void BuildWindow() // Add memory usage text and bars. { - usedMemoryText = CreateText("UsedMemoryText", new Vector3(-0.495f, 0.0f, 0.0f), window.transform, TextAnchor.UpperLeft, textMaterial, memoryUsedColor, usedMemoryString); - peakMemoryText = CreateText("PeakMemoryText", new Vector3(0.0f, 0.0f, 0.0f), window.transform, TextAnchor.UpperCenter, textMaterial, memoryPeakColor, peakMemoryString); - limitMemoryText = CreateText("LimitMemoryText", new Vector3(0.495f, 0.0f, 0.0f), window.transform, TextAnchor.UpperRight, textMaterial, Color.white, limitMemoryString); + memoryStats = new GameObject("MemoryStats").transform; + memoryStats.parent = window; + memoryStats.localScale = Vector3.one; + + usedMemoryText = CreateText("UsedMemoryText", new Vector3(-0.495f, 0.0f, 0.0f), memoryStats, TextAnchor.UpperLeft, textMaterial, memoryUsedColor, usedMemoryString); + peakMemoryText = CreateText("PeakMemoryText", new Vector3(0.0f, 0.0f, 0.0f), memoryStats, TextAnchor.UpperCenter, textMaterial, memoryPeakColor, peakMemoryString); + limitMemoryText = CreateText("LimitMemoryText", new Vector3(0.495f, 0.0f, 0.0f), memoryStats, TextAnchor.UpperRight, textMaterial, Color.white, limitMemoryString); - GameObject limitBar = CreateQuad("LimitBar", window.transform); + GameObject limitBar = CreateQuad("LimitBar", memoryStats); InitializeRenderer(limitBar, defaultMaterial, colorID, memoryLimitColor); limitBar.transform.localScale = new Vector3(0.99f, 0.2f, 1.0f); limitBar.transform.localPosition = new Vector3(0.0f, -0.37f, 0.0f); @@ -462,7 +566,8 @@ private void BuildWindow() } } - window.SetActive(isVisible); + window.gameObject.SetActive(isVisible); + memoryStats.gameObject.SetActive(memoryStatsVisible); } private void BuildFrameRateStrings() @@ -608,7 +713,7 @@ private static int MemoryItoA(int value, char[] stringBuffer, int bufferIndex) return bufferIndex; } - private static float AppFrameRate + private static float AppTargetFrameRate { get { diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses.meta new file mode 100644 index 00000000000..adbc91376a6 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce2d5adf3957ec7479e5462d15e43936 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json new file mode 100644 index 00000000000..bea7e1d31aa --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.0470723882317543,"y":-0.18403607606887818,"z":-0.5408412218093872},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.06179157271981239,"y":-0.15333214402198792,"z":-0.0469515398144722},"rotation":{"x":-0.5501163005828857,"y":-0.11712269484996796,"z":0.001836930401623249,"w":0.8265576958656311}}},{"joint":"Palm","pose":{"position":{"x":0.05801215022802353,"y":-0.1058567613363266,"z":-0.02556976117193699},"rotation":{"x":-0.5501163005828857,"y":-0.11712269484996796,"z":0.001836930401623249,"w":0.8265576958656311}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.03695414960384369,"y":-0.1407443881034851,"z":-0.03328647091984749},"rotation":{"x":-0.5855690240859985,"y":-0.10429229587316513,"z":0.5890942811965942,"w":0.547493577003479}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.00045104348100721836,"y":-0.11720659583806992,"z":-0.01997363194823265},"rotation":{"x":-0.5386121273040772,"y":0.04485885053873062,"z":0.5422580242156982,"w":0.6437124609947205}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":-0.016296127811074258,"y":-0.09359179437160492,"z":-0.006718119606375694},"rotation":{"x":-0.6040476560592651,"y":-0.08891747146844864,"z":0.5752687454223633,"w":0.5448194742202759}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.03216664865612984,"y":-0.08244754374027252,"z":-0.001603197306394577},"rotation":{"x":-0.6040476560592651,"y":-0.08891747146844864,"z":0.5752687454223633,"w":0.5448194742202759}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.04794362187385559,"y":-0.13700048625469209,"z":-0.03438100963830948},"rotation":{"x":-0.534980297088623,"y":-0.28449201583862307,"z":-0.061086010187864307,"w":0.7931764721870422}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.023209279403090478,"y":-0.08038382232189179,"z":-0.017351558431982995},"rotation":{"x":-0.599485456943512,"y":-0.1474478840827942,"z":0.04840812832117081,"w":0.7852058410644531}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":0.009743190370500088,"y":-0.03727291524410248,"z":-0.006295463070273399},"rotation":{"x":-0.6344203948974609,"y":-0.08629350364208222,"z":0.11939872056245804,"w":0.7588865756988525}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":0.0026917937211692335,"y":-0.013759316876530648,"z":-0.0017971978522837163},"rotation":{"x":-0.6451734304428101,"y":-0.12336783856153488,"z":0.00809548981487751,"w":0.7542511224746704}}},{"joint":"IndexTip","pose":{"position":{"x":-0.0002534952946007252,"y":0.0007631087210029364,"z":0.0002575620310381055},"rotation":{"x":-0.6451734304428101,"y":-0.12336783856153488,"z":0.00809548981487751,"w":0.7542511224746704}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.056570135056972507,"y":-0.13634957373142243,"z":-0.03486650064587593},"rotation":{"x":-0.6017327308654785,"y":-0.1049300879240036,"z":0.008752312511205674,"w":0.7917264699935913}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.045069482177495959,"y":-0.07444917410612107,"z":-0.018345370888710023},"rotation":{"x":-0.5885983109474182,"y":-0.10035836696624756,"z":0.025189023464918138,"w":0.8017893433570862}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.035030756145715716,"y":-0.025001518428325654,"z":-0.0032290546223521234},"rotation":{"x":-0.6631931662559509,"y":-0.09005288034677506,"z":-0.0027521485462784769,"w":0.7431085109710693}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.031546302139759067,"y":0.0013798222644254566,"z":-0.0004363078624010086},"rotation":{"x":-0.6468731164932251,"y":-0.11953263729810715,"z":-0.06937266886234284,"w":0.7504633665084839}}},{"joint":"MiddleTip","pose":{"position":{"x":0.030048875138163568,"y":0.017790958285331727,"z":0.0018172836862504483},"rotation":{"x":-0.6468731164932251,"y":-0.11953263729810715,"z":-0.06937266886234284,"w":0.7504633665084839}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.06806596368551254,"y":-0.13525664806365968,"z":-0.034837257117033008},"rotation":{"x":-0.5803540945053101,"y":0.014031633734703064,"z":0.05480925738811493,"w":0.8123965859413147}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.06544187664985657,"y":-0.07453925907611847,"z":-0.013881120830774308},"rotation":{"x":-0.6466344594955444,"y":-0.03600946068763733,"z":0.02467469871044159,"w":0.7615609765052795}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.06159381568431854,"y":-0.03093438223004341,"z":-0.006733019836246967},"rotation":{"x":-0.6550348401069641,"y":-0.06099399924278259,"z":-0.04121965169906616,"w":0.7520787715911865}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.06070023775100708,"y":-0.007464663125574589,"z":-0.003544492181390524},"rotation":{"x":-0.6712727546691895,"y":-0.05777180939912796,"z":-0.05727298930287361,"w":0.7370488047599793}}},{"joint":"RingTip","pose":{"position":{"x":0.060552775859832767,"y":0.010114867240190506,"z":-0.0019072332652285696},"rotation":{"x":-0.6712727546691895,"y":-0.05777180939912796,"z":-0.05727298930287361,"w":0.7370488047599793}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.07710164040327072,"y":-0.13650110363960267,"z":-0.032643478363752368},"rotation":{"x":-0.5344982147216797,"y":0.1545339822769165,"z":0.10820292681455612,"w":0.8238464593887329}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.08530370891094208,"y":-0.08254323154687882,"z":-0.010162543505430222},"rotation":{"x":-0.6702333688735962,"y":0.05704934149980545,"z":0.006686835549771786,"w":0.7399358749389648}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.08779342472553253,"y":-0.049793362617492679,"z":-0.0070251524448394779},"rotation":{"x":-0.6393072605133057,"y":0.030266048386693,"z":-0.15569603443145753,"w":0.7524937987327576}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.09219621121883393,"y":-0.03264733776450157,"z":-0.0037694787606596948},"rotation":{"x":-0.6555882692337036,"y":-0.0018634665757417679,"z":-0.09289215505123139,"w":0.7497090101242065}}},{"joint":"PinkyTip","pose":{"position":{"x":0.09392204880714417,"y":-0.018381092697381974,"z":-0.0017222119495272637},"rotation":{"x":-0.6555882692337036,"y":-0.0018634665757417679,"z":-0.09289215505123139,"w":0.7497090101242065}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json.meta new file mode 100644 index 00000000000..06c81debf9e --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Flat.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e7d04f951437f78409ca4c7a29bf4f4d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json new file mode 100644 index 00000000000..2d7764bdd17 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.08690944314002991,"y":0.013536587357521057,"z":-0.3781388998031616},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.059647563844919208,"y":-0.018170714378356935,"z":-0.07320141047239304},"rotation":{"x":-0.44069746136665347,"y":-0.3151600956916809,"z":-0.029152734205126764,"w":0.8398429155349731}}},{"joint":"Palm","pose":{"position":{"x":0.040150947868824008,"y":0.022433746606111528,"z":-0.04928050562739372},"rotation":{"x":-0.44069746136665347,"y":-0.3151600956916809,"z":-0.029152734205126764,"w":0.8398429155349731}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.033823080360889438,"y":-0.014000600203871727,"z":-0.06483504176139832},"rotation":{"x":0.46251192688941958,"y":0.15892137587070466,"z":-0.748396635055542,"w":-0.44902268052101138}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":-0.0048112208023667339,"y":-0.005827075336128473,"z":-0.04063580185174942},"rotation":{"x":0.32614850997924807,"y":-0.017511412501335145,"z":-0.7735356688499451,"w":-0.5439797639846802}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":-0.02188277430832386,"y":0.0075818500481545929,"z":-0.01290540024638176},"rotation":{"x":0.22856087982654572,"y":-0.09300848096609116,"z":-0.7769821286201477,"w":-0.5795565247535706}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.026505667716264726,"y":0.015197398141026497,"z":0.0034610535949468614},"rotation":{"x":0.22856087982654572,"y":-0.09300848096609116,"z":-0.7769821286201477,"w":-0.5795565247535706}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.04238410294055939,"y":-0.007463002577424049,"z":-0.06319385766983032},"rotation":{"x":-0.420803427696228,"y":-0.44982725381851199,"z":-0.04907778277993202,"w":0.7862387895584106}}},{"joint":"IndexKnuckle","pose":{"position":{"x":-0.0008817678317427635,"y":0.03838954120874405,"z":-0.04752813279628754},"rotation":{"x":0.004830620251595974,"y":0.18448397517204286,"z":-0.1560613363981247,"w":-0.9703620672225952}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":-0.014839660376310349,"y":0.03651837632060051,"z":-0.01135229505598545},"rotation":{"x":-0.5098936557769775,"y":0.03039226494729519,"z":-0.30394697189331057,"w":-0.8042332530021668}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":-0.008270945399999619,"y":0.015406630001962185,"z":0.0006891884841024876},"rotation":{"x":-0.7222777009010315,"y":-0.08202659338712692,"z":-0.2391108274459839,"w":-0.6440979242324829}}},{"joint":"IndexTip","pose":{"position":{"x":-0.0009594520088285208,"y":0.000933439121581614,"z":-0.00021468542399816215},"rotation":{"x":-0.7222777009010315,"y":-0.08202659338712692,"z":-0.2391108274459839,"w":-0.6440979242324829}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.04958740621805191,"y":-0.004707379266619682,"z":-0.06129273772239685},"rotation":{"x":-0.5128890872001648,"y":-0.29369285702705386,"z":0.018453821539878846,"w":0.8064419627189636}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.020074930042028428,"y":0.04420189931988716,"z":-0.04323747381567955},"rotation":{"x":-0.07308150827884674,"y":0.17278942465782166,"z":-0.10241489112377167,"w":-0.9769001603126526}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.005748542491346598,"y":0.0362907275557518,"z":-0.001959702931344509},"rotation":{"x":-0.7482351660728455,"y":0.06403420120477677,"z":-0.2061866670846939,"w":-0.6274414658546448}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.012452101334929467,"y":0.007901951670646668,"z":-0.0057104239240288738},"rotation":{"x":-0.9225407838821411,"y":-0.07818678766489029,"z":-0.1428528130054474,"w":-0.3514384627342224}}},{"joint":"MiddleTip","pose":{"position":{"x":0.01802952028810978,"y":-0.003061514813452959,"z":-0.01820256933569908},"rotation":{"x":-0.9225407838821411,"y":-0.07818678766489029,"z":-0.1428528130054474,"w":-0.3514384627342224}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.05912885442376137,"y":-0.0009383354336023331,"z":-0.05809984356164932},"rotation":{"x":-0.49521127343177798,"y":-0.17924758791923524,"z":0.07874160259962082,"w":0.846425473690033}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.038666337728500369,"y":0.04252086579799652,"z":-0.03421220928430557},"rotation":{"x":-0.1513676941394806,"y":0.15960678458213807,"z":-0.05129222199320793,"w":-0.9741657376289368}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.02693704515695572,"y":0.030163494870066644,"z":0.0016453623538836837},"rotation":{"x":-0.8552912473678589,"y":0.0920121893286705,"z":-0.11032526195049286,"w":-0.4979609251022339}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.029263043776154519,"y":0.009234108030796051,"z":-0.009864533320069313},"rotation":{"x":-0.9685380458831787,"y":-0.018125316128134729,"z":-0.094183549284935,"w":-0.23075833916664124}}},{"joint":"RingTip","pose":{"position":{"x":0.032915160059928897,"y":0.0007288604974746704,"z":-0.02667597308754921},"rotation":{"x":-0.9685380458831787,"y":-0.018125316128134729,"z":-0.094183549284935,"w":-0.23075833916664124}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.0675557404756546,"y":-0.0004099104553461075,"z":-0.05376683175563812},"rotation":{"x":-0.44121748208999636,"y":-0.05341072380542755,"z":0.14569664001464845,"w":0.8838818073272705}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.05575947463512421,"y":0.04002845287322998,"z":-0.02176406979560852},"rotation":{"x":-0.2122899889945984,"y":0.1802181601524353,"z":0.03122050315141678,"w":-0.959945559501648}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.046450983732938769,"y":0.029760107398033143,"z":0.0001273825764656067},"rotation":{"x":-0.8192430138587952,"y":0.16303858160972596,"z":-0.0602981373667717,"w":-0.5465834140777588}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.044868819415569308,"y":0.011532457545399666,"z":-0.007741663604974747},"rotation":{"x":-0.9710148572921753,"y":0.04234015569090843,"z":0.042903631925582889,"w":-0.23259779810905457}}},{"joint":"PinkyTip","pose":{"position":{"x":0.04328276216983795,"y":0.004625056870281696,"z":-0.0214386023581028},"rotation":{"x":-0.9710148572921753,"y":0.04234015569090843,"z":0.042903631925582889,"w":-0.23259779810905457}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json.meta new file mode 100644 index 00000000000..979892924c2 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Grab.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 26804200b794ba145a05c73b28c1134d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json new file mode 100644 index 00000000000..55fb126014d --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.0780251994729042,"y":-0.05990780144929886,"z":-0.3291178047657013},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.07397598028182984,"y":-0.1239677220582962,"z":-0.05636374652385712},"rotation":{"x":-0.5306746959686279,"y":-0.24036270380020142,"z":-0.0010364949703216553,"w":0.8126773834228516}}},{"joint":"Palm","pose":{"position":{"x":0.06148417666554451,"y":-0.08249785006046295,"z":-0.04003134369850159},"rotation":{"x":-0.5306746959686279,"y":-0.24036270380020142,"z":-0.0010364949703216553,"w":0.8126773834228516}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.05004027485847473,"y":-0.1168040931224823,"z":-0.046657364815473559},"rotation":{"x":-0.5606539249420166,"y":-0.098196841776371,"z":0.670694887638092,"w":0.4761941432952881}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.014790681190788746,"y":-0.1000247374176979,"z":-0.031946491450071338},"rotation":{"x":-0.5155644416809082,"y":-0.0010041594505310059,"z":0.6619959473609924,"w":0.5445378422737122}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":-0.0062080565840005878,"y":-0.0828109011054039,"z":-0.01753186620771885},"rotation":{"x":-0.5490170121192932,"y":-0.08343470841646195,"z":0.6728134751319885,"w":0.48939600586891177}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.02095535211265087,"y":-0.07516473531723023,"z":-0.010627731680870057},"rotation":{"x":-0.5490170121192932,"y":-0.08343470841646195,"z":0.6728134751319885,"w":0.48939600586891177}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.058891069144010547,"y":-0.11150021106004715,"z":-0.047359079122543338},"rotation":{"x":-0.5242606997489929,"y":-0.3638727068901062,"z":0.0003723353147506714,"w":0.7699006795883179}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.025922514498233796,"y":-0.06404880434274674,"z":-0.036451879888772967},"rotation":{"x":-0.5153175592422485,"y":-0.13684964179992677,"z":0.0975230410695076,"w":0.840372622013092}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":0.012116845697164536,"y":-0.028988275676965715,"z":-0.0184309259057045},"rotation":{"x":-0.5083625912666321,"y":-0.08690404891967774,"z":0.1772240400314331,"w":0.8382880687713623}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":0.0047910469584167,"y":-0.01052884478121996,"z":-0.007911253720521927},"rotation":{"x":-0.4986042380332947,"y":-0.10437075048685074,"z":0.07316453754901886,"w":0.8577484488487244}}},{"joint":"IndexTip","pose":{"position":{"x":0.0011067038867622614,"y":0.0017288230592384935,"z":-0.0008905145805329084},"rotation":{"x":-0.4986042380332947,"y":-0.10437075048685074,"z":0.07316453754901886,"w":0.8577484488487244}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.06627093255519867,"y":-0.1093648374080658,"z":-0.04731958359479904},"rotation":{"x":-0.5980523824691773,"y":-0.19373856484889985,"z":0.061999037861824039,"w":0.7752125859260559}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.04579643905162811,"y":-0.05998942255973816,"z":-0.035861626267433169},"rotation":{"x":0.07707051932811737,"y":0.09493987262248993,"z":-0.06967925280332566,"w":-0.9900561571121216}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.03759719431400299,"y":-0.054239436984062198,"z":0.004158938303589821},"rotation":{"x":-0.5364435911178589,"y":0.035090312361717227,"z":-0.1292860358953476,"w":-0.8333183526992798}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.039636775851249698,"y":-0.07725092768669129,"z":0.014920881018042565},"rotation":{"x":-0.7898687720298767,"y":-0.05351902171969414,"z":-0.050689004361629489,"w":-0.6095116138458252}}},{"joint":"MiddleTip","pose":{"position":{"x":0.04198702797293663,"y":-0.09284322708845139,"z":0.010831182822585106},"rotation":{"x":-0.7898687720298767,"y":-0.05351902171969414,"z":-0.050689004361629489,"w":-0.6095116138458252}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.07596171647310257,"y":-0.10612225532531738,"z":-0.04667811840772629},"rotation":{"x":-0.5675100088119507,"y":-0.08019199222326279,"z":0.10617346316576004,"w":0.8125444054603577}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.06377431005239487,"y":-0.06213853880763054,"z":-0.030012063682079316},"rotation":{"x":-0.03975258022546768,"y":0.09559198468923569,"z":-0.024301081895828248,"w":-0.9943375587463379}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.056988153606653216,"y":-0.06515654176473618,"z":0.005276134237647057},"rotation":{"x":-0.7588484287261963,"y":0.0701710507273674,"z":-0.045488141477108,"w":-0.6459669470787048}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.05652663856744766,"y":-0.08611556887626648,"z":0.0018516592681407929},"rotation":{"x":-0.9129649996757507,"y":-0.005179869011044502,"z":-0.007560268044471741,"w":-0.408629447221756}}},{"joint":"RingTip","pose":{"position":{"x":0.056841082870960239,"y":-0.09943331778049469,"z":-0.010053567588329316},"rotation":{"x":-0.9129649996757507,"y":-0.005179869011044502,"z":-0.007560268044471741,"w":-0.408629447221756}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.08423660695552826,"y":-0.10567539930343628,"z":-0.044220417737960818},"rotation":{"x":-0.5077040791511536,"y":0.04072892665863037,"z":0.1517779380083084,"w":0.8470779657363892}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.0801829993724823,"y":-0.06412312388420105,"z":-0.021305494010448457},"rotation":{"x":-0.08299122005701065,"y":0.1249239444732666,"z":0.04155319184064865,"w":-0.9878235459327698}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.07411551475524903,"y":-0.0677957683801651,"z":0.0015332028269767762},"rotation":{"x":-0.715654730796814,"y":0.1371033787727356,"z":0.001321159303188324,"w":-0.6849520206451416}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.07075578719377518,"y":-0.08515383303165436,"z":0.00044181570410728455},"rotation":{"x":-0.8999292254447937,"y":0.06855495274066925,"z":0.11455988883972168,"w":-0.41592133045196535}}},{"joint":"PinkyTip","pose":{"position":{"x":0.0670883059501648,"y":-0.09537018835544586,"z":-0.008319821208715439},"rotation":{"x":-0.8999292254447937,"y":0.06855495274066925,"z":0.11455988883972168,"w":-0.41592133045196535}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json.meta new file mode 100644 index 00000000000..72fc1f71e16 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Open.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 09df9528e8b9f6549a5f0989692b84ed +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json new file mode 100644 index 00000000000..14069366bee --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.05803713947534561,"y":-0.0574306957423687,"z":-0.3166872262954712},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.09272913634777069,"y":-0.07885700464248657,"z":-0.04831989109516144},"rotation":{"x":-0.5712693333625794,"y":-0.40886738896369936,"z":-0.1171460971236229,"w":0.7017942667007446}}},{"joint":"Palm","pose":{"position":{"x":0.07620562613010407,"y":-0.03217262774705887,"z":-0.043687816709280017},"rotation":{"x":-0.5712693333625794,"y":-0.40886738896369936,"z":-0.1171460971236229,"w":0.7017942667007446}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.06819753348827362,"y":-0.0703994631767273,"z":-0.049735166132450107},"rotation":{"x":0.5995731949806213,"y":0.05699071288108826,"z":-0.661469042301178,"w":-0.44784826040267947}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.02868979424238205,"y":-0.048832379281520846,"z":-0.036811355501413348},"rotation":{"x":0.48144450783729555,"y":-0.07798700034618378,"z":-0.6672651767730713,"w":-0.5636534690856934}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":0.009136375971138478,"y":-0.026046080514788629,"z":-0.018259162083268167},"rotation":{"x":0.48974254727363589,"y":-0.04340343177318573,"z":-0.678149402141571,"w":-0.5469872951507568}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.0027813860215246679,"y":-0.01456708274781704,"z":-0.008242706768214703},"rotation":{"x":0.48974254727363589,"y":-0.04340343177318573,"z":-0.678149402141571,"w":-0.5469872951507568}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.07683035731315613,"y":-0.06475835293531418,"z":-0.04752133786678314},"rotation":{"x":-0.5483980774879456,"y":-0.5408281683921814,"z":-0.10956580191850662,"w":0.6282992959022522}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.04007211700081825,"y":-0.011692005209624768,"z":-0.05977366864681244},"rotation":{"x":0.33803752064704897,"y":0.3461552560329437,"z":-0.07535676658153534,"w":-0.8719203472137451}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":0.01340008620172739,"y":0.010200870223343373,"z":-0.03810431808233261},"rotation":{"x":0.011520777828991413,"y":0.23532292246818543,"z":-0.26723867654800417,"w":-0.9344292879104614}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":0.002124335616827011,"y":0.007566994056105614,"z":-0.015632472932338716},"rotation":{"x":-0.18848013877868653,"y":0.1752738356590271,"z":-0.23216751217842103,"w":-0.938201367855072}}},{"joint":"IndexTip","pose":{"position":{"x":-0.0017012320458889008,"y":0.0006942185573279858,"z":-0.0019157170318067074},"rotation":{"x":-0.18848013877868653,"y":0.1752738356590271,"z":-0.23216751217842103,"w":-0.938201367855072}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.08333268761634827,"y":-0.06241743639111519,"z":-0.04416743665933609},"rotation":{"x":-0.6404632925987244,"y":-0.373137503862381,"z":-0.08211363852024079,"w":0.6662076711654663}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.05946168303489685,"y":-0.006718790158629417,"z":-0.050187066197395328},"rotation":{"x":0.1714177131652832,"y":0.3295632004737854,"z":-0.056909773498773578,"w":-0.9267067909240723}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.031405698508024219,"y":0.005752798169851303,"z":-0.017961783334612848},"rotation":{"x":-0.5295533537864685,"y":0.20503298938274384,"z":-0.28541553020477297,"w":-0.7721519470214844}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.03097768872976303,"y":-0.021602902561426164,"z":-0.007563188672065735},"rotation":{"x":-0.8061169385910034,"y":0.037188127636909488,"z":-0.2547818720340729,"w":-0.5337793231010437}}},{"joint":"MiddleTip","pose":{"position":{"x":0.03748321905732155,"y":-0.037102628499269488,"z":-0.012851428240537644},"rotation":{"x":-0.8061169385910034,"y":0.037188127636909488,"z":-0.2547818720340729,"w":-0.5337793231010437}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.09180567413568497,"y":-0.05892046540975571,"z":-0.03915772587060928},"rotation":{"x":-0.6309950351715088,"y":-0.2576797306537628,"z":-0.04002552852034569,"w":0.7306466698646545}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.07399174571037293,"y":-0.007413114421069622,"z":-0.035284288227558139},"rotation":{"x":0.06152142584323883,"y":0.3274478316307068,"z":-0.026347285136580468,"w":-0.9425047636032105}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.04940219968557358,"y":-0.00350095983594656,"z":-0.004453467205166817},"rotation":{"x":-0.7006344199180603,"y":0.22492779791355134,"z":-0.23193849623203278,"w":-0.6362745761871338}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.05032587796449661,"y":-0.027354829013347627,"z":-0.006434191018342972},"rotation":{"x":-0.8894772529602051,"y":0.06817293167114258,"z":-0.23703967034816743,"w":-0.38538727164268496}}},{"joint":"RingTip","pose":{"position":{"x":0.057455599308013919,"y":-0.041229620575904849,"z":-0.017864882946014406},"rotation":{"x":-0.8894772529602051,"y":0.06817293167114258,"z":-0.23703967034816743,"w":-0.38538727164268496}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.09856924414634705,"y":-0.05792553722858429,"z":-0.03258718177676201},"rotation":{"x":-0.5876141786575317,"y":-0.13647006452083589,"z":0.010980717837810517,"w":0.7974740862846375}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.08619456738233566,"y":-0.007785597816109657,"z":-0.017979636788368226},"rotation":{"x":-0.015533886849880219,"y":0.36132562160491946,"z":0.04475637152791023,"w":-0.9312441349029541}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.0688447505235672,"y":-0.007697771303355694,"z":0.0010179057717323304},"rotation":{"x":-0.6863744854927063,"y":0.3016105890274048,"z":-0.18428879976272584,"w":-0.6356791257858276}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.06625930219888687,"y":-0.027179542928934099,"z":-0.0014343485236167908},"rotation":{"x":-0.9307159781455994,"y":0.13045383989810944,"z":-0.11257931590080261,"w":-0.32351988554000857}}},{"joint":"PinkyTip","pose":{"position":{"x":0.06821046769618988,"y":-0.037023287266492847,"z":-0.013367027044296265},"rotation":{"x":-0.9307159781455994,"y":0.13045383989810944,"z":-0.11257931590080261,"w":-0.32351988554000857}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json.meta new file mode 100644 index 00000000000..8f2233d5718 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Pinch.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 00711cdd19e18a74db7fc25c63d9a0bf +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json new file mode 100644 index 00000000000..6e4cf37aa88 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.06115446984767914,"y":-0.09662134945392609,"z":-0.2845369577407837},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.09835253655910492,"y":-0.13776640594005586,"z":-0.039533719420433047},"rotation":{"x":-0.5504903793334961,"y":-0.3628506064414978,"z":0.009051494300365448,"w":0.7516400218009949}}},{"joint":"Palm","pose":{"position":{"x":0.0762285590171814,"y":-0.0935618057847023,"z":-0.03025330975651741},"rotation":{"x":-0.5504903793334961,"y":-0.3628506064414978,"z":0.009051494300365448,"w":0.7516400218009949}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.0726172998547554,"y":-0.13283079862594605,"z":-0.03489827364683151},"rotation":{"x":0.5268919467926025,"y":0.07137523591518402,"z":-0.7376347184181213,"w":-0.4172084629535675}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.033425573259592059,"y":-0.11720558255910874,"z":-0.01445704698562622},"rotation":{"x":0.434413880109787,"y":-0.0821000337600708,"z":-0.7344200611114502,"w":-0.5157689452171326}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":0.014360085129737854,"y":-0.09762166440486908,"z":0.006609674543142319},"rotation":{"x":0.4773363769054413,"y":0.019135713577270509,"z":-0.7483649849891663,"w":-0.4610738456249237}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.00011064158752560616,"y":-0.08949866145849228,"z":0.017393887042999269},"rotation":{"x":0.4773363769054413,"y":0.019135713577270509,"z":-0.7483649849891663,"w":-0.4610738456249237}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.08073623478412628,"y":-0.125896617770195,"z":-0.034658633172512057},"rotation":{"x":-0.5162340998649597,"y":-0.5017301440238953,"z":0.006298713386058807,"w":0.6940672993659973}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.03474228084087372,"y":-0.0794244259595871,"z":-0.03704426437616348},"rotation":{"x":0.24844542145729066,"y":0.2553045451641083,"z":-0.1957876831293106,"w":-0.9136616587638855}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":0.011708781123161316,"y":-0.06496208906173706,"z":-0.006560325622558594},"rotation":{"x":-0.07294681668281555,"y":0.11601599305868149,"z":-0.3479400873184204,"w":-0.9274918437004089}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":0.007551820017397404,"y":-0.07041776180267334,"z":0.017747312784194948},"rotation":{"x":-0.23120707273483277,"y":0.04230353981256485,"z":-0.283862441778183,"w":-0.9298091530799866}}},{"joint":"IndexTip","pose":{"position":{"x":0.008366326801478863,"y":-0.07753925025463104,"z":0.03171003982424736},"rotation":{"x":-0.23120707273483277,"y":0.04230353981256485,"z":-0.283862441778183,"w":-0.9298091530799866}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.08751480281352997,"y":-0.12250128388404846,"z":-0.03293202817440033},"rotation":{"x":-0.6167790293693543,"y":-0.3379325270652771,"z":0.047245174646377566,"w":0.7093328237533569}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.05473826080560684,"y":-0.07110955566167832,"z":-0.03227551281452179},"rotation":{"x":0.14497825503349305,"y":0.23276910185813905,"z":-0.15017877519130708,"w":-0.9498769640922546}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.03288401663303375,"y":-0.061863791197538379,"z":0.005947750061750412},"rotation":{"x":-0.529046893119812,"y":0.08228799700737,"z":-0.27945762872695925,"w":-0.7971096038818359}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.03765859827399254,"y":-0.08771546185016632,"z":0.018359089270234109},"rotation":{"x":-0.7883356809616089,"y":-0.06667964905500412,"z":-0.20251651108264924,"w":-0.5779290795326233}}},{"joint":"MiddleTip","pose":{"position":{"x":0.044593729078769687,"y":-0.10324498265981674,"z":0.013978719711303711},"rotation":{"x":-0.7883356809616089,"y":-0.06667964905500412,"z":-0.20251651108264924,"w":-0.5779290795326233}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.09642073512077332,"y":-0.11764736473560333,"z":-0.03004951775074005},"rotation":{"x":-0.6103544235229492,"y":-0.2158902883529663,"z":0.09254944324493408,"w":0.756500780582428}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.07221101969480515,"y":-0.06899281591176987,"z":-0.021143771708011628},"rotation":{"x":0.05531589314341545,"y":0.22126297652721406,"z":-0.10504759848117829,"w":-0.9679690599441528}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.05479241907596588,"y":-0.06659357994794846,"z":0.014326661825180054},"rotation":{"x":-0.7176058888435364,"y":0.09858439117670059,"z":-0.19834160804748536,"w":-0.6603801846504211}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.05848679319024086,"y":-0.09022481739521027,"z":0.013152096420526505},"rotation":{"x":-0.902705729007721,"y":-0.04138700291514397,"z":-0.16108426451683045,"w":-0.39749816060066225}}},{"joint":"RingTip","pose":{"position":{"x":0.0647393986582756,"y":-0.10384124517440796,"z":0.000916551798582077},"rotation":{"x":-0.902705729007721,"y":-0.04138700291514397,"z":-0.16108426451683045,"w":-0.39749816060066225}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.10431554913520813,"y":-0.11550788581371308,"z":-0.02525215595960617},"rotation":{"x":-0.5731514096260071,"y":-0.08393544703722,"z":0.14239011704921723,"w":0.8026066422462463}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.08813987672328949,"y":-0.06685832887887955,"z":-0.0073963552713394169},"rotation":{"x":0.004650826565921307,"y":0.2523718476295471,"z":-0.022669829428195955,"w":-0.967362105846405}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.07569940388202667,"y":-0.066920705139637,"z":0.014825716614723206},"rotation":{"x":-0.6876563429832459,"y":0.1765523999929428,"z":-0.14831064641475678,"w":-0.6885376572608948}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.0749262273311615,"y":-0.08663906902074814,"z":0.014672402292490006},"rotation":{"x":-0.927348792552948,"y":0.0344926156103611,"z":-0.02340996265411377,"w":-0.37271565198898318}}},{"joint":"PinkyTip","pose":{"position":{"x":0.07520446181297302,"y":-0.09743660688400269,"z":0.0034288540482521059},"rotation":{"x":-0.927348792552948,"y":0.0344926156103611,"z":-0.02340996265411377,"w":-0.37271565198898318}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json.meta new file mode 100644 index 00000000000..18266f401d7 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_PinchSteadyWrist.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bcf1fd0588649141811cbcb8135da00 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json new file mode 100644 index 00000000000..b729855b6c2 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.0002162586897611618,"y":-0.07638707756996155,"z":-0.5826087594032288},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.042526353150606158,"y":-0.05274807661771774,"z":-0.002824799157679081},"rotation":{"x":-0.3676998019218445,"y":-0.23572500050067902,"z":-0.11507342755794525,"w":0.8920522332191467}}},{"joint":"Palm","pose":{"position":{"x":0.03201436251401901,"y":-0.019188636913895608,"z":0.02868746407330036},"rotation":{"x":-0.3676998019218445,"y":-0.23572500050067902,"z":-0.11507342755794525,"w":0.8920522332191467}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.020570117980241777,"y":-0.04709470272064209,"z":0.006985310930758715},"rotation":{"x":0.3615202307701111,"y":0.20331884920597077,"z":-0.6839582324028015,"w":-0.6008830666542053}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":-0.009850621223449707,"y":-0.04070408642292023,"z":0.034042149782180789},"rotation":{"x":0.21800242364406587,"y":0.02305757999420166,"z":-0.7068297266960144,"w":-0.673233151435852}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":-0.02049688994884491,"y":-0.03254491835832596,"z":0.06248035654425621},"rotation":{"x":0.258157342672348,"y":0.0635419636964798,"z":-0.7039065957069397,"w":-0.6593562960624695}}},{"joint":"ThumbTip","pose":{"position":{"x":-0.028410332277417184,"y":-0.028122693300247194,"z":0.07770571112632752},"rotation":{"x":0.258157342672348,"y":0.0635419636964798,"z":-0.7039065957069397,"w":-0.6593562960624695}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.029027197510004045,"y":-0.042809583246707919,"z":0.009094133973121643},"rotation":{"x":-0.3631853759288788,"y":-0.3677399158477783,"z":-0.1473514586687088,"w":0.8432979583740234}}},{"joint":"IndexKnuckle","pose":{"position":{"x":-0.0017803632654249669,"y":0.0004678480327129364,"z":0.03705211728811264},"rotation":{"x":-0.27657586336135867,"y":-0.15855258703231812,"z":0.0009860674617812038,"w":0.947831392288208}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":-0.014122002758085728,"y":0.021943308413028718,"z":0.06970683485269547},"rotation":{"x":-0.2553846836090088,"y":-0.12617842853069306,"z":0.09538201987743378,"w":0.9538831114768982}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":-0.020550768822431566,"y":0.0322258397936821,"z":0.08830686658620835},"rotation":{"x":-0.30963119864463808,"y":-0.11118883639574051,"z":-0.031351685523986819,"w":0.9441277980804443}}},{"joint":"IndexTip","pose":{"position":{"x":-0.02332291379570961,"y":0.04081675410270691,"z":0.09968645870685578},"rotation":{"x":-0.30963119864463808,"y":-0.11118883639574051,"z":-0.031351685523986819,"w":0.9441277980804443}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.035866666585206988,"y":-0.041708216071128848,"z":0.010740639641880989},"rotation":{"x":-0.43399062752723696,"y":-0.2068476676940918,"z":-0.05406999588012695,"w":0.8751816153526306}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.018060242757201196,"y":0.002479703165590763,"z":0.04112553596496582},"rotation":{"x":0.005038086324930191,"y":0.1527022123336792,"z":0.021530797705054284,"w":-0.9880359768867493}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.005449346732348204,"y":0.0031707696616649629,"z":0.08099328726530075},"rotation":{"x":-0.49786925315856936,"y":0.13922974467277528,"z":-0.07507844269275665,"w":-0.8527824878692627}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.0013555703917518259,"y":-0.01869615726172924,"z":0.09269960224628449},"rotation":{"x":-0.7163864970207214,"y":0.07041004300117493,"z":-0.030646607279777528,"w":-0.6939578652381897}}},{"joint":"MiddleTip","pose":{"position":{"x":0.0004728742642328143,"y":-0.03479576110839844,"z":0.09213778376579285},"rotation":{"x":-0.7163864970207214,"y":0.07041004300117493,"z":-0.030646607279777528,"w":-0.6939578652381897}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.044932689517736438,"y":-0.04016602039337158,"z":0.013597620651125908},"rotation":{"x":-0.3939853310585022,"y":-0.10114617645740509,"z":0.016117071732878686,"w":0.9133923053741455}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.03491469845175743,"y":-0.003818823955953121,"z":0.047541361302137378},"rotation":{"x":-0.11738020181655884,"y":0.15373656153678895,"z":0.05639626830816269,"w":-0.9795019030570984}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.023768775165081025,"y":-0.01135534793138504,"z":0.08033758401870728},"rotation":{"x":-0.7923092842102051,"y":0.16401034593582154,"z":-0.02978098951280117,"w":-0.5869977474212647}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.02067880891263485,"y":-0.031320542097091678,"z":0.0737735852599144},"rotation":{"x":-0.9346709847450256,"y":0.0874316394329071,"z":-0.023773543536663057,"w":-0.344605952501297}}},{"joint":"RingTip","pose":{"position":{"x":0.020386409014463426,"y":-0.04289411008358002,"z":0.06018315628170967},"rotation":{"x":-0.9346709847450256,"y":0.0874316394329071,"z":-0.023773543536663057,"w":-0.344605952501297}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.05288681760430336,"y":-0.041848354041576388,"z":0.01654883660376072},"rotation":{"x":-0.33144858479499819,"y":0.002071807160973549,"z":0.085218146443367,"w":0.9396145343780518}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.050300415605306628,"y":-0.011202438734471798,"z":0.054917603731155398},"rotation":{"x":-0.16419324278831483,"y":0.1696346402168274,"z":0.12252454459667206,"w":-0.9639865159988403}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.04166591167449951,"y":-0.017666997388005258,"z":0.07580538094043732},"rotation":{"x":-0.7474591135978699,"y":0.20672142505645753,"z":0.04626481607556343,"w":-0.6297129392623901}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.03587989881634712,"y":-0.03386271744966507,"z":0.0722469910979271},"rotation":{"x":-0.928327202796936,"y":0.13445810973644257,"z":0.1272566169500351,"w":-0.3232197165489197}}},{"joint":"PinkyTip","pose":{"position":{"x":0.03135494887828827,"y":-0.04178089275956154,"z":0.06164591759443283},"rotation":{"x":-0.928327202796936,"y":0.13445810973644257,"z":0.1272566169500351,"w":-0.3232197165489197}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json.meta new file mode 100644 index 00000000000..b926042f6f4 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Poke.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 22b97ff789b664c4f9b9ee223c29eee7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json new file mode 100644 index 00000000000..c93b9a1a557 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":-0.01725071482360363,"y":-0.08121182024478913,"z":-0.47676876187324526},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.08615099638700485,"y":-0.024168234318494798,"z":0.034818120300769809},"rotation":{"x":-0.24332590401172639,"y":0.6052875518798828,"z":0.5141062140464783,"w":-0.5566452741622925}}},{"joint":"Palm","pose":{"position":{"x":0.03520287200808525,"y":-0.010816145688295365,"z":0.04648737236857414},"rotation":{"x":-0.24332590401172639,"y":0.6052875518798828,"z":0.5141062140464783,"w":-0.5566452741622925}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.06692907959222794,"y":-0.0030839829705655576,"z":0.020349422469735147},"rotation":{"x":0.39406728744506838,"y":0.7213952541351318,"z":0.33115363121032717,"w":-0.46385547518730166}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.048644911497831348,"y":0.034663256257772449,"z":0.004639927297830582},"rotation":{"x":0.34302714467048647,"y":0.719179630279541,"z":0.2980014383792877,"w":-0.5261238217353821}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":0.030924495309591295,"y":0.05998371168971062,"z":-0.004000300541520119},"rotation":{"x":0.4403221607208252,"y":0.6942930817604065,"z":0.3865111470222473,"w":-0.4186002314090729}}},{"joint":"ThumbTip","pose":{"position":{"x":0.02607334591448307,"y":0.07819978147745133,"z":-0.011070644482970238},"rotation":{"x":0.4403221607208252,"y":0.6942930817604065,"z":0.3865111470222473,"w":-0.4186002314090729}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.06430374830961228,"y":-0.01019766554236412,"z":0.02929815649986267},"rotation":{"x":-0.22792501747608186,"y":0.6316274404525757,"z":0.5866482257843018,"w":-0.45270389318466189}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.011573880910873413,"y":0.02339656837284565,"z":0.03546718880534172},"rotation":{"x":0.3942926526069641,"y":-0.7424762845039368,"z":-0.21414896845817567,"w":0.49741214513778689}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":-0.021892068907618524,"y":0.020658958703279496,"z":0.020219745114445688},"rotation":{"x":0.5834210515022278,"y":-0.7061115503311157,"z":0.3634859323501587,"w":0.17027443647384644}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":-0.017463261261582376,"y":0.00348295527510345,"z":0.0038637774996459486},"rotation":{"x":0.6371655464172363,"y":-0.4360961318016052,"z":0.6206539869308472,"w":-0.13840782642364503}}},{"joint":"IndexTip","pose":{"position":{"x":-0.001938387518748641,"y":-0.0027357139624655248,"z":0.0005815188633278012},"rotation":{"x":0.6371655464172363,"y":-0.4360961318016052,"z":0.6206539869308472,"w":-0.13840782642364503}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.06397924572229386,"y":-0.016921602189540864,"z":0.03521520271897316},"rotation":{"x":-0.16760338842868806,"y":0.5928976535797119,"z":0.5015624761581421,"w":-0.6073026657104492}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.01083554606884718,"y":0.006482137367129326,"z":0.049619730561971667},"rotation":{"x":0.5027921199798584,"y":-0.7059369087219238,"z":-0.16476257145404817,"w":0.4708792269229889}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":-0.025254713371396066,"y":-0.003984889946877956,"z":0.02779259905219078},"rotation":{"x":0.6809582710266113,"y":-0.6233372688293457,"z":0.3824990391731262,"w":-0.039771441370248798}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":-0.00917090568691492,"y":-0.015904264524579049,"z":0.007921875454485417},"rotation":{"x":0.6229440569877625,"y":-0.2391648292541504,"z":0.642637312412262,"w":-0.37781840562820437}}},{"joint":"MiddleTip","pose":{"position":{"x":0.008252275176346302,"y":-0.013008372858166695,"z":0.009888304397463799},"rotation":{"x":0.6229440569877625,"y":-0.2391648292541504,"z":0.642637312412262,"w":-0.37781840562820437}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.06303475052118302,"y":-0.02612213045358658,"z":0.04269380867481232},"rotation":{"x":-0.18103565275669099,"y":0.5941647887229919,"z":0.39771339297294619,"w":-0.6752913594245911}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.010207276791334153,"y":-0.013390008360147477,"z":0.055441394448280337},"rotation":{"x":0.5632884502410889,"y":-0.6713510751724243,"z":-0.15870888531208039,"w":0.45477786660194399}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":-0.01994304731488228,"y":-0.024818312376737596,"z":0.03496982902288437},"rotation":{"x":0.7331446409225464,"y":-0.5462665557861328,"z":0.3692132830619812,"w":-0.16697438061237336}}},{"joint":"RingDistalJoint","pose":{"position":{"x":-0.0031065356452018024,"y":-0.028507214039564134,"z":0.019337791949510576},"rotation":{"x":0.6351615786552429,"y":-0.23133434355258943,"z":0.5935887098312378,"w":-0.43731656670570376}}},{"joint":"RingTip","pose":{"position":{"x":0.015546157956123352,"y":-0.023027585819363595,"z":0.021024812012910844},"rotation":{"x":0.6351615786552429,"y":-0.23133434355258943,"z":0.5935887098312378,"w":-0.43731656670570376}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.06254640221595764,"y":-0.034929849207401279,"z":0.04593820124864578},"rotation":{"x":-0.19249169528484345,"y":0.581859290599823,"z":0.2601516842842102,"w":-0.7461285591125488}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.009921858087182045,"y":-0.03408779203891754,"z":0.05945640057325363},"rotation":{"x":0.6286200881004334,"y":-0.6190594434738159,"z":-0.18423764407634736,"w":0.43321672081947329}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":-0.007876850664615631,"y":-0.041423700749874118,"z":0.04655241593718529},"rotation":{"x":0.7744045257568359,"y":-0.5470465421676636,"z":0.2698802649974823,"w":-0.1682688444852829}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.0036155348643660547,"y":-0.042087383568286899,"z":0.03132062032818794},"rotation":{"x":0.7368069291114807,"y":-0.19751593470573426,"z":0.4435950815677643,"w":-0.47120407223701479}}},{"joint":"PinkyTip","pose":{"position":{"x":0.016652610152959825,"y":-0.034032851457595828,"z":0.02879030816257},"rotation":{"x":0.7368069291114807,"y":-0.19751593470573426,"z":0.4435950815677643,"w":-0.47120407223701479}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json.meta new file mode 100644 index 00000000000..3361cb67335 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_ThumbsUp.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 71175c7404cbaee408470b929ff3ae1f +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json new file mode 100644 index 00000000000..485cc87a937 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json @@ -0,0 +1 @@ +{"items":[{"joint":"None","pose":{"position":{"x":0.0021753902547061445,"y":-0.13046418130397798,"z":-0.45588064193725588},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}}},{"joint":"Wrist","pose":{"position":{"x":0.07915662229061127,"y":-0.13887012004852296,"z":-0.010340530425310135},"rotation":{"x":-0.5914298295974731,"y":-0.2676140367984772,"z":-0.06283169984817505,"w":0.7577439546585083}}},{"joint":"Palm","pose":{"position":{"x":0.06830108910799027,"y":-0.09366560727357865,"z":-0.0000256318598985672},"rotation":{"x":-0.5914298295974731,"y":-0.2676140367984772,"z":-0.06283169984817505,"w":0.7577439546585083}}},{"joint":"ThumbMetacarpalJoint","pose":{"position":{"x":0.05787024274468422,"y":-0.12883375585079194,"z":-0.005382232367992401},"rotation":{"x":0.4801919758319855,"y":-0.04491055756807327,"z":-0.7443504333496094,"w":-0.4627794027328491}}},{"joint":"ThumbProximalJoint","pose":{"position":{"x":0.030012525618076326,"y":-0.10770050436258316,"z":0.016813457012176515},"rotation":{"x":0.312323659658432,"y":-0.2742984890937805,"z":-0.6935320496559143,"w":-0.5894817113876343}}},{"joint":"ThumbDistalJoint","pose":{"position":{"x":0.026396021246910096,"y":-0.08305369317531586,"z":0.03835996612906456},"rotation":{"x":0.26157766580581667,"y":-0.3302468955516815,"z":-0.6686716675758362,"w":-0.6136223673820496}}},{"joint":"ThumbTip","pose":{"position":{"x":0.027343440800905229,"y":-0.07000578194856644,"z":0.04939644783735275},"rotation":{"x":0.26157766580581667,"y":-0.3302468955516815,"z":-0.6686716675758362,"w":-0.6136223673820496}}},{"joint":"IndexMetacarpal","pose":{"position":{"x":0.06611358374357224,"y":-0.12426556646823883,"z":-0.0055283233523368839},"rotation":{"x":-0.5613270998001099,"y":-0.42208683490753176,"z":-0.06766947358846665,"w":0.7086432576179504}}},{"joint":"IndexKnuckle","pose":{"position":{"x":0.034438081085681918,"y":-0.0725482851266861,"z":-0.004708992317318916},"rotation":{"x":-0.6286489963531494,"y":-0.2787279188632965,"z":0.040076885372400287,"w":0.7249277830123901}}},{"joint":"IndexMiddleJoint","pose":{"position":{"x":0.015563697554171086,"y":-0.03562714159488678,"z":-0.0024565430358052255},"rotation":{"x":-0.6645650863647461,"y":-0.2075067013502121,"z":0.10458821058273316,"w":0.7102522253990173}}},{"joint":"IndexDistalJoint","pose":{"position":{"x":0.005756473168730736,"y":-0.015270628966391087,"z":-0.0017626225017011166},"rotation":{"x":-0.6223592162132263,"y":-0.24349386990070344,"z":0.01842544600367546,"w":0.7439839839935303}}},{"joint":"IndexTip","pose":{"position":{"x":0.00011674128472805023,"y":-0.0018588211387395859,"z":-0.00020025699632242322},"rotation":{"x":-0.6223592162132263,"y":-0.24349386990070344,"z":0.01842544600367546,"w":0.7439839839935303}}},{"joint":"MiddleMetacarpal","pose":{"position":{"x":0.07268297672271729,"y":-0.12254584580659867,"z":-0.004201311618089676},"rotation":{"x":-0.6534333825111389,"y":-0.22906279563903809,"z":-0.018352244049310685,"w":0.7212615013122559}}},{"joint":"MiddleKnuckle","pose":{"position":{"x":0.054447855800390246,"y":-0.06595612317323685,"z":-0.0017550308257341385},"rotation":{"x":-0.5899049043655396,"y":-0.16088859736919404,"z":-0.018363818526268007,"w":0.7910826206207275}}},{"joint":"MiddleMiddleJoint","pose":{"position":{"x":0.04355549067258835,"y":-0.022029317915439607,"z":0.010043984279036522},"rotation":{"x":-0.6020974516868591,"y":-0.14070262014865876,"z":-0.036361001431941989,"w":0.7852000594139099}}},{"joint":"MiddleDistalJoint","pose":{"position":{"x":0.03923114016652107,"y":0.0012873951345682145,"z":0.015791211277246476},"rotation":{"x":-0.5366969108581543,"y":-0.17153941094875337,"z":-0.09987709671258927,"w":0.8206644058227539}}},{"joint":"MiddleTip","pose":{"position":{"x":0.03647539019584656,"y":0.015714645385742189,"z":0.021557386964559556},"rotation":{"x":-0.5366969108581543,"y":-0.17153941094875337,"z":-0.09987709671258927,"w":0.8206644058227539}}},{"joint":"RingMetacarpal","pose":{"position":{"x":0.08137646317481995,"y":-0.11985518038272858,"z":-0.00190657377243042},"rotation":{"x":-0.6267969012260437,"y":-0.10518965870141983,"z":0.02498382329940796,"w":0.7716453075408936}}},{"joint":"RingKnuckle","pose":{"position":{"x":0.07067620009183884,"y":-0.06669728457927704,"z":0.008708799257874489},"rotation":{"x":0.40646883845329287,"y":0.1807955503463745,"z":0.030094729736447336,"w":-0.8951042294502258}}},{"joint":"RingMiddleJoint","pose":{"position":{"x":0.060088954865932468,"y":-0.04056686535477638,"z":0.03008754923939705},"rotation":{"x":-0.2107616662979126,"y":0.18913404643535615,"z":-0.04620787873864174,"w":-0.9580028653144836}}},{"joint":"RingDistalJoint","pose":{"position":{"x":0.0528024360537529,"y":-0.0495174415409565,"z":0.047927625477313998},"rotation":{"x":-0.449715256690979,"y":0.15903393924236298,"z":-0.020673276856541635,"w":-0.8789007067680359}}},{"joint":"RingTip","pose":{"position":{"x":0.048170287162065509,"y":-0.06364263594150543,"z":0.05758979544043541},"rotation":{"x":-0.449715256690979,"y":0.15903393924236298,"z":-0.020673276856541635,"w":-0.8789007067680359}}},{"joint":"PinkyMetacarpal","pose":{"position":{"x":0.08909709751605988,"y":-0.11985252797603607,"z":0.001964922994375229},"rotation":{"x":-0.5780324339866638,"y":-0.0013396204449236394,"z":0.06318691372871399,"w":0.8135625720024109}}},{"joint":"PinkyKnuckle","pose":{"position":{"x":0.0851951465010643,"y":-0.07107751816511154,"z":0.019172409549355508},"rotation":{"x":0.31776368618011477,"y":0.2502634525299072,"z":0.05463750660419464,"w":-0.9129235744476318}}},{"joint":"PinkyMiddleJoint","pose":{"position":{"x":0.07433749735355377,"y":-0.055455759167671207,"z":0.03647337108850479},"rotation":{"x":-0.17528946697711945,"y":0.2344343513250351,"z":0.019245747476816179,"w":-0.9560556411743164}}},{"joint":"PinkyDistalJoint","pose":{"position":{"x":0.06645255535840988,"y":-0.06111001968383789,"z":0.050835996866226199},"rotation":{"x":-0.4488738477230072,"y":0.26990553736686709,"z":0.08396486192941666,"w":-0.8479632139205933}}},{"joint":"PinkyTip","pose":{"position":{"x":0.05911727994680405,"y":-0.07095448672771454,"z":0.05705229192972183},"rotation":{"x":-0.4488738477230072,"y":0.26990553736686709,"z":0.08396486192941666,"w":-0.8479632139205933}}}]} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json.meta new file mode 100644 index 00000000000..ad4947113eb --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/ArticulatedHandPose_Victory.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 21f98e595bbf7294c96c87c187f41196 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/InputSimulationService.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/InputSimulationService.cs index ef22c921cc3..4f8578cabfb 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/InputSimulationService.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/InputSimulationService.cs @@ -13,8 +13,9 @@ namespace Microsoft.MixedReality.Toolkit.Input typeof(IMixedRealityInputSystem), SupportedPlatforms.WindowsEditor, "Input Simulation Service", - "Profiles/DefaultMixedRealityInputSimulationProfile.asset", + "Profiles/DefaultMixedRealityInputSimulationProfile.asset", "MixedRealityToolkit.SDK")] + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/InputSimulation/InputSimulationService.html")] public class InputSimulationService : BaseInputDeviceManager, IInputSimulationService { private ManualCameraControl cameraControl = null; @@ -46,15 +47,11 @@ public class InputSimulationService : BaseInputDeviceManager, IInputSimulationSe #region BaseInputDeviceManager Implementation public InputSimulationService( - IMixedRealityServiceRegistrar registrar, + IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name, uint priority, - BaseMixedRealityProfile profile) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) - { - } + BaseMixedRealityProfile profile) : base(registrar, inputSystem, name, priority, profile) { } /// public override IMixedRealityController[] GetActiveControllers() @@ -65,6 +62,7 @@ public override IMixedRealityController[] GetActiveControllers() /// public override void Initialize() { + ArticulatedHandPose.LoadGesturePoses(); } /// @@ -99,7 +97,7 @@ public override void Update() if (profile.SimulateEyePosition) { - MixedRealityToolkit.InputSystem?.EyeGazeProvider?.UpdateEyeGaze(null, new Ray(CameraCache.Main.transform.position, CameraCache.Main.transform.forward), System.DateTime.UtcNow); + InputSystem?.EyeGazeProvider?.UpdateEyeGaze(null, new Ray(CameraCache.Main.transform.position, CameraCache.Main.transform.forward), System.DateTime.UtcNow); } switch (profile.HandSimulationMode) @@ -150,19 +148,18 @@ public override void LateUpdate() #endregion BaseInputDeviceManager Implementation - /// - /// Return the service profile and ensure that the type is correct - /// + private MixedRealityInputSimulationProfile inputSimulationProfile = null; + + /// public MixedRealityInputSimulationProfile InputSimulationProfile { get + { + if (inputSimulationProfile == null) { - var profile = ConfigurationProfile as MixedRealityInputSimulationProfile; - if (!profile) - { - Debug.LogError("Profile for Input Simulation Service must be a MixedRealityInputSimulationProfile"); + inputSimulationProfile = ConfigurationProfile as MixedRealityInputSimulationProfile; } - return profile; + return inputSimulationProfile; } } @@ -251,7 +248,7 @@ private SimulatedHand GetOrAddHandDevice(Handedness handedness, HandSimulationMo SupportedControllerType st = simulationMode == HandSimulationMode.Gestures ? SupportedControllerType.GGVHand : SupportedControllerType.ArticulatedHand; IMixedRealityPointer[] pointers = RequestPointers(st, handedness); - var inputSource = MixedRealityToolkit.InputSystem?.RequestNewGenericInputSource($"{handedness} Hand", pointers, InputSourceType.Hand); + var inputSource = InputSystem?.RequestNewGenericInputSource($"{handedness} Hand", pointers, InputSourceType.Hand); switch (simulationMode) { case HandSimulationMode.Articulated: @@ -285,7 +282,7 @@ private SimulatedHand GetOrAddHandDevice(Handedness handedness, HandSimulationMo controller.InputSource.Pointers[i].Controller = controller; } - MixedRealityToolkit.InputSystem?.RaiseSourceDetected(controller.InputSource, controller); + InputSystem?.RaiseSourceDetected(controller.InputSource, controller); trackedHands.Add(handedness, controller); UpdateActiveControllers(); @@ -298,7 +295,7 @@ private void RemoveHandDevice(Handedness handedness) var controller = GetHandDevice(handedness); if (controller != null) { - MixedRealityToolkit.InputSystem?.RaiseSourceLost(controller.InputSource, controller); + InputSystem?.RaiseSourceLost(controller.InputSource, controller); trackedHands.Remove(handedness); UpdateActiveControllers(); @@ -309,7 +306,7 @@ private void RemoveAllHandDevices() { foreach (var controller in trackedHands.Values) { - MixedRealityToolkit.InputSystem?.RaiseSourceLost(controller.InputSource, controller); + InputSystem?.RaiseSourceLost(controller.InputSource, controller); } trackedHands.Clear(); UpdateActiveControllers(); @@ -320,4 +317,4 @@ private void UpdateActiveControllers() activeControllers = trackedHands.Values.ToArray(); } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs index 60001148dae..5a122a36926 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs @@ -59,12 +59,13 @@ public class MixedRealityInputSimulationProfileInspector : BaseMixedRealityToolk private SerializedProperty holdStartDuration; private SerializedProperty manipulationStartThreshold; + private const string ProfileTitle = "Input Simulation Settings"; + private const string ProfileDescription = "Settings for simulating input devices in the editor."; + protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } - isCameraControlEnabled = serializedObject.FindProperty("isCameraControlEnabled"); extraMouseSensitivityScale = serializedObject.FindProperty("extraMouseSensitivityScale"); @@ -116,25 +117,17 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (GUILayout.Button("Back to Input Profile")) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { - Selection.activeObject = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile; + return; } - EditorGUILayout.Space(); - - EditorGUILayout.LabelField("Input Simulation settings", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Settings for simulating input devices in the editor.", MessageType.Info); - CheckProfileLock(target); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } serializedObject.Update(); - bool isGUIEnabled = GUI.enabled; + bool wasGUIEnabled = GUI.enabled; + bool isGUIEnabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); + GUI.enabled = isGUIEnabled; - GUILayout.Space(12f); EditorGUILayout.PropertyField(isCameraControlEnabled); { EditorGUILayout.BeginVertical("Label"); @@ -159,10 +152,10 @@ public override void OnInspectorGUI() GUI.enabled = isGUIEnabled; } - GUILayout.Space(12f); + EditorGUILayout.Space(); EditorGUILayout.PropertyField(simulateEyePosition); - GUILayout.Space(12f); + EditorGUILayout.Space(); EditorGUILayout.PropertyField(handSimulationMode); { EditorGUILayout.BeginVertical("Label"); @@ -202,7 +195,7 @@ public override void OnInspectorGUI() EditorGUILayout.Space(); EditorGUILayout.EndVertical(); - GUI.enabled = isGUIEnabled; + GUI.enabled = wasGUIEnabled; } serializedObject.ApplyModifiedProperties(); diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/IInputSimulationService.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/IInputSimulationService.cs index 3cd9ce42fcb..f04ed265549 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/IInputSimulationService.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/IInputSimulationService.cs @@ -5,6 +5,9 @@ namespace Microsoft.MixedReality.Toolkit.Input { public interface IInputSimulationService : IMixedRealityInputDeviceManager { + /// + /// Typed representation of the ConfigurationProfile property. + /// MixedRealityInputSimulationProfile InputSimulationProfile { get; } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/ManualCameraControl.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/ManualCameraControl.cs index bc4499a142a..0ce6f22cee7 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/ManualCameraControl.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/ManualCameraControl.cs @@ -19,6 +19,7 @@ public class ManualCameraControl private Vector3 lastTrackerToUnityTranslation = Vector3.zero; private Quaternion lastTrackerToUnityRotation = Quaternion.identity; private bool wasLooking = false; + private bool wasCursorVisible = true; public ManualCameraControl(MixedRealityInputSimulationProfile _profile) { @@ -149,6 +150,8 @@ private void OnStartMouseLook() { // if mousebutton is either control, shift or focused UnityEngine.Cursor.lockState = CursorLockMode.Locked; + // save current cursor visibility before hiding it + wasCursorVisible = UnityEngine.Cursor.visible; UnityEngine.Cursor.visible = false; } @@ -166,7 +169,7 @@ private void OnEndMouseLook() { // if mousebutton is either control, shift or focused UnityEngine.Cursor.lockState = CursorLockMode.None; - UnityEngine.Cursor.visible = true; + UnityEngine.Cursor.visible = wasCursorVisible; } // do nothing if (this.MouseLookButton == MouseButton.None) @@ -255,6 +258,8 @@ private void SetWantsMouseJumping(bool wantsJumping) // unlock the cursor if it was locked UnityEngine.Cursor.lockState = CursorLockMode.None; + // save original state of cursor before hiding + wasCursorVisible = UnityEngine.Cursor.visible; // hide the cursor UnityEngine.Cursor.visible = false; @@ -266,8 +271,8 @@ private void SetWantsMouseJumping(bool wantsJumping) UnityEngine.Cursor.lockState = CursorLockMode.Locked; UnityEngine.Cursor.lockState = CursorLockMode.None; - // show the cursor - UnityEngine.Cursor.visible = true; + // restore the cursor + UnityEngine.Cursor.visible = wasCursorVisible; } #if UNITY_EDITOR diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityInputSimulationProfile.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityInputSimulationProfile.cs index 6a4d7564b08..08632c56a1e 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityInputSimulationProfile.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityInputSimulationProfile.cs @@ -113,17 +113,17 @@ public class MixedRealityInputSimulationProfile : BaseMixedRealityProfile [Header("Hand Gesture Settings")] [SerializeField] - private SimulatedHandPose.GestureId defaultHandGesture = SimulatedHandPose.GestureId.Open; - public SimulatedHandPose.GestureId DefaultHandGesture => defaultHandGesture; + private ArticulatedHandPose.GestureId defaultHandGesture = ArticulatedHandPose.GestureId.Open; + public ArticulatedHandPose.GestureId DefaultHandGesture => defaultHandGesture; [SerializeField] - private SimulatedHandPose.GestureId leftMouseHandGesture = SimulatedHandPose.GestureId.Pinch; - public SimulatedHandPose.GestureId LeftMouseHandGesture => leftMouseHandGesture; + private ArticulatedHandPose.GestureId leftMouseHandGesture = ArticulatedHandPose.GestureId.Pinch; + public ArticulatedHandPose.GestureId LeftMouseHandGesture => leftMouseHandGesture; [SerializeField] - private SimulatedHandPose.GestureId middleMouseHandGesture = SimulatedHandPose.GestureId.None; - public SimulatedHandPose.GestureId MiddleMouseHandGesture => middleMouseHandGesture; + private ArticulatedHandPose.GestureId middleMouseHandGesture = ArticulatedHandPose.GestureId.None; + public ArticulatedHandPose.GestureId MiddleMouseHandGesture => middleMouseHandGesture; [SerializeField] - private SimulatedHandPose.GestureId rightMouseHandGesture = SimulatedHandPose.GestureId.None; - public SimulatedHandPose.GestureId RightMouseHandGesture => rightMouseHandGesture; + private ArticulatedHandPose.GestureId rightMouseHandGesture = ArticulatedHandPose.GestureId.None; + public ArticulatedHandPose.GestureId RightMouseHandGesture => rightMouseHandGesture; [SerializeField] [Tooltip("Gesture interpolation per second")] private float handGestureAnimationSpeed = 8.0f; diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef index b5c1602dd38..5480060fab8 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef @@ -1,12 +1,12 @@ { "name": "Microsoft.MixedReality.Toolkit.Services.InputSimulation", "references": [ - "Microsoft.MixedReality.Toolkit", - "Microsoft.MixedReality.Toolkit.SDK" + "Microsoft.MixedReality.Toolkit" ], "optionalUnityReferences": [], "includePlatforms": [ - "Editor" + "Editor", + "WSA" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedArticulatedHand.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedArticulatedHand.cs index 091c204605c..0cc56a6e645 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedArticulatedHand.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedArticulatedHand.cs @@ -58,7 +58,7 @@ protected override void UpdateInteractions(SimulatedHandData handData) // For convenience of simulating in Unity Editor, make the ray use the index // finger position instead of knuckle, since the index finger doesn't move when we press. - Vector3 pointerPosition = jointPositions[(int)TrackedHandJoint.IndexTip]; + Vector3 pointerPosition = jointPoses[TrackedHandJoint.IndexTip].Position; IsPositionAvailable = IsRotationAvailable = pointerPosition != Vector3.zero; if (IsPositionAvailable) @@ -70,26 +70,24 @@ protected override void UpdateInteractions(SimulatedHandData handData) currentPointerPose.Position = ray.origin; currentPointerPose.Rotation = Quaternion.LookRotation(ray.direction); - currentGripPose.Position = jointPositions[(int)TrackedHandJoint.Palm]; - currentGripPose.Rotation = jointOrientations[(int)TrackedHandJoint.Palm]; + currentGripPose = jointPoses[TrackedHandJoint.Palm]; - currentIndexPose.Position = jointPositions[(int)TrackedHandJoint.IndexTip]; - currentIndexPose.Rotation = jointOrientations[(int)TrackedHandJoint.IndexTip]; + currentIndexPose = jointPoses[TrackedHandJoint.IndexTip]; } if (lastGripPose != currentGripPose) { if (IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePoseChanged(InputSource, this, currentGripPose); + InputSystem?.RaiseSourcePoseChanged(InputSource, this, currentGripPose); } else if (IsPositionAvailable && !IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentPointerPosition); + InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentPointerPosition); } else if (!IsPositionAvailable && IsRotationAvailable) { - MixedRealityToolkit.InputSystem?.RaiseSourceRotationChanged(InputSource, this, currentPointerRotation); + InputSystem?.RaiseSourceRotationChanged(InputSource, this, currentPointerRotation); } } @@ -101,14 +99,14 @@ protected override void UpdateInteractions(SimulatedHandData handData) Interactions[i].PoseData = currentPointerPose; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentPointerPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentPointerPose); } break; case DeviceInputType.SpatialGrip: Interactions[i].PoseData = currentGripPose; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentGripPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentGripPose); } break; case DeviceInputType.Select: @@ -118,11 +116,11 @@ protected override void UpdateInteractions(SimulatedHandData handData) { if (Interactions[i].BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } } break; @@ -133,11 +131,11 @@ protected override void UpdateInteractions(SimulatedHandData handData) { if (Interactions[i].BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } } break; @@ -145,7 +143,7 @@ protected override void UpdateInteractions(SimulatedHandData handData) Interactions[i].PoseData = currentIndexPose; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentIndexPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentIndexPose); } break; } diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedGestureHand.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedGestureHand.cs index cc90db0274c..4b248e28859 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedGestureHand.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedGestureHand.cs @@ -60,7 +60,7 @@ private void EnsureProfileSettings() } initializedFromProfile = true; - var gestureProfile = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile; + var gestureProfile = InputSystem?.InputSystemProfile?.GesturesProfile; if (gestureProfile != null) { for (int i = 0; i < gestureProfile.Gestures.Length; i++) @@ -111,13 +111,13 @@ protected override void UpdateInteractions(SimulatedHandData handData) EnsureProfileSettings(); Vector3 lastPosition = currentPosition; - currentPosition = jointPositions[(int)TrackedHandJoint.IndexTip]; + currentPosition = jointPoses[TrackedHandJoint.IndexTip].Position; cumulativeDelta += currentPosition - lastPosition; currentGripPose.Position = currentPosition; if (lastPosition != currentPosition) { - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentPosition); + InputSystem?.RaiseSourcePositionChanged(InputSource, this, currentPosition); } for (int i = 0; i < Interactions?.Length; i++) @@ -129,7 +129,7 @@ protected override void UpdateInteractions(SimulatedHandData handData) Interactions[i].PoseData = currentGripPose; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentGripPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, currentGripPose); } break; case DeviceInputType.Select: @@ -139,14 +139,14 @@ protected override void UpdateInteractions(SimulatedHandData handData) { if (Interactions[i].BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); SelectDownStartTime = Time.time; cumulativeDelta = Vector3.zero; } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); // Stop gestures CompleteHoldGesture(); @@ -185,7 +185,7 @@ private void StartHoldGesture() { if (!holdInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureStarted(this, holdAction); + InputSystem?.RaiseGestureStarted(this, holdAction); holdInProgress = true; } } @@ -194,7 +194,7 @@ private void CompleteHoldGesture() { if (holdInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, holdAction); + InputSystem?.RaiseGestureCompleted(this, holdAction); holdInProgress = false; } } @@ -203,7 +203,7 @@ private void CancelHoldGesture() { if (holdInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, holdAction); + InputSystem?.RaiseGestureCanceled(this, holdAction); holdInProgress = false; } } @@ -212,8 +212,8 @@ private void StartManipulationNavigationGesture() { if (!manipulationInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureStarted(this, manipulationAction); - MixedRealityToolkit.InputSystem?.RaiseGestureStarted(this, navigationAction); + InputSystem?.RaiseGestureStarted(this, manipulationAction); + InputSystem?.RaiseGestureStarted(this, navigationAction); manipulationInProgress = true; currentRailsUsed = Vector3.one; @@ -223,18 +223,18 @@ private void StartManipulationNavigationGesture() private void UpdateManipulationNavigationGesture() { - MixedRealityToolkit.InputSystem?.RaiseGestureUpdated(this, manipulationAction, cumulativeDelta); + InputSystem?.RaiseGestureUpdated(this, manipulationAction, cumulativeDelta); UpdateNavigationRails(); - MixedRealityToolkit.InputSystem?.RaiseGestureUpdated(this, navigationAction, navigationDelta); + InputSystem?.RaiseGestureUpdated(this, navigationAction, navigationDelta); } private void CompleteManipulationNavigationGesture() { if (manipulationInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, manipulationAction, cumulativeDelta); - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, navigationAction, navigationDelta); + InputSystem?.RaiseGestureCompleted(this, manipulationAction, cumulativeDelta); + InputSystem?.RaiseGestureCompleted(this, navigationAction, navigationDelta); manipulationInProgress = false; } } @@ -243,8 +243,8 @@ private void CancelManipulationNavigationGesture() { if (manipulationInProgress) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, manipulationAction); - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, navigationAction); + InputSystem?.RaiseGestureCanceled(this, manipulationAction); + InputSystem?.RaiseGestureCanceled(this, navigationAction); manipulationInProgress = false; } } diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHand.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHand.cs index 363bc51ba2d..bb8cba50478 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHand.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHand.cs @@ -24,13 +24,30 @@ public class SimulatedHandData private bool isTracked = false; public bool IsTracked => isTracked; [SerializeField] - private Vector3[] joints = new Vector3[jointCount]; - public Vector3[] Joints => joints; + private MixedRealityPose[] joints = new MixedRealityPose[jointCount]; + public MixedRealityPose[] Joints => joints; [SerializeField] private bool isPinching = false; public bool IsPinching => isPinching; - public delegate void HandJointDataGenerator(Vector3[] jointPositions); + public delegate void HandJointDataGenerator(MixedRealityPose[] jointPositions); + + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } public void Copy(SimulatedHandData other) { @@ -81,8 +98,6 @@ public abstract class SimulatedHand : BaseHand protected static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; - protected readonly Quaternion[] jointOrientations = new Quaternion[jointCount]; - protected readonly Vector3[] jointPositions = new Vector3[jointCount]; protected readonly Dictionary jointPoses = new Dictionary(); /// @@ -103,25 +118,21 @@ public override bool TryGetJoint(TrackedHandJoint joint, out MixedRealityPose po public void UpdateState(SimulatedHandData handData) { - Array.Copy(handData.Joints, jointPositions, jointCount); - - SimulatedHandUtils.CalculateJointRotations(ControllerHandedness, jointPositions, jointOrientations); - - for (int i = 0; i < jointPositions.Length; i++) + for (int i = 0; i < jointCount; i++) { TrackedHandJoint handJoint = (TrackedHandJoint)i; if (!jointPoses.ContainsKey(handJoint)) { - jointPoses.Add(handJoint, new MixedRealityPose(jointPositions[i], jointOrientations[i])); + jointPoses.Add(handJoint, handData.Joints[i]); } else { - jointPoses[handJoint] = new MixedRealityPose(jointPositions[i], jointOrientations[i]); + jointPoses[handJoint] = handData.Joints[i]; } } - MixedRealityToolkit.InputSystem?.RaiseHandJointsUpdated(InputSource, ControllerHandedness, jointPoses); + InputSystem?.RaiseHandJointsUpdated(InputSource, ControllerHandedness, jointPoses); UpdateVelocity(); diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs index d348e3dece4..d50c4c00328 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs @@ -37,13 +37,13 @@ internal class SimulatedHandState public Vector3 JitterOffset = Vector3.zero; [SerializeField] - private SimulatedHandPose.GestureId gesture = SimulatedHandPose.GestureId.None; - public SimulatedHandPose.GestureId Gesture + private ArticulatedHandPose.GestureId gesture = ArticulatedHandPose.GestureId.None; + public ArticulatedHandPose.GestureId Gesture { get { return gesture; } set { - if (value != SimulatedHandPose.GestureId.None && value != gesture) + if (value != ArticulatedHandPose.GestureId.None && value != gesture) { gesture = value; gestureBlending = 0.0f; @@ -61,12 +61,12 @@ public float GestureBlending gestureBlending = Mathf.Clamp(value, gestureBlending, 1.0f); // Pinch is a special gesture that triggers the Select and TriggerPress input actions - IsPinching = (gesture == SimulatedHandPose.GestureId.Pinch && gestureBlending > 0.9f); + IsPinching = (gesture == ArticulatedHandPose.GestureId.Pinch && gestureBlending > 0.9f); } } private float poseBlending = 0.0f; - private SimulatedHandPose pose = new SimulatedHandPose(); + private ArticulatedHandPose pose = new ArticulatedHandPose(); public SimulatedHandState(Handedness _handedness) { @@ -108,25 +108,30 @@ public void ResetGesture() { gestureBlending = 1.0f; - SimulatedHandPose gesturePose = SimulatedHandPose.GetGesturePose(gesture); + ArticulatedHandPose gesturePose = ArticulatedHandPose.GetGesturePose(gesture); if (gesturePose != null) { pose.Copy(gesturePose); } } - internal void FillCurrentFrame(Vector3[] jointsOut) + internal void FillCurrentFrame(MixedRealityPose[] jointsOut) { - SimulatedHandPose gesturePose = SimulatedHandPose.GetGesturePose(gesture); + ArticulatedHandPose gesturePose = ArticulatedHandPose.GetGesturePose(gesture); if (gesturePose != null) { - pose.TransitionTo(gesturePose, poseBlending, gestureBlending); + if (gestureBlending > poseBlending) + { + float range = Mathf.Clamp01(1.0f - poseBlending); + float lerpFactor = range > 0.0f ? (gestureBlending - poseBlending) / range : 1.0f; + pose.InterpolateOffsets(pose, gesturePose, lerpFactor); + } } poseBlending = gestureBlending; Quaternion rotation = Quaternion.Euler(HandRotateEulerAngles); Vector3 position = CameraCache.Main.ScreenToWorldPoint(ScreenPosition + JitterOffset); - pose.ComputeJointPositions(handedness, rotation, position, jointsOut); + pose.ComputeJointPoses(handedness, rotation, position, jointsOut); } } @@ -237,7 +242,7 @@ private void SimulateUserInput() { isSimulatingRight = false; } - + Vector3 mouseDelta = (lastMousePosition.HasValue ? UnityEngine.Input.mousePosition - lastMousePosition.Value : Vector3.zero); mouseDelta.z += UnityEngine.Input.GetAxis("Mouse ScrollWheel") * profile.HandDepthMultiplier; float rotationDelta = profile.HandRotationSpeed * Time.deltaTime; @@ -286,7 +291,8 @@ private void SimulateUserInput() Vector3 mouseDelta, Vector3 rotationDeltaEulerAngles) { - if (!state.IsTracked && isSimulating) + bool enableTracking = isAlwaysVisible || isSimulating; + if (!state.IsTracked && enableTracking) { // Start at current mouse position Vector3 mousePos = UnityEngine.Input.mousePosition; @@ -314,7 +320,7 @@ private void SimulateUserInput() // TODO: DateTime.UtcNow can be quite imprecise, better use Stopwatch.GetTimestamp // https://stackoverflow.com/questions/2143140/c-sharp-datetime-now-precision DateTime currentTime = DateTime.UtcNow; - if (isAlwaysVisible || isSimulating) + if (enableTracking) { state.IsTracked = true; lastSimulatedTimestamp = currentTime.Ticks; @@ -329,7 +335,7 @@ private void SimulateUserInput() } } - private SimulatedHandPose.GestureId SelectGesture() + private ArticulatedHandPose.GestureId SelectGesture() { if (UnityEngine.Input.GetMouseButton(0)) { @@ -349,7 +355,7 @@ private SimulatedHandPose.GestureId SelectGesture() } } - private SimulatedHandPose.GestureId ToggleGesture(SimulatedHandPose.GestureId gesture) + private ArticulatedHandPose.GestureId ToggleGesture(ArticulatedHandPose.GestureId gesture) { if (UnityEngine.Input.GetMouseButtonDown(0)) { @@ -366,7 +372,7 @@ private SimulatedHandPose.GestureId ToggleGesture(SimulatedHandPose.GestureId ge else { // 'None' will not change the gesture - return SimulatedHandPose.GestureId.None; + return ArticulatedHandPose.GestureId.None; } } } diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs deleted file mode 100644 index 6853f8156c5..00000000000 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using Microsoft.MixedReality.Toolkit.Utilities; -using UnityEngine; -using System; - -namespace Microsoft.MixedReality.Toolkit.Input -{ - public class SimulatedHandPose - { - private static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; - - // TODO Right now animation is just lerping joint offsets - // For better transitions, esp. when wrist is rotating, use hierarchical bone rotations! - private Vector3[] jointOffsets; - - public SimulatedHandPose() - { - jointOffsets = new Vector3[jointCount]; - SetZero(); - } - - public SimulatedHandPose(Vector3[] _jointOffsets) - { - jointOffsets = new Vector3[jointCount]; - Array.Copy(_jointOffsets, jointOffsets, jointCount); - } - - public void ComputeJointPositions(Handedness handedness, Quaternion rotation, Vector3 position, Vector3[] jointsOut) - { - // Initialize from local offsets - for (int i = 0; i < jointCount; i++) - { - jointsOut[i] = -jointOffsets[i]; - } - - // Pose offset are for right hand, flip if left hand is needed - if (handedness == Handedness.Left) - { - for (int i = 0; i < jointCount; i++) - { - jointsOut[i].x = -jointsOut[i].x; - } - } - - // Apply camera transform - for (int i = 0; i < jointCount; i++) - { - jointsOut[i] = CameraCache.Main.transform.TransformDirection(jointsOut[i]); - } - - for (int i = 0; i < jointCount; i++) - { - jointsOut[i] = position + rotation * jointsOut[i]; - } - } - - public void ParseFromJointPositions(Vector3[] joints, Handedness handedness, Quaternion rotation, Vector3 position) - { - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = Quaternion.Inverse(rotation) * (joints[i] - position); - } - - // To camera space - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = Camera.main.transform.InverseTransformDirection(jointOffsets[i]); - } - - // Pose offset are for right hand, flip if left hand is given - if (handedness == Handedness.Left) - { - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i].x = -jointOffsets[i].x; - } - } - - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = -jointOffsets[i]; - } - } - - public void SetZero() - { - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = Vector3.zero; - } - } - - public void Copy(SimulatedHandPose other) - { - Array.Copy(other.jointOffsets, jointOffsets, jointCount); - } - - public void InterpolateOffsets(SimulatedHandPose poseA, SimulatedHandPose poseB, float value) - { - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = Vector3.Lerp(poseA.jointOffsets[i], poseB.jointOffsets[i], value); - } - } - - public void TransitionTo(SimulatedHandPose other, float lastAnim, float currentAnim) - { - if (currentAnim <= lastAnim) - { - return; - } - - float range = Mathf.Clamp01(1.0f - lastAnim); - float lerpFactor = range > 0.0f ? (currentAnim - lastAnim) / range : 1.0f; - for (int i = 0; i < jointCount; i++) - { - jointOffsets[i] = Vector3.Lerp(jointOffsets[i], other.jointOffsets[i], lerpFactor); - } - } - - public enum GestureId - { - /// - /// Unspecified hand shape - /// - None = 0, - /// - /// Flat hand with fingers spread out - /// - Flat, - /// - /// Relaxed hand pose - /// - Open, - /// - /// Index finger and Thumb touching, index tip does not move - /// - Pinch, - /// - /// Index finger and Thumb touching, wrist does not move - /// - PinchSteadyWrist, - /// - /// Index finger stretched out - /// - Poke, - /// - /// Grab with whole hand, fist shape - /// - Grab, - /// - /// OK sign - /// - ThumbsUp, - /// - /// Victory sign - /// - Victory, - } - - static public SimulatedHandPose GetGesturePose(GestureId gesture) - { - switch (gesture) - { - case GestureId.None: return null; - case GestureId.Flat: return HandFlat; - case GestureId.Open: return HandOpened; - case GestureId.Pinch: return HandPinch; - case GestureId.PinchSteadyWrist: return HandPinchSteadyWrist; - case GestureId.Poke: return HandPoke; - case GestureId.Grab: return HandGrab; - case GestureId.ThumbsUp: return HandThumbsUp; - case GestureId.Victory: return HandVictory; - } - return null; - } - - public string GenerateInitializerCode() - { - string[] names = Enum.GetNames(typeof(TrackedHandJoint)); - string s = ""; - s += "new Vector3[]\n"; - s += "{\n"; - for (int i = 0; i < jointCount; ++i) - { - Vector3 v = jointOffsets[i]; - s += $" new Vector3({v.x:F5}f, {v.y:F5}f, {v.z:F5}f), // {names[i]}\n"; - } - s += "}\n"; - - return s; - } - - static private SimulatedHandPose HandOpened = new SimulatedHandPose(new Vector3[] - { - // Right palm is duplicate of right thumb metacarpal and right pinky metacarpal - new Vector3(0.0f,0.0f,0.0f), // None - new Vector3(-0.036f,0.165f,0.061f), // Wrist - new Vector3(-0.036f,0.10f,0.051f), // Palm - new Vector3(-0.020f,0.159f,0.061f), // ThumbMetacarpal - new Vector3(0.018f,0.126f,0.047f), - new Vector3(0.044f,0.107f,0.041f), - new Vector3(0.063f,0.097f,0.040f), // ThumbTip - new Vector3(-0.027f,0.159f,0.061f), // IndexMetacarpal - new Vector3(-0.009f,0.075f,0.033f), - new Vector3(-0.005f,0.036f,0.017f), - new Vector3(-0.002f,0.015f,0.007f), - new Vector3(0.000f,0.000f,0.000f), // IndexTip - new Vector3(-0.035f,0.159f,0.061f), // MiddleMetacarpal - new Vector3(-0.032f,0.073f,0.032f), - new Vector3(-0.017f,0.077f,-0.002f), - new Vector3(-0.017f,0.104f,-0.001f), - new Vector3(-0.021f,0.119f,0.008f), - new Vector3(-0.043f,0.159f,0.061f), // RingMetacarpal - new Vector3(-0.055f,0.078f,0.032f), - new Vector3(-0.041f,0.080f,0.001f), - new Vector3(-0.037f,0.106f,0.003f), - new Vector3(-0.038f,0.121f,0.012f), - new Vector3(-0.050f,0.159f,0.061f), // PinkyMetacarpal - new Vector3(-0.074f,0.087f,0.031f), // PinkyProximal - new Vector3(-0.061f,0.084f,0.006f), // PinkyIntermediate - new Vector3(-0.054f,0.101f,0.005f), // PinkyDistal - new Vector3(-0.054f,0.116f,0.013f), // PinkyTip - }); - - static private SimulatedHandPose HandFlat = new SimulatedHandPose(new Vector3[] - { - new Vector3(-0.06300f, 0.15441f, 0.00097f), // None - new Vector3(-0.06300f, 0.15441f, 0.00097f), // Wrist - new Vector3(-0.04323f, 0.08708f, -0.00732f), // Palm - new Vector3(-0.04323f, 0.08708f, -0.00732f), // ThumbMetacarpalJoint - new Vector3(0.00233f, 0.10868f, 0.00007f), // ThumbProximalJoint - new Vector3(0.02282f, 0.08608f, 0.00143f), // ThumbDistalJoint - new Vector3(0.03249f, 0.07318f, 0.00075f), // ThumbTip - new Vector3(-0.06300f, 0.15441f, 0.00097f), // IndexMetacarpal - new Vector3(-0.01960f, 0.06668f, 0.00068f), // IndexKnuckle - new Vector3(-0.00923f, 0.02973f, 0.00216f), // IndexMiddleJoint - new Vector3(-0.00289f, 0.00912f, 0.00130f), // IndexDistalJoint - new Vector3(0.00075f, -0.00198f, 0.00011f), // IndexTip - new Vector3(-0.06300f, 0.15441f, 0.00097f), // MiddleMetacarpal - new Vector3(-0.03941f, 0.06396f, -0.00371f), // MiddleKnuckle - new Vector3(-0.03483f, 0.02113f, -0.00446f), // MiddleMiddleJoint - new Vector3(-0.03101f, -0.00381f, -0.00731f), // MiddleDistalJoint - new Vector3(-0.02906f, -0.01649f, -0.00879f), // MiddleTip - new Vector3(-0.06300f, 0.15441f, 0.00097f), // RingMetacarpal - new Vector3(-0.05859f, 0.06795f, -0.01061f), // RingKnuckle - new Vector3(-0.06179f, 0.02820f, -0.01284f), // RingMiddleJoint - new Vector3(-0.06302f, 0.00366f, -0.01568f), // RingDistalJoint - new Vector3(-0.06334f, -0.00900f, -0.01776f), // RingTip - new Vector3(-0.06300f, 0.15441f, 0.00097f), // PinkyMetacarpal - new Vector3(-0.07492f, 0.07446f, -0.01953f), // PinkyKnuckle - new Vector3(-0.08529f, 0.04472f, -0.02228f), // PinkyMiddleJoint - new Vector3(-0.08974f, 0.02819f, -0.02572f), // PinkyDistalJoint - new Vector3(-0.09266f, 0.01696f, -0.02819f), // PinkyTip - }); - - static private SimulatedHandPose HandPinch = new SimulatedHandPose(new Vector3[] - { - // Right palm is duplicate of right thumb metacarpal and right pinky metacarpal - new Vector3(0.0f,0.0f,0.0f), // None - new Vector3(-0.042f,0.111f,0.060f), // Wrist - new Vector3(-0.042f,0.051f,0.060f), // Palm - new Vector3(-0.032f,0.091f,0.060f), // ThumbMetacarpal - new Vector3(-0.013f,0.052f,0.044f), - new Vector3(0.002f,0.026f,0.030f), - new Vector3(0.007f,0.007f,0.017f), // ThumbTip - new Vector3(-0.038f,0.091f,0.060f), // IndexMetacarpal - new Vector3(-0.029f,0.008f,0.050f), - new Vector3(-0.009f,-0.016f,0.025f), - new Vector3(-0.002f,-0.011f,0.008f), - new Vector3(0.000f,0.000f,0.000f), - new Vector3(-0.042f,0.091f,0.060f), // MiddleMetacarpal - new Vector3(-0.050f,0.004f,0.046f), - new Vector3(-0.026f,0.004f,0.014f), - new Vector3(-0.028f,0.031f,0.014f), - new Vector3(-0.034f,0.048f,0.020f), - new Vector3(-0.048f,0.091f,0.060f), // RingMetacarpal - new Vector3(-0.071f,0.008f,0.041f), - new Vector3(-0.048f,0.009f,0.012f), - new Vector3(-0.046f,0.036f,0.014f), - new Vector3(-0.050f,0.052f,0.022f), - new Vector3(-0.052f,0.091f,0.060f), // PinkyMetacarpal - new Vector3(-0.088f,0.014f,0.034f), - new Vector3(-0.067f,0.012f,0.013f), - new Vector3(-0.061f,0.031f,0.014f), - new Vector3(-0.062f,0.046f,0.021f), - }); - - static private SimulatedHandPose HandPinchSteadyWrist = new SimulatedHandPose(new Vector3[] - { - new Vector3(0.0f, 0.0f, 0.0f), // None - new Vector3(-0.03600f, 0.16500f, 0.06100f), // Wrist - new Vector3(-0.03600f, 0.10500f, 0.06100f), // Palm - new Vector3(-0.02600f, 0.14500f, 0.06100f), // ThumbMetacarpalJoint - new Vector3(-0.00700f, 0.10600f, 0.04500f), // ThumbProximalJoint - new Vector3(0.00800f, 0.08000f, 0.03100f), // ThumbDistalJoint - new Vector3(0.01300f, 0.06100f, 0.01800f), // ThumbTip - new Vector3(-0.03200f, 0.14500f, 0.06100f), // IndexMetacarpal - new Vector3(-0.02300f, 0.06200f, 0.05100f), // IndexKnuckle - new Vector3(-0.00300f, 0.03800f, 0.02600f), // IndexMiddleJoint - new Vector3(0.00400f, 0.04300f, 0.00900f), // IndexDistalJoint - new Vector3(0.00600f, 0.05400f, 0.00100f), // IndexTip - new Vector3(-0.03600f, 0.14500f, 0.06100f), // MiddleMetacarpal - new Vector3(-0.04400f, 0.05800f, 0.04700f), // MiddleKnuckle - new Vector3(-0.02000f, 0.05800f, 0.01500f), // MiddleMiddleJoint - new Vector3(-0.02200f, 0.08500f, 0.01500f), // MiddleDistalJoint - new Vector3(-0.02800f, 0.10200f, 0.02100f), // MiddleTip - new Vector3(-0.04200f, 0.14500f, 0.06100f), // RingMetacarpal - new Vector3(-0.06500f, 0.06200f, 0.04200f), // RingKnuckle - new Vector3(-0.04200f, 0.06300f, 0.01300f), // RingMiddleJoint - new Vector3(-0.04000f, 0.09000f, 0.01500f), // RingDistalJoint - new Vector3(-0.04400f, 0.10600f, 0.02300f), // RingTip - new Vector3(-0.04600f, 0.14500f, 0.06100f), // PinkyMetacarpal - new Vector3(-0.08200f, 0.06800f, 0.03500f), // PinkyKnuckle - new Vector3(-0.06100f, 0.06600f, 0.01400f), // PinkyMiddleJoint - new Vector3(-0.05500f, 0.08500f, 0.01500f), // PinkyDistalJoint - new Vector3(-0.05600f, 0.10000f, 0.02200f), // PinkyTip - }); - - static private SimulatedHandPose HandPoke = new SimulatedHandPose(new Vector3[] - { - new Vector3(-0.06209f, 0.07595f, 0.07231f), // None - new Vector3(-0.06209f, 0.07595f, 0.07231f), // Wrist - new Vector3(-0.03259f, 0.03268f, 0.02552f), // Palm - new Vector3(-0.03259f, 0.03268f, 0.02552f), // ThumbMetacarpalJoint - new Vector3(-0.00118f, 0.05920f, 0.03279f), // ThumbProximalJoint - new Vector3(0.00171f, 0.05718f, 0.00273f), // ThumbDistalJoint - new Vector3(-0.00877f, 0.05977f, -0.00905f), // ThumbTip - new Vector3(-0.06209f, 0.07595f, 0.07231f), // IndexMetacarpal - new Vector3(-0.00508f, 0.01676f, 0.02067f), // IndexKnuckle - new Vector3(0.00320f, -0.00908f, -0.00469f), // IndexMiddleJoint - new Vector3(0.00987f, -0.01695f, -0.02251f), // IndexDistalJoint - new Vector3(0.01363f, -0.02002f, -0.03255f), // IndexTip - new Vector3(-0.06209f, 0.07595f, 0.07231f), // MiddleMetacarpal - new Vector3(-0.02474f, 0.01422f, 0.01270f), // MiddleKnuckle - new Vector3(-0.00556f, 0.03787f, -0.01700f), // MiddleMiddleJoint - new Vector3(-0.00648f, 0.06095f, -0.00658f), // MiddleDistalJoint - new Vector3(-0.01209f, 0.06180f, 0.00499f), // MiddleTip - new Vector3(-0.06209f, 0.07595f, 0.07231f), // RingMetacarpal - new Vector3(-0.04422f, 0.01955f, 0.00797f), // RingKnuckle - new Vector3(-0.02535f, 0.04385f, -0.01667f), // RingMiddleJoint - new Vector3(-0.02465f, 0.06521f, -0.00440f), // RingDistalJoint - new Vector3(-0.02953f, 0.06711f, 0.00726f), // RingTip - new Vector3(-0.06209f, 0.07595f, 0.07231f), // PinkyMetacarpal - new Vector3(-0.06218f, 0.02740f, 0.00434f), // PinkyKnuckle - new Vector3(-0.04335f, 0.04456f, -0.01437f), // PinkyMiddleJoint - new Vector3(-0.03864f, 0.06018f, -0.00822f), // PinkyDistalJoint - new Vector3(-0.04340f, 0.06202f, 0.00248f), // PinkyTip - }); - - static private SimulatedHandPose HandGrab = new SimulatedHandPose(new Vector3[] - { - new Vector3(-0.05340f, 0.02059f, 0.05460f), // None - new Vector3(-0.05340f, 0.02059f, 0.05460f), // Wrist - new Vector3(-0.02248f, -0.03254f, 0.01987f), // Palm - new Vector3(-0.02248f, -0.03254f, 0.01987f), // ThumbMetacarpalJoint - new Vector3(0.01379f, -0.00633f, 0.02738f), // ThumbProximalJoint - new Vector3(0.02485f, -0.02278f, 0.00441f), // ThumbDistalJoint - new Vector3(0.01847f, -0.02790f, -0.00937f), // ThumbTip - new Vector3(-0.05340f, 0.02059f, 0.05460f), // IndexMetacarpal - new Vector3(0.00565f, -0.04883f, 0.01896f), // IndexKnuckle - new Vector3(0.01153f, -0.02915f, -0.01358f), // IndexMiddleJoint - new Vector3(0.00547f, -0.00864f, -0.01074f), // IndexDistalJoint - new Vector3(0.00098f, -0.00265f, -0.00172f), // IndexTip - new Vector3(-0.05340f, 0.02059f, 0.05460f), // MiddleMetacarpal - new Vector3(-0.01343f, -0.05324f, 0.01296f), // MiddleKnuckle - new Vector3(-0.00060f, -0.03063f, -0.02099f), // MiddleMiddleJoint - new Vector3(-0.00567f, -0.00696f, -0.01334f), // MiddleDistalJoint - new Vector3(-0.01080f, -0.00381f, -0.00193f), // MiddleTip - new Vector3(-0.05340f, 0.02059f, 0.05460f), // RingMetacarpal - new Vector3(-0.03363f, -0.05134f, 0.00849f), // RingKnuckle - new Vector3(-0.02000f, -0.02888f, -0.02123f), // RingMiddleJoint - new Vector3(-0.02304f, -0.00675f, -0.01062f), // RingDistalJoint - new Vector3(-0.02754f, -0.00310f, 0.00082f), // RingTip - new Vector3(-0.05340f, 0.02059f, 0.05460f), // PinkyMetacarpal - new Vector3(-0.05225f, -0.04629f, 0.00384f), // PinkyKnuckle - new Vector3(-0.03698f, -0.03051f, -0.01900f), // PinkyMiddleJoint - new Vector3(-0.03617f, -0.01485f, -0.01130f), // PinkyDistalJoint - new Vector3(-0.03902f, -0.00873f, -0.00159f), // PinkyTip - }); - - static private SimulatedHandPose HandThumbsUp = new SimulatedHandPose(new Vector3[] - { - new Vector3(-0.05754f, 0.04969f, -0.01566f), // None - new Vector3(-0.05754f, 0.04969f, -0.01566f), // Wrist - new Vector3(0.00054f, 0.01716f, -0.03472f), // Palm - new Vector3(0.00054f, 0.01716f, -0.03472f), // ThumbMetacarpalJoint - new Vector3(-0.03106f, -0.02225f, -0.00120f), // ThumbProximalJoint - new Vector3(-0.02123f, -0.04992f, 0.00199f), // ThumbDistalJoint - new Vector3(-0.01793f, -0.06510f, 0.00358f), // ThumbTip - new Vector3(-0.05754f, 0.04969f, -0.01566f), // IndexMetacarpal - new Vector3(0.01284f, -0.01185f, -0.03795f), // IndexKnuckle - new Vector3(0.03290f, -0.00608f, -0.00720f), // IndexMiddleJoint - new Vector3(0.01647f, 0.00258f, 0.00238f), // IndexDistalJoint - new Vector3(0.00559f, 0.00502f, 0.00017f), // IndexTip - new Vector3(-0.05754f, 0.04969f, -0.01566f), // MiddleMetacarpal - new Vector3(0.01777f, 0.00604f, -0.04572f), // MiddleKnuckle - new Vector3(0.03731f, 0.00686f, -0.00898f), // MiddleMiddleJoint - new Vector3(0.01713f, 0.01536f, 0.00219f), // MiddleDistalJoint - new Vector3(0.00542f, 0.01846f, -0.00091f), // MiddleTip - new Vector3(-0.05754f, 0.04969f, -0.01566f), // RingMetacarpal - new Vector3(0.01836f, 0.02624f, -0.04858f), // RingKnuckle - new Vector3(0.03987f, 0.02388f, -0.01663f), // RingMiddleJoint - new Vector3(0.02182f, 0.02969f, -0.00200f), // RingDistalJoint - new Vector3(0.00978f, 0.03257f, -0.00310f), // RingTip - new Vector3(-0.05754f, 0.04969f, -0.01566f), // PinkyMetacarpal - new Vector3(0.01784f, 0.04561f, -0.04763f), // PinkyKnuckle - new Vector3(0.03771f, 0.03986f, -0.02511f), // PinkyMiddleJoint - new Vector3(0.02634f, 0.04067f, -0.01262f), // PinkyDistalJoint - new Vector3(0.01505f, 0.04267f, -0.01241f), // PinkyTip - }); - - static private SimulatedHandPose HandVictory = new SimulatedHandPose(new Vector3[] - { - new Vector3(-0.08835f, 0.13334f, 0.02745f), // None - new Vector3(-0.08835f, 0.13334f, 0.02745f), // Wrist - new Vector3(-0.05800f, 0.07626f, 0.00397f), // Palm - new Vector3(-0.05800f, 0.07626f, 0.00397f), // ThumbMetacarpalJoint - new Vector3(-0.03418f, 0.10243f, -0.00761f), // ThumbProximalJoint - new Vector3(-0.03570f, 0.08857f, -0.03347f), // ThumbDistalJoint - new Vector3(-0.04603f, 0.08584f, -0.04472f), // ThumbTip - new Vector3(-0.08835f, 0.13334f, 0.02745f), // IndexMetacarpal - new Vector3(-0.03200f, 0.05950f, 0.00836f), // IndexKnuckle - new Vector3(-0.01535f, 0.02702f, 0.00475f), // IndexMiddleJoint - new Vector3(-0.00577f, 0.00904f, 0.00218f), // IndexDistalJoint - new Vector3(-0.00046f, -0.00064f, 0.00053f), // IndexTip - new Vector3(-0.08835f, 0.13334f, 0.02745f), // MiddleMetacarpal - new Vector3(-0.05017f, 0.05484f, 0.00171f), // MiddleKnuckle - new Vector3(-0.04307f, 0.01754f, -0.01398f), // MiddleMiddleJoint - new Vector3(-0.03889f, -0.00439f, -0.02321f), // MiddleDistalJoint - new Vector3(-0.03677f, -0.01553f, -0.02789f), // MiddleTip - new Vector3(-0.08835f, 0.13334f, 0.02745f), // RingMetacarpal - new Vector3(-0.06885f, 0.05706f, -0.00568f), // RingKnuckle - new Vector3(-0.05015f, 0.04311f, -0.03622f), // RingMiddleJoint - new Vector3(-0.04307f, 0.06351f, -0.04646f), // RingDistalJoint - new Vector3(-0.04840f, 0.07039f, -0.03760f), // RingTip - new Vector3(-0.08835f, 0.13334f, 0.02745f), // PinkyMetacarpal - new Vector3(-0.08544f, 0.06253f, -0.01371f), // PinkyKnuckle - new Vector3(-0.06657f, 0.07318f, -0.03519f), // PinkyMiddleJoint - new Vector3(-0.06393f, 0.08967f, -0.03293f), // PinkyDistalJoint - new Vector3(-0.06748f, 0.09752f, -0.02542f), // PinkyTip - }); - } - -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities.meta b/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities.meta deleted file mode 100644 index c2c3481bc55..00000000000 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 701525520539a294abfd355960c2538e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs deleted file mode 100644 index 0c81518a217..00000000000 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using Microsoft.MixedReality.Toolkit.Utilities; -using System; -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Input -{ - - /// - /// Record joint positions of a hand and log them for use in simulated hands - /// - public class HandGestureRecorder : MonoBehaviour - { - private static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; - - public TrackedHandJoint ReferenceJoint = TrackedHandJoint.IndexTip; - - private Vector3 offset = Vector3.zero; - - void Update() - { - if (UnityEngine.Input.GetKeyDown(KeyCode.F9)) - { - HandJointUtils.TryGetJointPose(ReferenceJoint, Handedness.Left, out MixedRealityPose joint); - offset = joint.Position; - } - if (UnityEngine.Input.GetKeyUp(KeyCode.F9)) - { - RecordPose(Handedness.Left); - } - - if (UnityEngine.Input.GetKeyDown(KeyCode.F10)) - { - HandJointUtils.TryGetJointPose(ReferenceJoint, Handedness.Right, out MixedRealityPose joint); - offset = joint.Position; - } - if (UnityEngine.Input.GetKeyUp(KeyCode.F10)) - { - RecordPose(Handedness.Right); - } - } - - private void RecordPose(Handedness handedness) - { - Vector3[] jointPositions = new Vector3[jointCount]; - - for (int i = 0; i < jointCount; ++i) - { - GetJointPosition(jointPositions, (TrackedHandJoint)i, handedness); - } - - SimulatedHandPose pose = new SimulatedHandPose(); - pose.ParseFromJointPositions(jointPositions, handedness, Quaternion.identity, offset); - - Debug.Log(pose.GenerateInitializerCode()); - } - - private void GetJointPosition(Vector3[] positions, TrackedHandJoint jointId, Handedness handedness) - { - HandJointUtils.TryGetJointPose(jointId, handedness, out MixedRealityPose joint); - positions[(int)jointId] = joint.Position; - } - } - -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs index 457b1c3b8f3..ac760b4625e 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs @@ -13,8 +13,9 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// The focus provider handles the focused objects per input source. - /// There are convenience properties for getting only Gaze Pointer if needed. /// + /// There are convenience properties for getting only Gaze Pointer if needed. + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Input/Overview.html")] public class FocusProvider : BaseDataProvider, IMixedRealityFocusProvider { public FocusProvider( @@ -25,12 +26,40 @@ public class FocusProvider : BaseDataProvider, IMixedRealityFocusProvider private readonly HashSet pointers = new HashSet(); private readonly HashSet pendingOverallFocusEnterSet = new HashSet(); - private readonly HashSet pendingOverallFocusExitSet = new HashSet(); + private readonly Dictionary pendingOverallFocusExitSet = new Dictionary(); private readonly List pendingPointerSpecificFocusChange = new List(); private readonly Dictionary pointerMediators = new Dictionary(); private PointerHitResult hitResult3d = new PointerHitResult(); private PointerHitResult hitResultUi = new PointerHitResult(); + /// + /// Number of IMixedRealityNearPointers that are active (IsInteractionEnabled == true). + /// + public int NumNearPointersActive { get; private set; } + + /// + /// The number of pointers that support far interaction (like motion controller rays, hand rays) that + /// are active (IsInteractionEnabled == true), excluding the gaze cursor + /// + public int NumFarPointersActive { get; private set; } + + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + #region IFocusProvider Properties /// @@ -131,8 +160,8 @@ private bool IsSetupValid /// /// Cached Vector3 reference to the new raycast position. - /// Only used to update UI raycast results. /// + /// Only used to update UI raycast results. private Vector3 newUiRaycastPosition = Vector3.zero; /// @@ -271,7 +300,7 @@ public void UpdateHit(PointerHitResult hitResult) Pointer.OnPreCurrentPointerTargetChange(); // Set to default: - Pointer.IsTargetPositionLockedOnFocusLock = true; + Pointer.IsTargetPositionLockedOnFocusLock = true; } PreviousPointerTarget = CurrentPointerTarget; @@ -320,7 +349,7 @@ public void UpdateHit(PointerHitResult hitResult) focusDetails.NormalLocalSpace = Vector3.zero; } } - + /// /// Update focus information while focus is locked. If the object is moving, /// this updates the hit point to its new world transform. @@ -411,6 +440,8 @@ public override int GetHashCode() } } + private GazePointerVisibilityStateMachine gazePointerStateMachine = new GazePointerVisibilityStateMachine(); + #region IMixedRealityService Implementation /// @@ -418,22 +449,13 @@ public override void Initialize() { if (!IsSetupValid) { return; } -#if UNITY_EDITOR - var existingUiRaycastCameraObject = GameObject.Find("UIRaycastCamera"); - - if (existingUiRaycastCameraObject != null) - { - Debug.LogError("There's already a UIRaycastCamera in the scene. It will be ignored, so please delete it to avoid confusion.", existingUiRaycastCameraObject); - } -#endif - if (Application.isPlaying) { Debug.Assert(uiRaycastCamera == null); - CreateUiRaycastCamera(); + FindOrCreateUiRaycastCamera(); } - foreach (var inputSource in MixedRealityToolkit.InputSystem.DetectedInputSources) + foreach (var inputSource in InputSystem.DetectedInputSources) { RegisterPointers(inputSource); } @@ -511,10 +533,21 @@ public uint GenerateNewPointerId() /// Utility for creating the UIRaycastCamera. /// /// The UIRaycastCamera - private void CreateUiRaycastCamera() + private void FindOrCreateUiRaycastCamera() { - var cameraObject = new GameObject { name = "UIRaycastCamera" }; - uiRaycastCamera = cameraObject.AddComponent(); + GameObject cameraObject = null; + + var existingUiRaycastCameraObject = GameObject.Find("UIRaycastCamera"); + if (existingUiRaycastCameraObject != null) + { + cameraObject = existingUiRaycastCameraObject; + } + else + { + cameraObject = new GameObject { name = "UIRaycastCamera" }; + } + + uiRaycastCamera = cameraObject.EnsureComponent(); uiRaycastCamera.enabled = false; uiRaycastCamera.clearFlags = CameraClearFlags.Color; uiRaycastCamera.backgroundColor = new Color(0, 0, 0, 1); @@ -533,9 +566,13 @@ private void CreateUiRaycastCamera() uiRaycastCamera.targetDisplay = 0; uiRaycastCamera.stereoTargetEye = StereoTargetEyeMask.Both; - // Set target texture to specific pixel size so that drag thresholds are treated the same regardless of underlying - // device display resolution. - uiRaycastCameraTargetTexture = new RenderTexture(128, 128, 0); + if (uiRaycastCameraTargetTexture == null) + { + // Set target texture to specific pixel size so that drag thresholds are treated the same regardless of underlying + // device display resolution. + uiRaycastCameraTargetTexture = new RenderTexture(128, 128, 0); + } + uiRaycastCamera.targetTexture = uiRaycastCameraTargetTexture; } @@ -578,11 +615,11 @@ private void RegisterPointers(IMixedRealityInputSource inputSource) IMixedRealityPointerMediator mediator = null; - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile.PointerMediator.Type != null) + if (InputSystem?.InputSystemProfile.PointerProfile.PointerMediator.Type != null) { - mediator = Activator.CreateInstance(MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile.PointerMediator.Type) as IMixedRealityPointerMediator; + mediator = Activator.CreateInstance(InputSystem.InputSystemProfile.PointerProfile.PointerMediator.Type) as IMixedRealityPointerMediator; } - + if (mediator != null) { mediator.RegisterPointers(inputSource.Pointers); @@ -598,7 +635,7 @@ private void RegisterPointers(IMixedRealityInputSource inputSource) RegisterPointer(inputSource.Pointers[i]); // Special Registration for Gaze - if (inputSource.SourceId == MixedRealityToolkit.InputSystem.GazeProvider.GazeInputSource.SourceId && gazeProviderPointingData == null) + if (inputSource.SourceId == InputSystem.GazeProvider.GazeInputSource.SourceId && gazeProviderPointingData == null) { gazeProviderPointingData = new PointerData(inputSource.Pointers[i]); } @@ -628,12 +665,15 @@ public bool UnregisterPointer(IMixedRealityPointer pointer) } } + InputSystem?.RaisePreFocusChanged(pointer, unfocusedObject, null); + if (!objectIsStillFocusedByOtherPointer) { // Policy: only raise focus exit if no other pointers are still focusing the object - MixedRealityToolkit.InputSystem?.RaiseFocusExit(pointer, unfocusedObject); + InputSystem?.RaiseFocusExit(pointer, unfocusedObject); } - MixedRealityToolkit.InputSystem?.RaisePreFocusChanged(pointer, unfocusedObject, null); + + InputSystem?.RaiseFocusChanged(pointer, unfocusedObject, null); } pointers.Remove(pointerData); @@ -702,7 +742,6 @@ private void UpdatePointers() MixedRealityRaycaster.DebugEnabled = pointerProfile.DebugDrawPointingRays; Color rayColor; - if ((pointerProfile.DebugDrawPointingRayColors != null) && (pointerProfile.DebugDrawPointingRayColors.Length > 0)) { rayColor = pointerProfile.DebugDrawPointingRayColors[pointerCount++ % pointerProfile.DebugDrawPointingRayColors.Length]; @@ -712,6 +751,14 @@ private void UpdatePointers() rayColor = Color.green; } + if (!pointer.Pointer.IsActive) + { + // Only draw pointers that are currently active, but make sure to + // increment color even if pointer is disabled so that the color for e.g. the + // sphere pointer or the poke pointer remains consistent. + continue; + } + Debug.DrawRay(pointer.StartPoint, (pointer.Details.Point - pointer.StartPoint), rayColor); } } @@ -801,37 +848,43 @@ PointerHitResult GetPrioritizedHitResult(PointerHitResult hit1, PointerHitResult return (hit1.hitObject != null) ? hit1 : hit2; } - + /// /// Disable inactive pointers to unclutter the way for active ones. /// private void ReconcilePointers() { var gazePointer = gazeProviderPointingData?.Pointer as GenericPointer; - if (gazePointer != null) + NumFarPointersActive = 0; + NumNearPointersActive = 0; + + foreach (var pointerData in pointers) { - int numFarCursors = 0; - int numNearPointersActive = 0; - foreach (var p in pointers) + if (pointerData.Pointer is IMixedRealityNearPointer) { - if (p.Pointer != null) + if (pointerData.Pointer.IsInteractionEnabled) { - if (p.Pointer is IMixedRealityNearPointer) - { - if (p.Pointer.IsInteractionEnabled) - { - numNearPointersActive++; - } - } - else if (p.Pointer.BaseCursor != null) - { - numFarCursors++; - } + NumNearPointersActive++; } } - // The gaze cursor's visibility is controlled by IsInteractionEnabled - // Show the gaze cursor if there are no other pointers that are showing a cursor - gazePointer.IsInteractionEnabled = numFarCursors == 1 && numNearPointersActive == 0; + else if (pointerData.Pointer.BaseCursor != null + && !(pointerData.Pointer == gazePointer) + && pointerData.Pointer.IsInteractionEnabled) + { + // We ignore the currentGazePointer here because for cases like HoloLens 1 + // hand input or the gamepad, we want to show the cursor still. + NumFarPointersActive++; + } + } + if (gazePointer != null) + { + gazePointerStateMachine.UpdateState( + NumNearPointersActive, + NumFarPointersActive, + InputSystem.EyeGazeProvider.IsEyeGazeValid); + + // The gaze cursor's visibility is controlled by IsInteractionEnabled + gazePointer.IsInteractionEnabled = gazePointerStateMachine.IsGazePointerActive; } } @@ -896,7 +949,7 @@ private static void QueryScene(IMixedRealityPointer pointer, LayerMask[] priorit { // Policy: in order for an collider to be near interactable it must have // a NearInteractionGrabbable component on it. - // FIXME: This is assuming only the grab pointer is using SceneQueryType.SphereOverlap, + // FIXME: This is assuming only the grab pointer is using SceneQueryType.SphereOverlap, // but there may be other pointers using the same query type which have different semantics. if (collider.GetComponent() == null) { @@ -1039,7 +1092,15 @@ private void UpdateFocusedObjects() if (pointer.PreviousPointerTarget != null) { - pendingOverallFocusExitSet.Add(pointer.PreviousPointerTarget); + int numExits; + if (pendingOverallFocusExitSet.TryGetValue(pointer.PreviousPointerTarget, out numExits)) + { + pendingOverallFocusExitSet[pointer.PreviousPointerTarget] = numExits + 1; + } + else + { + pendingOverallFocusExitSet.Add(pointer.PreviousPointerTarget, 1); + } } if (pointer.CurrentPointerTarget != null) @@ -1049,11 +1110,20 @@ private void UpdateFocusedObjects() } } + // Early out if there have been no focus changes + if (pendingPointerSpecificFocusChange.Count == 0) + { + return; + } + // ... but now we trim out objects whose overall focus was maintained the same by a different pointer: foreach (var pointer in pointers) { - pendingOverallFocusExitSet.Remove(pointer.CurrentPointerTarget); + if (pointer.CurrentPointerTarget != null) + { + pendingOverallFocusExitSet.Remove(pointer.CurrentPointerTarget); + } pendingOverallFocusEnterSet.Remove(pointer.PreviousPointerTarget); } @@ -1064,21 +1134,29 @@ private void UpdateFocusedObjects() GameObject pendingUnfocusObject = change.PreviousPointerTarget; GameObject pendingFocusObject = change.CurrentPointerTarget; - MixedRealityToolkit.InputSystem.RaisePreFocusChanged(change.Pointer, pendingUnfocusObject, pendingFocusObject); + InputSystem.RaisePreFocusChanged(change.Pointer, pendingUnfocusObject, pendingFocusObject); - if (pendingOverallFocusExitSet.Contains(pendingUnfocusObject)) + int numExits; + if (pendingUnfocusObject != null && pendingOverallFocusExitSet.TryGetValue(pendingUnfocusObject, out numExits)) { - MixedRealityToolkit.InputSystem.RaiseFocusExit(change.Pointer, pendingUnfocusObject); - pendingOverallFocusExitSet.Remove(pendingUnfocusObject); + if (numExits > 1) + { + pendingOverallFocusExitSet[pendingUnfocusObject] = numExits - 1; + } + else + { + InputSystem.RaiseFocusExit(change.Pointer, pendingUnfocusObject); + pendingOverallFocusExitSet.Remove(pendingUnfocusObject); + } } if (pendingOverallFocusEnterSet.Contains(pendingFocusObject)) { - MixedRealityToolkit.InputSystem.RaiseFocusEnter(change.Pointer, pendingFocusObject); + InputSystem.RaiseFocusEnter(change.Pointer, pendingFocusObject); pendingOverallFocusEnterSet.Remove(pendingFocusObject); } - MixedRealityToolkit.InputSystem.RaiseFocusChanged(change.Pointer, pendingUnfocusObject, pendingFocusObject); + InputSystem.RaiseFocusChanged(change.Pointer, pendingUnfocusObject, pendingFocusObject); } Debug.Assert(pendingOverallFocusExitSet.Count == 0); @@ -1133,6 +1211,14 @@ public void OnSourceLost(SourceStateEventData eventData) } } + #endregion ISourceState Implementation + + #region IMixedRealitySpeechHandler Implementation + public void OnSpeechKeywordRecognized(SpeechEventData eventData) + { + gazePointerStateMachine.OnSpeechKeywordRecognized(eventData); + } + #endregion } } diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs new file mode 100644 index 00000000000..0242c035c43 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + /// + /// Helper class for managing the visibility of the gaze pointer to match windows mixed reality and HoloLens 2 + /// When application starts, gaze pointer is visible. Then when articulate hands / motion controllers + /// appear, hide the gaze cursor. Whenever user says "select", make the gaze cursor appear. + /// + /// + /// Has different behavior depending on whether or not eye gaze or head gaze in use - see comments on + /// GazePointerState for more details. + /// + public class GazePointerVisibilityStateMachine : IMixedRealitySpeechHandler + { + private enum GazePointerState + { + // When the application starts up, the gaze pointer should be active + Initial, + + // If head gaze is in use, then the gaze pointer is active when no hands are visible, after "select" + // If eye gaze is use, then the gaze pointer is active when no far pointers are active. + GazePointerActive, + + // If head gaze is in use, then the gaze pointer is inactive as soon as motion controller or + // articulated hand pointers appear. + // If eye gaze is in use, then the gaze pointer is inactive when far pointers are active. + GazePointerInactive + } + private GazePointerState gazePointerState = GazePointerState.Initial; + private bool activateGazeKeywordIsSet = false; + private bool eyeGazeValid = false; + + public bool IsGazePointerActive + { + get { return gazePointerState != GazePointerState.GazePointerInactive; } + } + + /// + /// Updates the state machine based on the number of near pointers, the number of far pointers, + /// and whether or not eye gaze is valid. + /// + public void UpdateState(int numNearPointersActive, int numFarPointersActive, bool isEyeGazeValid) + { + if (eyeGazeValid != isEyeGazeValid) + { + activateGazeKeywordIsSet = false; + eyeGazeValid = isEyeGazeValid; + } + + if (isEyeGazeValid) + { + UpdateStateEyeGaze(numNearPointersActive, numFarPointersActive); + } + else + { + UpdateStateHeadGaze(numNearPointersActive, numFarPointersActive); + } + } + + private void UpdateStateEyeGaze(int numNearPointersActive, int numFarPointersActive) + { + // If there are any far pointers active while eye gaze is valid, then + // eye gaze should be disabled. + bool isEyeGazePointerActive = numFarPointersActive == 0; + + gazePointerState = isEyeGazePointerActive ? + GazePointerState.GazePointerActive : + GazePointerState.GazePointerInactive; + } + + private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersActive) + { + bool canGazeCursorShow = numFarPointersActive == 1 && numNearPointersActive == 0; + switch (gazePointerState) + { + case GazePointerState.Initial: + if (!canGazeCursorShow) + { + // There is some pointer other than the gaze pointer in the scene, assume + // this is from a motion controller or articulated hand, and that we should + // hide the gaze pointer + gazePointerState = GazePointerState.GazePointerInactive; + } + break; + case GazePointerState.GazePointerActive: + if (!canGazeCursorShow) + { + activateGazeKeywordIsSet = false; + gazePointerState = GazePointerState.GazePointerInactive; + } + break; + case GazePointerState.GazePointerInactive: + // Go from inactive to active if we say the word "select" + if (activateGazeKeywordIsSet) + { + activateGazeKeywordIsSet = false; + gazePointerState = GazePointerState.GazePointerActive; + } + break; + default: + break; + } + } + + public void OnSpeechKeywordRecognized(SpeechEventData eventData) + { + if (!eyeGazeValid && eventData.Command.Keyword.Equals("select", StringComparison.CurrentCultureIgnoreCase)) + { + activateGazeKeywordIsSet = true; + } + } + } + +} diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs.meta b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs.meta new file mode 100644 index 00000000000..a7498db360b --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a609eb6100c33af4b8727a4d7b6e4fdc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazeProvider.cs b/Assets/MixedRealityToolkit.Services/InputSystem/GazeProvider.cs index 7b73dfe76ab..0ed833ce0dc 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/GazeProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazeProvider.cs @@ -5,6 +5,7 @@ using Microsoft.MixedReality.Toolkit.Utilities; using System; using UnityEngine; +using UnityEngine.Serialization; using UnityPhysics = UnityEngine.Physics; namespace Microsoft.MixedReality.Toolkit.Input @@ -80,22 +81,20 @@ public bool Enabled } [SerializeField] - [Tooltip("True to prefer eye tracking over head gaze, when available.")] - private bool preferEyeTracking = false; + [Tooltip("If true, eye-based tracking will be used when available. Requires the 'Gaze Input' permission and device eye calibration to have been run.")] + [Help("When enabling eye tracking, please follow the instructions at " + + "https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/EyeTracking/EyeTracking_BasicSetup.html#eye-tracking-requirements " + + "to set up 'Gaze Input' capabilities through Visual Studio.", "", false)] + [FormerlySerializedAs("preferEyeTracking")] + private bool useEyeTracking = true; /// public bool UseEyeTracking { - get { return preferEyeTracking; } - set { preferEyeTracking = value; } + get { return useEyeTracking; } + set { useEyeTracking = value; } } - /// - public IMixedRealityInputSystem InputSystem { private get; set; } - - /// - public Transform Playspace { private get; set; } - /// public IMixedRealityInputSource GazeInputSource { @@ -136,7 +135,7 @@ public IMixedRealityInputSource GazeInputSource public Vector3 HitNormal { get; private set; } /// - public Vector3 GazeOrigin => GazePointer.Rays[0].Origin; + public Vector3 GazeOrigin => gazePointer != null ? gazePointer.Rays[0].Origin : Vector3.zero; /// public Vector3 GazeDirection => GazePointer.Rays[0].Direction; @@ -227,7 +226,7 @@ public override void OnPreSceneQuery() Vector3 newGazeOrigin = Vector3.zero; Vector3 newGazeNormal = Vector3.zero; - if (gazeProvider.preferEyeTracking && gazeProvider.IsEyeTrackingAvailable) + if (gazeProvider.useEyeTracking && gazeProvider.IsEyeTrackingAvailable) { gazeProvider.gazeInputSource.SourceType = InputSourceType.Eyes; newGazeOrigin = gazeProvider.latestEyeGaze.origin; @@ -271,7 +270,7 @@ public override void OnPostSceneQuery() if (isDown) { - MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, currentHandedness, currentInputSource); + InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, currentHandedness, currentInputSource); } } @@ -353,7 +352,7 @@ protected override async void Start() { base.Start(); - await WaitUntilInputSystemValid; + await EnsureInputSystemValid(); if (this == null) { @@ -379,10 +378,10 @@ private void Update() // If flagged to do so (setCursorInvisibleWhenFocusLocked) and active (IsInteractionEnabled), set the visibility to !IsFocusLocked, // but don't touch the visibility when not active or not flagged. - if (setCursorInvisibleWhenFocusLocked && GazePointer != null && - GazePointer.IsInteractionEnabled && GazePointer.IsFocusLocked == GazeCursor.IsVisible) + if (setCursorInvisibleWhenFocusLocked && gazePointer != null && + gazePointer.IsInteractionEnabled && gazePointer.IsFocusLocked == GazeCursor.IsVisible) { - GazeCursor.SetVisibility(!GazePointer.IsFocusLocked); + GazeCursor.SetVisibility(!gazePointer.IsFocusLocked); } } @@ -477,7 +476,8 @@ private IMixedRealityPointer InitializeGazePointer() if ((GazeCursor == null) && (GazeCursorPrefab != null)) { - GameObject cursor = Instantiate(GazeCursorPrefab, Playspace); + GameObject cursor = Instantiate(GazeCursorPrefab); + MixedRealityPlayspace.AddChild(cursor.transform); SetGazeCursor(cursor); } @@ -486,7 +486,8 @@ private IMixedRealityPointer InitializeGazePointer() private async void RaiseSourceDetected() { - await WaitUntilInputSystemValid; + await EnsureInputSystemValid(); + if (this == null) { // We've been destroyed during the await. diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/InputSystemGlobalListener.cs b/Assets/MixedRealityToolkit.Services/InputSystem/InputSystemGlobalListener.cs index 95847812b08..6df842619a5 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/InputSystemGlobalListener.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/InputSystemGlobalListener.cs @@ -2,6 +2,8 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities; +using System; +using System.Threading.Tasks; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input @@ -13,13 +15,28 @@ public class InputSystemGlobalListener : MonoBehaviour { private bool lateInitialize = true; - protected readonly WaitUntil WaitUntilInputSystemValid = new WaitUntil(() => MixedRealityToolkit.InputSystem != null); + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } protected virtual void OnEnable() { - if (MixedRealityToolkit.IsInitialized && MixedRealityToolkit.InputSystem != null && !lateInitialize) + if (InputSystem != null && !lateInitialize) { - MixedRealityToolkit.InputSystem.Register(gameObject); + InputSystem.Register(gameObject); } } @@ -27,10 +44,7 @@ protected virtual async void Start() { if (lateInitialize) { - if (MixedRealityToolkit.InputSystem == null) - { - await WaitUntilInputSystemValid; - } + await EnsureInputSystemValid(); // We've been destroyed during the await. if (this == null) @@ -39,13 +53,28 @@ protected virtual async void Start() } lateInitialize = false; - MixedRealityToolkit.InputSystem.Register(gameObject); + InputSystem.Register(gameObject); } } protected virtual void OnDisable() { - MixedRealityToolkit.InputSystem?.Unregister(gameObject); + InputSystem?.Unregister(gameObject); + } + + /// + /// A task that will only complete when the input system has in a valid state. + /// + /// + /// It's possible for this object to have been destroyed after the await, which + /// implies that callers should check that this != null after awaiting this task. + /// + protected async Task EnsureInputSystemValid() + { + if (InputSystem == null) + { + await new WaitUntil(() => InputSystem != null); + } } } } diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputModule.cs b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputModule.cs index 5ca6cb9d19c..d3639ab78e7 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputModule.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputModule.cs @@ -31,6 +31,23 @@ public PointerData(IMixedRealityPointer pointer, EventSystem eventSystem) } } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + /// /// Mapping from pointer id to event data and click state /// @@ -58,24 +75,24 @@ public override void ActivateModule() { base.ActivateModule(); - if (MixedRealityToolkit.InputSystem != null) + if (InputSystem != null) { - RaycastCamera = MixedRealityToolkit.InputSystem.FocusProvider.UIRaycastCamera; + RaycastCamera = InputSystem.FocusProvider.UIRaycastCamera; - foreach (IMixedRealityInputSource inputSource in MixedRealityToolkit.InputSystem.DetectedInputSources) + foreach (IMixedRealityInputSource inputSource in InputSystem.DetectedInputSources) { OnSourceDetected(inputSource); } - MixedRealityToolkit.InputSystem.Register(gameObject); + InputSystem.Register(gameObject); } } public override void DeactivateModule() { - if (MixedRealityToolkit.InputSystem != null) + if (InputSystem != null) { - MixedRealityToolkit.InputSystem.Unregister(gameObject); + InputSystem.Unregister(gameObject); foreach (var p in pointerDataToUpdate) { @@ -275,9 +292,13 @@ void OnSourceDetected(IMixedRealityInputSource inputSource) var pointer = inputSource.Pointers[i]; if (pointer.InputSourceParent == inputSource) { + // This !ContainsKey is only necessary due to inconsistent initialization of + // various input providers and this class's ActivateModule() call. int pointerId = (int)pointer.PointerId; - Debug.Assert(!pointerDataToUpdate.ContainsKey(pointerId)); - pointerDataToUpdate.Add(pointerId, new PointerData(pointer, eventSystem)); + if (!pointerDataToUpdate.ContainsKey(pointerId)) + { + pointerDataToUpdate.Add(pointerId, new PointerData(pointer, eventSystem)); + } } } } diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs index f84470d4007..e3f1803582c 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities; -using Microsoft.MixedReality.Toolkit.Input; using System; using System.Collections.Generic; using UnityEngine; @@ -13,30 +12,19 @@ namespace Microsoft.MixedReality.Toolkit.Input /// /// The Mixed Reality Toolkit's specific implementation of the /// + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Input/Overview.html")] public class MixedRealityInputSystem : BaseCoreSystem, IMixedRealityInputSystem { public MixedRealityInputSystem( IMixedRealityServiceRegistrar registrar, - MixedRealityInputSystemProfile profile, - Transform playspace) : base(registrar, profile) + MixedRealityInputSystemProfile profile) : base(registrar, profile) { if (registrar == null) { Debug.LogError("The MixedRealityInputSystem object requires a valid IMixedRealityServiceRegistrar instance."); } - - if (playspace == null) - { - Debug.LogError("The MixedRealityInputSystem object requires a valid playspace Transform."); - } - Playspace = playspace; } - /// - /// The transform of the playspace scene object. - /// - private Transform Playspace = null; - /// public event Action InputEnabled; @@ -49,6 +37,22 @@ public class MixedRealityInputSystem : BaseCoreSystem, IMixedRealityInputSystem /// public HashSet DetectedControllers { get; } = new HashSet(); + + private MixedRealityInputSystemProfile inputSystemProfile = null; + + /// + public MixedRealityInputSystemProfile InputSystemProfile + { + get + { + if (inputSystemProfile == null) + { + inputSystemProfile = ConfigurationProfile as MixedRealityInputSystemProfile; + } + return inputSystemProfile; + } + } + private IMixedRealityFocusProvider focusProvider = null; /// @@ -135,7 +139,7 @@ public override void Initialize() } } - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile == null) + if (InputSystemProfile == null) { Debug.LogError("The Input system is missing the required Input System Profile!"); return; @@ -156,8 +160,6 @@ public override void Initialize() if (profile.PointerProfile.GazeProviderType?.Type != null) { GazeProvider = CameraCache.Main.gameObject.EnsureComponent(profile.PointerProfile.GazeProviderType.Type) as IMixedRealityGazeProvider; - GazeProvider.InputSystem = this; - GazeProvider.Playspace = Playspace; GazeProvider.GazeCursorPrefab = profile.PointerProfile.GazeCursorPrefab; // Current implementation implements both provider types in one concrete class. EyeGazeProvider = GazeProvider as IMixedRealityEyeGazeProvider; @@ -214,7 +216,7 @@ public override void Enable() for (int i = 0; i < profile.DataProviderConfigurations.Length; i++) { MixedRealityInputDataProviderConfiguration configuration = profile.DataProviderConfigurations[i]; - object[] args = { Registrar, this, profile, Playspace, configuration.ComponentName, configuration.Priority, configuration.DeviceManagerProfile }; + object[] args = { Registrar, this, configuration.ComponentName, configuration.Priority, configuration.DeviceManagerProfile }; if (Registrar.RegisterDataProvider( configuration.ComponentType.Type, @@ -418,8 +420,8 @@ public override void HandleEvent(BaseEventData eventData, ExecuteEvents.Event /// /// Register a GameObject to listen to events that will receive all input events, regardless /// of which other GameObjects might have handled the event beforehand. - /// Useful for listening to events when the GameObject is currently not being raycasted against by the . /// + /// Useful for listening to events when the GameObject is currently not being raycasted against by the . /// Listener to add. public override void Register(GameObject listener) { @@ -1307,6 +1309,8 @@ public void RaiseSpeechCommandRecognized(IMixedRealityInputSource source, Recogn // Create input event speechEventData.Initialize(source, confidence, phraseDuration, phraseStartTime, command); + FocusProvider?.OnSpeechKeywordRecognized(speechEventData); + // Pass handler through HandleEvent to perform modal/fallback logic HandleEvent(speechEventData, OnSpeechKeywordRecognizedEventHandler); } diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionGrabbable.cs b/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionGrabbable.cs index aabde84bacf..f489c1891c9 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionGrabbable.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionGrabbable.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using System.Collections; -using System.Collections.Generic; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionTouchable.cs b/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionTouchable.cs index 738b51624c4..db74e83e7a9 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionTouchable.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionTouchable.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using System; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -209,24 +210,26 @@ public virtual float DistanceToSurface(Vector3 samplePoint) { Vector3 localPoint = transform.InverseTransformPoint(samplePoint) - localCenter; - // Get point on plane - Plane plane = new Plane(localForward, Vector3.zero); - Vector3 pointOnPlane = plane.ClosestPointOnPlane(localPoint); - - // Get plane coordinates - Vector2 planeSpacePoint = new Vector2( - Vector3.Dot(pointOnPlane, LocalRight), - Vector3.Dot(pointOnPlane, localUp)); - - // Clamp to bounds - planeSpacePoint = new Vector2( - Mathf.Clamp(planeSpacePoint.x, -bounds.x / 2, bounds.x / 2), - Mathf.Clamp(planeSpacePoint.y, -bounds.y / 2, bounds.y / 2)); + // Get surface coordinates + Vector3 planeSpacePoint = new Vector3( + Vector3.Dot(localPoint, LocalRight), + Vector3.Dot(localPoint, localUp), + Vector3.Dot(localPoint, localForward)); + + // touchables currently can only be touched within the bounds of the rectangle. + // We return infinity to ensure that any point outside the bounds does not get touched. + if (planeSpacePoint.x < -bounds.x / 2 || + planeSpacePoint.x > bounds.x / 2 || + planeSpacePoint.y < -bounds.y / 2 || + planeSpacePoint.y > bounds.y / 2) + { + return float.PositiveInfinity; + } - // Convert back to 3D space - Vector3 clampedPoint = transform.TransformPoint((LocalRight * planeSpacePoint.x) + (localUp * planeSpacePoint.y) + localCenter); + // Scale back to 3D space + planeSpacePoint = transform.TransformSize(planeSpacePoint); - return (samplePoint - clampedPoint).magnitude; + return Math.Abs(planeSpacePoint.z); } } diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasEditorExtension.cs b/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasEditorExtension.cs index 9f0b3260052..d49d5442151 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasEditorExtension.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasEditorExtension.cs @@ -12,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Input.Utilities /// Helper class to get CanvasUtility onto Canvas objects. /// [CustomEditor(typeof(Canvas))] - public class CanvasEditorExtension : Editor + public class CanvasEditorExtension : UnityEditor.Editor { public override void OnInspectorGUI() { diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasUtility.cs b/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasUtility.cs index 02f79b3e024..10c9d3722b0 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasUtility.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasUtility.cs @@ -52,6 +52,23 @@ public override void OnInspectorGUI() } #endif + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + private IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + private void Start() { Canvas canvas = GetComponent(); @@ -61,8 +78,8 @@ private void Start() { if (canvas.worldCamera == null) { - Debug.Assert(MixedRealityToolkit.InputSystem.FocusProvider.UIRaycastCamera != null, this); - canvas.worldCamera = MixedRealityToolkit.InputSystem.FocusProvider.UIRaycastCamera; + Debug.Assert(InputSystem?.FocusProvider?.UIRaycastCamera != null, this); + canvas.worldCamera = InputSystem?.FocusProvider?.UIRaycastCamera; if (EventSystem.current == null) { diff --git a/Assets/MixedRealityToolkit.Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs b/Assets/MixedRealityToolkit.Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs index 6107989472e..7f109db89e8 100644 --- a/Assets/MixedRealityToolkit.Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs +++ b/Assets/MixedRealityToolkit.Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs @@ -10,6 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.SpatialAwareness /// /// Class providing the default implementation of the interface. /// + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/SpatialAwareness/SpatialAwarenessGettingStarted.html")] public class MixedRealitySpatialAwarenessSystem : BaseCoreSystem, IMixedRealitySpatialAwarenessSystem { public MixedRealitySpatialAwarenessSystem( @@ -136,7 +137,7 @@ public override void Destroy() #region IMixedRealitySpatialAwarenessSystem Implementation /// - /// The collection of registered spatial awareness observers. + /// The collection of registered spatial awareness observers. /// private List observers = new List(); @@ -174,6 +175,21 @@ public uint GenerateNewSourceId() return nextSourceId++; } + private MixedRealitySpatialAwarenessSystemProfile spatialAwarenessSystemProfile = null; + + /// + public MixedRealitySpatialAwarenessSystemProfile SpatialAwarenessSystemProfile + { + get + { + if (spatialAwarenessSystemProfile == null) + { + spatialAwarenessSystemProfile = ConfigurationProfile as MixedRealitySpatialAwarenessSystemProfile; + } + return spatialAwarenessSystemProfile; + } + } + /// public IReadOnlyList GetObservers() { diff --git a/Assets/MixedRealityToolkit.Services/TeleportSystem/MixedRealityTeleportSystem.cs b/Assets/MixedRealityToolkit.Services/TeleportSystem/MixedRealityTeleportSystem.cs index b87d12984d4..e2996708bfe 100644 --- a/Assets/MixedRealityToolkit.Services/TeleportSystem/MixedRealityTeleportSystem.cs +++ b/Assets/MixedRealityToolkit.Services/TeleportSystem/MixedRealityTeleportSystem.cs @@ -14,21 +14,13 @@ namespace Microsoft.MixedReality.Toolkit.Teleport public class MixedRealityTeleportSystem : BaseCoreSystem, IMixedRealityTeleportSystem { public MixedRealityTeleportSystem( - IMixedRealityServiceRegistrar registrar, - Transform playspace) : base(registrar, null) // Teleport system does not use a profile + IMixedRealityServiceRegistrar registrar) : base(registrar, null) // Teleport system does not use a profile { if (registrar == null) { Debug.LogError("The MixedRealityTeleportSystem object requires a valid IMixedRealityServiceRegistrar instance."); } IsInputSystemEnabled = (registrar.GetService(showLogs: false) != null); - - if (playspace == null) - { - Debug.LogError("The MixedRealityTeleportSystem object requires a valid playspace Transform."); - } - - Playspace = playspace; } private TeleportEventData teleportEventData; @@ -137,12 +129,6 @@ public override void Unregister(GameObject listener) #endregion IEventSystemManager Implementation #region IMixedRealityTeleportSystem Implementation - - /// - /// The transform of the playspace scene object. - /// - private Transform Playspace = null; - /// /// Is there an input system registered. /// @@ -262,8 +248,6 @@ private void ProcessTeleportationRequest(TeleportEventData eventData) { isProcessingTeleportRequest = true; - var cameraParent = Playspace; - targetRotation = Vector3.zero; var teleportPointer = eventData.Pointer as IMixedRealityTeleportPointer; if (teleportPointer != null) @@ -283,11 +267,14 @@ private void ProcessTeleportationRequest(TeleportEventData eventData) } float height = targetPosition.y; - targetPosition -= CameraCache.Main.transform.position - cameraParent.position; + targetPosition -= CameraCache.Main.transform.position - MixedRealityPlayspace.Position; targetPosition.y = height; - cameraParent.position = targetPosition; - cameraParent.RotateAround(CameraCache.Main.transform.position, Vector3.up, targetRotation.y - CameraCache.Main.transform.eulerAngles.y); + MixedRealityPlayspace.Position = targetPosition; + MixedRealityPlayspace.RotateAround( + CameraCache.Main.transform.position, + Vector3.up, + targetRotation.y - CameraCache.Main.transform.eulerAngles.y); isProcessingTeleportRequest = false; diff --git a/Assets/MixedRealityToolkit.Services/Version.txt b/Assets/MixedRealityToolkit.Services/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit.Services/Version.txt +++ b/Assets/MixedRealityToolkit.Services/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs index 81452e5d9b8..8318372c28b 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs @@ -16,17 +16,21 @@ public class TestFixture_01_MixedRealityToolkitTests public void Test_01_InitializeMixedRealityToolkit() { TestUtilities.CleanupScene(); + MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); MixedRealityToolkit.ConfirmInitialized(); // Tests - GameObject gameObject = GameObject.Find(nameof(MixedRealityToolkit)); - Assert.AreEqual(nameof(MixedRealityToolkit), gameObject.name); + GameObject gameObject = MixedRealityToolkit.Instance.gameObject; + Assert.IsNotNull(gameObject); } [Test] public void Test_02_TestNoMixedRealityConfigurationFound() { TestUtilities.CleanupScene(); + MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); MixedRealityToolkit.ConfirmInitialized(); MixedRealityToolkit.Instance.ActiveProfile = null; diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs new file mode 100644 index 00000000000..8cb169d48ce --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Input; +using NUnit.Framework; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.TestTools; + +namespace Microsoft.MixedReality.Toolkit.Tests.InputSystem +{ + class GazePointerStateMachineTests + { + [Test] + public void TestHeadGazeHandAndSpeechBehaviour() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Note that in this section, the numFarPointersActive == 1 to simulate the far pointer + // of the gaze pointer itself. + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Head gaze pointer should be visible on start"); + + // After hand is raised, no pointer should show up; + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "After hand is raised, head gaze pointer should go away"); + + // After select called, pointer should show up again but only if no hands are up + FireSelectKeyword(gsm); + Assert.IsFalse(gsm.IsGazePointerActive, "After select is called but hands are up, head gaze pointer should not show up"); + + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + FireSelectKeyword(gsm); + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + Assert.IsTrue(gsm.IsGazePointerActive, "When no hands present and select called, head gaze pointer should show up"); + + // Say select while gaze pointer is active, then raise hand. Gaze pointer should go away + FireSelectKeyword(gsm); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "After select called with hands present, then hand up, head gaze pointer should go away"); + + // Simulate a scene with just the head gaze ray to reset the state such that + // the head gaze pointer is active. + FireSelectKeyword(gsm); + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + Assert.IsTrue(gsm.IsGazePointerActive, "Head gaze pointer should be visible with just the gaze pointer in the scene"); + + // Simulate the addition of a far hand ray - the head gaze pointer should be hidden now. + gsm.UpdateState(0 /*numNearPointersActive*/, 2 /*numFarPointersActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "Head gaze pointer should be hidden in the presence of another far pointer"); + } + + [Test] + public void TestEyeGazeHandAndSpeechBehaviour() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Eye gaze pointer should be visible on start"); + + // With the hand raised, eye gaze pointer should still exist because only far interaction causes the + // eye gaze pointer to go away. + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, true); + Assert.IsTrue(gsm.IsGazePointerActive, "With near interaction, eye gaze pointer should continue to exist"); + + // With far interaction active, eye gaze pointer should be hidden. + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, true); + Assert.IsFalse(gsm.IsGazePointerActive, "With far interaction, eye gaze pointer should go away"); + + // Reset the state and validate that it goes back to being visible. + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, true); + Assert.IsTrue(gsm.IsGazePointerActive, "Eye gaze pointer should be visible when no near or far pointers"); + + // Saying "select" should have no impact on the state of eye gaze-based interactions. + FireSelectKeyword(gsm); + Assert.IsTrue(gsm.IsGazePointerActive, "Saying 'select' should have no impact on eye gaze"); + + // With far and near interaction active, eye gaze pointer should be hidden (because far interaction wins over + // the eye gaze regardless of near interaction state). + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, true); + Assert.IsFalse(gsm.IsGazePointerActive, "With far and near interaction, gaze pointer should go away"); + } + + [Test] + public void TestEyeGazeToHeadGazeTransition() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be visible on start"); + + // With the hand raised, eye gaze pointer should still exist because only far interaction causes the + // eye gaze pointer to go away. + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, true); + Assert.IsTrue(gsm.IsGazePointerActive, "With near interaction, gaze pointer should continue to exist"); + + // With far interaction active, eye gaze pointer should be hidden. + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, true); + Assert.IsFalse(gsm.IsGazePointerActive, "With far interaction, gaze pointer should go away"); + + // Send a "select" command right now, to show that this cached select value doesn't affect the + // state machine once eye gaze degrades into head gaze. + FireSelectKeyword(gsm); + Assert.IsFalse(gsm.IsGazePointerActive, "Select should have no impact while eye gaze is active"); + + // From this point on, we're simulating what happens when eye gaze degrades into head gaze. + // Note that gaze pointer should still be hidden at this point despite no hands being visible + // because "select" wasn't spoken after the degredation happened. + // A user saying "select" 10 minutes before shouldn't have that "select" invocation carry over + // 10 minutes later. + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "Gaze pointer should be inactive"); + + // Saying select at this point should now show the eye gaze pointer. + FireSelectKeyword(gsm); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); + Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be active"); + } + + [Test] + public void TestHeadGazeToEyeGazeTransition() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be visible on start"); + + // The eye pointer should go away because a hand was raised and head gaze is active. + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "With near interaction and head gaze, gaze pointer should be inactive"); + + // After transitioning to eye gaze, the gaze pointer should now be active because near interaction + // doesn't affect the visibility of eye-gaze style pointers. + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, true); + Assert.IsTrue(gsm.IsGazePointerActive, "With near interaction and eye gaze, gaze pointer should be active"); + } + + private static void FireSelectKeyword(GazePointerVisibilityStateMachine gsm) + { + SpeechEventData data = new SpeechEventData(EventSystem.current); + data.Initialize(new BaseGenericInputSource("test input source", new IMixedRealityPointer[0], InputSourceType.Voice), + Utilities.RecognitionConfidenceLevel.High, + System.TimeSpan.MinValue, + System.DateTime.Now, + new SpeechCommands("select", KeyCode.Alpha1, MixedRealityInputAction.None)); + gsm.OnSpeechKeywordRecognized(data); + } + } +} diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs.meta b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs.meta new file mode 100644 index 00000000000..61c361ccf96 --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5050ca6aadf1b2f42bf3aef54b441bf1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_02_InteractionDefinitionTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_02_InteractionDefinitionTests.cs index 5fa35356b29..683cc18c0f0 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_02_InteractionDefinitionTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_02_InteractionDefinitionTests.cs @@ -206,58 +206,47 @@ public void Test06_TestFloatNoChange() #region Vector2 [Test] - public void Test07_TestVector2Changed() + public void Test07_TestVector2() { - var interaction = new MixedRealityInteractionMapping(1, string.Empty, AxisType.DualAxis, DeviceInputType.None, MixedRealityInputAction.None); - var testValue1 = Vector2.one; - var testValue2 = Vector2.zero; - - var initialValue = interaction.Vector2Data; - - Assert.True(initialValue == Vector2.zero); - Assert.IsFalse(interaction.Changed); - - interaction.Vector2Data = testValue1; - - Assert.IsTrue(interaction.Changed); - - var setValue1 = interaction.Vector2Data; - - Assert.True(setValue1 == testValue1); - Assert.IsFalse(interaction.Changed); - - interaction.Vector2Data = testValue2; - - Assert.IsTrue(interaction.Changed); + bool[] invertAxisValues = { true, false }; + Vector2[] vectorValues = { new Vector2(1, 1), new Vector2(1, -1) }; - var setValue2 = interaction.Vector2Data; - - Assert.True(setValue2 == testValue2); - Assert.IsFalse(interaction.Changed); + foreach (var invertXAxis in invertAxisValues) + { + foreach (var invertYAxis in invertAxisValues) + { + foreach (var value in vectorValues) + { + Test07_TestVector2_internal(invertXAxis, invertYAxis, value); + } + } + } } - - [Test] - public void Test08_TestVector2NoChange() + + private static void Test07_TestVector2_internal(bool invertXAxis, bool invertYAxis, Vector2 vectorValue) { - var interaction = new MixedRealityInteractionMapping(1, string.Empty, AxisType.DualAxis, DeviceInputType.None, MixedRealityInputAction.None); - var testValue = Vector2.one; - - var initialValue = interaction.Vector2Data; + string msg = string.Format("invertXAxis: {0}, invertYAxis: {1}, vectorValue: {2}", invertXAxis, invertYAxis, vectorValue); - Assert.True(initialValue == Vector2.zero); - Assert.IsFalse(interaction.Changed); + var i = new MixedRealityInteractionMapping( + 1, string.Empty, AxisType.DualAxis, DeviceInputType.None, MixedRealityInputAction.None, invertXAxis: invertXAxis, invertYAxis: invertYAxis); - interaction.Vector2Data = testValue; + // Test initial state + Assert.AreEqual(Vector2.zero, i.Vector2Data, msg); + Assert.IsFalse(i.Changed, msg); - Assert.IsTrue(interaction.Changed); + // Test change + i.Vector2Data = vectorValue; + Vector2 invertedValue = vectorValue * new Vector2(invertXAxis ? -1f : 1f, invertYAxis ? -1f : 1f); + Assert.AreEqual(invertedValue, i.Vector2Data, msg); + Assert.IsTrue(i.Changed, msg); - // Make sure the second time we query it's false - Assert.IsFalse(interaction.Changed); + // Test Changed gets reset after querying + Assert.IsFalse(i.Changed, msg); - interaction.Vector2Data = testValue; - - // Make sure if we set the same value it's false - Assert.IsFalse(interaction.Changed); + // Test no change + i.Vector2Data = vectorValue; + Assert.AreEqual(invertedValue, i.Vector2Data, msg); + Assert.IsFalse(i.Changed, msg); } #endregion Vector2 diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs index c60b16dac7c..e3b41c860f6 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs @@ -30,7 +30,7 @@ public void Test01_CreateMixedRealityInputSystem() MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile = inputSystemProfile; // Add Input System - MixedRealityToolkit.Instance.RegisterService(new MixedRealityInputSystem(MixedRealityToolkit.Instance, MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile, MixedRealityToolkit.Instance.MixedRealityPlayspace)); + MixedRealityToolkit.Instance.RegisterService(new MixedRealityInputSystem(MixedRealityToolkit.Instance, MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)); // Tests Assert.IsNotEmpty(MixedRealityToolkit.Instance.ActiveSystems); diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs new file mode 100644 index 00000000000..2f2089edb6a --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +#if !WINDOWS_UWP +// When the .NET scripting backend is enabled and C# projects are built +// Unity doesn't include the the required assemblies (i.e. the ones below). +// Given that the .NET backend is deprecated by Unity at this point it's we have +// to work around this on our end. +using Microsoft.MixedReality.Toolkit.UI; +using NUnit.Framework; +using System.Collections; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.TestTools; +using Microsoft.MixedReality.Toolkit; +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.Utilities; +using System.Linq; + +namespace Microsoft.MixedReality.Toolkit.Tests +{ + public class FocusProviderTests + { + /// + /// + /// + [UnityTest] + public IEnumerator TestGazeCursorArticulated() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializePlayspace(); + + RenderSettings.skybox = null; + + IMixedRealityInputSystem inputSystem; + MixedRealityServiceRegistry.TryGetService(out inputSystem); + Assert.IsNotNull(inputSystem, "MixedRealityInputSystem is null!"); + + yield return null; + // Verify that the gaze cursor is visible at the start + Assert.IsTrue(inputSystem.GazeProvider.GazePointer.IsInteractionEnabled, "Gaze cursor should be visible at start"); + + // raise hand up -- gaze cursor should no longer be visible + // disable user input + InputSimulationService inputSimulationService = MixedRealityToolkit.Instance.GetService(); + Assert.IsNotNull(inputSimulationService, "InputSimulationService is null!"); + + inputSimulationService.UserInputEnabled = false; + ArticulatedHandPose gesturePose = ArticulatedHandPose.GetGesturePose(ArticulatedHandPose.GestureId.Open); + var handOpenPose = PlayModeTestUtilities.GenerateHandPose(ArticulatedHandPose.GestureId.Open, Handedness.Right, Vector3.forward * 0.1f); + inputSimulationService.HandDataRight.Update(true, false, handOpenPose); + yield return null; + // Gaze cursor should not be visible + Assert.IsFalse(inputSystem.GazeProvider.GazePointer.IsInteractionEnabled, "Gaze cursor should not be visible when one articulated hand is up"); + inputSimulationService.HandDataRight.Update(false, false, handOpenPose); + yield return null; + + // Say "select" to make gaze cursor active again + // Really we need to tear down the scene and create it again but MRTK doesn't support that yet + var gazeInputSource = inputSystem.DetectedInputSources.Where(x => x.SourceName.Equals("Gaze")).First(); + inputSystem.RaiseSpeechCommandRecognized(gazeInputSource, RecognitionConfidenceLevel.High, new System.TimeSpan(), System.DateTime.Now, new SpeechCommands("select", KeyCode.Alpha1, MixedRealityInputAction.None)); + yield return null; + Assert.IsTrue(inputSystem.GazeProvider.GazePointer.IsInteractionEnabled, "Gaze cursor should be visible after select command"); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs.meta b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs.meta new file mode 100644 index 00000000000..4ffc6a325a4 --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d5bbac05402dea840b48a823d9af2aca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs new file mode 100644 index 00000000000..2a7708b0c0f --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. +#if !WINDOWS_UWP +// When the .NET scripting backend is enabled and C# projects are built +// Unity doesn't include the the required assemblies (i.e. the ones below). +// Given that the .NET backend is deprecated by Unity at this point it's we have +// to work around this on our end. +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.UI; +using NUnit.Framework; +using System.Collections; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.TestTools; + +namespace Microsoft.MixedReality.Toolkit.Tests +{ + class InteractableTests + { + /// + /// Tests that an interactable component can be added to a GameObject + /// at runtime. + /// + /// + [UnityTest] + public IEnumerator TestAddInteractableAtRuntime() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializePlayspace(); + + var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + // This should not throw an excetion + var interactable = cube.AddComponent(); + + // clean up + GameObject.Destroy(cube); + yield return null; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs.meta b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs.meta new file mode 100644 index 00000000000..c8d90355cc8 --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0706866f136342429340f07946eb014 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs new file mode 100644 index 00000000000..ac20f728b40 --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +#if !WINDOWS_UWP +// When the .NET scripting backend is enabled and C# projects are built +// Unity doesn't include the the required assemblies (i.e. the ones below). +// Given that the .NET backend is deprecated by Unity at this point it's we have +// to work around this on our end. +using Microsoft.MixedReality.Toolkit.UI; +using NUnit.Framework; +using System.Collections; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.TestTools; +using Microsoft.MixedReality.Toolkit; +namespace Microsoft.MixedReality.Toolkit.Tests +{ + public class ManipulationHandlerTests + { + /// + /// Test creating adding a ManipulationHandler to GameObject programmatically. + /// Should be able to run scene without getting any exceptions. + /// + /// + [UnityTest] + public IEnumerator Test01_ManipulationHandlerInstantiate() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializePlayspace(); + + RenderSettings.skybox = null; + + var testObject = GameObject.CreatePrimitive(PrimitiveType.Cube); + testObject.transform.localScale = Vector3.one * 0.2f; + + var manipHandler = testObject.AddComponent(); + // Wait for two frames to make sure we don't get null pointer exception. + yield return null; + yield return null; + + GameObject.Destroy(testObject); + // Wait for a frame to give Unity a change to actually destroy the object + yield return null; + } + + /// + /// Test creating ManipulationHandler and receiving hover enter/exit events + /// from gaze provider. + /// + /// + [UnityTest] + public IEnumerator Test02_ManipulationHandlerGazeHover() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializePlayspace(); + + var testObject = GameObject.CreatePrimitive(PrimitiveType.Cube); + testObject.transform.localScale = Vector3.one * 0.2f; + + var manipHandler = testObject.AddComponent(); + int hoverEnterCount = 0; + int hoverExitCount = 0; + + manipHandler.OnHoverEntered.AddListener((eventData) => hoverEnterCount++); + manipHandler.OnHoverExited.AddListener((eventData) => hoverExitCount++); + + yield return null; + Assert.AreEqual(1, hoverEnterCount, $"ManipulationHandler did not receive hover enter event, count is {hoverEnterCount}"); + + testObject.transform.Translate(Vector3.up); + yield return null; + Assert.AreEqual(1, hoverExitCount, "ManipulationHandler did not receive hover exit event"); + + testObject.transform.Translate(5 * Vector3.up); + yield return null; + Assert.IsTrue(hoverExitCount == 1, "ManipulationHandler did not receive hover exit event"); + + GameObject.Destroy(testObject); + // Wait for a frame to give Unity a change to actually destroy the object + yield return null; + } + + } +} +#endif \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs.meta b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs.meta similarity index 86% rename from Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs.meta rename to Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs.meta index b3a9a880f60..3bc301ebf25 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs.meta +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 994e01e078ca4d24bad1f7c5862ff8f9 +guid: 1a29ad4959f94e94b845ccbba798e458 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef b/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef index acdc8c6a06a..2ead1c3295c 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef @@ -6,6 +6,7 @@ "Microsoft.MixedReality.Toolkit.SDK", "Microsoft.MixedReality.Toolkit.Services.InputSystem", "Microsoft.MixedReality.Toolkit.Services.InputSimulation", + "Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor", "Microsoft.MixedReality.Toolkit.Tests" ], "optionalUnityReferences": [ diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs new file mode 100644 index 00000000000..f835790c9d9 --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using Microsoft.MixedReality.Toolkit.Input; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Tests +{ + public class PlayModeTestUtilities + { + public static SimulatedHandData.HandJointDataGenerator GenerateHandPose(ArticulatedHandPose.GestureId gesture, Handedness handedness, Vector3 screenPosition) + { + return (jointsOut) => + { + ArticulatedHandPose gesturePose = ArticulatedHandPose.GetGesturePose(gesture); + Quaternion rotation = Quaternion.identity; + Vector3 position = CameraCache.Main.ScreenToWorldPoint(screenPosition); + gesturePose.ComputeJointPoses(handedness, rotation, position, jointsOut); + }; + } + } +} diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs.meta b/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs.meta new file mode 100644 index 00000000000..2a7a8bd046e --- /dev/null +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/PlayModeTestUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fe1c68280e69d4a4d971f956b1c870c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/TestFixture_01_SimplePlayModeTest.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs similarity index 79% rename from Assets/MixedRealityToolkit.Tests/PlayModeTests/TestFixture_01_SimplePlayModeTest.cs rename to Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs index b961acb161e..66d459e4999 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/TestFixture_01_SimplePlayModeTest.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs @@ -6,23 +6,25 @@ // Unity doesn't include the the required assemblies (i.e. the ones below). // Given that the .NET backend is deprecated by Unity at this point it's we have // to work around this on our end. -using NUnit.Framework; using System.Collections; using UnityEngine; using UnityEngine.TestTools; namespace Microsoft.MixedReality.Toolkit.Tests { - public class TestFixture_01_SimplePlayModeTest + public class SimplePlayModeTests { [UnityTest] public IEnumerator Test01_WhizzySphere() { TestUtilities.InitializeMixedRealityToolkitScene(true); - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - playspace.transform.position = new Vector3(1.0f, 1.5f, -2.0f); - playspace.transform.LookAt(Vector3.zero); + MixedRealityPlayspace.PerformTransformation( + p => + { + p.position = new Vector3(1.0f, 1.5f, -2.0f); + p.LookAt(Vector3.zero); + }); var testLight = new GameObject("TestLight"); var light = testLight.AddComponent(); @@ -51,6 +53,11 @@ public IEnumerator Test01_WhizzySphere() yield return new WaitForFixedUpdate(); } stopwatch.Stop(); + + GameObject.Destroy(testLight); + GameObject.Destroy(testObject); + // Wait for a frame to give Unity a change to actually destroy the object + yield return null; } } } diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/TestFixture_01_SimplePlayModeTest.cs.meta b/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit.Tests/PlayModeTests/TestFixture_01_SimplePlayModeTest.cs.meta rename to Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs.meta diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index 2c8df4bb75d..fac04afb453 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -5,6 +5,7 @@ using System.Linq; using UnityEngine; using UnityEngine.SceneManagement; +using System; #if UNITY_EDITOR using Microsoft.MixedReality.Toolkit.Editor; @@ -41,18 +42,16 @@ public static void CleanupScene() return; } #endif + } - if (testScene.IsValid() && testScene.isLoaded) + public static void InitializePlayspace() + { + MixedRealityPlayspace.PerformTransformation( + p => { - SceneManager.UnloadSceneAsync(testScene); - } - - testScene = SceneManager.CreateScene("TestScene"); - SceneManager.SetActiveScene(testScene); - - var cameraObject = new GameObject("Camera"); - var camera = cameraObject.AddComponent(); - cameraObject.tag = "MainCamera"; + p.position = new Vector3(1.0f, 1.5f, -2.0f); + p.LookAt(Vector3.zero); + }); } public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = false) @@ -60,6 +59,9 @@ public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = f // Setup CleanupScene(); + MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); + if (!MixedRealityToolkit.IsInitialized) { MixedRealityToolkit.ConfirmInitialized(); diff --git a/Assets/MixedRealityToolkit.Tests/Version.txt b/Assets/MixedRealityToolkit.Tests/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit.Tests/Version.txt +++ b/Assets/MixedRealityToolkit.Tests/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs b/Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs new file mode 100644 index 00000000000..2576092cc61 --- /dev/null +++ b/Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; + +namespace Microsoft.MixedReality.Toolkit +{ + /// + /// Defines a documentation link for a service. + /// Used primarily by service inspector facades. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class DocLinkAttribute : Attribute + { + public DocLinkAttribute(string url) { URL = url; } + + public string URL { get; private set; } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs.meta b/Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs.meta similarity index 86% rename from Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs.meta rename to Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs.meta index 8c9d3b0bc44..f7472c07488 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Utilities/Solvers/AttachToControllerInspector.cs.meta +++ b/Assets/MixedRealityToolkit/Attributes/DocLinkAttribute.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f45c8ed75934782429ad2866e52ef748 +guid: d68183ede17f6b74ca38173e4b40aff3 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit/Attributes/EnumFlagsAttribute.cs b/Assets/MixedRealityToolkit/Attributes/EnumFlagsAttribute.cs index 215321c443a..d63a2798c16 100644 --- a/Assets/MixedRealityToolkit/Attributes/EnumFlagsAttribute.cs +++ b/Assets/MixedRealityToolkit/Attributes/EnumFlagsAttribute.cs @@ -7,8 +7,12 @@ namespace Microsoft.MixedReality.Toolkit { /// - /// From https://answers.unity.com/questions/486694/default-editor-enum-as-flags-.html + /// An attribute that allows a particular field to be rendered as multi-selectable + /// set of flags. /// + /// + /// From https://answers.unity.com/questions/486694/default-editor-enum-as-flags-.html + /// [AttributeUsage(AttributeTargets.Field)] public sealed class EnumFlagsAttribute : PropertyAttribute { diff --git a/Assets/MixedRealityToolkit/Attributes/HelpAttribute.cs b/Assets/MixedRealityToolkit/Attributes/HelpAttribute.cs index 237e69e28ed..f74815dd8ee 100644 --- a/Assets/MixedRealityToolkit/Attributes/HelpAttribute.cs +++ b/Assets/MixedRealityToolkit/Attributes/HelpAttribute.cs @@ -19,17 +19,27 @@ public class HelpAttribute : PropertyAttribute /// /// The help header foldout text /// + /// + /// If Collapsible is false, then this header text will not be shown. + /// public string Header; + /// + /// If true, this will be a collapsible help section. Defaults to true. + /// + public bool Collapsible; + /// /// Constructor /// /// The help text to display /// The help header foldout text - public HelpAttribute(string helpText, string helpHeader="Help") + /// If true, this help drawer will be collapsible + public HelpAttribute(string helpText, string helpHeader="Help", bool collapsible = true) { Text = helpText; Header = helpHeader; + Collapsible = collapsible; } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs b/Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs new file mode 100644 index 00000000000..cc20164eafb --- /dev/null +++ b/Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; + +namespace Microsoft.MixedReality.Toolkit +{ + /// + /// Attach to a class implementing IMixedRealityServiceInspector to generate a facade inspector. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class MixedRealityServiceInspectorAttribute : Attribute + { + public MixedRealityServiceInspectorAttribute(Type serviceType) + { + if (!typeof(IMixedRealityService).IsAssignableFrom(serviceType)) + throw new Exception("Can't use this attribute with type " + serviceType + " - service must implement " + typeof(IMixedRealityService) + " interface."); + + ServiceType = serviceType; + } + + public Type ServiceType { get; private set; } + } +} diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs.meta b/Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs.meta similarity index 86% rename from Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs.meta rename to Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs.meta index 63bf86a21cc..be9a44e410d 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandPose.cs.meta +++ b/Assets/MixedRealityToolkit/Attributes/MixedRealityServiceInspectorAttribute.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5016be987d594ba44825123943c08661 +guid: e159fc0613d5db9479be3c2d92f449b9 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/Edge.cs b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/Edge.cs index 2a899d4dd3e..3ae1e536ae8 100644 --- a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/Edge.cs +++ b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/Edge.cs @@ -6,7 +6,7 @@ namespace Microsoft.MixedReality.Toolkit.Boundary { /// - /// The BoundaryEdge structure defines the points of a line segment that are used to + /// The Edge structure defines the points of a line segment that are used to /// construct a polygonal boundary. /// public struct Edge @@ -22,7 +22,7 @@ public struct Edge public readonly Vector2 PointB; /// - /// Initializes the BoundaryEdge structure. + /// Initializes the Edge structure. /// /// The first point of the line segment. /// The second point of the line segment. @@ -33,7 +33,7 @@ public Edge(Vector2 pointA, Vector2 pointB) } /// - /// Initializes the BoundaryEdge structure. + /// Initializes the Edge structure. /// /// The first point of the line segment. /// The second point of the line segment. diff --git a/Assets/MixedRealityToolkit/Definitions/Devices/ControllerMappingLibrary.cs b/Assets/MixedRealityToolkit/Definitions/Devices/ControllerMappingLibrary.cs index b94846d50be..e05acb7750c 100644 --- a/Assets/MixedRealityToolkit/Definitions/Devices/ControllerMappingLibrary.cs +++ b/Assets/MixedRealityToolkit/Definitions/Devices/ControllerMappingLibrary.cs @@ -192,39 +192,42 @@ public static class ControllerMappingLibrary #region InputAxisConfig + // Default value for the dead zone. This should match the default used by Unity for the pre-created Horizontal and Vertical axes. + public const float defaultDeadZone = 0.19f; + /// /// Get the InputManagerAxis data needed to configure the Input Mappings for a controller /// /// public static InputManagerAxis[] UnityInputManagerAxes => new[] { - new InputManagerAxis { Name = AXIS_1, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 1 }, - new InputManagerAxis { Name = AXIS_2, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 2 }, - new InputManagerAxis { Name = AXIS_3, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 3 }, - new InputManagerAxis { Name = AXIS_4, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 4 }, - new InputManagerAxis { Name = AXIS_5, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 5 }, - new InputManagerAxis { Name = AXIS_6, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 6 }, - new InputManagerAxis { Name = AXIS_7, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 7 }, - new InputManagerAxis { Name = AXIS_8, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 8 }, - new InputManagerAxis { Name = AXIS_9, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 9 }, - new InputManagerAxis { Name = AXIS_10, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 10 }, - new InputManagerAxis { Name = AXIS_11, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 11 }, - new InputManagerAxis { Name = AXIS_12, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 12 }, - new InputManagerAxis { Name = AXIS_13, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 13 }, - new InputManagerAxis { Name = AXIS_14, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 14 }, - new InputManagerAxis { Name = AXIS_15, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 15 }, - new InputManagerAxis { Name = AXIS_16, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 16 }, - new InputManagerAxis { Name = AXIS_17, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 17 }, - new InputManagerAxis { Name = AXIS_18, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 18 }, - new InputManagerAxis { Name = AXIS_19, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 19 }, - new InputManagerAxis { Name = AXIS_20, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 20 }, - new InputManagerAxis { Name = AXIS_21, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 21 }, - new InputManagerAxis { Name = AXIS_22, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 22 }, - new InputManagerAxis { Name = AXIS_23, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 23 }, - new InputManagerAxis { Name = AXIS_24, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 24 }, - new InputManagerAxis { Name = AXIS_25, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 25 }, - new InputManagerAxis { Name = AXIS_26, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 26 }, - new InputManagerAxis { Name = AXIS_27, Dead = 0.001f, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 27 } + new InputManagerAxis { Name = AXIS_1, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 1 }, + new InputManagerAxis { Name = AXIS_2, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 2 }, + new InputManagerAxis { Name = AXIS_3, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 3 }, + new InputManagerAxis { Name = AXIS_4, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 4 }, + new InputManagerAxis { Name = AXIS_5, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 5 }, + new InputManagerAxis { Name = AXIS_6, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 6 }, + new InputManagerAxis { Name = AXIS_7, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 7 }, + new InputManagerAxis { Name = AXIS_8, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 8 }, + new InputManagerAxis { Name = AXIS_9, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 9 }, + new InputManagerAxis { Name = AXIS_10, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 10 }, + new InputManagerAxis { Name = AXIS_11, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 11 }, + new InputManagerAxis { Name = AXIS_12, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 12 }, + new InputManagerAxis { Name = AXIS_13, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 13 }, + new InputManagerAxis { Name = AXIS_14, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 14 }, + new InputManagerAxis { Name = AXIS_15, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 15 }, + new InputManagerAxis { Name = AXIS_16, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 16 }, + new InputManagerAxis { Name = AXIS_17, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 17 }, + new InputManagerAxis { Name = AXIS_18, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 18 }, + new InputManagerAxis { Name = AXIS_19, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 19 }, + new InputManagerAxis { Name = AXIS_20, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 20 }, + new InputManagerAxis { Name = AXIS_21, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 21 }, + new InputManagerAxis { Name = AXIS_22, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 22 }, + new InputManagerAxis { Name = AXIS_23, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 23 }, + new InputManagerAxis { Name = AXIS_24, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 24 }, + new InputManagerAxis { Name = AXIS_25, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 25 }, + new InputManagerAxis { Name = AXIS_26, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 26 }, + new InputManagerAxis { Name = AXIS_27, Dead = defaultDeadZone, Sensitivity = 1, Invert = false, Type = InputManagerAxisType.JoystickAxis, Axis = 27 } }; #endregion InputAxisConfig diff --git a/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMappingProfile.cs b/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMappingProfile.cs index f3fb9691043..a7d2650797a 100644 --- a/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMappingProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMappingProfile.cs @@ -35,25 +35,52 @@ private static void CollectControllerTypes() { if (controllerMappingTypes == null) { - List tmp = new List(); + List controllerTypes = new List(); foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) { + IEnumerable types = null; try { - foreach (Type type in assembly.ExportedTypes) + types = assembly.ExportedTypes; + } + catch (NotSupportedException) + { + // assembly.ExportedTypes may not be supported. + } + catch (ReflectionTypeLoadException e) + { + // Not all assemblies may load correctly, but even upon encountering error + // some subset may have loaded in. + if (e.Types != null) + { + List loadedTypes = new List(); + foreach (Type type in e.Types) + { + // According to API docs, this array may contain null values + // so they must be filtered out here. + if (type != null) + { + loadedTypes.Add(type); + } + } + types = loadedTypes; + } + } + + if (types != null) + { + foreach (Type type in types) { if (type.IsSubclassOf(typeof(BaseController)) && MixedRealityControllerAttribute.Find(type) != null) { - tmp.Add(type); + controllerTypes.Add(type); } } } - catch (NotSupportedException) // assembly.ExportedTypes may not be supported. - { } } - controllerMappingTypes = tmp.ToArray(); + controllerMappingTypes = controllerTypes.ToArray(); } } diff --git a/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityInteractionMapping.cs b/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityInteractionMapping.cs index 1e2cc8c94c2..0d403c95228 100644 --- a/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityInteractionMapping.cs +++ b/Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityInteractionMapping.cs @@ -9,8 +9,10 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// Maps the capabilities of controllers, linking the Physical inputs of a controller to a Logical construct in a runtime project - /// One definition should exist for each physical device input, such as buttons, triggers, joysticks, dpads, and more. /// + /// + /// One definition should exist for each physical device input, such as buttons, triggers, joysticks, dpads, and more. + /// [Serializable] public class MixedRealityInteractionMapping { @@ -401,22 +403,9 @@ public Vector2 Vector2Data Debug.LogError($"SetVector2Value is only valid for AxisType.DualAxis InteractionMappings\nPlease check the {inputType} mapping for the current controller"); } - if (invertXAxis || invertYAxis) - { - float invertXAxisFactor = invertXAxis ? -1f : 1f; - float invertYAxisFactor = invertYAxis ? -1f : 1f; - - Changed = !vector2Data.x.Equals(value.x * invertXAxisFactor) && - !vector2Data.y.Equals(value.y * invertYAxisFactor); - - vector2Data.x = value.x * invertXAxisFactor; - vector2Data.y = value.y * invertYAxisFactor; - } - else - { - Changed = vector2Data != value; - vector2Data = value; - } + Vector2 newValue = value * new Vector2(invertXAxis ? -1f : 1f, invertYAxis ? -1f : 1f); + Changed = vector2Data != newValue; + vector2Data = newValue; } } diff --git a/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs b/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs index 03f27cd16b9..09e45b3db7a 100644 --- a/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs @@ -33,6 +33,24 @@ public class MixedRealityDiagnosticsProfile : BaseMixedRealityProfile /// public bool ShowProfiler => showProfiler; + [SerializeField] + [Tooltip("Display the frame info (per frame stats).")] + private bool showFrameInfo = true; + + /// + /// Show or hide the frame info (per frame stats). + /// + public bool ShowFrameInfo => showFrameInfo; + + [SerializeField] + [Tooltip("Display the memory stats (used, peak, and limit).")] + private bool showMemoryStats = true; + + /// + /// Show or hide the memory stats (used, peak, and limit). + /// + public bool ShowMemoryStats => showMemoryStats; + [SerializeField] [FormerlySerializedAs("frameRateDuration")] [Tooltip("The amount of time, in seconds, to collect frames for frame rate calculation.")] @@ -79,5 +97,17 @@ public class MixedRealityDiagnosticsProfile : BaseMixedRealityProfile /// How quickly to interpolate the window towards its target position and rotation. /// public float WindowFollowSpeed => windowFollowSpeed; + + [SerializeField] + [Tooltip("A material that the diagnostics system can use to render objects with instanced color support.")] + private Material defaultInstancedMaterial = null; + + /// + /// A material that the diagnostics system can use to render objects with instanced color support. + /// A asset reference is required here to make sure the shader permutation is pulled into player builds. + /// + public Material DefaultInstancedMaterial => defaultInstancedMaterial; + + } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Definitions/InputSystem/MixedRealityInputActionsProfile.cs b/Assets/MixedRealityToolkit/Definitions/InputSystem/MixedRealityInputActionsProfile.cs index 0ea1b7ec925..6602849cc62 100644 --- a/Assets/MixedRealityToolkit/Definitions/InputSystem/MixedRealityInputActionsProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/InputSystem/MixedRealityInputActionsProfile.cs @@ -53,8 +53,8 @@ public class MixedRealityInputActionsProfile : BaseMixedRealityProfile /// /// The list of actions users can do in your application. - /// Input Actions are device agnostic and can be paired with any number of device inputs across all platforms. /// + /// Input Actions are device agnostic and can be paired with any number of device inputs across all platforms. public MixedRealityInputAction[] InputActions => inputActions; /// diff --git a/Assets/MixedRealityToolkit/Definitions/MixedRealityCameraProfile.cs b/Assets/MixedRealityToolkit/Definitions/MixedRealityCameraProfile.cs index c0ffe2a9633..34cef46bfde 100644 --- a/Assets/MixedRealityToolkit/Definitions/MixedRealityCameraProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/MixedRealityCameraProfile.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using Microsoft.MixedReality.Toolkit.CameraSystem; using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine; @@ -12,23 +13,18 @@ namespace Microsoft.MixedReality.Toolkit /// Based on those values, you can customize your camera and quality settings. /// [CreateAssetMenu(menuName = "Mixed Reality Toolkit/Mixed Reality Camera Profile", fileName = "MixedRealityCameraProfile", order = (int)CreateProfileMenuItemIndices.Camera)] + [MixedRealityServiceProfile(typeof(IMixedRealityCameraSystem))] public class MixedRealityCameraProfile : BaseMixedRealityProfile { - private enum DisplayType - { - Opaque = 0, - Transparent - } + public float NearClipPlaneOpaqueDisplay => nearClipPlaneOpaqueDisplay; + public CameraClearFlags CameraClearFlagsOpaqueDisplay => cameraClearFlagsOpaqueDisplay; + public Color BackgroundColorOpaqueDisplay => backgroundColorOpaqueDisplay; + public int OpaqueQualityLevel => opaqueQualityLevel; - [SerializeField] - [Tooltip("Should the camera be reused in each scene?\nIf so, then the camera's root will be flagged so it is not destroyed when the scene is unloaded.")] - private bool isCameraPersistent = false; - - /// - /// Should the camera be reused in each scene? - /// If so, then the camera's root will be flagged so it is not destroyed when the scene is unloaded. - /// - public bool IsCameraPersistent => isCameraPersistent; + public float NearClipPlaneTransparentDisplay => nearClipPlaneTransparentDisplay; + public CameraClearFlags CameraClearFlagsTransparentDisplay => cameraClearFlagsTransparentDisplay; + public Color BackgroundColorTransparentDisplay => backgroundColorTransparentDisplay; + public int HoloLensQualityLevel => holoLensQualityLevel; [SerializeField] [Tooltip("The near clipping plane distance for an opaque display.")] @@ -61,47 +57,5 @@ private enum DisplayType [SerializeField] [Tooltip("Set the desired quality for your application for HoloLens.")] private int holoLensQualityLevel = 0; - - [HideInInspector] - private DisplayType currentDisplayType; - - /// - /// Is the current camera displaying on an Opaque (AR) device or a VR / immersive device - /// - public bool IsOpaque - { - get - { - currentDisplayType = DisplayType.Opaque; -#if UNITY_WSA - if (!UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque) - { - currentDisplayType = DisplayType.Transparent; - } -#endif - return currentDisplayType == DisplayType.Opaque; - } - } - - public void ApplySettingsForOpaqueDisplay() - { - CameraCache.Main.clearFlags = cameraClearFlagsOpaqueDisplay; - CameraCache.Main.nearClipPlane = nearClipPlaneOpaqueDisplay; - CameraCache.Main.backgroundColor = backgroundColorOpaqueDisplay; - SetQuality(opaqueQualityLevel); - } - - public void ApplySettingsForTransparentDisplay() - { - CameraCache.Main.clearFlags = cameraClearFlagsTransparentDisplay; - CameraCache.Main.backgroundColor = backgroundColorTransparentDisplay; - CameraCache.Main.nearClipPlane = nearClipPlaneTransparentDisplay; - SetQuality(holoLensQualityLevel); - } - - private static void SetQuality(int level) - { - QualitySettings.SetQualityLevel(level, false); - } } } diff --git a/Assets/MixedRealityToolkit/Definitions/MixedRealityToolkitConfigurationProfile.cs b/Assets/MixedRealityToolkit/Definitions/MixedRealityToolkitConfigurationProfile.cs index 295be49bdc5..12808221ef3 100644 --- a/Assets/MixedRealityToolkit/Definitions/MixedRealityToolkitConfigurationProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/MixedRealityToolkitConfigurationProfile.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Boundary; +using Microsoft.MixedReality.Toolkit.CameraSystem; using Microsoft.MixedReality.Toolkit.Diagnostics; using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.SpatialAwareness; @@ -11,6 +12,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using UnityEngine; +using UnityEngine.Serialization; [assembly: InternalsVisibleTo("Microsoft.MixedReality.Toolkit.Tests.EditModeTests")] [assembly: InternalsVisibleTo("Microsoft.MixedReality.Toolkit.Tests.PlayModeTests")] @@ -38,16 +40,17 @@ public ExperienceScale TargetExperienceScale } [SerializeField] - [Tooltip("Enable the Camera Profile on Startup.")] - private bool enableCameraProfile = false; + [FormerlySerializedAs("enableCameraProfile")] + [Tooltip("Enable the Camera System on Startup.")] + private bool enableCameraSystem = false; /// /// Enable and configure the Camera Profile for the Mixed Reality Toolkit /// - public bool IsCameraProfileEnabled + public bool IsCameraSystemEnabled { - get { return CameraProfile != null && enableCameraProfile; } - internal set { enableCameraProfile = value; } + get { return CameraProfile != null && cameraSystemType != null && cameraSystemType.Type != null && enableCameraSystem; } + internal set { enableCameraSystem = value; } } [SerializeField] @@ -64,6 +67,20 @@ public MixedRealityCameraProfile CameraProfile internal set { cameraProfile = value; } } + /// + /// Camera System class to instantiate at runtime. + /// + public SystemType CameraSystemType + { + get { return cameraSystemType; } + internal set { cameraSystemType = value; } + } + + [SerializeField] + [Tooltip("Camera System Class to instantiate at runtime.")] + [Implements(typeof(IMixedRealityCameraSystem), TypeGrouping.ByNamespaceFlat)] + private SystemType cameraSystemType; + [SerializeField] [Tooltip("Enable the Input System on Startup.")] private bool enableInputSystem = false; @@ -260,6 +277,14 @@ public SystemType DiagnosticsSystemSystemType /// public MixedRealityRegisteredServiceProvidersProfile RegisteredServiceProvidersProfile => registeredServiceProvidersProfile; + public bool UseServiceInspectors + { + get { return useServiceInspectors; } + } + [SerializeField] + [Tooltip("If true, MRTK will generate components that let you to view the state of running services. These objects will not be generated at runtime.")] + private bool useServiceInspectors = false; + #endregion Mixed Reality Toolkit configurable properties } } diff --git a/Assets/MixedRealityToolkit/Definitions/Physics/RayStep.cs b/Assets/MixedRealityToolkit/Definitions/Physics/RayStep.cs index e7c8652ffb7..4f1b0afef2f 100644 --- a/Assets/MixedRealityToolkit/Definitions/Physics/RayStep.cs +++ b/Assets/MixedRealityToolkit/Definitions/Physics/RayStep.cs @@ -155,33 +155,33 @@ public static Vector3 GetPointByDistance(RayStep[] steps, float distance) /// /// /// - public static RayStep GetStepByDistance(RayStep[] steps, float distance, ref float traveledDistance) + public static RayStep GetStepByDistance(RayStep[] steps, float distance, ref float remainingDistance) { - Debug.Assert(steps != null); - Debug.Assert(steps.Length > 0); - - float remainingDistance = distance; + Debug.Assert(steps != null && steps.Length > 0); - int numSteps = steps.Length; + float traveledDistance = 0; float stepLength = 0; + RayStep currentStep = new RayStep(); + - for (int i = 0; i < numSteps; i++) + foreach (var step in steps) { - stepLength = steps[i].Length; + currentStep = step; + stepLength = step.Length; - if (remainingDistance > stepLength) + if (distance > traveledDistance + stepLength) { - remainingDistance -= stepLength; + traveledDistance += stepLength; } else { - traveledDistance = remainingDistance; - return steps[i]; + remainingDistance = Mathf.Clamp(distance - traveledDistance, 0f, stepLength); + return currentStep; } } - traveledDistance = remainingDistance; - return steps[steps.Length - 1]; + remainingDistance = 0; + return currentStep; } /// diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs new file mode 100644 index 00000000000..492766c3568 --- /dev/null +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEngine; +using System; +using System.Collections.Generic; +using System.IO; + +#if UNITY_EDITOR +using UnityEditor; +using Microsoft.MixedReality.Toolkit.Utilities.Editor; +#endif + +namespace Microsoft.MixedReality.Toolkit.Utilities +{ + /// + /// Shape of an articulated hand defined by joint poses. + /// + public class ArticulatedHandPose + { + private static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; + + /// + /// Joint poses are stored as right-hand poses in camera space. + /// Output poses are computed in world space, and mirroring on the x axis for the left hand. + /// + private MixedRealityPose[] localJointPoses; + + public ArticulatedHandPose() + { + localJointPoses = new MixedRealityPose[jointCount]; + SetZero(); + } + + public ArticulatedHandPose(MixedRealityPose[] _localJointPoses) + { + localJointPoses = new MixedRealityPose[jointCount]; + Array.Copy(_localJointPoses, localJointPoses, jointCount); + } + + /// + /// Compute world space poses from camera-space joint data. + /// + public void ComputeJointPoses(Handedness handedness, Quaternion rotation, Vector3 position, MixedRealityPose[] jointsOut) + { + var cameraRotation = CameraCache.Main.transform.rotation; + + for (int i = 0; i < jointCount; i++) + { + // Initialize from local offsets + Vector3 p = localJointPoses[i].Position; + Quaternion r = localJointPoses[i].Rotation; + + // Pose offset are for right hand, mirror on X axis if left hand is needed + if (handedness == Handedness.Left) + { + p.x = -p.x; + r.y = -r.y; + r.z = -r.z; + } + + // Apply camera transform + p = cameraRotation * p; + r = cameraRotation * r; + + // Apply external transform + p = position + rotation * p; + r = rotation * r; + + jointsOut[i] = new MixedRealityPose(p, r); + } + } + + /// + /// Take world space joint poses from any hand and convert into right-hand, camera-space poses. + /// + public void ParseFromJointPoses(MixedRealityPose[] joints, Handedness handedness, Quaternion rotation, Vector3 position) + { + var invRotation = Quaternion.Inverse(rotation); + var invCameraRotation = Quaternion.Inverse(CameraCache.Main.transform.rotation); + + for (int i = 0; i < jointCount; i++) + { + Vector3 p = joints[i].Position; + Quaternion r = joints[i].Rotation; + + // Apply inverse external transform + p = invRotation * (p - position); + r = invRotation * r; + + // To camera space + p = invCameraRotation * p; + r = invCameraRotation * r; + + // Pose offset are for right hand, mirror on X axis if left hand is given + if (handedness == Handedness.Left) + { + p.x = -p.x; + r.y = -r.y; + r.z = -r.z; + } + + localJointPoses[i] = new MixedRealityPose(p, r); + } + } + + /// + /// Set all poses to zero. + /// + public void SetZero() + { + for (int i = 0; i < jointCount; i++) + { + localJointPoses[i] = MixedRealityPose.ZeroIdentity; + } + } + + /// + /// Copy data from another articulated hand pose. + /// + public void Copy(ArticulatedHandPose other) + { + Array.Copy(other.localJointPoses, localJointPoses, jointCount); + } + + /// + /// Blend between two hand poses. + /// + public void InterpolateOffsets(ArticulatedHandPose poseA, ArticulatedHandPose poseB, float value) + { + for (int i = 0; i < jointCount; i++) + { + var p = Vector3.Lerp(poseA.localJointPoses[i].Position, poseB.localJointPoses[i].Position, value); + var r = Quaternion.Slerp(poseA.localJointPoses[i].Rotation, poseB.localJointPoses[i].Rotation, value); + localJointPoses[i] = new MixedRealityPose(p, r); + } + } + + /// + /// Supported hand gestures. + /// + public enum GestureId + { + /// + /// Unspecified hand shape + /// + None = 0, + /// + /// Flat hand with fingers spread out + /// + Flat, + /// + /// Relaxed hand pose + /// + Open, + /// + /// Index finger and Thumb touching, index tip does not move + /// + Pinch, + /// + /// Index finger and Thumb touching, wrist does not move + /// + PinchSteadyWrist, + /// + /// Index finger stretched out + /// + Poke, + /// + /// Grab with whole hand, fist shape + /// + Grab, + /// + /// OK sign + /// + ThumbsUp, + /// + /// Victory sign + /// + Victory, + } + + private static readonly Dictionary handPoses = new Dictionary(); + + /// + /// Get pose data for a supported gesture. + /// + public static ArticulatedHandPose GetGesturePose(GestureId gesture) + { + if (handPoses.TryGetValue(gesture, out ArticulatedHandPose pose)) + { + return pose; + } + return null; + } + + #if UNITY_EDITOR + /// + /// Load pose data from files. + /// + public static void LoadGesturePoses() + { + string[] gestureNames = Enum.GetNames(typeof(GestureId)); + string basePath = Path.Combine("InputSimulation", "ArticulatedHandPoses"); + for (int i = 0; i < gestureNames.Length; ++i) + { + string relPath = Path.Combine(basePath, String.Format("ArticulatedHandPose_{0}.json", gestureNames[i])); + string absPath = MixedRealityToolkitFiles.MapRelativeFilePath(MixedRealityToolkitModuleType.Services, relPath); + LoadGesturePose((GestureId)i, absPath); + } + } + + private static ArticulatedHandPose LoadGesturePose(GestureId gesture, string filePath) + { + if (!string.IsNullOrEmpty(filePath)) + { + var pose = new ArticulatedHandPose(); + pose.FromJson(File.ReadAllText(filePath)); + handPoses.Add(gesture, pose); + return pose; + } + return null; + } + #endif + + /// Utility class to serialize hand pose as a dictionary with full joint names + [Serializable] + internal struct ArticulatedHandPoseItem + { + private static readonly string[] jointNames = Enum.GetNames(typeof(TrackedHandJoint)); + + public string joint; + public MixedRealityPose pose; + + public TrackedHandJoint JointIndex + { + get + { + int nameIndex = Array.FindIndex(jointNames, IsJointName); + if (nameIndex < 0) + { + Debug.LogError($"Joint name {joint} not in TrackedHandJoint enum"); + return TrackedHandJoint.None; + } + return (TrackedHandJoint)nameIndex; + } + set { joint = jointNames[(int)value]; } + } + + private bool IsJointName(string s) + { + return s == joint; + } + + public ArticulatedHandPoseItem(TrackedHandJoint joint, MixedRealityPose pose) + { + this.joint = jointNames[(int)joint]; + this.pose = pose; + } + } + + /// Utility class to serialize hand pose as a dictionary with full joint names + [Serializable] + internal class ArticulatedHandPoseDictionary + { + private static readonly int jointCount = Enum.GetNames(typeof(TrackedHandJoint)).Length; + + public ArticulatedHandPoseItem[] items = null; + + public void FromJointPoses(MixedRealityPose[] jointPoses) + { + items = new ArticulatedHandPoseItem[jointCount]; + for (int i = 0; i < jointCount; ++i) + { + items[i].JointIndex = (TrackedHandJoint)i; + items[i].pose = jointPoses[i]; + } + } + + public void ToJointPoses(MixedRealityPose[] jointPoses) + { + for (int i = 0; i < jointCount; ++i) + { + jointPoses[i] = MixedRealityPose.ZeroIdentity; + } + foreach (var item in items) + { + jointPoses[(int)item.JointIndex] = item.pose; + } + } + } + + /// + /// Serialize pose data to JSON format. + /// + public string ToJson() + { + var dict = new ArticulatedHandPoseDictionary(); + dict.FromJointPoses(localJointPoses); + return JsonUtility.ToJson(dict); + } + + /// + /// Deserialize pose data from JSON format. + /// + public void FromJson(string json) + { + var dict = JsonUtility.FromJson(json); + dict.ToJointPoses(localJointPoses); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs.meta b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs.meta new file mode 100644 index 00000000000..50ecd4ee975 --- /dev/null +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 521d0baa937716a4fbcfed7bd6bbde0e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs deleted file mode 100644 index 3be197ece9e..00000000000 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -namespace Microsoft.MixedReality.Toolkit.Utilities -{ - public enum ControllerElement - { - None, - // Controller button elements - Home, - Menu, - Grasp, - Thumbstick, - Select, - Touchpad, - // Controller body elements & poses - PointingPose - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs.meta b/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs.meta deleted file mode 100644 index d3c7438c877..00000000000 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/ControllerElement.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 23ca31691a0687a4fa61fa05e364f13a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/MixedRealityPose.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/MixedRealityPose.cs index 864a3b33d34..0deec76d8be 100644 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/MixedRealityPose.cs +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/MixedRealityPose.cs @@ -114,7 +114,7 @@ bool IEqualityComparer.Equals(object left, object right) public bool Equals(MixedRealityPose other) { return Position == other.Position && - Rotation == other.Rotation; + Rotation.Equals(other.Rotation); } public override bool Equals(object obj) diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ProfileMenuItemIndices.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/ProfileMenuItemIndices.cs index ef8ad9f6e84..ceec0d92a93 100644 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/ProfileMenuItemIndices.cs +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/ProfileMenuItemIndices.cs @@ -27,6 +27,7 @@ public enum CreateProfileMenuItemIndices InputSimulation, HandTracking, EyeTracking, + MouseInput, Assembly = 99 } diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs deleted file mode 100644 index 92c833bc0d1..00000000000 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using System; -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Utilities -{ - [Serializable] - public struct QuaternionSmoothed - { - public Quaternion Current { get; set; } - public Quaternion Goal { get; set; } - public float SmoothTime { get; set; } - - public QuaternionSmoothed(Quaternion value, float smoothingTime) : this() - { - Current = value; - Goal = value; - SmoothTime = smoothingTime; - } - - public void Update(float deltaTime) - { - Current = Quaternion.Slerp(Current, Goal, (Math.Abs(SmoothTime) < Mathf.Epsilon) ? 1.0f : deltaTime / SmoothTime); - } - - public void SetGoal(Quaternion newGoal) - { - Goal = newGoal; - } - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs.meta b/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs.meta deleted file mode 100644 index d29f94cd618..00000000000 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/QuaternionSmoothed.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aece96fb1a3b7e044b7c4a091cb2c1e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/SupportedPlatforms.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/SupportedPlatforms.cs index 1edcd76b9a6..d276a633080 100644 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/SupportedPlatforms.cs +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/SupportedPlatforms.cs @@ -16,5 +16,6 @@ public enum SupportedPlatforms LinuxStandalone = 1 << 2, WindowsUniversal = 1 << 3, WindowsEditor = 1 << 4, + Android = 1 << 5 } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/EventDatum/Input/HandPanEventData.cs b/Assets/MixedRealityToolkit/EventDatum/Input/HandPanEventData.cs index a5726731725..7d90c9600b4 100644 --- a/Assets/MixedRealityToolkit/EventDatum/Input/HandPanEventData.cs +++ b/Assets/MixedRealityToolkit/EventDatum/Input/HandPanEventData.cs @@ -8,8 +8,8 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// Describes an source state event that has a source id. - /// Source State events do not have an associated . /// + /// Source State events do not have an associated . public class HandPanEventData : BaseInputEventData { public Vector2 PanPosition diff --git a/Assets/MixedRealityToolkit/EventDatum/Input/SourcePoseEventData.cs b/Assets/MixedRealityToolkit/EventDatum/Input/SourcePoseEventData.cs index 82a5cf9f598..cd5ba7a64a7 100644 --- a/Assets/MixedRealityToolkit/EventDatum/Input/SourcePoseEventData.cs +++ b/Assets/MixedRealityToolkit/EventDatum/Input/SourcePoseEventData.cs @@ -7,8 +7,8 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// Describes a source change event. - /// Source State events do not have an associated . /// + /// Source State events do not have an associated . public class SourcePoseEventData : SourceStateEventData { /// diff --git a/Assets/MixedRealityToolkit/EventDatum/Input/SourceStateEventData.cs b/Assets/MixedRealityToolkit/EventDatum/Input/SourceStateEventData.cs index a6a8032736e..2dfb4b41c93 100644 --- a/Assets/MixedRealityToolkit/EventDatum/Input/SourceStateEventData.cs +++ b/Assets/MixedRealityToolkit/EventDatum/Input/SourceStateEventData.cs @@ -7,8 +7,8 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// Describes an source state event that has a source id. - /// Source State events do not have an associated . /// + /// Source State events do not have an associated . public class SourceStateEventData : BaseInputEventData { public IMixedRealityController Controller { get; private set; } diff --git a/Assets/MixedRealityToolkit/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs b/Assets/MixedRealityToolkit/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs index c99adc9b70a..1f4697298ff 100644 --- a/Assets/MixedRealityToolkit/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs +++ b/Assets/MixedRealityToolkit/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs @@ -44,7 +44,6 @@ public static ScriptableObject CreateAsset(this ScriptableObject scriptableObjec AssetDatabase.CreateAsset(scriptableObject, assetPathAndName); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); - Selection.activeObject = scriptableObject; EditorGUIUtility.PingObject(scriptableObject); return scriptableObject; } diff --git a/Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs b/Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs index 5afcbd8e939..806d880286b 100644 --- a/Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs +++ b/Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs @@ -40,8 +40,8 @@ public static async Task StartProcessAsync(this Process process, /// /// Starts a process asynchronously. - /// The provided Process Start Info must not use shell execution, and should redirect the standard output and errors. /// + /// The provided Process Start Info must not use shell execution, and should redirect the standard output and errors. /// This Process. /// The Process start info. /// Should output debug code to Editor Console? diff --git a/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates.meta b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates.meta new file mode 100644 index 00000000000..59d9e5a9be4 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7436a51b615d4c143894c685f60c8bf1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs new file mode 100644 index 00000000000..e25c35e7c3f --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs @@ -0,0 +1,659 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.CSharp; +using Microsoft.MixedReality.Toolkit.Utilities; +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Threading.Tasks; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + /// + /// Class used to generate service scripts and profile instances + /// + public class ExtensionServiceCreator + { + #region enums and types + + /// + /// Result of create operation + /// + public enum CreateResult + { + None, + Successful, + Error, + } + + /// + /// The current stage of the creation process + /// + public enum CreationStage + { + SelectNameAndPlatform, + ChooseOutputFolders, + CreatingExtensionService, + CreatingProfileInstance, + Finished, + } + + /// + /// Simple struct for storing state in editor prefs when recompiling + /// + [Serializable] + private struct PersistentState + { + public string ServiceName; + public bool UsesProfile; + public bool UsesInspector; + public SupportedPlatforms Platforms; + public CreationStage Stage; + public string ServiceFolderPath; + public string InspectorFolderPath; + public string InterfaceFolderPath; + public string ProfileFolderPath; + public string ProfileAssetFolderPath; + public string Namespace; + } + + #endregion + + #region static + + private static readonly string DefaultExtensionNamespace = "Microsoft.MixedReality.Toolkit.Extensions"; + private static readonly string PersistentStateKey = "MRTK_ExtensionServiceWizard_State_Before_Recompilation"; + private static readonly string DefaultExtensionsFolder = "Assets/MixedRealityToolkit.Extensions"; + private static readonly string DefaultExtensionsFolderName = "MixedRealityToolkit.Extensions"; + private static readonly string ServiceTemplatePath = "ExtensionTemplates/ExtensionScriptTemplate.txt"; + private static readonly string InspectorTemplatePath = "ExtensionTemplates/ExtensionInspectorTemplate.txt"; + private static readonly string InterfaceTemplatePath = "ExtensionTemplates/ExtensionInterfaceTemplate.txt"; + private static readonly string ProfileTemplatePath = "ExtensionTemplates/ExtensionProfileTemplate.txt"; + private static readonly string ScriptExtension = ".cs"; + private static readonly string ProfileExtension = ".asset"; + private static readonly string ServiceNameSearchString = "#SERVICE_NAME#"; + private static readonly string InspectorNameSearchString = "#INSPECTOR_NAME#"; + private static readonly string InterfaceNameSearchString = "#INTERFACE_NAME#"; + private static readonly string ProfileNameSearchString = "#PROFILE_NAME#"; + private static readonly string ProfileFieldNameSearchString = "#PROFILE_FIELD_NAME#"; + private static readonly string SupportedPlatformsSearchString = "#SUPPORTED_PLATFORMS_PARAM#"; + private static readonly string ExtensionNamespaceSearchString = "#NAMESPACE#"; + private static readonly string SampleCodeTemplate = "#INTERFACE_NAME# #SERVICE_NAME# = MixedRealityToolkit.Instance.GetService<#INTERFACE_NAME#>();"; + + #endregion + + #region public properties + + public string ServiceName + { + get { return state.ServiceName; } + set { state.ServiceName = value; } + } + + public bool UsesProfile + { + get { return state.UsesProfile; } + set { state.UsesProfile = value; } + } + + public bool UsesInspector + { + get { return state.UsesInspector; } + set { state.UsesInspector = value; } + } + + public SupportedPlatforms Platforms + { + get { return state.Platforms; } + set { state.Platforms = value; } + } + + public CreationStage Stage + { + get { return state.Stage; } + set { state.Stage = value; } + } + + public string Namespace + { + get { return state.Namespace; } + set { state.Namespace = value; } + } + + public IEnumerable CreationLog { get { return creationLog; } } + public CreateResult Result { get; private set; } = CreateResult.None; + public string InterfaceName { get { return "I" + ServiceName; } } + public string ProfileName { get { return ServiceName + "Profile"; } } + public string InspectorName { get { return ServiceName + "Inspector"; } } + public string ServiceFieldName { get { return Char.ToLowerInvariant(ServiceName[0]) + ServiceName.Substring(1); } } + public string ProfileFieldName { get { return Char.ToLowerInvariant(ProfileName[0]) + ProfileName.Substring(1); } } + public string ProfileAssetName { get { return "Default" + ProfileName; } } + + public UnityEngine.Object ServiceFolderObject { get; set; } + public UnityEngine.Object InspectorFolderObject { get; set; } + public UnityEngine.Object InterfaceFolderObject { get; set; } + public UnityEngine.Object ProfileFolderObject { get; set; } + public UnityEngine.Object ProfileAssetFolderObject { get; set; } + + public Type ServiceType { get; private set; } + public BaseMixedRealityProfile ProfileInstance { get; private set; } + + #endregion + + #region private properties + + private string ServiceFolderPath + { + get { return state.ServiceFolderPath; } + set { state.ServiceFolderPath = value; } + } + + private string InspectorFolderPath + { + get { return state.InspectorFolderPath; } + set { state.InspectorFolderPath = value; } + } + + private string InterfaceFolderPath + { + get { return state.InterfaceFolderPath; } + set { state.InterfaceFolderPath = value; } + } + + private string ProfileFolderPath + { + get { return state.ProfileFolderPath; } + set { state.ProfileFolderPath = value; } + } + + private string ProfileAssetFolderPath + { + get { return state.ProfileAssetFolderPath; } + set { state.ProfileAssetFolderPath = value; } + } + + public string SampleCode + { + get + { + string sampleCode = SampleCodeTemplate; + sampleCode = sampleCode.Replace(InterfaceNameSearchString, InterfaceName); + sampleCode = sampleCode.Replace(ServiceNameSearchString, ServiceFieldName); + return sampleCode; + } + } + + private string ServiceTemplate; + private string InspectorTemplate; + private string InterfaceTemplate; + private string ProfileTemplate; + + #endregion + + #region private fields + + private List creationLog = new List(); + private PersistentState state; + + #endregion + + #region public methods + + public void StoreState() + { + string stateString = JsonUtility.ToJson(state); + SessionState.SetString(PersistentStateKey, stateString); + } + + public void ResetState() + { + Debug.Log("Resetting state"); + SessionState.EraseString(PersistentStateKey); + } + + public async void LoadStoredState() + { + // (We can't call SessionState from inside a constructor) + // Check to see whether editor prefs exist of our persistent state + // If it does, load that now and clear the state + string persistentState = SessionState.GetString(PersistentStateKey, string.Empty); + if (!string.IsNullOrEmpty(persistentState)) + { + state = JsonUtility.FromJson(persistentState); + // If we got this far we know we were successful + Result = CreateResult.Successful; + // If we were interrupted during script creation, move to profile creation + switch (Stage) + { + case CreationStage.CreatingExtensionService: + await ResumeAssetCreationProcessAfterReload(); + break; + } + } + else + { + // Otherwise create a default state + CreateDefaultState(); + } + } + + public bool ValidateAssets(List errors) + { + errors.Clear(); + + if (ServiceTemplate == null) + { + if (!ReadTemplate(ServiceTemplatePath, ref ServiceTemplate)) + errors.Add("Script template not found in " + ServiceTemplatePath); + } + + if (InspectorTemplate == null) + { + if (!ReadTemplate(InspectorTemplatePath, ref InspectorTemplate)) + errors.Add("Inspector template not found in " + InspectorTemplatePath); + } + + if (InterfaceTemplate == null) + { + if (!ReadTemplate(InterfaceTemplatePath, ref InterfaceTemplate)) + errors.Add("Interface template not found in " + InterfaceTemplatePath); + } + + if (ProfileTemplate == null) + { + if (!ReadTemplate(ProfileTemplatePath, ref ProfileTemplate)) + errors.Add("Profile template not found in " + ProfileTemplatePath); + } + + if (!AssetDatabase.IsValidFolder(DefaultExtensionsFolder)) + { + AssetDatabase.CreateFolder("Assets", DefaultExtensionsFolderName); + AssetDatabase.Refresh(); + } + + return errors.Count == 0; + } + + private bool ReadTemplate(string templatePath, ref string template) + { + string dataPath = Application.dataPath.Replace("/Assets", string.Empty); + string path = System.IO.Path.Combine(dataPath, templatePath); + + try + { + template = System.IO.File.ReadAllText(path); + } + catch (Exception e) + { + Debug.LogWarning(e.ToString()); + return false; + } + + return !string.IsNullOrEmpty(template); + } + + public bool ValidateName(List errors) + { + errors.Clear(); + + if (string.IsNullOrEmpty(ServiceName)) + { + errors.Add("Name cannot be empty."); + return false; + } + + if (!ServiceName.EndsWith("Service")) + { + errors.Add("Name must end with 'Service' suffix."); + } + + if (!CSharpCodeProvider.CreateProvider("C#").IsValidIdentifier(ServiceName)) + { + errors.Add("Name must not contain illegal characters."); + } + + return errors.Count == 0; + } + + public bool ValidateFolders(List errors) + { + errors.Clear(); + + if (ServiceFolderObject == null) + ServiceFolderObject = (UnityEngine.Object)AssetDatabase.LoadAssetAtPath(DefaultExtensionsFolder, typeof(UnityEngine.Object)); + + if (InspectorFolderObject == null && ServiceFolderObject != null) + InspectorFolderObject = ServiceFolderObject; + + if (InterfaceFolderObject == null && ServiceFolderObject != null) + InterfaceFolderObject = ServiceFolderObject; + + if (ProfileFolderObject == null && ServiceFolderObject != null) + ProfileFolderObject = ServiceFolderObject; + + if (ProfileAssetFolderObject == null && ServiceFolderObject != null) + ProfileAssetFolderObject = ServiceFolderObject; + + ServiceFolderPath = ServiceFolderObject != null ? AssetDatabase.GetAssetPath(ServiceFolderObject) : string.Empty; + InspectorFolderPath = InspectorFolderObject != null ? AssetDatabase.GetAssetPath(InspectorFolderObject) : string.Empty; + InterfaceFolderPath = InterfaceFolderObject != null ? AssetDatabase.GetAssetPath(InterfaceFolderObject) : string.Empty; + ProfileFolderPath = ProfileFolderObject != null ? AssetDatabase.GetAssetPath(ProfileFolderObject) : string.Empty; + ProfileAssetFolderPath = ProfileAssetFolderObject != null ? AssetDatabase.GetAssetPath(ProfileAssetFolderObject) : string.Empty; + + // Make sure the folders exist and aren't other assets + if (!AssetDatabase.IsValidFolder(ServiceFolderPath)) + errors.Add("Service folder is not valid."); + + if (!AssetDatabase.IsValidFolder(InspectorFolderPath)) + errors.Add("Inspector folder is not valid."); + + if (!AssetDatabase.IsValidFolder(InterfaceFolderPath)) + errors.Add("Interface folder is not valid."); + + if (!AssetDatabase.IsValidFolder(ProfileFolderPath)) + errors.Add("Profile folder is not valid."); + + if (!AssetDatabase.IsValidFolder(ProfileAssetFolderPath)) + errors.Add("Profile asset folder is not valid."); + + // Make sure there aren't already assets with the same name + if (AssetExists(ServiceFolderPath, ServiceName, ScriptExtension)) + errors.Add("Service script asset already exists. Delete it or choose a different service name to continue."); + + if (AssetExists(InspectorFolderPath, InspectorName, ScriptExtension)) + errors.Add("Inspector script asset already exists. Delete it or choose a different service name to continue."); + + if (AssetExists(InterfaceFolderPath, InterfaceName, ScriptExtension)) + errors.Add("Interface script asset already exists. Delete it or choose a different service name to continue."); + + if (AssetExists(ProfileFolderPath, ProfileName, ScriptExtension)) + errors.Add("Profile script asset already exists. Delete it or choose a different service name to continue."); + + if (AssetExists(ProfileAssetFolderPath, ProfileAssetName, ProfileExtension)) + errors.Add("Profile asset already exists. Delete it or choose a different service name to continue."); + + return errors.Count == 0; + } + + public bool ValidatePlatforms(List errors) + { + errors.Clear(); + + if ((int)Platforms == 0) + { + errors.Add("Service must support at least one platform."); + } + + return errors.Count == 0; + } + + public bool ValidateNamespace(List errors) + { + errors.Clear(); + + if (string.IsNullOrEmpty(Namespace)) + { + Namespace = DefaultExtensionNamespace; + } + + // Check if a class with this name already exists + Type serviceType = Type.GetType(Namespace + "." + ServiceName); + if (serviceType != null) + { + errors.Add("The type '" + ServiceName + "' already exists in this namespace."); + } + + Type inspectorType = Type.GetType(Namespace + ".Editor." + InspectorName); + if (serviceType != null) + { + errors.Add("The type '" + InspectorName + "' already exists in this namespace."); + } + + Type interfaceType = Type.GetType(Namespace + "." + InterfaceName); + if (interfaceType != null) + { + errors.Add("The type '" + InterfaceName + "' already exists in this namespace."); + } + + Type profileType = Type.GetType(Namespace + "." + ProfileName); + if (profileType != null) + { + errors.Add("The type '" + ProfileName + "' already exists in this namespace."); + } + + return errors.Count == 0; + } + + public async Task BeginAssetCreationProcess() + { + await Task.Yield(); + + Stage = CreationStage.CreatingExtensionService; + Result = CreateResult.Successful; + + // At this point, we're ready to store a temporary state in editor prefs + StoreState(); + + string serviceAsset = CreateTextAssetFromTemplate(ServiceTemplate); + WriteTextAssetToDisk(serviceAsset, ServiceName, ServiceFolderPath); + if (Result == CreateResult.Error) + return; + + // This delay is purely for visual flow + await Task.Delay(100); + string inspectorAsset = CreateTextAssetFromTemplate(InspectorTemplate); + WriteTextAssetToDisk(inspectorAsset, InspectorName, InspectorFolderPath); + if (Result == CreateResult.Error) + return; + + // This delay is purely for visual flow + await Task.Delay(100); + string interfaceAsset = CreateTextAssetFromTemplate(InterfaceTemplate); + WriteTextAssetToDisk(interfaceAsset, InterfaceName, InterfaceFolderPath); + if (Result == CreateResult.Error) + return; + + // This delay is purely for visual flow + await Task.Delay(100); + string profileAsset = string.Empty; + if (UsesProfile) + { + profileAsset = CreateTextAssetFromTemplate(ProfileTemplate); + WriteTextAssetToDisk(profileAsset, ProfileName, ProfileFolderPath); + if (Result == CreateResult.Error) + return; + } + + // Wait a moment, then refresh the database and save our assets + await Task.Delay(100); + AssetDatabase.Refresh(); + AssetDatabase.SaveAssets(); + await Task.Delay(100); + + // Subscribe to Unity's log output so we can detect compilation errors + Application.logMessageReceived += LogMessageReceived; + + // Wait for scripts to finish compiling + while (EditorApplication.isCompiling) + await Task.Delay(100); + + // Unsubscribe + Application.logMessageReceived -= LogMessageReceived; + // If we've gotten this far, it means that there was a compilation error + // Otherwise this object would have been wiped from memory + } + + public async Task ResumeAssetCreationProcessAfterReload() + { + await Task.Yield(); + + Result = CreateResult.Successful; + Stage = CreationStage.CreatingProfileInstance; + + // Wait for scripts to finish compiling + while (EditorApplication.isCompiling) + await Task.Delay(100); + + // Search for our service type up front + ServiceType = FindServiceType(ServiceName); + if (ServiceType == null) + { + Stage = CreationStage.Finished; + Result = CreateResult.Error; + creationLog.Add("Couldn't find type " + ServiceName + " in loaded assemblies."); + return; + } + + // If this service doesn't use a profile, skip this step + if (!UsesProfile) + { + Stage = CreationStage.Finished; + creationLog.Add("Service does not use profile - skipping profile creation."); + return; + } + + try + { + ScriptableObject profileInstance = ScriptableObject.CreateInstance(DefaultExtensionNamespace + "." + ProfileName); + if (profileInstance == null) + { + creationLog.Add("Couldn't create instance of profile class " + DefaultExtensionNamespace + "." + ProfileName + " - aborting"); + Result = CreateResult.Error; + return; + } + + string profilePath = System.IO.Path.Combine(ProfileFolderPath, ProfileAssetName + ProfileExtension); + profileInstance.name = ProfileAssetName; + + // Save the asset and refresh + AssetDatabase.CreateAsset(profileInstance, profilePath); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + // Force import the asset so it works with object reference values in serialized props + AssetDatabase.ImportAsset(profilePath, ImportAssetOptions.ForceUpdate); + + // Load asset immediately to ensure it was created, and for registration later + ProfileInstance = AssetDatabase.LoadAssetAtPath(profilePath); + if (ProfileInstance == null) + { + creationLog.Add("Couldn't load profile instance after creation!"); + Stage = CreationStage.Finished; + Result = CreateResult.Error; + return; + } + } + catch (Exception e) + { + creationLog.Add("Exception when creating profile instance"); + creationLog.Add(e.ToString()); + Stage = CreationStage.Finished; + Result = CreateResult.Error; + return; + } + + Stage = CreationStage.Finished; + } + + #endregion + + #region private methods + + private void CreateDefaultState() + { + state = new PersistentState(); + state.ServiceName = "NewService"; + state.UsesProfile = true; + state.UsesInspector = true; + state.Stage = CreationStage.SelectNameAndPlatform; + state.Platforms = SupportedPlatforms.LinuxStandalone | SupportedPlatforms.MacStandalone | SupportedPlatforms.WindowsStandalone | SupportedPlatforms.WindowsUniversal; + } + + private bool AssetExists(string assetPath, string assetName, string extension) + { + string path = System.IO.Path.Combine(assetPath, assetName + extension); + UnityEngine.Object asset = AssetDatabase.LoadAssetAtPath(path); + return asset != null; + } + + private string CreateTextAssetFromTemplate(string templateText) + { + string scriptContents = templateText; + scriptContents = scriptContents.Replace(ServiceNameSearchString, ServiceName); + scriptContents = scriptContents.Replace(InspectorNameSearchString, InspectorName); + scriptContents = scriptContents.Replace(InterfaceNameSearchString, InterfaceName); + scriptContents = scriptContents.Replace(ProfileNameSearchString, ProfileName); + scriptContents = scriptContents.Replace(ProfileFieldNameSearchString, ProfileFieldName); + scriptContents = scriptContents.Replace(ExtensionNamespaceSearchString, DefaultExtensionNamespace); + + List platformValues = new List(); + foreach (SupportedPlatforms platform in Enum.GetValues(typeof(SupportedPlatforms))) + { + if ((platform & Platforms) != 0) + platformValues.Add("SupportedPlatforms." + platform.ToString()); + } + scriptContents = scriptContents.Replace(SupportedPlatformsSearchString, String.Join("|", platformValues.ToArray())); + + if (string.IsNullOrEmpty(scriptContents)) + { + Result = CreateResult.Error; + creationLog.Add("Script contents were empty, aborting."); + } + + return scriptContents; + } + + private void WriteTextAssetToDisk(string contents, string assetName, string folderPath) + { + string localPath = folderPath + "/" + assetName + ScriptExtension; + creationLog.Add("Creating " + localPath); + try + { + System.IO.File.WriteAllText(localPath, contents); + } + catch (Exception e) + { + Result = CreateResult.Error; + creationLog.Add(e.ToString()); + } + } + + private void LogMessageReceived(string condition, string stackTrace, LogType type) + { + switch (type) + { + case LogType.Error: + case LogType.Exception: + creationLog.Add("Encountered error while compiling"); + creationLog.Add(condition); + Result = CreateResult.Error; + break; + + default: + break; + } + } + + private static Type FindServiceType(string serviceClassName) + { + foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + foreach (Type type in assembly.GetTypes()) + { + if (!type.IsClass || type.IsAutoClass || type.IsAbstract || type.IsGenericType || type.IsArray) + continue; + + if (type.Name.Equals(serviceClassName)) + return type; + } + } + + return null; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs.meta new file mode 100644 index 00000000000..c384b170cc7 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceCreator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e85f3cf7a438fa449a72507d45fc863 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs new file mode 100644 index 00000000000..0cc0fe89540 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + public class ExtensionServiceWizard : EditorWindow + { + private static ExtensionServiceWizard window; + private static readonly Color enabledColor = Color.white; + private static readonly Color disabledColor = Color.gray; + private static readonly Color readOnlyColor = Color.Lerp(enabledColor, Color.clear, 0.5f); + private static readonly string servicesDocumentationURL = "https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/MixedRealityConfigurationGuide.html"; + private static readonly Vector2 minWindowSize = new Vector2(500, 0); + private const int docLinkWidth = 200; + + private ExtensionServiceCreator creator = new ExtensionServiceCreator(); + private List errors = new List(); + private bool registered = false; + private int numEllipses = 0; + + [MenuItem("Mixed Reality Toolkit/Utilities/Create Extension Service", false, 500)] + private static void CreateExtensionServiceMenuItem() + { + if (window != null) + { + Debug.Log("Only one window allowed at a time"); + // Only allow one window at a time + return; + } + + window = EditorWindow.CreateInstance(); + window.titleContent = new GUIContent("Create Extension Service"); + window.minSize = minWindowSize; + window.ResetCreator(); + window.Show(true); + } + + private void ResetCreator() + { + if (creator == null) + creator = new ExtensionServiceCreator(); + + creator.ResetState(); + } + + private void OnEnable() + { + if (creator == null) + creator = new ExtensionServiceCreator(); + + creator.LoadStoredState(); + } + + private void OnGUI() + { + if (!creator.ValidateAssets(errors)) + { + EditorGUILayout.LabelField("Validating assets...", EditorStyles.miniLabel); + foreach (string error in errors) + { + EditorGUILayout.HelpBox(error, MessageType.Error); + } + return; + } + + switch (creator.Stage) + { + case ExtensionServiceCreator.CreationStage.SelectNameAndPlatform: + DrawSelectNameAndPlatform(); + break; + + case ExtensionServiceCreator.CreationStage.ChooseOutputFolders: + DrawChooseOutputFolders(); + break; + + case ExtensionServiceCreator.CreationStage.CreatingExtensionService: + case ExtensionServiceCreator.CreationStage.CreatingProfileInstance: + DrawCreatingAssets(); + break; + + case ExtensionServiceCreator.CreationStage.Finished: + DrawFinished(); + break; + } + } + + private void DrawSelectNameAndPlatform() + { + EditorGUILayout.Space(); + EditorGUILayout.HelpBox("This wizard will help you set up and register a simple extension service. MRTK Services are similar to traditional Monobehaviour singletons but with more robust access and lifecycle control. Scripts can access services through the MRTK's service provider interface. For more information about services, click the link below.", MessageType.Info); + + GUIContent buttonContent = new GUIContent(); + buttonContent.image = EditorGUIUtility.IconContent("_Help").image; + buttonContent.text = " Services Documentation"; + buttonContent.tooltip = servicesDocumentationURL; + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + + if (GUILayout.Button(buttonContent, GUILayout.MaxWidth(docLinkWidth))) + { + Application.OpenURL(servicesDocumentationURL); + } + + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + EditorGUILayout.Space(); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Choose a name for your service.", EditorStyles.miniLabel); + + creator.ServiceName = EditorGUILayout.TextField("Service Name", creator.ServiceName); + + bool readyToProgress = creator.ValidateName(errors); + foreach (string error in errors) + { + EditorGUILayout.HelpBox(error, MessageType.Error); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Choose which platforms your service will support.", EditorStyles.miniLabel); + + creator.Platforms = (SupportedPlatforms)EditorGUILayout.EnumFlagsField("Platforms", creator.Platforms); + readyToProgress &= creator.ValidatePlatforms(errors); + foreach (string error in errors) + { + EditorGUILayout.HelpBox(error, MessageType.Error); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Choose a namespace for your service.", EditorStyles.miniLabel); + + creator.Namespace = EditorGUILayout.TextField("Namespace", creator.Namespace); + readyToProgress &= creator.ValidateNamespace(errors); + foreach (string error in errors) + { + EditorGUILayout.HelpBox(error, MessageType.Error); + } + + EditorGUILayout.Space(); + + GUI.color = readyToProgress ? enabledColor : disabledColor; + if (GUILayout.Button("Next") && readyToProgress) + { + creator.Stage = ExtensionServiceCreator.CreationStage.ChooseOutputFolders; + creator.StoreState(); + } + } + + private void DrawChooseOutputFolders() + { + GUI.color = enabledColor; + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Below are the files you will be generating", EditorStyles.miniLabel); + + EditorGUILayout.Space(); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(creator.ServiceName + ".cs", EditorStyles.boldLabel); + EditorGUILayout.LabelField("This is the main script for your service. It functions simliarly to a MonoBehaviour, with Enable, Disable and Update functions.", EditorStyles.wordWrappedMiniLabel); + creator.ServiceFolderObject = EditorGUILayout.ObjectField("Target Folder", creator.ServiceFolderObject, typeof(UnityEngine.Object), false); + EditorGUILayout.EndVertical(); + + EditorGUILayout.Space(); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(creator.InterfaceName + ".cs", EditorStyles.boldLabel); + EditorGUILayout.LabelField("This is the interface that other scripts will use to interact with your service.", EditorStyles.wordWrappedMiniLabel); + creator.InterfaceFolderObject = EditorGUILayout.ObjectField("Target Folder", creator.InterfaceFolderObject, typeof(UnityEngine.Object), false); + EditorGUILayout.EndVertical(); + + EditorGUILayout.Space(); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(creator.InspectorName + ".cs", EditorStyles.boldLabel); + EditorGUILayout.LabelField("An optional inspector for your service. This will be displayed in the editor when service inspectors are enabled.", EditorStyles.wordWrappedMiniLabel); + creator.UsesInspector = EditorGUILayout.Toggle("Generate Inspector", creator.UsesInspector); + if (creator.UsesInspector) + { + creator.InspectorFolderObject = EditorGUILayout.ObjectField("Target Folder", creator.InspectorFolderObject, typeof(UnityEngine.Object), false); + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.Space(); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(creator.ProfileName + ".cs", EditorStyles.boldLabel); + EditorGUILayout.LabelField("An optional profile script for your service. Profiles are scriptable objects that store permanent config data. If you're not sure whether your service will need a profile, it's best to create one. You can remove it later.", EditorStyles.wordWrappedMiniLabel); + creator.UsesProfile = EditorGUILayout.Toggle("Generate Profile", creator.UsesProfile); + if (creator.UsesProfile) + { + creator.ProfileFolderObject = EditorGUILayout.ObjectField("Target Folder", creator.ProfileFolderObject, typeof(UnityEngine.Object), false); + } + EditorGUILayout.EndVertical(); + + if (creator.UsesProfile) + { + EditorGUILayout.Space(); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(creator.ProfileAssetName + ".asset", EditorStyles.boldLabel); + EditorGUILayout.LabelField("A default instance of your profile.", EditorStyles.wordWrappedMiniLabel); + creator.ProfileAssetFolderObject = EditorGUILayout.ObjectField("Target Folder", creator.ProfileAssetFolderObject, typeof(UnityEngine.Object), false); + EditorGUILayout.EndVertical(); + } + + GUI.color = enabledColor; + EditorGUILayout.Space(); + + bool readyToProgress = creator.ValidateFolders(errors); + foreach (string error in errors) + { + EditorGUILayout.HelpBox(error, MessageType.Error); + } + + EditorGUILayout.Space(); + + GUI.color = enabledColor; + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Back")) + { + creator.Stage = ExtensionServiceCreator.CreationStage.SelectNameAndPlatform; + creator.StoreState(); + } + GUI.color = readyToProgress ? enabledColor : disabledColor; + if (GUILayout.Button("Next") && readyToProgress) + { + // Start the async method that will wait for the service to be created + CreateAssetsAsync(); + } + EditorGUILayout.EndHorizontal(); + } + + private void DrawCreatingAssets() + { + EditorGUILayout.LabelField("Creating assets...", EditorStyles.boldLabel); + + // Draw crude working indicator so we know it hasn't frozen + numEllipses++; + if (numEllipses > 10) + numEllipses = 0; + + string workingIndicator = "."; + for (int i = 0; i < numEllipses; i++) + workingIndicator += "."; + + EditorGUILayout.LabelField(workingIndicator, EditorStyles.boldLabel); + + switch (creator.Result) + { + case ExtensionServiceCreator.CreateResult.Error: + EditorGUILayout.HelpBox("There were errors while creating assets.", MessageType.Error); + break; + + default: + break; + } + + foreach (string info in creator.CreationLog) + { + EditorGUILayout.LabelField(info, EditorStyles.wordWrappedMiniLabel); + } + + Repaint(); + } + + private void DrawFinished() + { + EditorGUILayout.Space(); + + switch (creator.Result) + { + case ExtensionServiceCreator.CreateResult.Successful: + break; + + case ExtensionServiceCreator.CreateResult.Error: + EditorGUILayout.HelpBox("There were errors during the creation process:", MessageType.Error); + foreach (string info in creator.CreationLog) + { + EditorGUILayout.LabelField(info, EditorStyles.wordWrappedMiniLabel); + } + + EditorGUILayout.Space(); + if (GUILayout.Button("Close")) + { + creator.ResetState(); + Close(); + } + // All done, bail early + return; + } + + EditorGUILayout.HelpBox("Your service scripts have been created.", MessageType.Info); + + if (!registered) + { + EditorGUILayout.LabelField("Would you like to register this service in your current MixedRealityToolkit profile?", EditorStyles.miniLabel); + // Check to see whether it's possible ot register the profile + bool canRegisterProfile = true; + if (MixedRealityToolkit.Instance == null || !MixedRealityToolkit.Instance.HasActiveProfile) + { + EditorGUILayout.HelpBox("Toolkit has no active profile. Can't register service.", MessageType.Warning); + canRegisterProfile = false; + } + else if (MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile == null) + { + EditorGUILayout.HelpBox("Toolkit has no RegisteredServiceProvidersProfile. Can't register service.", MessageType.Warning); + canRegisterProfile = false; + } + EditorGUILayout.Space(); + EditorGUILayout.BeginHorizontal(); + GUI.color = canRegisterProfile ? enabledColor : disabledColor; + if (GUILayout.Button("Register") && canRegisterProfile) + { + RegisterServiceWithActiveMixedRealityProfile(); + } + GUI.color = enabledColor; + if (GUILayout.Button("Not Now")) + { + creator.ResetState(); + Close(); + } + EditorGUILayout.EndHorizontal(); + } + else + { + EditorGUILayout.LabelField("Your service is now registered. Scripts can access this service like so:", EditorStyles.miniLabel); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.TextField(creator.SampleCode); + if (GUILayout.Button("Copy Sample Code", EditorStyles.miniButton)) + { + EditorGUIUtility.systemCopyBuffer = creator.SampleCode; + } + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Space(); + if (GUILayout.Button("Close")) + { + creator.ResetState(); + Close(); + } + } + } + + private void RegisterServiceWithActiveMixedRealityProfile() + { + // We assume this has already been validated + MixedRealityRegisteredServiceProvidersProfile servicesProfile = MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile; + // Use serialized object so this process can be undone + SerializedObject servicesProfileObject = new SerializedObject(servicesProfile); + SerializedProperty configurations = servicesProfileObject.FindProperty("configurations"); + int numConfigurations = configurations.arraySize; + // Insert a new configuration at the end + configurations.InsertArrayElementAtIndex(numConfigurations); + // Get that config value + SerializedProperty newConfig = configurations.GetArrayElementAtIndex(numConfigurations); + + // Configurations look like so: + /* + SystemType componentType; + string componentName; + uint priority; + SupportedPlatforms runtimePlatform; + BaseMixedRealityProfile configurationProfile; + */ + + SerializedProperty componentType = newConfig.FindPropertyRelative("componentType"); + SerializedProperty componentTypeReference = componentType.FindPropertyRelative("reference"); + SerializedProperty componentName = newConfig.FindPropertyRelative("componentName"); + SerializedProperty priority = newConfig.FindPropertyRelative("priority"); + SerializedProperty runtimePlatform = newConfig.FindPropertyRelative("runtimePlatform"); + SerializedProperty configurationProfile = newConfig.FindPropertyRelative("configurationProfile"); + + componentTypeReference.stringValue = creator.ServiceType.AssemblyQualifiedName; + // Add spaces between camel case service name + componentName.stringValue = System.Text.RegularExpressions.Regex.Replace(creator.ServiceName, "(\\B[A-Z])", " $1"); + configurationProfile.objectReferenceValue = creator.ProfileInstance; + runtimePlatform.intValue = (int)creator.Platforms; + + servicesProfileObject.ApplyModifiedProperties(); + + // Select the profile so we can see what we've done + Selection.activeObject = servicesProfile; + + registered = true; + } + + private async void CreateAssetsAsync() + { + await creator.BeginAssetCreationProcess(); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs.meta new file mode 100644 index 00000000000..467d8565013 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ExtensionTemplates/ExtensionServiceWizard.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7060425cc37f684983d7bac50e2c985 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/MixedRealityStandardShaderGUI.cs b/Assets/MixedRealityToolkit/Inspectors/MixedRealityStandardShaderGUI.cs index ebe1b301258..306e9d1c46c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/MixedRealityStandardShaderGUI.cs +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityStandardShaderGUI.cs @@ -3,6 +3,7 @@ using Microsoft.MixedReality.Toolkit.Utilities; using System; +using System.IO; using UnityEditor; using UnityEngine; using UnityEngine.Rendering; @@ -59,6 +60,8 @@ protected static class Styles public static string blendOperationName = "_BlendOp"; public static string depthTestName = "_ZTest"; public static string depthWriteName = "_ZWrite"; + public static string depthOffsetFactorName = "_ZOffsetFactor"; + public static string depthOffsetUnitsName = "_ZOffsetUnits"; public static string colorWriteMaskName = "_ColorWriteMask"; public static string instancedColorName = "_InstancedColor"; public static string instancedColorFeatureName = "_INSTANCED_COLOR"; @@ -79,6 +82,8 @@ protected static class Styles public static GUIContent blendOperation = new GUIContent("Blend Operation", "Operation for Blending New Color With Existing Color"); public static GUIContent depthTest = new GUIContent("Depth Test", "How Should Depth Testing Be Performed."); public static GUIContent depthWrite = new GUIContent("Depth Write", "Controls Whether Pixels From This Object Are Written to the Depth Buffer"); + public static GUIContent depthOffsetFactor = new GUIContent("Depth Offset Factor", "Scales the Maximum Z Slope, with Respect to X or Y of the Polygon"); + public static GUIContent depthOffsetUnits = new GUIContent("Depth Offset Units", "Scales the Minimum Resolvable Depth Buffer Value"); public static GUIContent colorWriteMask = new GUIContent("Color Write Mask", "Color Channel Writing Mask"); public static GUIContent instancedColor = new GUIContent("Instanced Color", "Enable a Unique Color Per Instance"); public static GUIContent cullMode = new GUIContent("Cull Mode", "Triangle Culling Mode"); @@ -108,6 +113,8 @@ protected static class Styles public static GUIContent rimColor = new GUIContent("Color", "Rim Highlight Color"); public static GUIContent rimPower = new GUIContent("Power", "Rim Highlight Saturation"); public static GUIContent vertexColors = new GUIContent("Vertex Colors", "Enable Vertex Color Tinting"); + public static GUIContent vertexExtrusion = new GUIContent("Vertex Extrusion", "Enable Vertex Extrusion Along the Vetex Normal"); + public static GUIContent vertexExtrusionValue = new GUIContent("Vertex Extrusion Value", "How Far to Extrude the Vertex Along the Vetex Normal"); public static GUIContent clippingPlane = new GUIContent("Clipping Plane", "Enable Clipping Against a Plane"); public static GUIContent clippingSphere = new GUIContent("Clipping Sphere", "Enable Clipping Against a Sphere"); public static GUIContent clippingBox = new GUIContent("Clipping Box", "Enable Clipping Against a Box"); @@ -118,6 +125,7 @@ protected static class Styles public static GUIContent nearLightFade = new GUIContent("Use Light", "A Hover or Proximity Light (Rather Than the Camera) Determines Near Fade Distance"); public static GUIContent fadeBeginDistance = new GUIContent("Fade Begin", "Distance From Camera to Begin Fade In"); public static GUIContent fadeCompleteDistance = new GUIContent("Fade Complete", "Distance From Camera When Fade is Fully In"); + public static GUIContent fadeMinValue = new GUIContent("Fade Min Value", "Clamps the Fade Ammount to a Minimum Value"); public static GUIContent hoverLight = new GUIContent("Hover Light", "Enable utilization of Hover Light(s)"); public static GUIContent enableHoverColorOverride = new GUIContent("Override Color", "Override Global Hover Light Color"); public static GUIContent hoverColorOverride = new GUIContent("Color", "Override Hover Light Color"); @@ -163,6 +171,8 @@ protected static class Styles protected MaterialProperty blendOperation; protected MaterialProperty depthTest; protected MaterialProperty depthWrite; + protected MaterialProperty depthOffsetFactor; + protected MaterialProperty depthOffsetUnits; protected MaterialProperty colorWriteMask; protected MaterialProperty instancedColor; protected MaterialProperty cullMode; @@ -194,6 +204,8 @@ protected static class Styles protected MaterialProperty rimColor; protected MaterialProperty rimPower; protected MaterialProperty vertexColors; + protected MaterialProperty vertexExtrusion; + protected MaterialProperty vertexExtrusionValue; protected MaterialProperty clippingPlane; protected MaterialProperty clippingSphere; protected MaterialProperty clippingBox; @@ -204,6 +216,7 @@ protected static class Styles protected MaterialProperty nearLightFade; protected MaterialProperty fadeBeginDistance; protected MaterialProperty fadeCompleteDistance; + protected MaterialProperty fadeMinValue; protected MaterialProperty hoverLight; protected MaterialProperty enableHoverColorOverride; protected MaterialProperty hoverColorOverride; @@ -248,6 +261,8 @@ protected void FindProperties(MaterialProperty[] props) blendOperation = FindProperty(Styles.blendOperationName, props); depthTest = FindProperty(Styles.depthTestName, props); depthWrite = FindProperty(Styles.depthWriteName, props); + depthOffsetFactor = FindProperty(Styles.depthOffsetFactorName, props); + depthOffsetUnits = FindProperty(Styles.depthOffsetUnitsName, props); colorWriteMask = FindProperty(Styles.colorWriteMaskName, props); instancedColor = FindProperty(Styles.instancedColorName, props); cullMode = FindProperty("_CullMode", props); @@ -279,6 +294,8 @@ protected void FindProperties(MaterialProperty[] props) rimColor = FindProperty("_RimColor", props); rimPower = FindProperty("_RimPower", props); vertexColors = FindProperty("_VertexColors", props); + vertexExtrusion = FindProperty("_VertexExtrusion", props); + vertexExtrusionValue = FindProperty("_VertexExtrusionValue", props); clippingPlane = FindProperty("_ClippingPlane", props); clippingSphere = FindProperty("_ClippingSphere", props); clippingBox = FindProperty("_ClippingBox", props); @@ -289,6 +306,7 @@ protected void FindProperties(MaterialProperty[] props) nearLightFade = FindProperty("_NearLightFade", props); fadeBeginDistance = FindProperty("_FadeBeginDistance", props); fadeCompleteDistance = FindProperty("_FadeCompleteDistance", props); + fadeMinValue = FindProperty("_FadeMinValue", props); hoverLight = FindProperty("_HoverLight", props); enableHoverColorOverride = FindProperty("_EnableHoverColorOverride", props); hoverColorOverride = FindProperty("_HoverColorOverride", props); @@ -469,6 +487,8 @@ protected void RenderingModeOptions(MaterialEditor materialEditor) materialEditor.ShaderProperty(blendOperation, Styles.blendOperation); materialEditor.ShaderProperty(depthTest, Styles.depthTest); depthWrite.floatValue = EditorGUILayout.Popup(depthWrite.displayName, (int)depthWrite.floatValue, Styles.depthWriteNames); + materialEditor.ShaderProperty(depthOffsetFactor, Styles.depthOffsetFactor); + materialEditor.ShaderProperty(depthOffsetUnits, Styles.depthOffsetUnits); materialEditor.ShaderProperty(colorWriteMask, Styles.colorWriteMask); EditorGUI.indentLevel -= 2; } @@ -587,6 +607,13 @@ protected void RenderingOptions(MaterialEditor materialEditor, Material material materialEditor.ShaderProperty(vertexColors, Styles.vertexColors); + materialEditor.ShaderProperty(vertexExtrusion, Styles.vertexExtrusion); + + if (PropertyEnabled(vertexExtrusion)) + { + materialEditor.ShaderProperty(vertexExtrusionValue, Styles.vertexExtrusionValue, 2); + } + materialEditor.ShaderProperty(clippingPlane, Styles.clippingPlane); if (PropertyEnabled(clippingPlane)) @@ -626,6 +653,7 @@ protected void RenderingOptions(MaterialEditor materialEditor, Material material materialEditor.ShaderProperty(nearLightFade, Styles.nearLightFade, 2); materialEditor.ShaderProperty(fadeBeginDistance, Styles.fadeBeginDistance, 2); materialEditor.ShaderProperty(fadeCompleteDistance, Styles.fadeCompleteDistance, 2); + materialEditor.ShaderProperty(fadeMinValue, Styles.fadeMinValue, 2); } } @@ -749,9 +777,9 @@ protected void AdvancedOptions(MaterialEditor materialEditor, Material material) GUI.enabled = false; materialEditor.RenderQueueField(); - // When round corner or border light features are used, enable instancing to disable batching. Static and dynamic - // batching will normalize the object scale, which breaks border related features. - GUI.enabled = !PropertyEnabled(roundCorners) && !PropertyEnabled(borderLight); + // Enable instancing to disable batching. Static and dynamic batching will normalize the object scale, which breaks + // features which utilize object scale. + GUI.enabled = !ScaleRequired(); if (!GUI.enabled && !material.enableInstancing) { @@ -793,6 +821,13 @@ protected void AdvancedOptions(MaterialEditor materialEditor, Material material) } } + protected bool ScaleRequired() + { + return PropertyEnabled(roundCorners) || + PropertyEnabled(borderLight) || + (PropertyEnabled(enableTriplanarMapping) && PropertyEnabled(enableLocalSpaceTriplanarMapping)); + } + protected static void SetupMaterialWithAlbedo(Material material, MaterialProperty albedoMap, MaterialProperty albedoAlphaMode, MaterialProperty albedoAssignedAtRuntime) { if (albedoMap.textureValue || PropertyEnabled(albedoAssignedAtRuntime)) @@ -842,6 +877,8 @@ protected static void SetupMaterialWithRenderingMode(Material material, Renderin material.SetInt(Styles.blendOperationName, (int)BlendOp.Add); material.SetInt(Styles.depthTestName, (int)CompareFunction.LessEqual); material.SetInt(Styles.depthWriteName, (int)DepthWrite.On); + material.SetFloat(Styles.depthOffsetFactorName, 0.0f); + material.SetFloat(Styles.depthOffsetUnitsName, 0.0f); material.SetInt(Styles.colorWriteMaskName, (int)ColorWriteMask.All); material.DisableKeyword(Styles.alphaTestOnName); material.DisableKeyword(Styles.alphaBlendOnName); @@ -858,6 +895,8 @@ protected static void SetupMaterialWithRenderingMode(Material material, Renderin material.SetInt(Styles.blendOperationName, (int)BlendOp.Add); material.SetInt(Styles.depthTestName, (int)CompareFunction.LessEqual); material.SetInt(Styles.depthWriteName, (int)DepthWrite.On); + material.SetFloat(Styles.depthOffsetFactorName, 0.0f); + material.SetFloat(Styles.depthOffsetUnitsName, 0.0f); material.SetInt(Styles.colorWriteMaskName, (int)ColorWriteMask.All); material.EnableKeyword(Styles.alphaTestOnName); material.DisableKeyword(Styles.alphaBlendOnName); @@ -874,6 +913,8 @@ protected static void SetupMaterialWithRenderingMode(Material material, Renderin material.SetInt(Styles.blendOperationName, (int)BlendOp.Add); material.SetInt(Styles.depthTestName, (int)CompareFunction.LessEqual); material.SetInt(Styles.depthWriteName, (int)DepthWrite.Off); + material.SetFloat(Styles.depthOffsetFactorName, 0.0f); + material.SetFloat(Styles.depthOffsetUnitsName, 0.0f); material.SetInt(Styles.colorWriteMaskName, (int)ColorWriteMask.All); material.DisableKeyword(Styles.alphaTestOnName); material.EnableKeyword(Styles.alphaBlendOnName); @@ -890,6 +931,8 @@ protected static void SetupMaterialWithRenderingMode(Material material, Renderin material.SetInt(Styles.blendOperationName, (int)BlendOp.Add); material.SetInt(Styles.depthTestName, (int)CompareFunction.LessEqual); material.SetInt(Styles.depthWriteName, (int)DepthWrite.Off); + material.SetFloat(Styles.depthOffsetFactorName, 0.0f); + material.SetFloat(Styles.depthOffsetUnitsName, 0.0f); material.SetInt(Styles.colorWriteMaskName, (int)ColorWriteMask.All); material.DisableKeyword(Styles.alphaTestOnName); material.EnableKeyword(Styles.alphaBlendOnName); @@ -906,6 +949,8 @@ protected static void SetupMaterialWithRenderingMode(Material material, Renderin material.SetInt(Styles.blendOperationName, (int)BlendOp.Add); material.SetInt(Styles.depthTestName, (int)CompareFunction.LessEqual); material.SetInt(Styles.depthWriteName, (int)DepthWrite.Off); + material.SetFloat(Styles.depthOffsetFactorName, 0.0f); + material.SetFloat(Styles.depthOffsetUnitsName, 0.0f); material.SetInt(Styles.colorWriteMaskName, (int)ColorWriteMask.All); material.DisableKeyword(Styles.alphaTestOnName); material.EnableKeyword(Styles.alphaBlendOnName); @@ -1018,5 +1063,49 @@ protected static void SetColorProperty(Material material, string propertyName, C material.SetColor(propertyName, propertyValue.Value); } } + + [MenuItem("Mixed Reality Toolkit/Utilities/Upgrade MRTK Standard Shader for Lightweight Render Pipeline")] + protected static void UpgradeShaderForLightweightRenderPipeline() + { + if (EditorUtility.DisplayDialog("Upgrade MRTK Standard Shader?", + "This will alter the MRTK Standard Shader for use with Unity's Lightweight Render Pipeline. You cannot undo this action.", + "Ok", + "Cancel")) + { + string shaderName = "Mixed Reality Toolkit/Standard"; + string path = AssetDatabase.GetAssetPath(Shader.Find(shaderName)); + + if (!string.IsNullOrEmpty(path)) + { + try + { + string upgradedShader = File.ReadAllText(path); + upgradedShader = upgradedShader.Replace("Tags{ \"RenderType\" = \"Opaque\" \"LightMode\" = \"ForwardBase\" }", + "Tags{ \"RenderType\" = \"Opaque\" \"LightMode\" = \"LightweightForward\" }"); + upgradedShader = upgradedShader.Replace("//#define _LIGHTWEIGHT_RENDER_PIPELINE", + "#define _LIGHTWEIGHT_RENDER_PIPELINE"); + File.WriteAllText(path, upgradedShader); + AssetDatabase.Refresh(); + + Debug.LogFormat("Upgraded {0} for use with the Lightweight Render Pipeline.", path); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + else + { + Debug.LogErrorFormat("Failed to get asset path to: {0}", shaderName); + } + } + } + + [MenuItem("Mixed Reality Toolkit/Utilities/Upgrade MRTK Standard Shader for Lightweight Render Pipeline", true)] + protected static bool UpgradeShaderForLightweightRenderPipelineValidate() + { + // If a scriptable render pipeline is not present, no need to upgrade the shader. + return GraphicsSettings.renderPipelineAsset != null; + } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs new file mode 100644 index 00000000000..f8e0cb9a032 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Utilities.Facades +{ + /// + /// Links service facade objects to active services. + /// + [InitializeOnLoad] + public static class MixedRealityToolkitFacadeHandler + { + private static List childrenToDelete = new List(); + private static List servicesToSort = new List(); + private static MixedRealityToolkit previousActiveInstance; + + static MixedRealityToolkitFacadeHandler() + { + SceneView.onSceneGUIDelegate += UpdateServiceFacades; + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + } + + [UnityEditor.Callbacks.DidReloadScripts] + private static void OnScriptsReloaded() + { + // If scripts were reloaded, nuke everything and start over + foreach (MixedRealityToolkit toolkitInstance in GameObject.FindObjectsOfType()) + { + DestroyAllChildren(toolkitInstance); + } + previousActiveInstance = null; + } + + private static void OnPlayModeStateChanged(PlayModeStateChange state) + { + foreach (MixedRealityToolkit toolkitInstance in GameObject.FindObjectsOfType()) + { + DestroyAllChildren(toolkitInstance); + } + previousActiveInstance = null; + } + + private static void UpdateServiceFacades(SceneView sceneView) + { + if (!MixedRealityToolkit.IsInitialized) + { // Nothing to do here. + return; + } + + if (EditorApplication.isCompiling) + { // Wait for compilation to complete before creating or destroying facades + return; + } + + if (previousActiveInstance != null && MixedRealityToolkit.Instance != previousActiveInstance) + { // We've changed active instances. Destroy all children in the previous instance. + DestroyAllChildren(previousActiveInstance); + } + + if (MixedRealityToolkit.Instance.HasActiveProfile && !MixedRealityToolkit.Instance.ActiveProfile.UseServiceInspectors) + { // If we're not using inspectors, destroy them all now + DestroyAllChildren(MixedRealityToolkit.Instance); + return; + } + + servicesToSort.Clear(); + + foreach (IMixedRealityService service in MixedRealityToolkit.Instance.ActiveSystems.Values) + { + servicesToSort.Add(service); + } + + foreach (Tuple registeredService in MixedRealityToolkit.Instance.RegisteredMixedRealityServices) + { + servicesToSort.Add(registeredService.Item2); + } + + servicesToSort.Sort( + delegate (IMixedRealityService s1, IMixedRealityService s2) + { + string s1Name = s1.GetType().Name; + string s2Name = s2.GetType().Name; + + if (s1Name == s2Name) + { + return s1.Priority.CompareTo(s2.Priority); + } + + return s1Name.CompareTo(s2Name); + }); + + for (int i = 0; i < servicesToSort.Count; i++) + { + CreateFacade(MixedRealityToolkit.Instance.transform, servicesToSort[i], i); + } + + // Delete any stragglers + childrenToDelete.Clear(); + for (int i = servicesToSort.Count; i < MixedRealityToolkit.Instance.transform.childCount; i++) + { + childrenToDelete.Add(MixedRealityToolkit.Instance.transform.GetChild(i)); + } + + foreach (Transform childToDelete in childrenToDelete) + { + if (Application.isPlaying) + { + GameObject.Destroy(childToDelete.gameObject); + } + else + { + GameObject.DestroyImmediate(childToDelete.gameObject); + } + } + + try + { + // Update all self-registered facades + foreach (ServiceFacade facade in ServiceFacade.ActiveFacadeObjects) + { + if (facade == null) + { + continue; + } + + facade.CheckIfStillValid(); + } + } + catch(Exception) + { + Debug.LogWarning("Service Facades should remain parented under the MixedRealityToolkit instance."); + } + + previousActiveInstance = MixedRealityToolkit.Instance; + } + + private static void CreateFacade(Transform parent, IMixedRealityService service, int facadeIndex) + { + ServiceFacade facade = null; + if (facadeIndex > parent.transform.childCount - 1) + { + GameObject facadeObject = new GameObject(); + facadeObject.transform.parent = parent; + facade = facadeObject.AddComponent(); + } + else + { + Transform child = parent.GetChild(facadeIndex); + facade = child.GetComponent(); + if (facade == null) + { + facade = child.gameObject.AddComponent(); + } + } + + if (facade.transform.hasChanged) + { + facade.transform.localPosition = Vector3.zero; + facade.transform.localRotation = Quaternion.identity; + facade.transform.localScale = Vector3.one; + facade.transform.hasChanged = false; + } + + facade.SetService(service, parent); + } + + private static void DestroyAllChildren(MixedRealityToolkit instance) + { + Transform instanceTransform = instance.transform; + + childrenToDelete.Clear(); + foreach (Transform child in instanceTransform.transform) + { + childrenToDelete.Add(child); + } + + foreach (ServiceFacade facade in ServiceFacade.ActiveFacadeObjects) + { + if (!childrenToDelete.Contains(facade.transform)) + childrenToDelete.Add(facade.transform); + } + + foreach (Transform child in childrenToDelete) + { + GameObject.DestroyImmediate(child.gameObject); + } + + childrenToDelete.Clear(); + servicesToSort.Clear(); + } + } +} diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs.meta b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs.meta similarity index 86% rename from Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs.meta rename to Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs.meta index 9f22de49437..d8202bcbed3 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Utilities/HandGestureRecorder.cs.meta +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitFacadeHandler.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d072578c4c2c6554d9423574626c2c7f +guid: 3e5187c03457caa448ff3226ff038bb8 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs index a26b57f4cd6..92ad7624027 100644 --- a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs @@ -22,6 +22,29 @@ private void OnEnable() public override void OnInspectorGUI() { + MixedRealityToolkit instance = (MixedRealityToolkit)target; + + if (MixedRealityToolkit.Instance == null) + { // See if an active instance exists at all. If it doesn't register this instance pre-emptively. + MixedRealityToolkit.SetActiveInstance(instance); + } + + if (!instance.IsActiveInstance) + { + EditorGUILayout.HelpBox("This instance of the toolkt is inactive. There can only be one active instance loaded at any time.", MessageType.Warning); + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Select Active Instance")) + { + UnityEditor.Selection.activeGameObject = MixedRealityToolkit.Instance.gameObject; + } + if (GUILayout.Button("Make this the Active Instance")) + { + MixedRealityToolkit.SetActiveInstance(instance); + } + EditorGUILayout.EndHorizontal(); + return; + } + serializedObject.Update(); EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(activeProfile); @@ -29,7 +52,7 @@ public override void OnInspectorGUI() string commandName = Event.current.commandName; var allConfigProfiles = ScriptableObjectExtensions.GetAllInstances(); - if (activeProfile.objectReferenceValue == null && currentPickerWindow == -1 && checkChange) + if (activeProfile.objectReferenceValue == null && currentPickerWindow == -1 && checkChange && !BuildPipeline.isBuildingPlayer) { if (allConfigProfiles.Length > 1) { @@ -97,10 +120,14 @@ public override void OnInspectorGUI() [MenuItem("Mixed Reality Toolkit/Add to Scene and Configure...")] public static void CreateMixedRealityToolkitGameObject() { - Selection.activeObject = MixedRealityToolkit.Instance; + if (MixedRealityToolkit.IsInitialized) + { + EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); + return; + } + + Selection.activeObject = new GameObject("MixedRealityToolkit").AddComponent(); Debug.Assert(MixedRealityToolkit.IsInitialized); - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - Debug.Assert(playspace != null); EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs index 183acd8bfc3..8c08abec5aa 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs @@ -4,8 +4,9 @@ using Microsoft.MixedReality.Toolkit.Utilities; using System; using System.Collections.Generic; -using System.Text; using System.Linq; +using System.Text; +using System.Threading.Tasks; using UnityEditor; using UnityEngine; @@ -20,9 +21,6 @@ public abstract class BaseMixedRealityProfileInspector : UnityEditor.Editor private static readonly GUIContent NewProfileContent = new GUIContent("+", "Create New Profile"); private static readonly String BaseMixedRealityProfileClassName = typeof(BaseMixedRealityProfile).Name; - private static BaseMixedRealityProfile profile; - private static SerializedObject targetProfile; - private static BaseMixedRealityProfile profileToCopy; private static StringBuilder dropdownKeyBuilder = new StringBuilder(); protected virtual void OnEnable() @@ -32,40 +30,70 @@ protected virtual void OnEnable() // Either when we are recompiling, or the inspector window is hidden behind another one, the target can get destroyed (null) and thereby will raise an ArgumentException when accessing serializedObject. For now, just return. return; } + } + + /// + /// Renders a non-editable object field and an editable dropdown of a profile. + /// + /// + /// + public static void RenderReadOnlyProfile(SerializedProperty property) + { + EditorGUILayout.BeginHorizontal(); + + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.ObjectField(property.objectReferenceValue != null ? "" : property.displayName, property.objectReferenceValue, typeof(BaseMixedRealityProfile), false, GUILayout.ExpandWidth(true)); + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.EndHorizontal(); + + if (property.objectReferenceValue != null) + { + UnityEditor.Editor subProfileEditor = UnityEditor.Editor.CreateEditor(property.objectReferenceValue); - targetProfile = serializedObject; - profile = target as BaseMixedRealityProfile; + // If this is a default MRTK configuration profile, ask it to render as a sub-profile + if (typeof(BaseMixedRealityToolkitConfigurationProfileInspector).IsAssignableFrom(subProfileEditor.GetType())) + { + BaseMixedRealityToolkitConfigurationProfileInspector configProfile = (BaseMixedRealityToolkitConfigurationProfileInspector)subProfileEditor; + configProfile.RenderAsSubProfile = true; + } + + EditorGUILayout.BeginHorizontal(); + EditorGUI.indentLevel++; + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + subProfileEditor.OnInspectorGUI(); + EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + EditorGUI.indentLevel--; + EditorGUILayout.EndHorizontal(); + } } /// /// Renders a . /// /// the property. - /// The GUIContent for the field. - /// Optional flag to hide the create button. + /// If true, draw the clone button, if false, don't + /// if true, render box around profile content, if false, don't + /// Optional service type to limit available profile types. /// True, if the profile changed. - protected static bool RenderProfile(SerializedProperty property, GUIContent guiContent, bool showAddButton = true, Type serviceType = null) + protected static bool RenderProfile(SerializedProperty property, bool showAddButton = true, bool renderProfileInBox = false, Type serviceType = null) { - return RenderProfileInternal(property, guiContent, showAddButton, serviceType); + return RenderProfileInternal(property, showAddButton, renderProfileInBox, serviceType); } /// /// Renders a . /// /// the property. - /// Optional flag to hide the create button. + /// If true, draw the clone button, if false, don't + /// if true, render box around profile content, if false, don't + /// Optional service type to limit available profile types. /// True, if the profile changed. - protected static bool RenderProfile(SerializedProperty property, bool showAddButton = true, Type serviceType = null) + private static bool RenderProfileInternal(SerializedProperty property, bool showAddButton, bool renderProfileInBox, Type serviceType = null) { - return RenderProfileInternal(property, null, showAddButton, serviceType); - } - - private static bool RenderProfileInternal(SerializedProperty property, GUIContent guiContent, bool showAddButton, Type serviceType = null) - { - profile = property.serializedObject.targetObject as BaseMixedRealityProfile; - + var profile = property.serializedObject.targetObject as BaseMixedRealityProfile; bool changed = false; - var oldObject = property.objectReferenceValue; // If we're constraining this to a service type, check whether the profile is valid @@ -78,77 +106,118 @@ private static bool RenderProfileInternal(SerializedProperty property, GUIConten } } - EditorGUILayout.BeginHorizontal(); - RenderProfileField(property, guiContent, GetProfileTypesForService(serviceType)); - if (property.objectReferenceValue == null) + // Find the profile type so we can limit the available object field options + Type profileType = null; + if (serviceType != null) { - var profileTypeName = property.type.Replace("PPtr<$", string.Empty).Replace(">", string.Empty); - if (showAddButton && IsConcreteProfileType(profileTypeName)) + // If GetProfileTypesForService has a count greater than one, then it won't be possible to use + // EditorGUILayout.ObjectField to restrict the set of profiles to a single type - in this + // case all profiles of BaseMixedRealityProfile will be visible in the picker. + // + // However in the case where there is just a single profile type for the service, we can improve + // upon the user experience by limiting the set of things that show in the picker by restricting + // the set of profiles listed to only that type. + profileType = GetProfileTypesForService(serviceType).FirstOrDefault(); + } + + // If the profile type is still null, just set it to base profile type + if (profileType == null) + { + profileType = typeof(BaseMixedRealityProfile); + } + + // Begin the horizontal group + EditorGUILayout.BeginHorizontal(); + + // Draw the object field with an empty label - label is kept in the foldout + property.objectReferenceValue = EditorGUILayout.ObjectField(oldObject != null ? "" : property.displayName, oldObject, profileType, false, GUILayout.ExpandWidth(true)); + changed = (property.objectReferenceValue != oldObject); + + // Draw the clone button + if (property.objectReferenceValue == null) { - if (GUILayout.Button(NewProfileContent, EditorStyles.miniButton, GUILayout.Width(20f))) + var profileTypeName = property.type.Replace("PPtr<$", string.Empty).Replace(">", string.Empty); + if (showAddButton && IsConcreteProfileType(profileTypeName)) { - Debug.Assert(profileTypeName != null, "No Type Found"); + if (GUILayout.Button(NewProfileContent, EditorStyles.miniButton, GUILayout.Width(20f))) + { + Debug.Assert(profileTypeName != null, "No Type Found"); - ScriptableObject instance = CreateInstance(profileTypeName); - var newProfile = instance.CreateAsset(AssetDatabase.GetAssetPath(Selection.activeObject)) as BaseMixedRealityProfile; - property.objectReferenceValue = newProfile; - property.serializedObject.ApplyModifiedProperties(); - changed = true; + ScriptableObject instance = CreateInstance(profileTypeName); + var newProfile = instance.CreateAsset(AssetDatabase.GetAssetPath(Selection.activeObject)) as BaseMixedRealityProfile; + property.objectReferenceValue = newProfile; + property.serializedObject.ApplyModifiedProperties(); + changed = true; + } } } - } - else - { - var renderedProfile = property.objectReferenceValue as BaseMixedRealityProfile; - Debug.Assert(renderedProfile != null); - Debug.Assert(profile != null, "No profile was set in OnEnable. Did you forget to call base.OnEnable in a derived profile class?"); - - if (GUILayout.Button(new GUIContent("Clone", "Replace with a copy of the default profile."), EditorStyles.miniButton, GUILayout.Width(42f))) + else { - MixedRealityProfileCloneWindow.OpenWindow(profile, renderedProfile, property); + var renderedProfile = property.objectReferenceValue as BaseMixedRealityProfile; + Debug.Assert(renderedProfile != null); + Debug.Assert(profile != null, "No profile was set in OnEnable. Did you forget to call base.OnEnable in a derived profile class?"); + + if (GUILayout.Button(new GUIContent("Clone", "Replace with a copy of the default profile."), EditorStyles.miniButton, GUILayout.Width(42f))) + { + MixedRealityProfileCloneWindow.OpenWindow(profile, renderedProfile, property); + } } - } EditorGUILayout.EndHorizontal(); - // Check fields within profile for other nested profiles - // Draw them when found if (property.objectReferenceValue != null) { - Type profileType = property.objectReferenceValue.GetType(); - if (typeof(BaseMixedRealityProfile).IsAssignableFrom(profileType)) + UnityEditor.Editor subProfileEditor = UnityEditor.Editor.CreateEditor(property.objectReferenceValue); + + // If this is a default MRTK configuration profile, ask it to render as a sub-profile + if (typeof(BaseMixedRealityToolkitConfigurationProfileInspector).IsAssignableFrom(subProfileEditor.GetType())) { - string showFoldoutKey = GetSubProfileDropdownKey(property); - bool showFoldout = SessionState.GetBool(showFoldoutKey, false); - showFoldout = EditorGUILayout.Foldout(showFoldout, showFoldout ? "Hide " + property.displayName + " contents" : "Show " + property.displayName + " contents", true); + BaseMixedRealityToolkitConfigurationProfileInspector configProfile = (BaseMixedRealityToolkitConfigurationProfileInspector)subProfileEditor; + configProfile.RenderAsSubProfile = true; + } - if (showFoldout) - { - UnityEditor.Editor subProfileEditor = UnityEditor.Editor.CreateEditor(property.objectReferenceValue); + var subProfile = property.objectReferenceValue as BaseMixedRealityProfile; + if (subProfile != null && !subProfile.IsCustomProfile) + { + EditorGUILayout.HelpBox("Clone this default profile to edit properties below", MessageType.Warning); + } - // If this is a default MRTK configuration profile, ask it to render as a sub-profile - if (typeof(BaseMixedRealityToolkitConfigurationProfileInspector).IsAssignableFrom(subProfileEditor.GetType())) - { - BaseMixedRealityToolkitConfigurationProfileInspector configProfile = (BaseMixedRealityToolkitConfigurationProfileInspector)subProfileEditor; - configProfile.RenderAsSubProfile = true; - } + if (renderProfileInBox) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + } + else + { + EditorGUILayout.BeginVertical(); + } - EditorGUI.indentLevel++; - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - subProfileEditor.OnInspectorGUI(); + EditorGUILayout.Space(); + subProfileEditor.OnInspectorGUI(); + EditorGUILayout.Space(); - EditorGUILayout.Space(); - EditorGUILayout.Space(); + EditorGUILayout.EndVertical(); + } - EditorGUILayout.EndVertical(); - EditorGUI.indentLevel--; - } + return changed; + } - SessionState.SetBool(showFoldoutKey, showFoldout); - } + /// + /// Render Bold/HelpBox style Foldout + /// + /// reference bool for current visibility state of foldout + /// Title in foldout + /// code to execute to render inside of foldout + protected static void RenderFoldout(ref bool currentState, string title, Action renderContent) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + currentState = EditorGUILayout.Foldout(currentState, title, true, MixedRealityStylesUtility.BoldFoldoutStyle); + if (currentState) + { + renderContent(); } - return changed; + EditorGUILayout.EndVertical(); } private static string GetSubProfileDropdownKey(SerializedProperty property) @@ -166,68 +235,36 @@ private static string GetSubProfileDropdownKey(SerializedProperty property) return dropdownKeyBuilder.ToString(); } - [MenuItem("CONTEXT/BaseMixedRealityProfile/Create Copy from Profile Values", false, 0)] - protected static async void CreateCopyProfileValues() + protected static BaseMixedRealityProfile CreateCustomProfile(BaseMixedRealityProfile sourceProfile) { - profileToCopy = profile; - ScriptableObject newProfile = CreateInstance(profile.GetType().ToString()); - profile = newProfile.CreateAsset("Assets/MixedRealityToolkit.Generated/CustomProfiles") as BaseMixedRealityProfile; - Debug.Assert(profile != null); + if (sourceProfile == null) + { + return null; + } - await new WaitUntil(() => profileToCopy != profile); + ScriptableObject newProfile = CreateInstance(sourceProfile.GetType().ToString()); + BaseMixedRealityProfile targetProfile = newProfile.CreateAsset("Assets/MixedRealityToolkit.Generated/CustomProfiles") as BaseMixedRealityProfile; + Debug.Assert(targetProfile != null); - Selection.activeObject = null; - PasteProfileValues(); - Selection.activeObject = profile; + EditorUtility.CopySerialized(sourceProfile, targetProfile); - if (!profileToCopy.IsCustomProfile) + var serializedProfile = new SerializedObject(targetProfile); + serializedProfile.FindProperty(IsCustomProfileProperty).boolValue = true; + serializedProfile.ApplyModifiedProperties(); + AssetDatabase.SaveAssets(); + + if (!sourceProfile.IsCustomProfile) { // For now we only replace it if it's the master configuration profile. // Sub-profiles are easy to update in the master configuration inspector. - if (MixedRealityToolkit.Instance.ActiveProfile.GetType() == profile.GetType()) + if (MixedRealityToolkit.Instance.ActiveProfile.GetType() == targetProfile.GetType()) { - MixedRealityToolkit.Instance.ActiveProfile = profile as MixedRealityToolkitConfigurationProfile; + UnityEditor.Undo.RecordObject(MixedRealityToolkit.Instance, "Copy & Customize Profile"); + MixedRealityToolkit.Instance.ActiveProfile = targetProfile as MixedRealityToolkitConfigurationProfile; } } - } - - [MenuItem("CONTEXT/BaseMixedRealityProfile/Copy Profile Values", false, 1)] - private static void CopyProfileValues() - { - profileToCopy = profile; - } - - [MenuItem("CONTEXT/BaseMixedRealityProfile/Paste Profile Values", true)] - private static bool PasteProfileValuesValidation() - { - return profile != null && - targetProfile != null && - profileToCopy != null && - targetProfile.FindProperty(IsCustomProfileProperty).boolValue && - profile.GetType() == profileToCopy.GetType(); - } - [MenuItem("CONTEXT/BaseMixedRealityProfile/Paste Profile Values", false, 2)] - private static void PasteProfileValues() - { - Undo.RecordObject(profile, "Paste Profile Values"); - bool targetIsCustom = targetProfile.FindProperty(IsCustomProfileProperty).boolValue; - string originalName = targetProfile.targetObject.name; - EditorUtility.CopySerialized(profileToCopy, targetProfile.targetObject); - targetProfile.Update(); - targetProfile.FindProperty(IsCustomProfileProperty).boolValue = targetIsCustom; - targetProfile.ApplyModifiedProperties(); - targetProfile.targetObject.name = originalName; - Debug.Assert(targetProfile.FindProperty(IsCustomProfileProperty).boolValue == targetIsCustom); - AssetDatabase.SaveAssets(); - } - - private static async void PasteProfileValuesDelay(BaseMixedRealityProfile newProfile) - { - await new WaitUntil(() => profile == newProfile); - Selection.activeObject = null; - PasteProfileValues(); - Selection.activeObject = newProfile; + return targetProfile; } /// @@ -274,48 +311,19 @@ private static bool IsProfileForService(Type profileType, Type serviceType) return false; } - /// - /// Renders the profile field, optionally restricting the set of selectable types based on the given - /// profileTypes parameter. - /// - /// - /// If profileTypes has a count greater than one, then it won't be possible to use - /// EditorGUILayout.ObjectField to restrict the set of profiles to a single type - in this - /// case all profiles of BaseMixedRealityProfile will be visible in the picker. - /// - /// However in the case where there is just a single profile type for the service, we can improve - /// upon the user experience by limiting the set of things that show in the picker by restricting - /// the set of profiles listed to only that type. - /// - private static void RenderProfileField(SerializedProperty property, GUIContent guiContent, IReadOnlyCollection profileTypes) + private static bool IsConcreteProfileType(String profileTypeName) { - if (profileTypes.Count == 1) - { - if (guiContent != null) - { - EditorGUILayout.ObjectField(property, profileTypes.Single(), guiContent); - } - else - { - EditorGUILayout.ObjectField(property, profileTypes.Single()); - } - } - else - { - if (guiContent != null) - { - EditorGUILayout.ObjectField(property, guiContent); - } - else - { - EditorGUILayout.ObjectField(property); - } - } + return profileTypeName != BaseMixedRealityProfileClassName; } - private static bool IsConcreteProfileType(String profileTypeName) + /// + /// Checks if the profile is locked + /// + /// + /// + protected static bool IsProfileLock(BaseMixedRealityProfile profile) { - return profileTypeName != BaseMixedRealityProfileClassName; + return MixedRealityPreferences.LockProfiles && !profile.IsCustomProfile; } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs index a08370e782b..491de893dfc 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System; using UnityEditor; using UnityEngine; using Object = UnityEngine.Object; @@ -21,6 +22,22 @@ public abstract class BaseMixedRealityToolkitConfigurationProfileInspector : Bas [SerializeField] private Texture2D logoDarkTheme = null; + [SerializeField] + private static Texture helpIcon = null; + + private static GUIContent WarningIconContent = null; + + /// + /// Internal enum used for back navigation along profile hiearchy. + /// Indicates what type of parent profile the current profile will return to for going back + /// + protected enum BackProfileType + { + Configuration, + Input, + RegisteredServices + }; + protected virtual void Awake() { string assetPath = "StandardAssets/Textures"; @@ -34,6 +51,17 @@ protected virtual void Awake() { logoDarkTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath($"{assetPath}/MRTK_Logo_White.png"), typeof(Texture2D)); } + + if (helpIcon == null) + { + helpIcon = EditorGUIUtility.IconContent("_Help").image; + } + + if (WarningIconContent == null) + { + WarningIconContent = new GUIContent(EditorGUIUtility.IconContent("console.warnicon").image, + "This profile is part of the default set from the Mixed Reality Toolkit SDK. You can make a copy of this profile, and customize it if needed."); + } } /// @@ -49,10 +77,34 @@ protected void RenderMixedRealityToolkitLogo() GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); - GUILayout.Label(EditorGUIUtility.isProSkin ? logoDarkTheme : logoLightTheme, GUILayout.MaxHeight(128f)); + GUILayout.Label(EditorGUIUtility.isProSkin ? logoDarkTheme : logoLightTheme, GUILayout.MaxHeight(96f)); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); - GUILayout.Space(12f); + GUILayout.Space(3f); + } + + + protected bool DrawBacktrackProfileButton(BackProfileType returnProfileTarget = BackProfileType.Configuration) + { + string backText = string.Empty; + BaseMixedRealityProfile backProfile = null; + switch (returnProfileTarget) + { + case BackProfileType.Configuration: + backText = "Back to Configuration Profile"; + backProfile = MixedRealityToolkit.Instance.ActiveProfile; + break; + case BackProfileType.Input: + backText = "Back to Input Profile"; + backProfile = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile; + break; + case BackProfileType.RegisteredServices: + backText = "Back to Registered Service Providers Profile"; + backProfile = MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile; + break; + } + + return DrawBacktrackProfileButton(backText, backProfile); } /// @@ -74,21 +126,77 @@ protected bool DrawBacktrackProfileButton(string message, UnityEngine.Object act Selection.activeObject = activeObject; return true; } + return false; } /// - /// Checks if the profile is locked and displays a warning. + /// Helper function to render buttons correctly indented according to EditorGUI.indentLevel since GUILayout component don't respond naturally /// - /// - /// - protected static void CheckProfileLock(Object target, bool lockProfile = true) + /// text to place in button + /// layout options + /// true if button clicked, false if otherwise + protected static bool RenderIndentedButton(string buttonText, params GUILayoutOption[] options) { - if (MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile) + return RenderIndentedButton(() => { return GUILayout.Button(buttonText, options); }); + } + + /// + /// Helper function to render buttons correctly indented according to EditorGUI.indentLevel since GUILayout component don't respond naturally + /// + /// What to draw in button + /// Style configuration for button + /// layout options + /// true if button clicked, false if otherwise + protected static bool RenderIndentedButton(GUIContent content, GUIStyle style, params GUILayoutOption[] options) + { + return RenderIndentedButton(() => { return GUILayout.Button(content, style, options); }); + } + + /// + /// Helper function to support primary overloaded version of this functionality + /// + /// The code to render button correctly based on parameter types passed + /// true if button clicked, false if otherwise + private static bool RenderIndentedButton(Func renderButton) + { + bool result = false; + GUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 15); + result = renderButton(); + GUILayout.EndHorizontal(); + return result; + } + + /// + /// Helper function to render header correctly for all profiles + /// + /// Title of profile + /// profile tooltip describing purpose + /// Text for back button if not rendering as sub-profile + /// Target profile to return to if not rendering as sub-profile + /// true to render rest of profile as-is or false if profile/MRTK is in a state to not render rest of profile contents + protected bool RenderProfileHeader(string title, string description, BackProfileType returnProfileTarget = BackProfileType.Configuration) + { + RenderMixedRealityToolkitLogo(); + + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { - EditorGUILayout.HelpBox("This profile is part of the default set from the Mixed Reality Toolkit SDK. You can make a copy of this profile, and customize it if needed.", MessageType.Warning); - GUI.enabled = !lockProfile; + return false; } + + if (DrawBacktrackProfileButton(returnProfileTarget)) + { + return false; + } + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(new GUIContent(title, description), EditorStyles.boldLabel, GUILayout.ExpandWidth(true)); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider); + + return true; } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs index 025d8bcbcba..aaddfec1620 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs @@ -12,35 +12,32 @@ namespace Microsoft.MixedReality.Toolkit.Boundary.Editor [CustomEditor(typeof(MixedRealityBoundaryVisualizationProfile))] public class MixedRealityBoundaryVisualizationProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector { - private static bool showGeneralProperties = true; private SerializedProperty boundaryHeight; - private static bool showFloorProperties = true; private SerializedProperty showFloor; private SerializedProperty floorMaterial; private SerializedProperty floorScale; private SerializedProperty floorPhysicsLayer; - private static bool showPlayAreaProperties = true; private SerializedProperty showPlayArea; private SerializedProperty playAreaMaterial; private SerializedProperty playAreaPhysicsLayer; - private static bool showTrackedAreaProperties = true; private SerializedProperty showTrackedArea; private SerializedProperty trackedAreaMaterial; private SerializedProperty trackedAreaPhysicsLayer; - private static bool showWallProperties = true; private SerializedProperty showBoundaryWalls; private SerializedProperty boundaryWallMaterial; private SerializedProperty boundaryWallsPhysicsLayer; - private static bool showCeilingProperties = true; private SerializedProperty showBoundaryCeiling; private SerializedProperty boundaryCeilingMaterial; private SerializedProperty ceilingPhysicsLayer; + private const string ProfileTitle = "Boundary Visualization Settings"; + private const string ProfileDescription = "Boundary visualizations can help users stay oriented and comfortable in the experience."; + private readonly GUIContent showContent = new GUIContent("Show"); private readonly GUIContent scaleContent = new GUIContent("Scale"); private readonly GUIContent materialContent = new GUIContent("Material"); @@ -49,11 +46,6 @@ protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - boundaryHeight = serializedObject.FindProperty("boundaryHeight"); showFloor = serializedObject.FindProperty("showFloor"); @@ -80,107 +72,68 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) - { - return; - } - - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Boundary Visualization Options", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Boundary visualizations can help users stay oriented and comfortable in the experience.", MessageType.Info); - // Boundary settings depend on the experience scale - if (MixedRealityToolkit.Instance.ActiveProfile.TargetExperienceScale != ExperienceScale.Room) - { - EditorGUILayout.Space(); - EditorGUILayout.HelpBox("Boundary visualization is only supported in Room scale experiences.", MessageType.Warning); - } - EditorGUILayout.Space(); - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); EditorGUILayout.Space(); - showGeneralProperties = EditorGUILayout.Foldout(showGeneralProperties, "General Settings", true); - if (showGeneralProperties) + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(boundaryHeight); - } + EditorGUILayout.PropertyField(boundaryHeight); } EditorGUILayout.Space(); - showFloorProperties = EditorGUILayout.Foldout(showFloorProperties, "Floor Settings", true); - if (showFloorProperties) + EditorGUILayout.LabelField("Floor Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(showFloor, showContent); - EditorGUILayout.PropertyField(floorMaterial, materialContent); - var prevWideMode = EditorGUIUtility.wideMode; - EditorGUIUtility.wideMode = true; - EditorGUILayout.PropertyField(floorScale, scaleContent, GUILayout.ExpandWidth(true)); - EditorGUIUtility.wideMode = prevWideMode; - EditorGUILayout.PropertyField(floorPhysicsLayer); - } + EditorGUILayout.PropertyField(showFloor, showContent); + EditorGUILayout.PropertyField(floorMaterial, materialContent); + var prevWideMode = EditorGUIUtility.wideMode; + EditorGUIUtility.wideMode = true; + EditorGUILayout.PropertyField(floorScale, scaleContent, GUILayout.ExpandWidth(true)); + EditorGUIUtility.wideMode = prevWideMode; + EditorGUILayout.PropertyField(floorPhysicsLayer); } EditorGUILayout.Space(); - showPlayAreaProperties = EditorGUILayout.Foldout(showPlayAreaProperties, "Play Area Settings", true); - if (showPlayAreaProperties) + EditorGUILayout.LabelField("Play Area Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(showPlayArea, showContent); - EditorGUILayout.PropertyField(playAreaMaterial, materialContent); - EditorGUILayout.PropertyField(playAreaPhysicsLayer); - } + EditorGUILayout.PropertyField(showPlayArea, showContent); + EditorGUILayout.PropertyField(playAreaMaterial, materialContent); + EditorGUILayout.PropertyField(playAreaPhysicsLayer); } EditorGUILayout.Space(); - showTrackedAreaProperties = EditorGUILayout.Foldout(showTrackedAreaProperties, "Tracked Area Settings", true); - if (showTrackedAreaProperties) + EditorGUILayout.LabelField("Tracked Area Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(showTrackedArea, showContent); - EditorGUILayout.PropertyField(trackedAreaMaterial, materialContent); - EditorGUILayout.PropertyField(trackedAreaPhysicsLayer); - } + EditorGUILayout.PropertyField(showTrackedArea, showContent); + EditorGUILayout.PropertyField(trackedAreaMaterial, materialContent); + EditorGUILayout.PropertyField(trackedAreaPhysicsLayer); } EditorGUILayout.Space(); - showWallProperties = EditorGUILayout.Foldout(showWallProperties, "Boundary Wall Settings", true); - if (showWallProperties) + EditorGUILayout.LabelField("Boundary Wall Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(showBoundaryWalls, showContent); - EditorGUILayout.PropertyField(boundaryWallMaterial, materialContent); - EditorGUILayout.PropertyField(boundaryWallsPhysicsLayer); - } + EditorGUILayout.PropertyField(showBoundaryWalls, showContent); + EditorGUILayout.PropertyField(boundaryWallMaterial, materialContent); + EditorGUILayout.PropertyField(boundaryWallsPhysicsLayer); } EditorGUILayout.Space(); - showCeilingProperties = EditorGUILayout.Foldout(showCeilingProperties, "Boundary Ceiling Settings", true); - if (showCeilingProperties) + EditorGUILayout.LabelField("Boundary Ceiling Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(showBoundaryCeiling, showContent); - EditorGUILayout.PropertyField(boundaryCeilingMaterial, materialContent); - EditorGUILayout.PropertyField(ceilingPhysicsLayer); - } + EditorGUILayout.PropertyField(showBoundaryCeiling, showContent); + EditorGUILayout.PropertyField(boundaryCeilingMaterial, materialContent); + EditorGUILayout.PropertyField(ceilingPhysicsLayer); } serializedObject.ApplyModifiedProperties(); + + GUI.enabled = wasGUIEnabled; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs index 1546235c994..8b5ce476f0c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs @@ -10,16 +10,11 @@ namespace Microsoft.MixedReality.Toolkit.Editor [CustomEditor(typeof(MixedRealityCameraProfile))] public class MixedRealityCameraProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector { - private static bool showGeneralProperties = true; - private SerializedProperty isCameraPersistent; - - private static bool showOpaqueProperties = true; private SerializedProperty opaqueNearClip; private SerializedProperty opaqueClearFlags; private SerializedProperty opaqueBackgroundColor; private SerializedProperty opaqueQualityLevel; - private static bool showTransparentProperties = true; private SerializedProperty transparentNearClip; private SerializedProperty transparentClearFlags; private SerializedProperty transparentBackgroundColor; @@ -28,16 +23,13 @@ public class MixedRealityCameraProfileInspector : BaseMixedRealityToolkitConfigu private readonly GUIContent nearClipTitle = new GUIContent("Near Clip"); private readonly GUIContent clearFlagsTitle = new GUIContent("Clear Flags"); + private const string ProfileTitle = "Camera Settings"; + private const string ProfileDescription = "The Camera Profile helps configure cross platform camera settings."; + protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - - isCameraPersistent = serializedObject.FindProperty("isCameraPersistent"); opaqueNearClip = serializedObject.FindProperty("nearClipPlaneOpaqueDisplay"); opaqueClearFlags = serializedObject.FindProperty("cameraClearFlagsOpaqueDisplay"); opaqueBackgroundColor = serializedObject.FindProperty("backgroundColorOpaqueDisplay"); @@ -51,72 +43,45 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) - { - return; - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Camera Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("The Camera Profile helps configure cross platform camera settings.", MessageType.Info); - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); EditorGUILayout.Space(); - showGeneralProperties = EditorGUILayout.Foldout(showGeneralProperties, "General Settings", true); - if (showGeneralProperties) + EditorGUILayout.LabelField("Opaque Display Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.PropertyField(opaqueNearClip, nearClipTitle); + EditorGUILayout.PropertyField(opaqueClearFlags, clearFlagsTitle); + + if ((CameraClearFlags)opaqueClearFlags.intValue == CameraClearFlags.Color) { - EditorGUILayout.PropertyField(isCameraPersistent); + opaqueBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", opaqueBackgroundColor.colorValue); } - } - - EditorGUILayout.Space(); - showOpaqueProperties = EditorGUILayout.Foldout(showOpaqueProperties, "Opaque Display Settings", true); - if (showOpaqueProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(opaqueNearClip, nearClipTitle); - EditorGUILayout.PropertyField(opaqueClearFlags, clearFlagsTitle); - if ((CameraClearFlags)opaqueClearFlags.intValue == CameraClearFlags.Color) - { - opaqueBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", opaqueBackgroundColor.colorValue); - } - - opaqueQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", opaqueQualityLevel.intValue, QualitySettings.names); - } + opaqueQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", opaqueQualityLevel.intValue, QualitySettings.names); } EditorGUILayout.Space(); - showTransparentProperties = EditorGUILayout.Foldout(showTransparentProperties, "Transparent Display Settings", true); - if (showTransparentProperties) + EditorGUILayout.LabelField("Transparent Display Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(transparentNearClip, nearClipTitle); - EditorGUILayout.PropertyField(transparentClearFlags, clearFlagsTitle); + EditorGUILayout.PropertyField(transparentNearClip, nearClipTitle); + EditorGUILayout.PropertyField(transparentClearFlags, clearFlagsTitle); - if ((CameraClearFlags)transparentClearFlags.intValue == CameraClearFlags.Color) - { - transparentBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", transparentBackgroundColor.colorValue); - } - - holoLensQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", holoLensQualityLevel.intValue, QualitySettings.names); + if ((CameraClearFlags)transparentClearFlags.intValue == CameraClearFlags.Color) + { + transparentBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", transparentBackgroundColor.colorValue); } + + holoLensQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", holoLensQualityLevel.intValue, QualitySettings.names); } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs index 5edd7edc89e..c9131befd0f 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs @@ -40,9 +40,33 @@ public ControllerRenderProfile(SupportedControllerType supportedControllerType, private float defaultLabelWidth; private float defaultFieldWidth; private GUIStyle controllerButtonStyle; + private static bool showControllerDefinitions = false; + + private const string ProfileTitle = "Controller Input Mapping Settings"; + private const string ProfileDescription = "Use this profile to define all the controllers and their inputs your users will be able to use in your application.\n\n" + + "You'll want to define all your Input Actions first. They can then be wired up to hardware sensors, controllers, gestures, and other input devices."; + private readonly List controllerRenderList = new List(); + protected override void Awake() + { + base.Awake(); + + if (controllerButtonStyle == null) + { + controllerButtonStyle = new GUIStyle("LargeButton") + { + imagePosition = ImagePosition.ImageAbove, + fontStyle = FontStyle.Bold, + stretchHeight = true, + stretchWidth = true, + wordWrap = true, + fontSize = 10, + }; + } + } + protected override void OnEnable() { base.OnEnable(); @@ -67,8 +91,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } @@ -76,57 +99,30 @@ public override void OnInspectorGUI() if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - - return; - } - - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) - { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Controller Input Mapping", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Use this profile to define all the controllers and their inputs your users will be able to use in your application.\n\n" + - "You'll want to define all your Input Actions first. They can then be wired up to hardware sensors, controllers, gestures, and other input devices.", MessageType.Info); - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { EditorGUILayout.HelpBox("No input actions found, please specify a input action profile in the main configuration.", MessageType.Error); return; } - CheckProfileLock(target); - - if (controllerButtonStyle == null) - { - controllerButtonStyle = new GUIStyle("LargeButton") - { - imagePosition = ImagePosition.ImageAbove, - fontStyle = FontStyle.Bold, - stretchHeight = true, - stretchWidth = true, - wordWrap = true, - fontSize = 10, - }; - } - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); RenderControllerList(mixedRealityControllerMappingProfiles); serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void RenderControllerList(SerializedProperty controllerList) { if (thisProfile.MixedRealityControllerMappingProfiles.Length != controllerList.arraySize) { return; } - EditorGUILayout.Space(); - - if (GUILayout.Button(ControllerAddButtonContent, EditorStyles.miniButton)) + if (RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) { AddController(controllerList, typeof(GenericJoystickController)); return; @@ -134,197 +130,186 @@ private void RenderControllerList(SerializedProperty controllerList) controllerRenderList.Clear(); - GUILayout.Space(12f); - - using (var outerVerticalScope = new GUILayout.VerticalScope()) + showControllerDefinitions = EditorGUILayout.Foldout(showControllerDefinitions, "Controller Definitions"); + if (showControllerDefinitions) { - GUILayout.HorizontalScope horizontalScope = null; - - for (int i = 0; i < thisProfile.MixedRealityControllerMappingProfiles.Length; i++) + using (var outerVerticalScope = new GUILayout.VerticalScope()) { - MixedRealityControllerMapping controllerMapping = thisProfile.MixedRealityControllerMappingProfiles[i]; - Type controllerType = controllerMapping.ControllerType; - if (controllerType == null) { continue; } + GUILayout.HorizontalScope horizontalScope = null; - Handedness handedness = controllerMapping.Handedness; - bool useCustomInteractionMappings = controllerMapping.HasCustomInteractionMappings; - SupportedControllerType supportedControllerType = controllerMapping.SupportedControllerType; + for (int i = 0; i < thisProfile.MixedRealityControllerMappingProfiles.Length; i++) + { + MixedRealityControllerMapping controllerMapping = thisProfile.MixedRealityControllerMappingProfiles[i]; + Type controllerType = controllerMapping.ControllerType; + if (controllerType == null) { continue; } - var controllerMappingProperty = controllerList.GetArrayElementAtIndex(i); - var handednessProperty = controllerMappingProperty.FindPropertyRelative("handedness"); + Handedness handedness = controllerMapping.Handedness; + bool useCustomInteractionMappings = controllerMapping.HasCustomInteractionMappings; + SupportedControllerType supportedControllerType = controllerMapping.SupportedControllerType; - if (!useCustomInteractionMappings) - { - bool skip = false; + var controllerMappingProperty = controllerList.GetArrayElementAtIndex(i); + var handednessProperty = controllerMappingProperty.FindPropertyRelative("handedness"); - // Merge controllers with the same supported controller type. - for (int j = 0; j < controllerRenderList.Count; j++) + if (!useCustomInteractionMappings) { - if (controllerRenderList[j].SupportedControllerType == supportedControllerType && - controllerRenderList[j].Handedness == handedness) + bool skip = false; + + // Merge controllers with the same supported controller type. + for (int j = 0; j < controllerRenderList.Count; j++) { - try - { - thisProfile.MixedRealityControllerMappingProfiles[i].SynchronizeInputActions(controllerRenderList[j].Interactions); - } - catch (ArgumentException e) + if (controllerRenderList[j].SupportedControllerType == supportedControllerType && + controllerRenderList[j].Handedness == handedness) { - Debug.LogError($"Controller mappings between {thisProfile.MixedRealityControllerMappingProfiles[i].Description} and {controllerMapping.Description} do not match. Error message: {e.Message}"); + try + { + thisProfile.MixedRealityControllerMappingProfiles[i].SynchronizeInputActions(controllerRenderList[j].Interactions); + } + catch (ArgumentException e) + { + Debug.LogError($"Controller mappings between {thisProfile.MixedRealityControllerMappingProfiles[i].Description} and {controllerMapping.Description} do not match. Error message: {e.Message}"); + } + serializedObject.ApplyModifiedProperties(); + skip = true; } - serializedObject.ApplyModifiedProperties(); - skip = true; } - } - - if (skip) { continue; } - } - controllerRenderList.Add(new ControllerRenderProfile(supportedControllerType, handedness, thisProfile.MixedRealityControllerMappingProfiles[i].Interactions)); - - string controllerTitle = thisProfile.MixedRealityControllerMappingProfiles[i].Description; - var interactionsProperty = controllerMappingProperty.FindPropertyRelative("interactions"); + if (skip) { continue; } + } - if (useCustomInteractionMappings) - { - if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } + controllerRenderList.Add(new ControllerRenderProfile(supportedControllerType, handedness, thisProfile.MixedRealityControllerMappingProfiles[i].Interactions)); - GUILayout.Space(24f); + string controllerTitle = thisProfile.MixedRealityControllerMappingProfiles[i].Description; + var interactionsProperty = controllerMappingProperty.FindPropertyRelative("interactions"); - using (var verticalScope = new GUILayout.VerticalScope()) + if (useCustomInteractionMappings) { - using (horizontalScope = new GUILayout.HorizontalScope()) - { - EditorGUIUtility.labelWidth = 64f; - EditorGUIUtility.fieldWidth = 64f; - EditorGUILayout.LabelField(controllerTitle); - EditorGUIUtility.fieldWidth = defaultFieldWidth; - EditorGUIUtility.labelWidth = defaultLabelWidth; - - if (GUILayout.Button(ControllerMinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) - { - controllerList.DeleteArrayElementAtIndex(i); - return; - } - } - EditorGUI.indentLevel++; - - EditorGUIUtility.labelWidth = 128f; - EditorGUIUtility.fieldWidth = 64f; + if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } - EditorGUI.BeginChangeCheck(); + GUILayout.Space(24f); - // Generic Type dropdown - Type[] genericTypes = MixedRealityControllerMappingProfile.CustomControllerMappingTypes; - var genericTypeListContent = new GUIContent[genericTypes.Length]; - var genericTypeListIds = new int[genericTypes.Length]; - int currentGenericType = -1; - for (int genericTypeIdx = 0; genericTypeIdx < genericTypes.Length; genericTypeIdx++) + using (var verticalScope = new GUILayout.VerticalScope()) { - var attribute = MixedRealityControllerAttribute.Find(genericTypes[genericTypeIdx]); - if (attribute != null) - { - genericTypeListContent[genericTypeIdx] = new GUIContent(attribute.SupportedControllerType.ToString().Replace("Generic", "").ToProperCase() + " Controller"); - } - else + using (horizontalScope = new GUILayout.HorizontalScope()) { - genericTypeListContent[genericTypeIdx] = new GUIContent("Unknown Controller"); + EditorGUILayout.LabelField(controllerTitle, EditorStyles.boldLabel); + + if (GUILayout.Button(ControllerMinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + { + controllerList.DeleteArrayElementAtIndex(i); + return; + } } - genericTypeListIds[genericTypeIdx] = genericTypeIdx; + EditorGUI.BeginChangeCheck(); - if (controllerType == genericTypes[genericTypeIdx]) + // Generic Type dropdown + Type[] genericTypes = MixedRealityControllerMappingProfile.CustomControllerMappingTypes; + var genericTypeListContent = new GUIContent[genericTypes.Length]; + var genericTypeListIds = new int[genericTypes.Length]; + int currentGenericType = -1; + for (int genericTypeIdx = 0; genericTypeIdx < genericTypes.Length; genericTypeIdx++) { - currentGenericType = genericTypeIdx; - } - } - Debug.Assert(currentGenericType != -1); + var attribute = MixedRealityControllerAttribute.Find(genericTypes[genericTypeIdx]); + if (attribute != null) + { + genericTypeListContent[genericTypeIdx] = new GUIContent(attribute.SupportedControllerType.ToString().Replace("Generic", "").ToProperCase() + " Controller"); + } + else + { + genericTypeListContent[genericTypeIdx] = new GUIContent("Unknown Controller"); + } - currentGenericType = EditorGUILayout.IntPopup(GenericTypeContent, currentGenericType, genericTypeListContent, genericTypeListIds); - controllerType = genericTypes[currentGenericType]; + genericTypeListIds[genericTypeIdx] = genericTypeIdx; - { - // Handedness dropdown - var attribute = MixedRealityControllerAttribute.Find(controllerType); - if (attribute != null && attribute.SupportedHandedness.Length >= 1) - { - // Make sure handedness is valid for the selected controller type. - if (Array.IndexOf(attribute.SupportedHandedness, (Handedness)handednessProperty.intValue) < 0) + if (controllerType == genericTypes[genericTypeIdx]) { - handednessProperty.intValue = (int)attribute.SupportedHandedness[0]; + currentGenericType = genericTypeIdx; } + } + Debug.Assert(currentGenericType != -1); + + currentGenericType = EditorGUILayout.IntPopup(GenericTypeContent, currentGenericType, genericTypeListContent, genericTypeListIds); + controllerType = genericTypes[currentGenericType]; - if (attribute.SupportedHandedness.Length >= 2) + { + // Handedness dropdown + var attribute = MixedRealityControllerAttribute.Find(controllerType); + if (attribute != null && attribute.SupportedHandedness.Length >= 1) { - var handednessListContent = new GUIContent[attribute.SupportedHandedness.Length]; - var handednessListIds = new int[attribute.SupportedHandedness.Length]; - for (int handednessIdx = 0; handednessIdx < attribute.SupportedHandedness.Length; handednessIdx++) + // Make sure handedness is valid for the selected controller type. + if (Array.IndexOf(attribute.SupportedHandedness, (Handedness)handednessProperty.intValue) < 0) { - handednessListContent[handednessIdx] = new GUIContent(attribute.SupportedHandedness[handednessIdx].ToString()); - handednessListIds[handednessIdx] = (int)attribute.SupportedHandedness[handednessIdx]; + handednessProperty.intValue = (int)attribute.SupportedHandedness[0]; } - handednessProperty.intValue = EditorGUILayout.IntPopup(HandednessTypeContent, handednessProperty.intValue, handednessListContent, handednessListIds); + if (attribute.SupportedHandedness.Length >= 2) + { + var handednessListContent = new GUIContent[attribute.SupportedHandedness.Length]; + var handednessListIds = new int[attribute.SupportedHandedness.Length]; + for (int handednessIdx = 0; handednessIdx < attribute.SupportedHandedness.Length; handednessIdx++) + { + handednessListContent[handednessIdx] = new GUIContent(attribute.SupportedHandedness[handednessIdx].ToString()); + handednessListIds[handednessIdx] = (int)attribute.SupportedHandedness[handednessIdx]; + } + + handednessProperty.intValue = EditorGUILayout.IntPopup(HandednessTypeContent, handednessProperty.intValue, handednessListContent, handednessListIds); + } + } + else + { + handednessProperty.intValue = (int)Handedness.None; } } - else + + if (EditorGUI.EndChangeCheck()) { - handednessProperty.intValue = (int)Handedness.None; + interactionsProperty.ClearArray(); + serializedObject.ApplyModifiedProperties(); + thisProfile.MixedRealityControllerMappingProfiles[i].ControllerType.Type = genericTypes[currentGenericType]; + thisProfile.MixedRealityControllerMappingProfiles[i].SetDefaultInteractionMapping(true); + serializedObject.ApplyModifiedProperties(); + return; } - } - if (EditorGUI.EndChangeCheck()) + if (RenderIndentedButton("Edit Input Action Map")) + { + ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); + } + + if (RenderIndentedButton("Reset Input Actions")) + { + interactionsProperty.ClearArray(); + serializedObject.ApplyModifiedProperties(); + thisProfile.MixedRealityControllerMappingProfiles[i].SetDefaultInteractionMapping(true); + serializedObject.ApplyModifiedProperties(); + } + } + } + else + { + if (supportedControllerType == SupportedControllerType.WindowsMixedReality && + handedness == Handedness.None) { - interactionsProperty.ClearArray(); - serializedObject.ApplyModifiedProperties(); - thisProfile.MixedRealityControllerMappingProfiles[i].ControllerType.Type = genericTypes[currentGenericType]; - thisProfile.MixedRealityControllerMappingProfiles[i].SetDefaultInteractionMapping(true); - serializedObject.ApplyModifiedProperties(); - return; + controllerTitle = "HoloLens Voice and Clicker"; } - EditorGUIUtility.labelWidth = defaultLabelWidth; - EditorGUIUtility.fieldWidth = defaultFieldWidth; - - EditorGUI.indentLevel--; - - if (GUILayout.Button("Edit Input Action Map")) + if (handedness != Handedness.Right) { - ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); + if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } + horizontalScope = new GUILayout.HorizontalScope(); } - if (GUILayout.Button("Reset Input Actions")) + var buttonContent = new GUIContent(controllerTitle, ControllerMappingLibrary.GetControllerTextureScaled(controllerType, handedness)); + + if (GUILayout.Button(buttonContent, controllerButtonStyle, GUILayout.Height(128f), GUILayout.MinWidth(32f), GUILayout.ExpandWidth(true))) { - interactionsProperty.ClearArray(); - serializedObject.ApplyModifiedProperties(); - thisProfile.MixedRealityControllerMappingProfiles[i].SetDefaultInteractionMapping(true); - serializedObject.ApplyModifiedProperties(); + ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); } } } - else - { - if (supportedControllerType == SupportedControllerType.WindowsMixedReality && - handedness == Handedness.None) - { - controllerTitle = "HoloLens Voice and Clicker"; - } - - if (handedness != Handedness.Right) - { - if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } - horizontalScope = new GUILayout.HorizontalScope(); - } - var buttonContent = new GUIContent(controllerTitle, ControllerMappingLibrary.GetControllerTextureScaled(controllerType, handedness)); - - if (GUILayout.Button(buttonContent, controllerButtonStyle, GUILayout.Height(128f), GUILayout.MinWidth(32f), GUILayout.ExpandWidth(true))) - { - ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); - } - } + if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } } - - if (horizontalScope != null) { horizontalScope.Dispose(); horizontalScope = null; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs index 594101dae45..87402960f7f 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs @@ -22,11 +22,9 @@ public class MixedRealityControllerVisualizationProfileInspector : BaseMixedReal new GUIContent("Right Hand"), }; - private static bool showVisualizationProperties = true; private SerializedProperty renderMotionControllers; private SerializedProperty defaultControllerVisualizationType; - private static bool showModelProperties = true; private SerializedProperty useDefaultModels; private SerializedProperty globalLeftHandedControllerModel; private SerializedProperty globalRightHandedControllerModel; @@ -41,6 +39,10 @@ public class MixedRealityControllerVisualizationProfileInspector : BaseMixedReal private float defaultLabelWidth; private float defaultFieldWidth; + private const string ProfileTitle = "Controller Visualization Settings"; + private const string ProfileDescription = "Define all the custom controller visualizations you'd like to use for each controller type when they're rendered in the scene.\n\n" + + "Global settings are the default fallback, and any specific controller definitions take precedence."; + protected override void OnEnable() { base.OnEnable(); @@ -48,11 +50,6 @@ protected override void OnEnable() defaultLabelWidth = EditorGUIUtility.labelWidth; defaultFieldWidth = EditorGUIUtility.fieldWidth; - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - thisProfile = target as MixedRealityControllerVisualizationProfile; renderMotionControllers = serializedObject.FindProperty("renderMotionControllers"); @@ -67,8 +64,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } @@ -76,42 +72,29 @@ public override void OnInspectorGUI() if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - return; } - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) + if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { + EditorGUILayout.HelpBox("No input actions found, please specify a input action profile in the main configuration.", MessageType.Error); return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Controller Visualizations", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Define all the custom controller visualizations you'd like to use for each controller type when they're rendered in the scene.\n\n" + - "Global settings are the default fallback, and any specific controller definitions take precedence.", MessageType.Info); + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); - CheckProfileLock(target); - - EditorGUIUtility.labelWidth = 168f; - - EditorGUILayout.Space(); - showVisualizationProperties = EditorGUILayout.Foldout(showVisualizationProperties, "Visualization Settings", true); - if (showVisualizationProperties) + EditorGUILayout.LabelField("Visualization Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(renderMotionControllers); + EditorGUILayout.PropertyField(renderMotionControllers); - EditorGUILayout.PropertyField(defaultControllerVisualizationType); + EditorGUILayout.PropertyField(defaultControllerVisualizationType); - if (thisProfile.DefaultControllerVisualizationType == null || - thisProfile.DefaultControllerVisualizationType.Type == null) - { - EditorGUILayout.HelpBox("A default controller visualization type must be defined!", MessageType.Error); - } + if (thisProfile.DefaultControllerVisualizationType == null || + thisProfile.DefaultControllerVisualizationType.Type == null) + { + EditorGUILayout.HelpBox("A default controller visualization type must be defined!", MessageType.Error); } } @@ -119,37 +102,33 @@ public override void OnInspectorGUI() var rightHandModelPrefab = globalRightHandedControllerModel.objectReferenceValue as GameObject; EditorGUILayout.Space(); - showModelProperties = EditorGUILayout.Foldout(showModelProperties, "Controller Model Settings", true); - if (showModelProperties) + EditorGUILayout.LabelField("Controller Model Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(useDefaultModels); + EditorGUILayout.PropertyField(useDefaultModels); - if (useDefaultModels.boolValue && (leftHandModelPrefab != null || rightHandModelPrefab != null)) - { - EditorGUILayout.HelpBox("When default models are used, an attempt is made to obtain controller models from the platform sdk. The global left and right models are only shown if no model can be obtained.", MessageType.Warning); - } - - EditorGUI.BeginChangeCheck(); - leftHandModelPrefab = EditorGUILayout.ObjectField(new GUIContent(globalLeftHandedControllerModel.displayName, "Note: If the default model is not found, the fallback is the global left hand model."), leftHandModelPrefab, typeof(GameObject), false) as GameObject; + if (useDefaultModels.boolValue && (leftHandModelPrefab != null || rightHandModelPrefab != null)) + { + EditorGUILayout.HelpBox("When default models are used, an attempt is made to obtain controller models from the platform sdk. The global left and right models are only shown if no model can be obtained.", MessageType.Warning); + } - if (EditorGUI.EndChangeCheck() && CheckVisualizer(leftHandModelPrefab)) - { - globalLeftHandedControllerModel.objectReferenceValue = leftHandModelPrefab; - } + EditorGUI.BeginChangeCheck(); + leftHandModelPrefab = EditorGUILayout.ObjectField(new GUIContent(globalLeftHandedControllerModel.displayName, "Note: If the default model is not found, the fallback is the global left hand model."), leftHandModelPrefab, typeof(GameObject), false) as GameObject; - EditorGUI.BeginChangeCheck(); - rightHandModelPrefab = EditorGUILayout.ObjectField(new GUIContent(globalRightHandedControllerModel.displayName, "Note: If the default model is not found, the fallback is the global right hand model."), rightHandModelPrefab, typeof(GameObject), false) as GameObject; + if (EditorGUI.EndChangeCheck() && CheckVisualizer(leftHandModelPrefab)) + { + globalLeftHandedControllerModel.objectReferenceValue = leftHandModelPrefab; + } - if (EditorGUI.EndChangeCheck() && CheckVisualizer(rightHandModelPrefab)) - { - globalRightHandedControllerModel.objectReferenceValue = rightHandModelPrefab; - } + EditorGUI.BeginChangeCheck(); + rightHandModelPrefab = EditorGUILayout.ObjectField(new GUIContent(globalRightHandedControllerModel.displayName, "Note: If the default model is not found, the fallback is the global right hand model."), rightHandModelPrefab, typeof(GameObject), false) as GameObject; - EditorGUILayout.PropertyField(globalLeftHandModel); - EditorGUILayout.PropertyField(globalRightHandModel); + if (EditorGUI.EndChangeCheck() && CheckVisualizer(rightHandModelPrefab)) + { + globalRightHandedControllerModel.objectReferenceValue = rightHandModelPrefab; } + + EditorGUILayout.PropertyField(globalLeftHandModel); + EditorGUILayout.PropertyField(globalRightHandModel); } EditorGUIUtility.labelWidth = defaultLabelWidth; @@ -165,6 +144,7 @@ public override void OnInspectorGUI() } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void RenderControllerList(SerializedProperty controllerList) @@ -173,7 +153,7 @@ private void RenderControllerList(SerializedProperty controllerList) EditorGUILayout.Space(); - if (GUILayout.Button(ControllerAddButtonContent, EditorStyles.miniButton)) + if (RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) { controllerList.InsertArrayElementAtIndex(controllerList.arraySize); var index = controllerList.arraySize - 1; @@ -192,8 +172,6 @@ private void RenderControllerList(SerializedProperty controllerList) EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); - EditorGUIUtility.labelWidth = 64f; - EditorGUIUtility.fieldWidth = 64f; var controllerSetting = controllerList.GetArrayElementAtIndex(i); var mixedRealityControllerMappingDescription = controllerSetting.FindPropertyRelative("description"); bool hasValidType = thisProfile.ControllerVisualizationSettings[i].ControllerType != null && @@ -205,10 +183,7 @@ private void RenderControllerList(SerializedProperty controllerList) serializedObject.ApplyModifiedProperties(); var mixedRealityControllerHandedness = controllerSetting.FindPropertyRelative("handedness"); - EditorGUILayout.LabelField($"{mixedRealityControllerMappingDescription.stringValue} {((Handedness)mixedRealityControllerHandedness.intValue).ToString().ToProperCase()} Hand"); - - EditorGUIUtility.fieldWidth = defaultFieldWidth; - EditorGUIUtility.labelWidth = defaultLabelWidth; + EditorGUILayout.LabelField($"{mixedRealityControllerMappingDescription.stringValue} {((Handedness)mixedRealityControllerHandedness.intValue).ToString().ToProperCase()} Hand", EditorStyles.boldLabel); if (GUILayout.Button(ControllerMinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) { @@ -220,8 +195,6 @@ private void RenderControllerList(SerializedProperty controllerList) EditorGUILayout.EndHorizontal(); - EditorGUI.indentLevel++; - EditorGUILayout.PropertyField(controllerSetting.FindPropertyRelative("controllerType")); EditorGUILayout.PropertyField(controllerSetting.FindPropertyRelative("controllerVisualizationType")); @@ -261,8 +234,6 @@ private void RenderControllerList(SerializedProperty controllerList) { overrideModel.objectReferenceValue = overrideModelPrefab; } - - EditorGUI.indentLevel--; } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs index e87db151625..57ce9a6cab5 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs @@ -4,22 +4,28 @@ using Microsoft.MixedReality.Toolkit.Editor; using Microsoft.MixedReality.Toolkit.Utilities.Editor; using UnityEditor; +using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Diagnostics.Editor { [CustomEditor(typeof(MixedRealityDiagnosticsProfile))] public class MixedRealityDiagnosticsSystemProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector { - private static bool showGeneralSettings = true; private SerializedProperty showDiagnostics; private static bool showProfilerSettings = true; private SerializedProperty showProfiler; + private SerializedProperty showFrameInfo; + private SerializedProperty showMemoryStats; private SerializedProperty frameSampleRate; private SerializedProperty windowAnchor; private SerializedProperty windowOffset; private SerializedProperty windowScale; private SerializedProperty windowFollowSpeed; + private SerializedProperty defaultInstancedMaterial; + + private const string ProfileTitle = "Diagnostic Settings"; + private const string ProfileDescription = "Diagnostic visualizations can help monitor system resources and performance inside an application."; // todo: coming soon // private static bool showDebugPanelSettings = true; @@ -29,54 +35,38 @@ protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - showDiagnostics = serializedObject.FindProperty("showDiagnostics"); showProfiler = serializedObject.FindProperty("showProfiler"); + showFrameInfo = serializedObject.FindProperty("showFrameInfo"); + showMemoryStats = serializedObject.FindProperty("showMemoryStats"); frameSampleRate = serializedObject.FindProperty("frameSampleRate"); windowAnchor = serializedObject.FindProperty("windowAnchor"); windowOffset = serializedObject.FindProperty("windowOffset"); windowScale = serializedObject.FindProperty("windowScale"); windowFollowSpeed = serializedObject.FindProperty("windowFollowSpeed"); + defaultInstancedMaterial = serializedObject.FindProperty("defaultInstancedMaterial"); } public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) - { - return; - } - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); EditorGUILayout.Space(); - EditorGUILayout.LabelField("Diagnostic Visualization Options", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Diagnostic visualizations can help monitor system resources and performance inside an application.", MessageType.Info); - - EditorGUILayout.Space(); - showGeneralSettings = EditorGUILayout.Foldout(showGeneralSettings, "General Settings", true); - if (showGeneralSettings) + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.PropertyField(showDiagnostics); + if(!showDiagnostics.boolValue) { - EditorGUILayout.PropertyField(showDiagnostics); - if(!showDiagnostics.boolValue) - { - EditorGUILayout.Space(); - EditorGUILayout.HelpBox("Diagnostic visualizations have been globally disabled.", MessageType.Info); - EditorGUILayout.Space(); - } + EditorGUILayout.Space(); + EditorGUILayout.HelpBox("Diagnostic visualizations have been globally disabled.", MessageType.Info); + EditorGUILayout.Space(); } } @@ -87,15 +77,19 @@ public override void OnInspectorGUI() using (new EditorGUI.IndentLevelScope()) { EditorGUILayout.PropertyField(showProfiler); + EditorGUILayout.PropertyField(showFrameInfo); + EditorGUILayout.PropertyField(showMemoryStats); EditorGUILayout.PropertyField(frameSampleRate); EditorGUILayout.PropertyField(windowAnchor); EditorGUILayout.PropertyField(windowOffset); EditorGUILayout.PropertyField(windowScale); EditorGUILayout.PropertyField(windowFollowSpeed); + EditorGUILayout.PropertyField(defaultInstancedMaterial); } } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs index 95c50105898..a8f4074b5f1 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs @@ -14,6 +14,8 @@ public class MixedRealityEyeTrackingProfileInspector : BaseMixedRealityToolkitCo { private SerializedProperty smoothEyeTracking; + private const string ProfileTitle = "Eye tracking Settings"; + protected override void OnEnable() { base.OnEnable(); @@ -25,26 +27,19 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (GUILayout.Button("Back to Registered Service Providers Profile")) + if (!RenderProfileHeader(ProfileTitle, string.Empty, BackProfileType.RegisteredServices)) { - Selection.activeObject = MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile; + return; } - EditorGUILayout.Space(); - - EditorGUILayout.LabelField("Eye tracking settings", EditorStyles.boldLabel); - CheckProfileLock(target); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } serializedObject.Update(); - GUILayout.Space(12f); + EditorGUILayout.Space(); EditorGUILayout.LabelField("General settings", EditorStyles.boldLabel); EditorGUILayout.PropertyField(smoothEyeTracking); serializedObject.ApplyModifiedProperties(); + GUI.enabled = true; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs index b3398f89e04..5fbb0101dfd 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs @@ -20,6 +20,10 @@ public class MixedRealityGesturesProfileInspector : BaseMixedRealityToolkitConfi private static readonly GUIContent GestureTypeContent = new GUIContent("Gesture Type", "The type of Gesture that will trigger the action."); private static readonly GUIContent ActionContent = new GUIContent("Action", "The action to trigger when a Gesture is recognized."); + private const string ProfileTitle = "Gesture Settings"; + private const string ProfileDescription = "This gesture map is any and all movements of part the user's body, especially a hand or the head, that raise actions through the input system.\n\n" + + "Note: Defined controllers can look up the list of gestures and raise the events based on specific criteria."; + private SerializedProperty gestures; private SerializedProperty windowsManipulationGestureSettings; private SerializedProperty useRailsNavigation; @@ -86,37 +90,27 @@ private void UpdateGestureLabels() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } - - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - return; } - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) + if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { + EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Gesture Input", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("This gesture map is any and all movements of part the user's body, especially a hand or the head, that raise actions through the input system.\n\nNote: Defined controllers can look up the list of gestures and raise the events based on specific criteria.", MessageType.Info); - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { EditorGUILayout.HelpBox("No input actions found, please specify a input action profile in the main configuration.", MessageType.Error); return; } - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); + EditorGUILayout.Space(); EditorGUILayout.LabelField("Windows Gesture Settings", EditorStyles.boldLabel); EditorGUILayout.PropertyField(windowsManipulationGestureSettings); @@ -127,8 +121,11 @@ public override void OnInspectorGUI() EditorGUILayout.Space(); EditorGUILayout.LabelField("Defined Recognizable Gestures", EditorStyles.boldLabel); + RenderList(gestures); + serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void RenderList(SerializedProperty list) @@ -136,7 +133,7 @@ private void RenderList(SerializedProperty list) EditorGUILayout.Space(); GUILayout.BeginVertical(); - if (GUILayout.Button(AddButtonContent, EditorStyles.miniButton)) + if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) { list.arraySize += 1; var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); @@ -153,8 +150,6 @@ private void RenderList(SerializedProperty list) actionConstraint.intValue = 0; } - GUILayout.Space(12f); - if (list == null || list.arraySize == 0) { EditorGUILayout.HelpBox("Define a new Gesture.", MessageType.Warning); diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs index 5280e2caf78..ebe386e8e71 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs @@ -19,12 +19,13 @@ public class MixedRealityHandTrackingProfileInspector : BaseMixedRealityToolkitC private SerializedProperty enableHandMeshVisualization; private SerializedProperty enableHandJointVisualization; + private const string ProfileTitle = "Hand Tracking Settings"; + private const string ProfileDescription = "Use this for platform-specific hand tracking settings."; + protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } - jointPrefab = serializedObject.FindProperty("jointPrefab"); fingertipPrefab = serializedObject.FindProperty("fingertipPrefab"); palmPrefab = serializedObject.FindProperty("palmPrefab"); @@ -35,23 +36,21 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (GUILayout.Button("Back to Input Profile")) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { - Selection.activeObject = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile; + return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Hand tracking settings", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Use this for platform-specific hand tracking settings.", MessageType.Info); - CheckProfileLock(target); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } + if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + { + EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); + return; + } + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); - GUILayout.Space(12f); EditorGUILayout.LabelField("General settings", EditorStyles.boldLabel); EditorGUILayout.PropertyField(jointPrefab); EditorGUILayout.PropertyField(palmPrefab); @@ -61,6 +60,7 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(enableHandJointVisualization); serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs index fa5c75982c9..109c7daa431 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs @@ -19,6 +19,11 @@ public class MixedRealityInputActionRulesInspector : BaseMixedRealityToolkitConf private static readonly GUIContent RuleActionContent = new GUIContent("Rule Input Action:", "The Action that will be raised when the criteria is met"); private static readonly GUIContent CriteriaContent = new GUIContent("Action Criteria:", "The Criteria that must be met in order to raise the new Action"); + private const string ProfileTitle = "Input Action Rule Settings"; + private const string ProfileDescription = "Input Action Rules help define alternative Actions that will be raised based on specific criteria.\n\n" + + "You can create new rules by assigning a base Input Action below, then assigning the criteria you'd like to meet. When the criteria is met, the Rule's Action will be raised with the criteria value.\n\n" + + "Note: Rules can only be created for the same axis constraints."; + private SerializedProperty inputActionRulesDigital; private SerializedProperty inputActionRulesSingleAxis; private SerializedProperty inputActionRulesDualAxis; @@ -88,9 +93,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } @@ -98,39 +101,18 @@ public override void OnInspectorGUI() if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - return; } if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { EditorGUILayout.HelpBox("No Input Actions profile was specified.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile); - return; } - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) - { - return; - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Input Action Rules Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Input Action Rules help define alternative Actions that will be raised based on specific criteria.\n\n" + - "You can create new rules by assigning a base Input Action below, then assigning the criteria you'd like to meet. When the criteria is met, the Rule's Action will be raised with the criteria value.\n\n" + - "Note: Rules can only be created for the same axis constraints.", MessageType.Info); - - EditorGUILayout.Space(); - - CheckProfileLock(target); - - var isGuiLocked = !(MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile); + bool wasGUIlocked = GUI.enabled; + bool isGuiLocked = wasGUIlocked && !IsProfileLock((BaseMixedRealityProfile)target); GUI.enabled = isGuiLocked; - serializedObject.Update(); selectedBaseActionId = RenderBaseInputAction(selectedBaseActionId, out currentBaseAction); @@ -153,7 +135,7 @@ public override void OnInspectorGUI() currentBaseAction.AxisConstraint != AxisType.None && currentBaseAction.AxisConstraint != AxisType.Raw; - if (GUILayout.Button(RuleAddButtonContent, EditorStyles.miniButton)) + if (RenderIndentedButton(RuleAddButtonContent, EditorStyles.miniButton)) { AddRule(); ResetCriteria(); @@ -175,6 +157,8 @@ public override void OnInspectorGUI() EditorGUIUtility.wideMode = isWideMode; serializedObject.ApplyModifiedProperties(); + + GUI.enabled = wasGUIlocked; } private bool RuleExists() @@ -448,7 +432,7 @@ private int RenderBaseInputAction(int baseActionId, out MixedRealityInputAction { action = MixedRealityInputAction.None; EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField(BaseActionContent, GUILayout.Width(128)); + EditorGUILayout.LabelField(BaseActionContent); EditorGUI.BeginChangeCheck(); if (!isLocked) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs index 4a697bdb69c..88b3adec76a 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs @@ -15,6 +15,9 @@ public class MixedRealityInputActionsProfileInspector : BaseMixedRealityToolkitC private static readonly GUIContent AddButtonContent = new GUIContent("+ Add a New Action", "Add New Action"); private static readonly GUIContent ActionContent = new GUIContent("Action", "The Name of the Action."); private static readonly GUIContent AxisConstraintContent = new GUIContent("Axis Constraint", "Optional Axis Constraint for this input source."); + private const string ProfileTitle = "Input Action Settings"; + private const string ProfileDescription = "Input Actions are any/all actions your users will be able to make when interacting with your application.\n\n" + + "After defining all your actions, you can then wire up these actions to hardware sensors, controllers, and other input devices."; private static Vector2 scrollPosition = Vector2.zero; @@ -24,19 +27,12 @@ protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - inputActionList = serializedObject.FindProperty("inputActions"); } public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } @@ -44,35 +40,25 @@ public override void OnInspectorGUI() if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - - return; - } - - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) - { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Input Actions", EditorStyles.boldLabel); - - EditorGUILayout.HelpBox("Input Actions are any/all actions your users will be able to make when interacting with your application.\n\n" + - "After defining all your actions, you can then wire up these actions to hardware sensors, controllers, and other input devices.", MessageType.Info); - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); + RenderList(inputActionList); + serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private static void RenderList(SerializedProperty list) { EditorGUILayout.Space(); GUILayout.BeginVertical(); - if (GUILayout.Button(AddButtonContent, EditorStyles.miniButton)) + + if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) { list.arraySize += 1; var inputAction = list.GetArrayElementAtIndex(list.arraySize - 1); diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs index e5addbaf3f0..f772805a174 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs @@ -17,36 +17,36 @@ public class MixedRealityInputSystemProfileInspector : BaseMixedRealityToolkitCo private static readonly GUIContent ComponentTypeContent = new GUIContent("Type"); private static readonly GUIContent RuntimePlatformContent = new GUIContent("Platform(s)"); - private static readonly GUIContent ProviderProfileContent = new GUIContent("Profile"); - private static bool showDataProviders = true; + private static bool showDataProviders = false; private SerializedProperty dataProviderConfigurations; - private static bool showFocusProperties = true; private SerializedProperty focusProviderType; - private static bool showPointerProperties = true; + private static bool showPointerProperties = false; private SerializedProperty pointerProfile; - private static bool showActionsProperties = true; + private static bool showActionsProperties = false; private SerializedProperty inputActionsProfile; private SerializedProperty inputActionRulesProfile; - private static bool showControllerProperties = true; + private static bool showControllerProperties = false; private SerializedProperty enableControllerMapping; private SerializedProperty controllerMappingProfile; private SerializedProperty controllerVisualizationProfile; - private static bool showGestureProperties = true; + private static bool showGestureProperties = false; private SerializedProperty gesturesProfile; - private static bool showSpeechCommandsProperties = true; + private static bool showSpeechCommandsProperties = false; private SerializedProperty speechCommandsProfile; - private static bool showHandTrackingProperties = true; + private static bool showHandTrackingProperties = false; private SerializedProperty handTrackingProfile; private static bool[] providerFoldouts; + private const string ProfileTitle = "Input System Settings"; + private const string ProfileDescription = "The Input System Profile helps developers configure input for cross-platform applications."; protected override void OnEnable() { @@ -69,116 +69,99 @@ protected override void OnEnable() controllerVisualizationProfile = serializedObject.FindProperty("controllerVisualizationProfile"); handTrackingProfile = serializedObject.FindProperty("handTrackingProfile"); - providerFoldouts = new bool[dataProviderConfigurations.arraySize]; + if (providerFoldouts == null || providerFoldouts.Length != dataProviderConfigurations.arraySize) + { + providerFoldouts = new bool[dataProviderConfigurations.arraySize]; + } } public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) - { - return; - } - - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) + if (!RenderProfileHeader(ProfileTitle, string.Empty)) { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Input System Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("The Input System Profile helps developers configure input for cross-platform applications.", MessageType.Info); - - CheckProfileLock(target); - - var previousLabelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 160f; - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); + EditorGUI.BeginChangeCheck(); bool changed = false; + EditorGUILayout.PropertyField(focusProviderType); EditorGUILayout.Space(); - showDataProviders = EditorGUILayout.Foldout(showDataProviders, "Data Providers", true); - if (showDataProviders) + + bool isSubProfile = RenderAsSubProfile; + if (!isSubProfile) { - using (new EditorGUI.IndentLevelScope()) - { - RenderList(dataProviderConfigurations); - } + EditorGUI.indentLevel++; } - EditorGUILayout.Space(); - showFocusProperties = EditorGUILayout.Foldout(showFocusProperties, "Focus Settings", true); - if (showFocusProperties) + RenderFoldout(ref showDataProviders, "Input Data Providers", () => { using (new EditorGUI.IndentLevelScope()) { - EditorGUILayout.PropertyField(focusProviderType); + RenderList(dataProviderConfigurations); } - } + }); - EditorGUILayout.Space(); - showPointerProperties = EditorGUILayout.Foldout(showPointerProperties, "Pointer Settings", true); - if (showPointerProperties) + RenderFoldout(ref showPointerProperties, "Pointers", () => { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(pointerProfile); + changed |= RenderProfile(pointerProfile, true, false); } - } + }); - EditorGUILayout.Space(); - showActionsProperties = EditorGUILayout.Foldout(showActionsProperties, "Action Settings", true); - if (showActionsProperties) + RenderFoldout(ref showActionsProperties, "Input Actions", () => { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(inputActionsProfile); - changed |= RenderProfile(inputActionRulesProfile); + changed |= RenderProfile(inputActionsProfile, true, false); + EditorGUILayout.Space(); + changed |= RenderProfile(inputActionRulesProfile, true, false); } - } + }); - EditorGUILayout.Space(); - showControllerProperties = EditorGUILayout.Foldout(showControllerProperties, "Controller Settings", true); - if (showControllerProperties) + RenderFoldout(ref showControllerProperties, "Controllers", () => { using (new EditorGUI.IndentLevelScope()) { EditorGUILayout.PropertyField(enableControllerMapping); - changed |= RenderProfile(controllerMappingProfile); - changed |= RenderProfile(controllerVisualizationProfile, true, typeof(IMixedRealityControllerVisualizer)); + changed |= RenderProfile(controllerMappingProfile, true, false); + EditorGUILayout.Space(); + changed |= RenderProfile(controllerVisualizationProfile, true, false, typeof(IMixedRealityControllerVisualizer)); } - } + }); - EditorGUILayout.Space(); - showGestureProperties = EditorGUILayout.Foldout(showGestureProperties, "Gesture Settings", true); - if (showGestureProperties) + RenderFoldout(ref showGestureProperties, "Gestures", () => { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(gesturesProfile); + changed |= RenderProfile(gesturesProfile, true, false); } - } + }); - EditorGUILayout.Space(); - showSpeechCommandsProperties = EditorGUILayout.Foldout(showSpeechCommandsProperties, "Speech Command Settings", true); - if (showSpeechCommandsProperties) + RenderFoldout(ref showSpeechCommandsProperties, "Speech Commands", () => { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(speechCommandsProfile); + changed |= RenderProfile(speechCommandsProfile, true, false); } - } + }); - EditorGUILayout.Space(); - showHandTrackingProperties = EditorGUILayout.Foldout(showHandTrackingProperties, "Hand Tracking Settings", true); - if (showHandTrackingProperties) + RenderFoldout(ref showHandTrackingProperties, "Hand Tracking", () => { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(handTrackingProfile); + changed |= RenderProfile(handTrackingProfile, true, false); } + }); + + if (!isSubProfile) + { + EditorGUI.indentLevel--; } if (!changed) @@ -186,10 +169,10 @@ public override void OnInspectorGUI() changed |= EditorGUI.EndChangeCheck(); } - EditorGUIUtility.labelWidth = previousLabelWidth; serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; - if (changed) + if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(MixedRealityToolkit.Instance.ActiveProfile); } @@ -227,7 +210,7 @@ private void RenderList(SerializedProperty list) return; } - GUILayout.Space(12f); + EditorGUILayout.Space(); if (list == null || list.arraySize == 0) { @@ -258,7 +241,7 @@ private void RenderList(SerializedProperty list) } } - if (providerFoldouts[i] || RenderAsSubProfile) + if (providerFoldouts[i]) { using (new EditorGUI.IndentLevelScope()) { @@ -282,7 +265,7 @@ private void RenderList(SerializedProperty list) serviceType = (target as MixedRealityInputSystemProfile).DataProviderConfigurations[i].ComponentType; } - changed |= RenderProfile(configurationProfile, ProviderProfileContent, true, serviceType); + changed |= RenderProfile(configurationProfile, true, false, serviceType); } serializedObject.ApplyModifiedProperties(); @@ -291,7 +274,7 @@ private void RenderList(SerializedProperty list) } } - if (changed) + if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(MixedRealityToolkit.Instance.ActiveProfile); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs new file mode 100644 index 00000000000..d38474cb607 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Editor; +using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + [CustomEditor(typeof(MixedRealityMouseInputProfile))] + public class MixedRealityMouseInputProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector + { + private SerializedProperty mouseSpeed; + private const string ProfileTitle = "Mouse Input Settings"; + private const string ProfileDescription = "Settings for mouse input in the editor."; + + protected override void OnEnable() + { + base.OnEnable(); + + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } + + mouseSpeed = serializedObject.FindProperty("mouseSpeed"); + } + + public override void OnInspectorGUI() + { + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) + { + return; + } + + serializedObject.Update(); + + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(mouseSpeed); + + serializedObject.ApplyModifiedProperties(); + GUI.enabled = true; + } + } +} diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs.meta new file mode 100644 index 00000000000..709ee531a28 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a4054f9166cdf974eb265d3209eb985d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs index da763369fa0..da5fe9695a7 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs @@ -15,16 +15,16 @@ public class MixedRealityPointerProfileInspector : BaseMixedRealityToolkitConfig { private static readonly GUIContent ControllerTypeContent = new GUIContent("Controller Type", "The type of Controller this pointer will attach itself to at runtime."); - private static bool showPointerProperties = true; + private const string ProfileTitle = "Pointer Settings"; + private const string ProfileDescription = "Pointers attach themselves onto controllers as they are initialized."; + private SerializedProperty pointingExtent; private SerializedProperty pointingRaycastLayerMasks; private static bool showPointerOptionProperties = true; private SerializedProperty pointerOptions; private ReorderableList pointerOptionList; - private static bool showPointerDebugProperties = true; private SerializedProperty debugDrawPointingRays; private SerializedProperty debugDrawPointingRayColors; - private static bool showGazeProperties = true; private SerializedProperty gazeCursorPrefab; private SerializedProperty gazeProviderType; private SerializedProperty showCursorWithEyeGaze; @@ -36,11 +36,6 @@ protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - pointingExtent = serializedObject.FindProperty("pointingExtent"); pointingRaycastLayerMasks = serializedObject.FindProperty("pointingRaycastLayerMasks"); pointerOptions = serializedObject.FindProperty("pointerOptions"); @@ -63,80 +58,64 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) + if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { + EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Pointer Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Pointers attach themselves onto controllers as they are initialized.", MessageType.Info); - EditorGUILayout.Space(); + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - CheckProfileLock(target); serializedObject.Update(); currentlySelectedPointerOption = -1; EditorGUILayout.Space(); - showPointerProperties = EditorGUILayout.Foldout(showPointerProperties, "Pointer Settings", true); - if (showPointerProperties) + EditorGUILayout.LabelField("Gaze Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(pointingExtent); - EditorGUILayout.PropertyField(pointingRaycastLayerMasks, true); - EditorGUILayout.PropertyField(pointerMediator); - - EditorGUILayout.Space(); - showPointerOptionProperties = EditorGUILayout.Foldout(showPointerOptionProperties, "Pointer Options", true); - if (showPointerOptionProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - pointerOptionList.DoLayoutList(); - } - } + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(gazeCursorPrefab); + EditorGUILayout.PropertyField(gazeProviderType); + EditorGUILayout.Space(); - EditorGUILayout.Space(); - showPointerDebugProperties = EditorGUILayout.Foldout(showPointerDebugProperties, "Debug Settings", true); - if (showPointerDebugProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(debugDrawPointingRays); - EditorGUILayout.PropertyField(debugDrawPointingRayColors, true); - } - } + if (RenderIndentedButton("Customize Gaze Provider Settings")) + { + Selection.activeObject = CameraCache.Main.gameObject; } } EditorGUILayout.Space(); - showGazeProperties = EditorGUILayout.Foldout(showGazeProperties, "Gaze Settings", true); - if (showGazeProperties) + EditorGUILayout.LabelField("Pointer Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.HelpBox("The gaze provider uses the default settings above, but further customization of the gaze can be done on the Gaze Provider.", MessageType.Info); - - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(gazeCursorPrefab); - EditorGUILayout.PropertyField(gazeProviderType); + EditorGUILayout.PropertyField(pointingExtent); + EditorGUILayout.PropertyField(pointingRaycastLayerMasks, true); + EditorGUILayout.PropertyField(pointerMediator); - EditorGUILayout.Space(); - if (GUILayout.Button("Customize Gaze Provider Settings")) + EditorGUILayout.Space(); + showPointerOptionProperties = EditorGUILayout.Foldout(showPointerOptionProperties, "Pointer Options", true); + if (showPointerOptionProperties) + { + using (new EditorGUI.IndentLevelScope()) { - Selection.activeObject = CameraCache.Main.gameObject; + pointerOptionList.DoLayoutList(); } } } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Debug Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(debugDrawPointingRays); + EditorGUILayout.PropertyField(debugDrawPointingRayColors, true); + } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void DrawPointerOptionElement(Rect rect, int index, bool isActive, bool isFocused) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs index c5ca25ecace..f5806084eea 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs @@ -265,7 +265,6 @@ private void CloneMainProfile() newChildSerializedObject.ApplyModifiedProperties(); - Selection.activeObject = newChildProfile; cloneWindow.Close(); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs index 7d306e1e323..bdf6fe6733a 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs @@ -17,41 +17,32 @@ public class MixedRealityRegisteredServiceProviderProfileInspector : BaseMixedRe private static bool[] configFoldouts; + private const string ProfileTitle = "Registered Services Settings"; + private const string ProfileDescription = "This profile defines any additional Services like systems, features, and managers to register with the Mixed Reality Toolkit."; + protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - configurations = serializedObject.FindProperty("configurations"); configFoldouts = new bool[configurations.arraySize]; } public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) - { - return; - } - - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Registered Service Providers Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("This profile defines any additional Services like systems, features, and managers to register with the Mixed Reality Toolkit.", MessageType.Info); - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); + RenderList(configurations); + serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void RenderList(SerializedProperty list) @@ -155,7 +146,7 @@ private void RenderList(SerializedProperty list) serviceType = (target as MixedRealityRegisteredServiceProvidersProfile).Configurations[i].ComponentType; } - changed |= RenderProfile(configurationProfile, true, serviceType); + changed |= RenderProfile(configurationProfile, true, true, serviceType); EditorGUI.indentLevel--; @@ -169,7 +160,7 @@ private void RenderList(SerializedProperty list) GUILayout.EndVertical(); GUILayout.EndVertical(); - if (changed) + if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(MixedRealityToolkit.Instance.ActiveProfile); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs index 5c97638c270..5dc2e434e05 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs @@ -13,7 +13,6 @@ namespace Microsoft.MixedReality.Toolkit.Editor.SpatialAwareness public class MixedRealitySpatialAwarenessMeshObserverProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector { // General settings - private static bool showGeneralProperties = true; private SerializedProperty startupBehavior; private SerializedProperty observationExtents; private SerializedProperty observerVolumeType; @@ -21,17 +20,14 @@ public class MixedRealitySpatialAwarenessMeshObserverProfileInspector : BaseMixe private SerializedProperty updateInterval; // Physics settings - private static bool showPhysicsProperties = true; private SerializedProperty meshPhysicsLayer; private SerializedProperty recalculateNormals; // Level of Detail settings - private static bool showLevelOfDetailProperties = true; private SerializedProperty levelOfDetail; private SerializedProperty trianglesPerCubicMeter; // Display settings - private static bool showDisplayProperties = true; private SerializedProperty displayOption; private SerializedProperty visibleMaterial; private SerializedProperty occlusionMaterial; @@ -41,16 +37,13 @@ public class MixedRealitySpatialAwarenessMeshObserverProfileInspector : BaseMixe private readonly GUIContent volumeTypeContent = new GUIContent("Observer Shape"); private readonly GUIContent physicsLayerContent = new GUIContent("Physics Layer"); private readonly GUIContent trianglesPerCubicMeterContent = new GUIContent("Triangles/Cubic Meter"); + private const string ProfileTitle = "Spatial Mesh Observer Settings"; + private const string ProfileDescription = "Configuration settings for how the real-world environment will be perceived and displayed."; protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - // General settings startupBehavior = serializedObject.FindProperty("startupBehavior"); observationExtents = serializedObject.FindProperty("observationExtents"); @@ -70,93 +63,65 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) - { - return; - } - - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Spatial Awareness Mesh Observer Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Configuration settings for how the real-world environment will be perceived and displayed.", MessageType.Info); - EditorGUILayout.Space(); + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); - if (MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile) + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - GUI.enabled = false; - } - - showGeneralProperties = EditorGUILayout.Foldout(showGeneralProperties, "General Settings", true); - if (showGeneralProperties) - { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.PropertyField(startupBehavior); + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(updateInterval); + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(isStationaryObserver); + EditorGUILayout.PropertyField(observerVolumeType, volumeTypeContent); + string message = string.Empty; + if (observerVolumeType.intValue == (int)VolumeType.AxisAlignedCube) + { + message = "Observed meshes will be aligned to the world coordinate space."; + } + else if (observerVolumeType.intValue == (int)VolumeType.UserAlignedCube) { - EditorGUILayout.PropertyField(startupBehavior); - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(updateInterval); - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(isStationaryObserver); - EditorGUILayout.PropertyField(observerVolumeType, volumeTypeContent); - string message = string.Empty; - if (observerVolumeType.intValue == (int)VolumeType.AxisAlignedCube) - { - message = "Observed meshes will be aligned to the world coordinate space."; - } - else if (observerVolumeType.intValue == (int)VolumeType.UserAlignedCube) - { - message = "Observed meshes will be aligned to the user's coordinate space."; - } - else if (observerVolumeType.intValue == (int)VolumeType.Sphere) - { - message = "The X value of the Observation Extents will be used as the sphere radius."; - } - EditorGUILayout.HelpBox(message, MessageType.Info); - EditorGUILayout.PropertyField(observationExtents); + message = "Observed meshes will be aligned to the user's coordinate space."; } + else if (observerVolumeType.intValue == (int)VolumeType.Sphere) + { + message = "The X value of the Observation Extents will be used as the sphere radius."; + } + EditorGUILayout.HelpBox(message, MessageType.Info); + EditorGUILayout.PropertyField(observationExtents); } EditorGUILayout.Space(); - showPhysicsProperties = EditorGUILayout.Foldout(showPhysicsProperties, "Physics Settings", true); - if (showPhysicsProperties) + EditorGUILayout.LabelField("Physics Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(meshPhysicsLayer, physicsLayerContent); - EditorGUILayout.PropertyField(recalculateNormals); - } + EditorGUILayout.PropertyField(meshPhysicsLayer, physicsLayerContent); + EditorGUILayout.PropertyField(recalculateNormals); } EditorGUILayout.Space(); - showLevelOfDetailProperties = EditorGUILayout.Foldout(showLevelOfDetailProperties, "Level of Detail Settings", true); - if (showLevelOfDetailProperties) + EditorGUILayout.LabelField("Level of Detail Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(levelOfDetail, lodContent); - EditorGUILayout.PropertyField(trianglesPerCubicMeter, trianglesPerCubicMeterContent); - EditorGUILayout.HelpBox("The value of Triangles per Cubic Meter is ignored unless Level of Detail is set to Custom.", MessageType.Info); - } + EditorGUILayout.PropertyField(levelOfDetail, lodContent); + EditorGUILayout.PropertyField(trianglesPerCubicMeter, trianglesPerCubicMeterContent); + EditorGUILayout.HelpBox("The value of Triangles per Cubic Meter is ignored unless Level of Detail is set to Custom.", MessageType.Info); } EditorGUILayout.Space(); - showDisplayProperties = EditorGUILayout.Foldout(showDisplayProperties, "Display Settings", true); - if (showDisplayProperties) + EditorGUILayout.LabelField("Display Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(displayOption, displayOptionContent); - EditorGUILayout.PropertyField(visibleMaterial); - EditorGUILayout.PropertyField(occlusionMaterial); - } + EditorGUILayout.PropertyField(displayOption, displayOptionContent); + EditorGUILayout.PropertyField(visibleMaterial); + EditorGUILayout.PropertyField(occlusionMaterial); } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs index 86bff43a81a..cfecad72aac 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs @@ -17,69 +17,53 @@ public class MixedRealitySpatialAwarenessSystemProfileInspector : BaseMixedReali private static readonly GUIContent ComponentTypeContent = new GUIContent("Type"); private static readonly GUIContent RuntimePlatformContent = new GUIContent("Platform(s)"); - private static readonly GUIContent ObserverProfileContent = new GUIContent("Profile"); - private static bool showObservers = true; private SerializedProperty observerConfigurations; - private bool[] observerFoldouts; + private const string ProfileTitle = "Spatial Awareness System Settings"; + private const string ProfileDescription = "The Spatial Awareness System profile allows developers to configure cross-platform environmental awareness."; + + private static bool[] observerFoldouts; protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - observerConfigurations = serializedObject.FindProperty("observerConfigurations"); - observerFoldouts = new bool[observerConfigurations.arraySize]; + if (observerFoldouts == null || observerFoldouts.Length != observerConfigurations.arraySize) + { + observerFoldouts = new bool[observerConfigurations.arraySize]; + } } public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) { return; } - if (DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile)) - { - return; - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Spatial Awareness System Profile", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("The Spatial Awareness System profile allows developers to configure cross-platform environmental awareness.", MessageType.Info); - - CheckProfileLock(target); - + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); - EditorGUILayout.Space(); - showObservers = EditorGUILayout.Foldout(showObservers, "Observers", true); - if (showObservers) + using (new EditorGUI.IndentLevelScope()) { - using (new EditorGUI.IndentLevelScope()) - { - RenderList(observerConfigurations); - } + RenderList(observerConfigurations); } + serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private void RenderList(SerializedProperty list) { - EditorGUILayout.Space(); - bool changed = false; using (new EditorGUILayout.VerticalScope()) { - if (GUILayout.Button(AddObserverContent, EditorStyles.miniButton)) + if (RenderIndentedButton(AddObserverContent, EditorStyles.miniButton)) { list.InsertArrayElementAtIndex(list.arraySize); SerializedProperty observer = list.GetArrayElementAtIndex(list.arraySize - 1); @@ -102,8 +86,6 @@ private void RenderList(SerializedProperty list) return; } - GUILayout.Space(12f); - if (list == null || list.arraySize == 0) { EditorGUILayout.HelpBox("The Mixed Reality Spatial Awareness System requires one or more observers.", MessageType.Warning); @@ -118,12 +100,12 @@ private void RenderList(SerializedProperty list) SerializedProperty observerProfile = observer.FindPropertyRelative("observerProfile"); SerializedProperty runtimePlatform = observer.FindPropertyRelative("runtimePlatform"); - using (new EditorGUILayout.VerticalScope()) + using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) { using (new EditorGUILayout.HorizontalScope()) { observerFoldouts[i] = EditorGUILayout.Foldout(observerFoldouts[i], observerName.stringValue, true); - + if (GUILayout.Button(RemoveObserverContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) { list.DeleteArrayElementAtIndex(i); @@ -131,42 +113,38 @@ private void RenderList(SerializedProperty list) changed = true; break; } - } - if (observerFoldouts[i] || RenderAsSubProfile) + if (observerFoldouts[i]) { - using (new EditorGUI.IndentLevelScope()) + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(observerType, ComponentTypeContent); + if (EditorGUI.EndChangeCheck()) { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(observerType, ComponentTypeContent); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - System.Type type = ((MixedRealitySpatialAwarenessSystemProfile)serializedObject.targetObject).ObserverConfigurations[i].ComponentType.Type; - ApplyObserverConfiguration(type, observerName, observerProfile, runtimePlatform); - break; - } - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(runtimePlatform, RuntimePlatformContent); - changed |= EditorGUI.EndChangeCheck(); - - System.Type serviceType = null; - if (observerProfile.objectReferenceValue != null) - { - serviceType = (target as MixedRealitySpatialAwarenessSystemProfile).ObserverConfigurations[i].ComponentType; - } - - changed |= RenderProfile(observerProfile, ObserverProfileContent, true, serviceType); + serializedObject.ApplyModifiedProperties(); + System.Type type = ((MixedRealitySpatialAwarenessSystemProfile)serializedObject.targetObject).ObserverConfigurations[i].ComponentType.Type; + ApplyObserverConfiguration(type, observerName, observerProfile, runtimePlatform); + break; + } + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(runtimePlatform, RuntimePlatformContent); + changed |= EditorGUI.EndChangeCheck(); + + System.Type serviceType = null; + if (observerProfile.objectReferenceValue != null) + { + serviceType = (target as MixedRealitySpatialAwarenessSystemProfile).ObserverConfigurations[i].ComponentType; } + changed |= RenderProfile(observerProfile, true, false, serviceType); + serializedObject.ApplyModifiedProperties(); } } } - if (changed) + if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(MixedRealityToolkit.Instance.ActiveProfile); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs index 7b393f21967..8cb5f9d862c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs @@ -19,7 +19,9 @@ public class MixedRealitySpeechCommandsProfileInspector : BaseMixedRealityToolki private static readonly GUIContent KeyCodeContent = new GUIContent("KeyCode", "The keyboard key that will trigger the action."); private static readonly GUIContent ActionContent = new GUIContent("Action", "The action to trigger when a keyboard key is pressed or keyword is recognized."); - private static bool showGeneralProperties = true; + private const string ProfileTitle = "Speech Settings"; + private const string ProfileDescription = "Speech Commands are any/all spoken keywords your users will be able say to raise an Input Action in your application."; + private SerializedProperty recognizerStartBehaviour; private SerializedProperty recognitionConfidenceLevel; @@ -50,8 +52,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderMixedRealityToolkitLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) { return; } @@ -59,44 +60,27 @@ public override void OnInspectorGUI() if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) { EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - - DrawBacktrackProfileButton("Back to Configuration Profile", MixedRealityToolkit.Instance.ActiveProfile); - - return; - } - - if (DrawBacktrackProfileButton("Back to Input Profile", MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile)) - { return; } - CheckProfileLock(target); - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Speech Commands", EditorStyles.boldLabel); - EditorGUILayout.HelpBox("Speech Commands are any/all spoken keywords your users will be able say to raise an Input Action in your application.", MessageType.Info); - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { EditorGUILayout.HelpBox("No input actions found, please specify a input action profile in the main configuration.", MessageType.Error); return; } + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); serializedObject.Update(); - EditorGUILayout.Space(); - showGeneralProperties = EditorGUILayout.Foldout(showGeneralProperties, "General Settings", true); - if (showGeneralProperties) + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(recognizerStartBehaviour); - EditorGUILayout.PropertyField(recognitionConfidenceLevel); - } + EditorGUILayout.PropertyField(recognizerStartBehaviour); + EditorGUILayout.PropertyField(recognitionConfidenceLevel); } EditorGUILayout.Space(); - showSpeechCommands = EditorGUILayout.Foldout(showSpeechCommands, "Speech Commands", true); + showSpeechCommands = EditorGUILayout.Foldout(showSpeechCommands, "Speech Commands", true, MixedRealityStylesUtility.BoldFoldoutStyle); if (showSpeechCommands) { using (new EditorGUI.IndentLevelScope()) @@ -106,6 +90,7 @@ public override void OnInspectorGUI() } serializedObject.ApplyModifiedProperties(); + GUI.enabled = wasGUIEnabled; } private static void RenderList(SerializedProperty list) @@ -113,7 +98,7 @@ private static void RenderList(SerializedProperty list) EditorGUILayout.Space(); GUILayout.BeginVertical(); - if (GUILayout.Button(AddButtonContent, EditorStyles.miniButton)) + if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) { list.arraySize += 1; var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs index d480b26ba3d..15178e5163f 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using Microsoft.MixedReality.Toolkit.Boundary; +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.Utilities; +using System; using UnityEditor; using UnityEngine; @@ -13,41 +17,43 @@ public class MixedRealityToolkitConfigurationProfileInspector : BaseMixedReality private static readonly GUIContent TargetScaleContent = new GUIContent("Target Scale:"); // Experience properties - private static bool showExperienceProperties = true; private SerializedProperty targetExperienceScale; // Camera properties - private static bool showCameraProperties = true; - private SerializedProperty enableCameraProfile; + private SerializedProperty enableCameraSystem; + private SerializedProperty cameraSystemType; private SerializedProperty cameraProfile; // Input system properties - private static bool showInputProperties = true; private SerializedProperty enableInputSystem; private SerializedProperty inputSystemType; private SerializedProperty inputSystemProfile; // Boundary system properties - private static bool showBoundaryProperties = true; private SerializedProperty enableBoundarySystem; private SerializedProperty boundarySystemType; private SerializedProperty boundaryVisualizationProfile; // Teleport system properties - private static bool showTeleportProperties = true; private SerializedProperty enableTeleportSystem; private SerializedProperty teleportSystemType; // Spatial Awareness system properties - private static bool showSpatialAwarenessProperties = true; private SerializedProperty enableSpatialAwarenessSystem; private SerializedProperty spatialAwarenessSystemType; private SerializedProperty spatialAwarenessSystemProfile; // Diagnostic system properties - private static bool showDiagnosticProperties = true; private SerializedProperty enableDiagnosticsSystem; private SerializedProperty diagnosticsSystemType; private SerializedProperty diagnosticsSystemProfile; // Additional registered components profile - private static bool showRegisteredServiceProperties = true; private SerializedProperty registeredServiceProvidersProfile; + // Editor settings + private SerializedProperty useServiceInspectors; + + private MixedRealityToolkitConfigurationProfile configurationProfile; + private Func[] RenderProfileFuncs; + + private static string[] ProfileTabTitles = { "Camera", "Input", "Boundary", "Teleport", "Spatial Mapping", "Diagnostics", "Extensions", "Editor" }; + private static int SelectedProfileTab = 0; + protected override void OnEnable() { base.OnEnable(); @@ -61,7 +67,8 @@ protected override void OnEnable() // Experience configuration targetExperienceScale = serializedObject.FindProperty("targetExperienceScale"); // Camera configuration - enableCameraProfile = serializedObject.FindProperty("enableCameraProfile"); + enableCameraSystem = serializedObject.FindProperty("enableCameraSystem"); + cameraSystemType = serializedObject.FindProperty("cameraSystemType"); cameraProfile = serializedObject.FindProperty("cameraProfile"); // Input system configuration enableInputSystem = serializedObject.FindProperty("enableInputSystem"); @@ -85,19 +92,79 @@ protected override void OnEnable() // Additional registered components configuration registeredServiceProvidersProfile = serializedObject.FindProperty("registeredServiceProvidersProfile"); + + // Editor settings + useServiceInspectors = serializedObject.FindProperty("useServiceInspectors"); + + if (this.RenderProfileFuncs == null) + { + this.RenderProfileFuncs = new Func[] + { + () => { + EditorGUILayout.PropertyField(enableCameraSystem); + EditorGUILayout.PropertyField(cameraSystemType); + return RenderProfile(cameraProfile); + }, + () => { + EditorGUILayout.PropertyField(enableInputSystem); + EditorGUILayout.PropertyField(inputSystemType); + return RenderProfile(inputSystemProfile, true, false, typeof(IMixedRealityInputSystem)); + }, + () => { + var experienceScale = (ExperienceScale)targetExperienceScale.intValue; + if (experienceScale != ExperienceScale.Room) + { + // Alert the user if the experience scale does not support boundary features. + GUILayout.Space(6f); + EditorGUILayout.HelpBox("Boundaries are only supported in Room scale experiences.", MessageType.Warning); + GUILayout.Space(6f); + } + EditorGUILayout.PropertyField(enableBoundarySystem); + EditorGUILayout.PropertyField(boundarySystemType); + return RenderProfile(boundaryVisualizationProfile, true, false, typeof(IMixedRealityBoundarySystem)); + }, + () => { + EditorGUILayout.PropertyField(enableTeleportSystem); + EditorGUILayout.PropertyField(teleportSystemType); + return false; + }, + () => { + EditorGUILayout.PropertyField(enableSpatialAwarenessSystem); + EditorGUILayout.PropertyField(spatialAwarenessSystemType); + EditorGUILayout.HelpBox("Spatial Awareness settings are configured per observer.", MessageType.Info); + return RenderProfile(spatialAwarenessSystemProfile, true, false, typeof(IMixedRealitySpatialAwarenessSystem)); + }, + () => { + EditorGUILayout.HelpBox("It is recommended to enable the Diagnostics system during development. Be sure to disable prior to building your shipping product.", MessageType.Warning); + EditorGUILayout.PropertyField(enableDiagnosticsSystem); + EditorGUILayout.PropertyField(diagnosticsSystemType); + return RenderProfile(diagnosticsSystemProfile); + }, + () => { + return RenderProfile(registeredServiceProvidersProfile); + }, + () => { + EditorGUILayout.PropertyField(useServiceInspectors); + return false; + }, + }; + } } public override void OnInspectorGUI() { var configurationProfile = (MixedRealityToolkitConfigurationProfile)target; - serializedObject.Update(); + RenderMixedRealityToolkitLogo(); if (!MixedRealityToolkit.IsInitialized) { - EditorGUILayout.HelpBox("Unable to find Mixed Reality Toolkit!", MessageType.Error); - return; + EditorGUILayout.HelpBox("No Mixed Reality Toolkit found in scene.", MessageType.Warning); + if (GUILayout.Button("Click here to add Mixed Reality Toolkit instance to scene")) + { + new GameObject("MixedRealityToolkit").AddComponent(); + } } if (!configurationProfile.IsCustomProfile) @@ -108,181 +175,91 @@ public override void OnInspectorGUI() if (GUILayout.Button("Copy & Customize")) { - CreateCopyProfileValues(); + var originalSelection = Selection.activeObject; + CreateCustomProfile(target as BaseMixedRealityProfile); + Selection.activeObject = originalSelection; } - if (GUILayout.Button("Create new profiles")) + if (MixedRealityToolkit.IsInitialized) { - ScriptableObject profile = CreateInstance(nameof(MixedRealityToolkitConfigurationProfile)); - var newProfile = profile.CreateAsset("Assets/MixedRealityToolkit.Generated/CustomProfiles") as MixedRealityToolkitConfigurationProfile; - MixedRealityToolkit.Instance.ActiveProfile = newProfile; - Selection.activeObject = newProfile; + if (GUILayout.Button("Create new profiles")) + { + ScriptableObject profile = CreateInstance(nameof(MixedRealityToolkitConfigurationProfile)); + var newProfile = profile.CreateAsset("Assets/MixedRealityToolkit.Generated/CustomProfiles") as MixedRealityToolkitConfigurationProfile; + UnityEditor.Undo.RecordObject(MixedRealityToolkit.Instance, "Create new profiles"); + MixedRealityToolkit.Instance.ActiveProfile = newProfile; + Selection.activeObject = newProfile; + } } EditorGUILayout.EndHorizontal(); + EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider); } - // We don't call the CheckLock method so won't get a duplicate message. - if (MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile) - { - GUI.enabled = false; - } + bool isGUIEnabled = !IsProfileLock((BaseMixedRealityProfile)target); + GUI.enabled = isGUIEnabled; - var previousLabelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 160f; EditorGUI.BeginChangeCheck(); bool changed = false; // Experience configuration - EditorGUILayout.Space(); ExperienceScale experienceScale = (ExperienceScale)targetExperienceScale.intValue; - showExperienceProperties = EditorGUILayout.Foldout(showExperienceProperties, "Experience Settings", true); - if (showExperienceProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(targetExperienceScale, TargetScaleContent); - string scaleDescription = string.Empty; - - switch (experienceScale) - { - case ExperienceScale.OrientationOnly: - scaleDescription = "The user is stationary. Position data does not change."; - break; - - case ExperienceScale.Seated: - scaleDescription = "The user is stationary and seated. The origin of the world is at a neutral head-level position."; - break; - - case ExperienceScale.Standing: - scaleDescription = "The user is stationary and standing. The origin of the world is on the floor, facing forward."; - break; - - case ExperienceScale.Room: - scaleDescription = "The user is free to move about the room. The origin of the world is on the floor, facing forward. Boundaries are available."; - break; - - case ExperienceScale.World: - scaleDescription = "The user is free to move about the world. Relies upon knowledge of the environment (Spatial Anchors and Spatial Mapping)."; - break; - } - - if (scaleDescription != string.Empty) - { - GUILayout.Space(6f); - EditorGUILayout.HelpBox(scaleDescription, MessageType.Info); - } - } - } + EditorGUILayout.PropertyField(targetExperienceScale, TargetScaleContent); - // Camera Profile configuration - EditorGUILayout.Space(); - showCameraProperties = EditorGUILayout.Foldout(showCameraProperties, "Camera Settings", true); - if (showCameraProperties) + string scaleDescription = GetExperienceDescription(experienceScale); + if (!string.IsNullOrEmpty(scaleDescription)) { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableCameraProfile); - changed |= RenderProfile(cameraProfile); - } + EditorGUILayout.HelpBox(scaleDescription, MessageType.Info); + EditorGUILayout.Space(); } - // Input System configuration - EditorGUILayout.Space(); - showInputProperties = EditorGUILayout.Foldout(showInputProperties, "Input System Settings", true); - if (showInputProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableInputSystem); - EditorGUILayout.PropertyField(inputSystemType); - changed |= RenderProfile(inputSystemProfile); - } - } - - // Boundary System configuration - EditorGUILayout.Space(); - showBoundaryProperties = EditorGUILayout.Foldout(showBoundaryProperties, "Boundary System Settings", true); - if (showBoundaryProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - if (experienceScale != ExperienceScale.Room) - { - // Alert the user if the experience scale does not support boundary features. - GUILayout.Space(6f); - EditorGUILayout.HelpBox("Boundaries are only supported in Room scale experiences.", MessageType.Warning); - GUILayout.Space(6f); - } - EditorGUILayout.PropertyField(enableBoundarySystem); - EditorGUILayout.PropertyField(boundarySystemType); - changed |= RenderProfile(boundaryVisualizationProfile); - } - } - - // Teleport System configuration - EditorGUILayout.Space(); - showTeleportProperties = EditorGUILayout.Foldout(showTeleportProperties, "Teleport System Settings", true); - if (showTeleportProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableTeleportSystem); - EditorGUILayout.PropertyField(teleportSystemType); - } - } - - // Spatial Awareness System configuration - EditorGUILayout.Space(); - showSpatialAwarenessProperties = EditorGUILayout.Foldout(showSpatialAwarenessProperties, "Spatial Awareness System Settings", true); - if (showSpatialAwarenessProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableSpatialAwarenessSystem); - EditorGUILayout.PropertyField(spatialAwarenessSystemType); - EditorGUILayout.HelpBox("Spatial Awareness settings are configured per observer.", MessageType.Info); - changed |= RenderProfile(spatialAwarenessSystemProfile); - } - } + EditorGUILayout.BeginHorizontal(); - // Diagnostics System configuration - EditorGUILayout.Space(); - showDiagnosticProperties = EditorGUILayout.Foldout(showDiagnosticProperties, "Diagnostics System Settings", true); - if (showDiagnosticProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.HelpBox("It is recommended to enable the Diagnostics system during development. Be sure to disable prior to building your shipping product.", MessageType.Warning); - EditorGUILayout.PropertyField(enableDiagnosticsSystem); - EditorGUILayout.PropertyField(diagnosticsSystemType); - changed |= RenderProfile(diagnosticsSystemProfile); - } - } + EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Width(100)); + GUI.enabled = true; // Force enable so we can view profile defaults + SelectedProfileTab = GUILayout.SelectionGrid(SelectedProfileTab, ProfileTabTitles, 1, EditorStyles.boldLabel, GUILayout.MaxWidth(125)); + GUI.enabled = isGUIEnabled; + EditorGUILayout.EndVertical(); - // Registered Services configuration - EditorGUILayout.Space(); - showRegisteredServiceProperties = EditorGUILayout.Foldout(showRegisteredServiceProperties, "Extension Services", true); - if (showRegisteredServiceProperties) - { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfile(registeredServiceProvidersProfile); + changed |= RenderProfileFuncs[SelectedProfileTab](); } - } + EditorGUILayout.EndVertical(); + EditorGUILayout.EndHorizontal(); if (!changed) { changed |= EditorGUI.EndChangeCheck(); } - EditorGUIUtility.labelWidth = previousLabelWidth; serializedObject.ApplyModifiedProperties(); + GUI.enabled = true; - if (changed) + if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(configurationProfile); } } + + private static string GetExperienceDescription(ExperienceScale experienceScale) + { + switch (experienceScale) + { + case ExperienceScale.OrientationOnly: + return "The user is stationary. Position data does not change."; + case ExperienceScale.Seated: + return "The user is stationary and seated. The origin of the world is at a neutral head-level position."; + case ExperienceScale.Standing: + return "The user is stationary and standing. The origin of the world is on the floor, facing forward."; + case ExperienceScale.Room: + return "The user is free to move about the room. The origin of the world is on the floor, facing forward. Boundaries are available."; + case ExperienceScale.World: + return "The user is free to move about the world. Relies upon knowledge of the environment (Spatial Anchors and Spatial Mapping)."; + } + + return null; + } } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/HelpDrawer.cs b/Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/HelpDrawer.cs index c1ecf023242..8c5d11fcef6 100644 --- a/Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/HelpDrawer.cs +++ b/Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/HelpDrawer.cs @@ -6,11 +6,11 @@ namespace Microsoft.MixedReality.Toolkit.Editor { /// - /// Custom property drawer to show a foldout help section in the Inspector + /// Custom property drawer to show an optionally collapsible foldout help section in the Inspector /// /// /// - /// [Help("This is a multiline collapsable help section.\n • Great for providing simple instructions in Inspector.\n • Easy to use.\n • Saves space.")] + /// [Help("This is a multiline optionally collapsable help section.\n • Great for providing simple instructions in Inspector.\n • Easy to use.\n • Saves space.")] /// /// [CustomPropertyDrawer(typeof(HelpAttribute))] @@ -24,11 +24,19 @@ public override void OnGUI(Rect position) { HelpAttribute help = attribute as HelpAttribute; - HelpFoldOut = EditorGUI.Foldout(position, HelpFoldOut, help.Header); - if (HelpFoldOut) + if (help.Collapsible) + { + HelpFoldOut = EditorGUI.Foldout(position, HelpFoldOut, help.Header); + if (HelpFoldOut) + { + EditorGUI.HelpBox(position, help.Text, MessageType.Info); + } + } + else { EditorGUI.HelpBox(position, help.Text, MessageType.Info); } + cachedPosition = position; } /// @@ -39,10 +47,20 @@ public override float GetHeight() { HelpAttribute help = attribute as HelpAttribute; + // Computing the actual height requires the cachedPosition because + // CalcSize doesn't factor in word-wrapped height, and CalcHeight + // requires a pre-determined width. GUIStyle helpStyle = EditorStyles.helpBox; - Vector2 size = helpStyle.CalcSize(new GUIContent(help.Text)); - float lines = size.y / helpStyle.lineHeight; - return helpStyle.margin.top + helpStyle.margin.bottom + helpStyle.lineHeight * (HelpFoldOut ? lines : 1.0f); + GUIContent helpContent = new GUIContent(help.Text); + float wrappedHeight = helpStyle.CalcHeight(helpContent, cachedPosition.width); + + // The height of the help box should be the content if expanded, or + // just the header text if not expanded. + float contentHeight = !help.Collapsible || HelpFoldOut ? + wrappedHeight : + helpStyle.lineHeight; + + return helpStyle.margin.top + helpStyle.margin.bottom + contentHeight; } #region Private @@ -51,6 +69,7 @@ public override float GetHeight() /// The "help" foldout state /// private bool HelpFoldOut = false; + private Rect cachedPosition = new Rect(); #endregion } diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors.meta new file mode 100644 index 00000000000..93df0fd52a1 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6ec8cae434e30f4d8e294ca4ac3a4cc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs new file mode 100644 index 00000000000..f1b95d566a4 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; +using UnityEditor; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + public class BaseMixedRealityServiceInspector : IMixedRealityServiceInspector + { + public virtual bool DrawProfileField { get { return true; } } + + public virtual bool AlwaysDrawSceneGUI { get { return false; } } + + public virtual void DrawGizmos(object target) { } + + public virtual void DrawInspectorGUI(object target) { } + + public virtual void DrawSceneGUI(object target, SceneView sceneView) { } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs.meta new file mode 100644 index 00000000000..b7a76c00d4f --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BaseMixedRealityServiceInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ddbc3b6577e449c499596943dff66b08 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs new file mode 100644 index 00000000000..497fe9aa48a --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Input; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + [MixedRealityServiceInspector(typeof(FocusProvider))] + public class FocusProviderInspector : BaseMixedRealityServiceInspector + { + private static readonly Color enabledColor = GUI.backgroundColor; + private static readonly Color disabledColor = Color.Lerp(enabledColor, Color.clear, 0.5f); + + public override void DrawInspectorGUI(object target) + { + IMixedRealityFocusProvider focusProvider = (IMixedRealityFocusProvider)target; + + EditorGUILayout.LabelField("Active Pointers", EditorStyles.boldLabel); + + if (!Application.isPlaying) + { + EditorGUILayout.HelpBox("Pointers will be populated once you enter play mode.", MessageType.Info); + return; + } + + bool pointerFound = false; + foreach (IMixedRealityPointer pointer in focusProvider.GetPointers()) + { + GUI.color = pointer.IsInteractionEnabled ? enabledColor : disabledColor; + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField(pointer.PointerName); + EditorGUILayout.Toggle("Interaction Enabled", pointer.IsInteractionEnabled); + EditorGUILayout.Toggle("Focus Locked", pointer.IsFocusLocked); + EditorGUILayout.ObjectField("Focus Result", pointer.Result?.CurrentPointerTarget, typeof(GameObject), true); + EditorGUILayout.EndVertical(); + + pointerFound = true; + } + + if (!pointerFound) + { + EditorGUILayout.LabelField("(None found)", EditorStyles.miniLabel); + } + + GUI.color = enabledColor; + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs.meta new file mode 100644 index 00000000000..fed7f644fba --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/FocusProviderInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15116e109ef8e7549a0947e571dd7eca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs new file mode 100644 index 00000000000..b797cf05440 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Collections.Generic; +using System; +using UnityEditor; +using UnityEngine; +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.Utilities; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + [MixedRealityServiceInspector(typeof(HandJointService))] + public class HandJointServiceInspector : BaseMixedRealityServiceInspector + { + private const string ShowHandPreviewInSceneViewKey = "MRTK_HandJointServiceInspector_ShowHandPreviewInSceneViewKey"; + private const string ShowHandJointFoldoutKey = "MRTK_HandJointServiceInspector_ShowHandJointFoldoutKey"; + private const string ShowHandJointKeyPrefix = "MRTK_HandJointServiceInspector_ShowHandJointKeyPrefixKey_"; + private static bool ShowHandPreviewInSceneView = false; + private static bool ShowHandJointFoldout = false; + + private const float previewJointSize = 0.02f; + private static readonly Color previewJointColor = new Color(0.5f, 0.1f, 0.6f, 0.75f); + private static readonly Color enabledColor = GUI.backgroundColor; + private static readonly Color disabledColor = Color.Lerp(enabledColor, Color.clear, 0.5f); + private static Dictionary showHandJointSettings; + private static Dictionary showHandJointSettingKeys; + + //We want hand preview to always be visible + public override bool AlwaysDrawSceneGUI { get { return true; } } + + public override void DrawInspectorGUI(object target) + { + IMixedRealityHandJointService handJointService = (IMixedRealityHandJointService)target; + + EditorGUILayout.LabelField("Tracking State", EditorStyles.boldLabel); + + if (!Application.isPlaying) + { + GUI.color = disabledColor; + EditorGUILayout.Toggle("Left Hand Tracked", false); + EditorGUILayout.Toggle("Right Hand Tracked", false); + } + else + { + GUI.color = enabledColor; + EditorGUILayout.Toggle("Left Hand Tracked", handJointService.IsHandTracked(Handedness.Left)); + EditorGUILayout.Toggle("Right Hand Tracked", handJointService.IsHandTracked(Handedness.Right)); + } + + GenerateHandJointLookup(); + + GUI.color = enabledColor; + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Editor Settings", EditorStyles.boldLabel); + ShowHandPreviewInSceneView = SessionState.GetBool(ShowHandPreviewInSceneViewKey, false); + bool showHandPreviewInSceneView = EditorGUILayout.Toggle("Show Preview in Scene View", ShowHandPreviewInSceneView); + if (ShowHandPreviewInSceneView != showHandPreviewInSceneView) + { + SessionState.SetBool(ShowHandPreviewInSceneViewKey, showHandPreviewInSceneView); + } + + ShowHandJointFoldout = SessionState.GetBool(ShowHandJointFoldoutKey, false); + ShowHandJointFoldout = EditorGUILayout.Foldout(ShowHandJointFoldout, "Visible Hand Joints"); + SessionState.SetBool(ShowHandJointFoldoutKey, ShowHandJointFoldout); + + if (ShowHandJointFoldout) + { + #region setting buttons + + EditorGUILayout.BeginHorizontal(); + + if (GUILayout.Button("All")) + { + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + if (joint == TrackedHandJoint.None) + { + continue; + } + + SessionState.SetBool(showHandJointSettingKeys[joint], true); + showHandJointSettings[joint] = true; + } + } + + if (GUILayout.Button("Fingers")) + { + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + bool setting = false; + switch (joint) + { + case TrackedHandJoint.IndexTip: + case TrackedHandJoint.IndexDistalJoint: + case TrackedHandJoint.IndexKnuckle: + case TrackedHandJoint.IndexMetacarpal: + case TrackedHandJoint.IndexMiddleJoint: + + case TrackedHandJoint.MiddleTip: + case TrackedHandJoint.MiddleDistalJoint: + case TrackedHandJoint.MiddleKnuckle: + case TrackedHandJoint.MiddleMetacarpal: + case TrackedHandJoint.MiddleMiddleJoint: + + case TrackedHandJoint.PinkyTip: + case TrackedHandJoint.PinkyDistalJoint: + case TrackedHandJoint.PinkyKnuckle: + case TrackedHandJoint.PinkyMetacarpal: + case TrackedHandJoint.PinkyMiddleJoint: + + case TrackedHandJoint.RingTip: + case TrackedHandJoint.RingDistalJoint: + case TrackedHandJoint.RingKnuckle: + case TrackedHandJoint.RingMetacarpal: + case TrackedHandJoint.RingMiddleJoint: + + case TrackedHandJoint.ThumbTip: + case TrackedHandJoint.ThumbDistalJoint: + case TrackedHandJoint.ThumbMetacarpalJoint: + case TrackedHandJoint.ThumbProximalJoint: + setting = true; + break; + + default: + break; + + case TrackedHandJoint.None: + continue; + } + + SessionState.SetBool(showHandJointSettingKeys[joint], setting); + showHandJointSettings[joint] = setting; + } + } + + if (GUILayout.Button("Fingertips")) + { + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + bool setting = false; + switch (joint) + { + case TrackedHandJoint.IndexTip: + case TrackedHandJoint.MiddleTip: + case TrackedHandJoint.PinkyTip: + case TrackedHandJoint.RingTip: + case TrackedHandJoint.ThumbTip: + setting = true; + break; + + default: + break; + + case TrackedHandJoint.None: + continue; + } + + SessionState.SetBool(showHandJointSettingKeys[joint], setting); + showHandJointSettings[joint] = setting; + } + } + + if (GUILayout.Button("None")) + { + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + if (joint == TrackedHandJoint.None) + { + continue; + } + + SessionState.SetBool(showHandJointSettingKeys[joint], false); + showHandJointSettings[joint] = false; + } + } + + EditorGUILayout.EndHorizontal(); + + #endregion + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + if (joint == TrackedHandJoint.None) + { + continue; + } + + bool prevSetting = showHandJointSettings[joint]; + bool newSetting = EditorGUILayout.Toggle(joint.ToString(), prevSetting); + if (newSetting != prevSetting) + { + SessionState.SetBool(showHandJointSettingKeys[joint], newSetting); + showHandJointSettings[joint] = newSetting; + } + } + EditorGUILayout.EndVertical(); + } + } + + public override void DrawSceneGUI(object target, SceneView sceneView) + { + if (!Application.isPlaying || !ShowHandPreviewInSceneView) + { + return; + } + + IMixedRealityHandJointService handJointService = (IMixedRealityHandJointService)target; + + DrawHandPreview(handJointService, Handedness.Left); + DrawHandPreview(handJointService, Handedness.Right); + } + + public override void DrawGizmos(object target) { } + + public static void DrawHandPreview(IMixedRealityHandJointService handJointService, Handedness handedness) + { + if (!handJointService.IsHandTracked(handedness)) + { + return; + } + + GenerateHandJointLookup(); + + Handles.color = previewJointColor; + + foreach (KeyValuePair setting in showHandJointSettings) + { + if (!setting.Value) + { + continue; + } + + Transform jointTransform = handJointService.RequestJointTransform(setting.Key, handedness); + + if (jointTransform == null) + { + continue; + } + + Handles.SphereHandleCap(0, jointTransform.position, jointTransform.rotation, previewJointSize, EventType.Repaint); + } + } + + private static void GenerateHandJointLookup() + { + if (showHandJointSettings != null) + { + return; + } + + showHandJointSettingKeys = new Dictionary(); + showHandJointSettings = new Dictionary(); + + foreach (TrackedHandJoint joint in Enum.GetValues(typeof(TrackedHandJoint))) + { + if (joint == TrackedHandJoint.None) + { + continue; + } + + string key = ShowHandJointKeyPrefix + joint; + showHandJointSettingKeys.Add(joint, key); + + bool showHandJoint = SessionState.GetBool(key, true); + showHandJointSettings.Add(joint, showHandJoint); + } + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs.meta new file mode 100644 index 00000000000..59a1a0738fe --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/HandJointServiceInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8829b80f825412d4490d4fe8b27ad4ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs new file mode 100644 index 00000000000..c9c2d1c3222 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEditor; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + /// + /// Used to populate service facades with content. + /// To use, create a class that implements this interface + /// and mark it with the MixedRealityServiceInspector attribute. + /// + public interface IMixedRealityServiceInspector + { + /// + /// If true, inspector will include a field for the service's profile at the top (if applicable) + /// + bool DrawProfileField { get; } + + /// + /// If true, DrawSceneGUI will be called even when facade object is not selected. + /// + bool AlwaysDrawSceneGUI { get; } + + /// + /// Used to draw an inspector for a service facade. + /// + void DrawInspectorGUI(object target); + + /// + /// Used to draw handles and visualizations in scene view. + /// + void DrawSceneGUI(object target, SceneView sceneView); + + /// + /// Used to draw gizmos in the scene + /// + /// + void DrawGizmos(object target); + } +} diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs.meta new file mode 100644 index 00000000000..0639ba54cf7 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/IMixedRealityServiceInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 252db3cd84cc38447a2ec3b7e44e0928 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef new file mode 100644 index 00000000000..b74eb7ea0fb --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef @@ -0,0 +1,25 @@ +{ + "name": "MixedRealityToolkit.Core.Inspectors.ServiceInspectors", + "references": [ + "Microsoft.MixedReality.Toolkit", + "Microsoft.MixedReality.Toolkit.Core.Extensions.EditorClassExtensions", + "Microsoft.MixedReality.Toolkit.Core.Definitions.Utilities.Editor", + "Microsoft.MixedReality.Toolkit.Core.Utilities.Editor", + "Microsoft.MixedReality.Toolkit.Core.Utilities.Async", + "Microsoft.MixedReality.Toolkit.Services.InputSystem", + "Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem", + "Microsoft.MixedReality.Toolkit.Services.BoundarySystem", + "Microsoft.MixedReality.Toolkit.Services.TeleportSystem", + "Microsoft.MixedReality.Toolkit.Core.Inspectors" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef.meta new file mode 100644 index 00000000000..af3e4dd8118 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/MixedRealityToolkit.Core.Inspectors.ServiceInspectors.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8213dc10c274b714cb89afec31623845 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs new file mode 100644 index 00000000000..c4d003483fd --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Boundary; +using Microsoft.MixedReality.Toolkit.CameraSystem; +using Microsoft.MixedReality.Toolkit.Diagnostics; +using Microsoft.MixedReality.Toolkit.Editor; +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.SpatialAwareness; +using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Utilities.Facades +{ + [CustomEditor(typeof(ServiceFacade))] + [InitializeOnLoad] + public class ServiceFacadeEditor : UnityEditor.Editor + { + static ServiceFacadeEditor() + { + // Register this on startup so we can update whether a facade inspector is updated or not + SceneView.onSceneGUIDelegate += DrawSceneGUI; + } + + private static List dataProviderList = new List(); + private static Dictionary inspectorTypeLookup = new Dictionary(); + private static Dictionary inspectorInstanceLookup = new Dictionary(); + private static bool initializedServiceInspectorLookup = false; + + Color proHeaderColor = (Color)new Color32(56, 56, 56, 255); + Color defaultHeaderColor = (Color)new Color32(194, 194, 194, 255); + + const int headerXOffset = 48; + const int docLinkWidth = 175; + + [SerializeField] + private Texture2D logoLightTheme = null; + + [SerializeField] + private Texture2D logoDarkTheme = null; + + protected virtual void Awake() + { + string assetPath = "StandardAssets/Textures"; + + if (logoLightTheme == null) + { + logoLightTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath($"{assetPath}/MRTK_Logo_Black.png"), typeof(Texture2D)); + } + + if (logoDarkTheme == null) + { + logoDarkTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath($"{assetPath}/MRTK_Logo_White.png"), typeof(Texture2D)); + } + } + + protected override void OnHeaderGUI() + { + ServiceFacade facade = (ServiceFacade)target; + + // Draw a rect over the top of the existing header label + var labelRect = EditorGUILayout.GetControlRect(false, 0f); + labelRect.height = EditorGUIUtility.singleLineHeight; + labelRect.y -= labelRect.height; + labelRect.x = headerXOffset; + labelRect.xMax -= labelRect.x * 2f; + + EditorGUI.DrawRect(labelRect, EditorGUIUtility.isProSkin ? proHeaderColor : defaultHeaderColor); + + // Draw a new label + string header = facade.name; + if (string.IsNullOrEmpty(header)) + header = target.ToString(); + + EditorGUI.LabelField(labelRect, header, EditorStyles.boldLabel); + } + + public override void OnInspectorGUI() + { + OnHeaderGUI(); + + ServiceFacade facade = (ServiceFacade)target; + + if (facade.Service == null) + { // Facade has likely been destroyed + return; + } + + if (!MixedRealityToolkit.IsInitialized || !MixedRealityToolkit.Instance.HasActiveProfile) + { + return; + } + + InitializeServiceInspectorLookup(); + + bool drawDocLink = DrawDocLink(facade.ServiceType); + bool drawDataProviders = DrawDataProviders(facade.ServiceType); + bool drawProfile = DrawProfile(facade.ServiceType); + bool drawInspector = DrawInspector(facade); + + bool drewSomething = drawProfile | drawInspector | drawDataProviders; + + if (!drewSomething) + { + // If we haven't drawn anything at all, draw a label so people aren't confused. + EditorGUILayout.HelpBox("No inspector has been defined for this service type.", MessageType.Info); + } + + } + + /// + /// Draws button linking to documentation. + /// + /// + /// + private bool DrawDocLink(Type serviceType) + { + DocLinkAttribute docLink = serviceType.GetCustomAttribute(); + if (docLink != null) + { + GUIContent buttonContent = new GUIContent(); + buttonContent.image = EditorGUIUtility.IconContent("_Help").image; + buttonContent.text = " Documentation"; + buttonContent.tooltip = docLink.URL; + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + + if (GUILayout.Button(buttonContent, GUILayout.MaxWidth(docLinkWidth))) + { + Application.OpenURL(docLink.URL); + } + + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + EditorGUILayout.Space(); + return true; + } + return false; + } + + /// + /// Draws a list of services that use this as a data provider + /// + /// + /// + private bool DrawDataProviders(Type serviceType) + { + // If this is a data provider being used by other services, mention that now + dataProviderList.Clear(); + foreach (MixedRealityDataProviderAttribute dataProviderAttribute in serviceType.GetCustomAttributes(typeof(MixedRealityDataProviderAttribute), true)) + { + dataProviderList.Add(" • " + dataProviderAttribute.ServiceInterfaceType.Name); + } + + if (dataProviderList.Count > 0) + { + EditorGUILayout.HelpBox("This data provider is used by the following services:\n " + String.Join("\n", dataProviderList.ToArray()), MessageType.Info); + EditorGUILayout.Space(); + return true; + } + return false; + } + + /// + /// Draws the custom inspector gui for service type. + /// + /// + /// + private bool DrawInspector(ServiceFacade facade) + { + IMixedRealityServiceInspector inspectorInstance; + if (GetServiceInspectorInstance(facade.ServiceType, out inspectorInstance)) + { + inspectorInstance.DrawInspectorGUI(facade.Service); + return true; + } + return false; + } + + /// + /// Draws the profile for the service type, if wanted by inspector and found. + /// + /// + /// + private bool DrawProfile(Type serviceType) + { + IMixedRealityServiceInspector inspectorInstance; + if (GetServiceInspectorInstance(serviceType, out inspectorInstance)) + { + if (!inspectorInstance.DrawProfileField) + { // We've been instructed to skip drawing a profile by the inspector + return false; + } + } + + bool foundAndDrewProfile = false; + + // Draw the base profile stuff + if (typeof(BaseCoreSystem).IsAssignableFrom(serviceType)) + { + SerializedObject activeProfileObject = new SerializedObject(MixedRealityToolkit.Instance.ActiveProfile); + // Would be nice to handle this using some other method + // Would be nice to handle this with a lookup instead + if (typeof(IMixedRealityInputSystem).IsAssignableFrom(serviceType)) + { + SerializedProperty serviceProfileProp = activeProfileObject.FindProperty("inputSystemProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + } + else if (typeof(IMixedRealityBoundarySystem).IsAssignableFrom(serviceType)) + { + SerializedProperty serviceProfileProp = activeProfileObject.FindProperty("boundaryVisualizationProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + } + else if (typeof(IMixedRealityDiagnosticsSystem).IsAssignableFrom(serviceType)) + { + SerializedProperty serviceProfileProp = activeProfileObject.FindProperty("diagnosticsSystemProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + } + else if (typeof(IMixedRealitySpatialAwarenessSystem).IsAssignableFrom(serviceType)) + { + SerializedProperty serviceProfileProp = activeProfileObject.FindProperty("spatialAwarenessSystemProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + } + else if (typeof(IMixedRealityCameraSystem).IsAssignableFrom(serviceType)) + { + SerializedProperty serviceProfileProp = activeProfileObject.FindProperty("cameraProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + } + } + else if (typeof(BaseExtensionService).IsAssignableFrom(serviceType)) + { + // Make sure the extension service profile isn't null + if (MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile != null) + { + // If this is an extension service, see if it uses a profile + MixedRealityServiceConfiguration[] serviceConfigs = MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile.Configurations; + for (int serviceIndex = 0; serviceIndex < serviceConfigs.Length; serviceIndex++) + { + MixedRealityServiceConfiguration serviceConfig = serviceConfigs[serviceIndex]; + if (serviceConfig.ComponentType.Type.IsAssignableFrom(serviceType) && serviceConfig.ConfigurationProfile != null) + { + // We found the service that this type uses - draw the profile + SerializedObject serviceConfigObject = new SerializedObject(MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile); + SerializedProperty serviceConfigArray = serviceConfigObject.FindProperty("configurations"); + SerializedProperty serviceConfigProp = serviceConfigArray.GetArrayElementAtIndex(serviceIndex); + SerializedProperty serviceProfileProp = serviceConfigProp.FindPropertyRelative("configurationProfile"); + BaseMixedRealityProfileInspector.RenderReadOnlyProfile(serviceProfileProp); + EditorGUILayout.Space(); + foundAndDrewProfile = true; + break; + } + } + } + } + + return foundAndDrewProfile; + } + + /// + /// Gathers service types from all assemblies. + /// + private static void InitializeServiceInspectorLookup() + { + if (initializedServiceInspectorLookup) + { + return; + } + + inspectorTypeLookup.Clear(); + + var typesWithMyAttribute = + from assembly in AppDomain.CurrentDomain.GetAssemblies().AsParallel() + from classType in assembly.GetTypes() + let attribute = classType.GetCustomAttribute(true) + where attribute != null + select new { ClassType = classType, Attribute = attribute }; + + foreach (var result in typesWithMyAttribute) + { + inspectorTypeLookup.Add(result.Attribute.ServiceType, result.ClassType); + } + + initializedServiceInspectorLookup = true; + } + + /// + /// Draws gizmos for facade. + /// + /// + /// + [DrawGizmo(GizmoType.NonSelected | GizmoType.Selected | GizmoType.Active)] + private static void DrawGizmos(ServiceFacade facade, GizmoType type) + { + if (facade.Service == null) + { + return; + } + + if (!MixedRealityToolkit.IsInitialized || !MixedRealityToolkit.Instance.HasActiveProfile) + { + return; + } + + InitializeServiceInspectorLookup(); + + // Find and draw the custom inspector + IMixedRealityServiceInspector inspectorInstance; + if (!GetServiceInspectorInstance(facade.ServiceType, out inspectorInstance)) + { + return; + } + + // If we've implemented a facade inspector, draw gizmos now + inspectorInstance.DrawGizmos(facade.Service); + } + + /// + /// Draws scene gui for facade. + /// + /// + private static void DrawSceneGUI(SceneView sceneView) + { + if (!MixedRealityToolkit.IsInitialized || !MixedRealityToolkit.Instance.HasActiveProfile) + { + return; + } + + InitializeServiceInspectorLookup(); + + foreach (KeyValuePair inspectorTypePair in inspectorTypeLookup) + { + // Find the facade associated with this service + ServiceFacade facade; + // If no facade exists for this service type, move on + if (!ServiceFacade.FacadeServiceLookup.TryGetValue(inspectorTypePair.Key, out facade) || facade.Destroyed || facade == null) + { + continue; + } + + IMixedRealityServiceInspector inspectorInstance; + if (!GetServiceInspectorInstance(inspectorTypePair.Key, out inspectorInstance)) + { + continue; + } + + if (Selection.Contains(facade) || inspectorInstance.AlwaysDrawSceneGUI) + { + inspectorInstance.DrawSceneGUI(facade.Service, sceneView); + } + } + } + + /// + /// Gets an instance of the service type. Returns false if no instance is found. + /// + /// + /// + /// + private static bool GetServiceInspectorInstance(Type serviceType, out IMixedRealityServiceInspector inspectorInstance) + { + inspectorInstance = null; + + Type inspectorType; + if (inspectorTypeLookup.TryGetValue(serviceType, out inspectorType)) + { + if (!inspectorInstanceLookup.TryGetValue(inspectorType, out inspectorInstance)) + { + // If an instance of the class doesn't exist yet, create it now + try + { + inspectorInstance = (IMixedRealityServiceInspector)Activator.CreateInstance(inspectorType); + inspectorInstanceLookup.Add(inspectorType, inspectorInstance); + return true; + } + catch (Exception e) + { + Debug.LogError("Couldn't create instance of inspector type " + inspectorType); + Debug.LogException(e); + } + } + else + { + return true; + } + } + + return inspectorInstance != null; + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs.meta new file mode 100644 index 00000000000..5a8d60671a9 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/ServiceFacadeInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 75c7137de81a14e4ba0645725e79e844 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs new file mode 100644 index 00000000000..47bb77509ab --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.SpatialAwareness; +using Microsoft.MixedReality.Toolkit.Utilities; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + [MixedRealityServiceInspector(typeof(MixedRealitySpatialAwarenessSystem))] + public class SpatialAwarenessSystemInspector : BaseMixedRealityServiceInspector + { + private const string ShowObserverBoundaryKey = "MRTK_SpatialAwarenessSystemInspector_ShowObserverBoundaryKey"; + private const string ShowObserverOriginKey = "MRTK_SpatialAwarenessSystemInspector_ShowObserverOriginKey"; + + private static bool ShowObserverBoundary = false; + private static bool ShowObserverOrigin = false; + + private static readonly Color[] observerColors = new Color[] { Color.blue, Color.cyan, Color.green, Color.magenta, Color.red, Color.yellow }; + private static readonly Color originColor = new Color(0.75f, 0.1f, 0.75f, 0.75f); + private static readonly Color enabledColor = GUI.backgroundColor; + private static readonly Color disabledColor = Color.Lerp(enabledColor, Color.clear, 0.5f); + + public override bool AlwaysDrawSceneGUI { get { return false; } } + + public override void DrawInspectorGUI(object target) + { + MixedRealitySpatialAwarenessSystem spatial = (MixedRealitySpatialAwarenessSystem)target; + + EditorGUILayout.LabelField("Observers", EditorStyles.boldLabel); + int observerIndex = 0; + foreach (IMixedRealitySpatialAwarenessObserver observer in spatial.GetObservers()) + { + GUI.color = observer.IsRunning ? enabledColor : disabledColor; + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + GUI.color = GetObserverColor(observerIndex); + GUILayout.Button(observer.Name); + GUI.color = observer.IsRunning ? enabledColor : disabledColor; + + EditorGUILayout.Toggle("Running", observer.IsRunning); + EditorGUILayout.LabelField("Source", observer.SourceName); + EditorGUILayout.Toggle("Is Stationary", observer.IsStationaryObserver); + EditorGUILayout.FloatField("Update Interval", observer.UpdateInterval); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Volume Properties", EditorStyles.boldLabel); + EditorGUILayout.EnumPopup("Volume Type", observer.ObserverVolumeType); + EditorGUILayout.Vector3Field("Origin", observer.ObserverOrigin); + EditorGUILayout.Vector3Field("Rotation", observer.ObserverRotation.eulerAngles); + EditorGUILayout.Vector3Field("Extents", observer.ObservationExtents); + + EditorGUILayout.EndVertical(); + observerIndex++; + } + + GUI.color = enabledColor; + + if (!Application.isPlaying) + { + EditorGUILayout.HelpBox("Observers will be populated once you enter play mode.", MessageType.Info); + } + else if (observerIndex == 0) + { + EditorGUILayout.LabelField("(None found)", EditorStyles.miniLabel); + } + + EditorGUILayout.Space(); + + EditorGUILayout.LabelField("Editor Options", EditorStyles.boldLabel); + ShowObserverBoundary = SessionState.GetBool(ShowObserverBoundaryKey, false); + ShowObserverBoundary = EditorGUILayout.Toggle("Show Observer Boundaries", ShowObserverBoundary); + SessionState.SetBool(ShowObserverBoundaryKey, ShowObserverBoundary); + + ShowObserverOrigin = SessionState.GetBool(ShowObserverOriginKey, false); + ShowObserverOrigin = EditorGUILayout.Toggle("Show Observer Origins", ShowObserverOrigin); + SessionState.SetBool(ShowObserverOriginKey, ShowObserverOrigin); + } + + public override void DrawSceneGUI(object target, SceneView sceneView) { } + + public override void DrawGizmos(object target) + { + if (!(ShowObserverBoundary || ShowObserverOrigin)) + { + return; + } + + MixedRealitySpatialAwarenessSystem spatial = (MixedRealitySpatialAwarenessSystem)target; + + int observerIndex = 0; + foreach (IMixedRealitySpatialAwarenessObserver observer in spatial.GetObservers()) + { + Gizmos.color = GetObserverColor(observerIndex); + + if (ShowObserverBoundary) + { + switch (observer.ObserverVolumeType) + { + case VolumeType.None: + break; + + case VolumeType.AxisAlignedCube: + Gizmos.DrawWireCube(observer.ObserverOrigin, observer.ObservationExtents); + break; + + case VolumeType.Sphere: + Gizmos.DrawWireSphere(observer.ObserverOrigin, observer.ObservationExtents.x); + break; + + case VolumeType.UserAlignedCube: + Gizmos.DrawWireCube(observer.ObserverOrigin, observer.ObservationExtents); + break; + } + } + + Gizmos.matrix = Matrix4x4.identity; + + if (ShowObserverOrigin) + { + Gizmos.DrawSphere(observer.ObserverOrigin, 0.1f); + } + + observerIndex++; + } + } + + private Color GetObserverColor(int observerIndex) + { + if (observerIndex >= observerColors.Length) + { + observerIndex = 0; + } + + return Color.Lerp(Color.white, observerColors[observerIndex], 0.35f); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs.meta new file mode 100644 index 00000000000..adad5ab7c09 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/SpatialAwarenessSystemInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87aa6458300a2d94786a933bbc424427 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs new file mode 100644 index 00000000000..79d12bae811 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Teleport; +using UnityEngine; +using UnityEditor; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + [MixedRealityServiceInspector(typeof(MixedRealityTeleportSystem))] + public class TeleportSystemInspector : BaseMixedRealityServiceInspector + { + private static readonly Color enabledColor = GUI.backgroundColor; + private static readonly Color disabledColor = Color.Lerp(enabledColor, Color.clear, 0.5f); + + public override void DrawInspectorGUI(object target) + { + MixedRealityTeleportSystem teleport = (MixedRealityTeleportSystem)target; + + EditorGUILayout.LabelField("Event Listeners", EditorStyles.boldLabel); + + if (!Application.isPlaying) + { + EditorGUILayout.HelpBox("Event listeners will be populated once you enter play mode.", MessageType.Info); + return; + } + + if (teleport.EventListeners.Count == 0) + { + EditorGUILayout.LabelField("(None found)", EditorStyles.miniLabel); + } + else + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + foreach (GameObject listener in teleport.EventListeners) + { + EditorGUILayout.ObjectField(listener.name, listener, typeof(GameObject), true); + } + EditorGUILayout.EndVertical(); + } + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs.meta b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs.meta new file mode 100644 index 00000000000..dd539f29189 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/TeleportSystemInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f34a2ab5ac91c448a0d02a4b0992f06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/ChannelPackerWindow.cs b/Assets/MixedRealityToolkit/Inspectors/TextureCombinerWindow.cs similarity index 86% rename from Assets/MixedRealityToolkit/Inspectors/ChannelPackerWindow.cs rename to Assets/MixedRealityToolkit/Inspectors/TextureCombinerWindow.cs index 968535c030f..07b96473004 100644 --- a/Assets/MixedRealityToolkit/Inspectors/ChannelPackerWindow.cs +++ b/Assets/MixedRealityToolkit/Inspectors/TextureCombinerWindow.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using UnityEditor; @@ -7,7 +7,7 @@ namespace Microsoft.MixedReality.Toolkit.Editor { - public class ChannelPackerWindow : EditorWindow + public class TextureCombinerWindow : EditorWindow { private enum Channel { @@ -18,6 +18,14 @@ private enum Channel RGBAverage = 4 } + private enum TextureFormat + { + TGA = 0, + PNG = 1, + JPG = 2 + } + + private static readonly string[] textureExtensions = new string[] { "tga", "png", "jpg" }; private const float defaultUniformValue = -0.01f; private Texture2D metallicMap; @@ -33,17 +41,18 @@ private enum Channel private Channel smoothnessMapChannel = Channel.Alpha; private float smoothnessUniform = defaultUniformValue; private Material standardMaterial; + private TextureFormat textureFormat = TextureFormat.TGA; private const string StandardShaderName = "Standard"; private const string StandardRoughnessShaderName = "Standard (Roughness setup)"; private const string StandardSpecularShaderName = "Standard (Specular setup)"; - [MenuItem("Mixed Reality Toolkit/Utilities/Channel Packer")] + [MenuItem("Mixed Reality Toolkit/Utilities/Texture Combiner")] private static void ShowWindow() { - ChannelPackerWindow window = GetWindow(); - window.titleContent = new GUIContent("Channel Packer"); - window.minSize = new Vector2(380.0f, 680.0f); + TextureCombinerWindow window = GetWindow(); + window.titleContent = new GUIContent("Texture Combiner"); + window.minSize = new Vector2(380.0f, 700.0f); window.Show(); } @@ -94,6 +103,8 @@ private void OnGUI() GUILayout.Label("Export", EditorStyles.boldLabel); + textureFormat = (TextureFormat)EditorGUILayout.EnumPopup("Texture Format", textureFormat); + if (GUILayout.Button("Save Channel Map")) { Save(); @@ -172,17 +183,31 @@ private void Save() RenderTexture.ReleaseTemporary(renderTexture); // Save the texture to disk. - string filename = string.Format("{0}{1}.png", GetChannelMapName(textures), "_Channel"); - string path = EditorUtility.SaveFilePanel("Save Channel Map", "", filename, "png"); + string filename = string.Format("{0}{1}.{2}", GetChannelMapName(textures), "_Channel", textureExtensions[(int)textureFormat]); + string path = EditorUtility.SaveFilePanel("Save Channel Map", "", filename, textureExtensions[(int)textureFormat]); if (path.Length != 0) { - byte[] pngData = channelMap.EncodeToPNG(); + byte[] textureData = null; + + switch (textureFormat) + { + case TextureFormat.TGA: + textureData = channelMap.EncodeToTGA(); + break; + case TextureFormat.PNG: + textureData = channelMap.EncodeToPNG(); + break; + case TextureFormat.JPG: + textureData = channelMap.EncodeToJPG(); + break; + } - if (pngData != null) + if (textureData != null) { - File.WriteAllBytes(path, pngData); + File.WriteAllBytes(path, textureData); Debug.LogFormat("Saved channel map to: {0}", path); + AssetDatabase.Refresh(); } } } @@ -224,8 +249,8 @@ private static string GetChannelMapName(Texture[] textures) private static void CalculateChannelMapSize(Texture[] textures, out int width, out int height) { - width = 1; - height = 1; + width = 4; + height = 4; // Find the max extents of all texture maps. foreach (Texture texture in textures) diff --git a/Assets/MixedRealityToolkit/Inspectors/ChannelPackerWindow.cs.meta b/Assets/MixedRealityToolkit/Inspectors/TextureCombinerWindow.cs.meta similarity index 100% rename from Assets/MixedRealityToolkit/Inspectors/ChannelPackerWindow.cs.meta rename to Assets/MixedRealityToolkit/Inspectors/TextureCombinerWindow.cs.meta diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs index 96320574999..48275a13ab2 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs @@ -22,29 +22,28 @@ public static class MixedRealityInspectorUtility /// Check and make sure we have a Mixed Reality Toolkit and an active profile. /// /// True if the Mixed Reality Toolkit is properly initialized. - public static bool CheckMixedRealityConfigured(bool showHelpBox = true) + public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, bool showCreateButton = false) { if (!MixedRealityToolkit.IsInitialized) { - // Search the scene for one, in case we've just hot reloaded the assembly. - var managerSearch = Object.FindObjectsOfType(); - - if (managerSearch.Length == 0) + if (renderEditorElements) { - if (showHelpBox) + EditorGUILayout.HelpBox("No Mixed Reality Toolkit found in scene.", MessageType.Error); + + if (showCreateButton && GUILayout.Button("Click here to add Mixed Reality Toolkit instance to scene")) { - EditorGUILayout.HelpBox("No Mixed Reality Toolkit found in scene.", MessageType.Error); + new GameObject("MixedRealityToolkit").AddComponent(); } - - return false; + EditorGUILayout.Space(); } - MixedRealityToolkit.ConfirmInitialized(); + // Don't proceeed + return false; } if (!MixedRealityToolkit.Instance.HasActiveProfile) { - if (showHelpBox) + if (renderEditorElements) { EditorGUILayout.HelpBox("No Active Profile set on the Mixed Reality Toolkit.", MessageType.Error); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs new file mode 100644 index 00000000000..0db8d46cdaf --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + public class MixedRealityStylesUtility + { + public static readonly GUIStyle BoldFoldoutStyle = + new GUIStyle(EditorStyles.foldout) + { + fontStyle = FontStyle.Bold + }; + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta new file mode 100644 index 00000000000..a3cbe0dfd80 --- /dev/null +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f369071b10b1ac54aa21a1b5e5127c44 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/BoundarySystem/IMixedRealityBoundarySystem.cs b/Assets/MixedRealityToolkit/Interfaces/BoundarySystem/IMixedRealityBoundarySystem.cs index 9679696789f..af79310f427 100644 --- a/Assets/MixedRealityToolkit/Interfaces/BoundarySystem/IMixedRealityBoundarySystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/BoundarySystem/IMixedRealityBoundarySystem.cs @@ -13,6 +13,11 @@ namespace Microsoft.MixedReality.Toolkit.Boundary /// public interface IMixedRealityBoundarySystem : IMixedRealityEventSystem, IMixedRealityEventSource { + /// + /// Typed representation of the ConfigurationProfile property. + /// + MixedRealityBoundaryVisualizationProfile BoundaryVisualizationProfile { get; } + /// /// The scale (ex: World Scale) of the experience. /// diff --git a/Assets/MixedRealityToolkit/Interfaces/CameraSystem.meta b/Assets/MixedRealityToolkit/Interfaces/CameraSystem.meta new file mode 100644 index 00000000000..05239e9f1c9 --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/CameraSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98c6d6b25579ad24888e894ef05229d4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs b/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs new file mode 100644 index 00000000000..edcea3fb479 --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +namespace Microsoft.MixedReality.Toolkit.CameraSystem +{ + /// + /// Manager interface for a camera system in the Mixed Reality Toolkit. + /// The camera system is expected to manage settings on the main camera. + /// It should update the camera's clear settings, render mask, etc based on platform. + /// + public interface IMixedRealityCameraSystem : IMixedRealityEventSystem, IMixedRealityEventSource, IMixedRealityDataProvider + { + /// + /// Typed representation of the ConfigurationProfile property. + /// + MixedRealityCameraProfile CameraProfile { get; } + + /// + /// Is the current camera displaying on an Opaque (AR) device or a VR / immersive device + /// + bool IsOpaque { get; } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs.meta b/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs.meta new file mode 100644 index 00000000000..42de7e2d2ab --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/CameraSystem/IMixedRealityCameraSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08a26eaf5a0b88a47b3fb9a7276eab74 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/Devices/IMixedRealityHandVisualizer.cs b/Assets/MixedRealityToolkit/Interfaces/Devices/IMixedRealityHandVisualizer.cs index bed1fd1053f..afcb53c93ff 100644 --- a/Assets/MixedRealityToolkit/Interfaces/Devices/IMixedRealityHandVisualizer.cs +++ b/Assets/MixedRealityToolkit/Interfaces/Devices/IMixedRealityHandVisualizer.cs @@ -4,6 +4,7 @@ using Microsoft.MixedReality.Toolkit.Utilities; using Microsoft.MixedReality.Toolkit.Input; using UnityEngine; +using System; namespace Microsoft.MixedReality.Toolkit.Input { @@ -15,6 +16,7 @@ public interface IMixedRealityHandVisualizer : IMixedRealityControllerVisualizer /// /// Get a game object following the hand joint. /// + [Obsolete("Use HandJointUtils.TryGetJointPose instead of this")] bool TryGetJointTransform(TrackedHandJoint joint, out Transform jointTransform); } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs b/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs index 882437c75f5..5064a618be9 100644 --- a/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs @@ -9,6 +9,11 @@ namespace Microsoft.MixedReality.Toolkit.Diagnostics /// public interface IMixedRealityDiagnosticsSystem : IMixedRealityEventSystem, IMixedRealityEventSource { + /// + /// Typed representation of the ConfigurationProfile property. + /// + MixedRealityDiagnosticsProfile DiagnosticsSystemProfile { get; } + /// /// Enable / disable diagnostic display. /// @@ -23,6 +28,16 @@ public interface IMixedRealityDiagnosticsSystem : IMixedRealityEventSystem, IMix /// bool ShowProfiler { get; set; } + /// + /// Show or hide the frame info (per frame stats). + /// + bool ShowFrameInfo { get; set; } + + /// + /// Show or hide the memory stats (used, peak, and limit). + /// + bool ShowMemoryStats { get; set; } + /// /// The amount of time, in seconds, to collect frames for frame rate calculation. /// diff --git a/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs b/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs deleted file mode 100644 index cac157797ba..00000000000 --- a/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - - -namespace Microsoft.MixedReality.Toolkit -{ - /// - /// Interface to implement reacting to placement of objects. - /// - public interface IMixedRealityPlacementHandler : IMixedRealityEventHandler - { - void OnPlacingStarted(PlacementEventData eventData); - - void OnPlacingCompleted(PlacementEventData eventData); - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs.meta b/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs.meta deleted file mode 100644 index c7c4cb13d48..00000000000 --- a/Assets/MixedRealityToolkit/Interfaces/EventSystem/Handlers/IMixedRealityPlacementHandler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 60c5533bae4f4d1cbc3fe2d01a7f2ea4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/EventSystem/IMixedRealityEventSystem.cs b/Assets/MixedRealityToolkit/Interfaces/EventSystem/IMixedRealityEventSystem.cs index 6d574d16397..e9f4cc6ea2c 100644 --- a/Assets/MixedRealityToolkit/Interfaces/EventSystem/IMixedRealityEventSystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/EventSystem/IMixedRealityEventSystem.cs @@ -19,8 +19,8 @@ public interface IMixedRealityEventSystem : IMixedRealityService /// /// The main function for handling and forwarding all events to their intended recipients. - /// See: https://docs.unity3d.com/Manual/MessagingSystem.html /// + /// See: https://docs.unity3d.com/Manual/MessagingSystem.html /// Event Handler Interface Type /// Event Data /// Event Handler delegate diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityFocusChangedHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityFocusChangedHandler.cs index 9839751f586..183381668aa 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityFocusChangedHandler.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityFocusChangedHandler.cs @@ -12,8 +12,8 @@ public interface IMixedRealityFocusChangedHandler : IEventSystemHandler { /// /// Focus event that is raised before the focus is actually changed. - /// Useful for logic that needs to take place before focus changes. /// + /// Useful for logic that needs to take place before focus changes. /// void OnBeforeFocusChange(FocusEventData eventData); diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityEyeGazeProvider.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityEyeGazeProvider.cs index f35a5b5550b..4c77d9cfdc3 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityEyeGazeProvider.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityEyeGazeProvider.cs @@ -17,8 +17,13 @@ public interface IMixedRealityEyeGazeProvider : IMixedRealityGazeProvider bool IsEyeGazeValid { get; } /// - /// True to provide eye tracking, when available. + /// If true, eye-based tracking will be used when available. /// + /// + /// The usage of eye-based tracking depends on having the Gaze Input permission set + /// and user approved, along with proper device eye calibration. This will fallback to head-based + /// gaze when eye-based tracking is not available. + /// bool UseEyeTracking { get; set; } /// @@ -37,4 +42,4 @@ public interface IMixedRealityEyeGazeProvider : IMixedRealityGazeProvider /// void UpdateEyeGaze(IMixedRealityEyeGazeDataProvider provider, Ray eyeRay, DateTime timestamp); } -} \ No newline at end of file +} diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityFocusProvider.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityFocusProvider.cs index bfad5e20372..4e926d76cb9 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityFocusProvider.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityFocusProvider.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Input /// /// Implements the Focus Provider for handling focus of pointers. /// - public interface IMixedRealityFocusProvider : IMixedRealitySourceStateHandler, IMixedRealityDataProvider + public interface IMixedRealityFocusProvider : IMixedRealitySourceStateHandler, IMixedRealityDataProvider, IMixedRealitySpeechHandler { /// /// Maximum distance at which all pointers can collide with a GameObject, unless it has an override extent. @@ -24,14 +24,14 @@ public interface IMixedRealityFocusProvider : IMixedRealitySourceStateHandler, I /// /// The Camera the EventSystem uses to raycast against. - /// Every uGUI canvas in your scene should use this camera as its event camera. /// + /// Every uGUI canvas in your scene should use this camera as its event camera. Camera UIRaycastCamera { get; } /// /// Gets the currently focused object for the pointing source. - /// If the pointing source is not registered, then the Gaze's Focused GameObject is returned. /// + /// If the pointing source is not registered, then the Gaze's Focused GameObject is returned. /// /// Currently Focused Object. GameObject GetFocusedObject(IMixedRealityPointer pointingSource); diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityGazeProvider.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityGazeProvider.cs index c1c784d2658..5ecf3deb75e 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityGazeProvider.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityGazeProvider.cs @@ -15,16 +15,6 @@ public interface IMixedRealityGazeProvider /// bool Enabled { get; set; } - /// - /// The instance for which this object is providing gaze data. - /// - IMixedRealityInputSystem InputSystem { set; } - - /// - /// The transform of the Mixed Reality Playspace - /// - Transform Playspace { set; } - /// /// The Gaze Input Source for the provider. /// diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityInputSystem.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityInputSystem.cs index 93d082325fb..448a0f1e959 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityInputSystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityInputSystem.cs @@ -37,6 +37,11 @@ public interface IMixedRealityInputSystem : IMixedRealityEventSystem /// HashSet DetectedControllers { get; } + /// + /// Typed representation of the ConfigurationProfile property. + /// + MixedRealityInputSystemProfile InputSystemProfile { get; } + /// /// The current Focus Provider that's been implemented by this Input System. /// @@ -115,8 +120,8 @@ public interface IMixedRealityInputSystem : IMixedRealityEventSystem /// /// Generates a new unique input source id. - /// All Input Sources are required to call this method in their constructor or initialization. /// + /// All Input Sources are required to call this method in their constructor or initialization. /// a new unique Id for the input source. uint GenerateNewSourceId(); @@ -182,8 +187,8 @@ public interface IMixedRealityInputSystem : IMixedRealityEventSystem /// /// Raise the pre-focus changed event. - /// This event is useful for doing logic before the focus changed event. /// + /// This event is useful for doing logic before the focus changed event. /// The pointer that the focus change event is raised on. /// The old focused object. /// The new focused object. diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityPointer.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityPointer.cs index 5f815c54c64..ad2d0eee3e3 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityPointer.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/IMixedRealityPointer.cs @@ -70,8 +70,7 @@ public interface IMixedRealityPointer : IEqualityComparer /// /// The physics layers to use when performing scene queries. /// - /// If set, will override the 's default scene query layer mask array. - /// + /// If set, will override the 's default scene query layer mask array. /// /// Allow the pointer to hit SR, but first prioritize any DefaultRaycastLayers (potentially behind SR) /// The interface type of the service to be unregistered (ex: IMixedRealityBoundarySystem). /// The name of the service to unregister. /// True if the service was successfully unregistered, false otherwise. - /// If the name argument is not especified, the first instance will be unregistered + /// If the name argument is not specified, the first instance will be unregistered bool UnregisterService(string name = null) where T : IMixedRealityService; /// diff --git a/Assets/MixedRealityToolkit/Interfaces/Services/IMixedRealityService.cs b/Assets/MixedRealityToolkit/Interfaces/Services/IMixedRealityService.cs index 676cfd7aa75..ac8684ccfe0 100644 --- a/Assets/MixedRealityToolkit/Interfaces/Services/IMixedRealityService.cs +++ b/Assets/MixedRealityToolkit/Interfaces/Services/IMixedRealityService.cs @@ -20,6 +20,14 @@ public interface IMixedRealityService : IDisposable /// uint Priority { get; } + /// + /// The configuration profile for the service. + /// + /// + /// Many services may wish to provide a typed version (ex: MixedRealityInputSystemProfile) that casts this value for ease of use in calling code. + /// + BaseMixedRealityProfile ConfigurationProfile { get; } + /// /// The initialize function is used to setup the service once created. /// This method is called once all services have been registered in the Mixed Reality Toolkit. diff --git a/Assets/MixedRealityToolkit/Interfaces/SpatialAwareness/IMixedRealitySpatialAwarenessSystem.cs b/Assets/MixedRealityToolkit/Interfaces/SpatialAwareness/IMixedRealitySpatialAwarenessSystem.cs index 0ca30628aa3..bd064a2211d 100644 --- a/Assets/MixedRealityToolkit/Interfaces/SpatialAwareness/IMixedRealitySpatialAwarenessSystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/SpatialAwareness/IMixedRealitySpatialAwarenessSystem.cs @@ -33,6 +33,11 @@ public interface IMixedRealitySpatialAwarenessSystem : IMixedRealityEventSystem /// uint GenerateNewSourceId(); + /// + /// Typed representation of the ConfigurationProfile property. + /// + MixedRealitySpatialAwarenessSystemProfile SpatialAwarenessSystemProfile { get; } + /// /// Gets the collection of registered data providers. /// @@ -133,7 +138,6 @@ public interface IMixedRealitySpatialAwarenessSystem : IMixedRealityEventSystem /// This method is to be called by implementations of the interface, not by application code. /// void RaiseMeshUpdated(IMixedRealitySpatialAwarenessObserver observer, int meshId, SpatialAwarenessMeshObject meshObject); - // void RaiseObservedObjectUpdated(IMixedRealitySpatialAwarenessObserver observer, int meshId, T observedObject); /// /// 's should call this method to indicate an existing mesh has been removed. diff --git a/Assets/MixedRealityToolkit/Interfaces/TeleportSystem/IMixedRealityTeleportHotSpot.cs b/Assets/MixedRealityToolkit/Interfaces/TeleportSystem/IMixedRealityTeleportHotSpot.cs index 10329200579..ca63df183e0 100644 --- a/Assets/MixedRealityToolkit/Interfaces/TeleportSystem/IMixedRealityTeleportHotSpot.cs +++ b/Assets/MixedRealityToolkit/Interfaces/TeleportSystem/IMixedRealityTeleportHotSpot.cs @@ -30,10 +30,10 @@ public interface IMixedRealityTeleportHotSpot /// /// Should the destination orientation be overridden? /// Useful when you want to orient the user in a specific direction when they teleport to this position. + /// /// /// Override orientation is the transform forward of the GameObject this component is attached to. /// - /// float TargetOrientation { get; } /// diff --git a/Assets/MixedRealityToolkit/Providers/BaseController.cs b/Assets/MixedRealityToolkit/Providers/BaseController.cs index badd58f9dd7..e736ca358ec 100644 --- a/Assets/MixedRealityToolkit/Providers/BaseController.cs +++ b/Assets/MixedRealityToolkit/Providers/BaseController.cs @@ -33,6 +33,23 @@ protected BaseController(TrackingState trackingState, Handedness controllerHande Enabled = true; } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + /// /// The default interactions for this controller. /// @@ -234,10 +251,8 @@ protected virtual bool TryRenderControllerModel(Type controllerType, InputSource } // If we've got a controller model prefab, then create it and place it in the scene. - var playspace = GetPlayspace(); - var controllerObject = (playspace != null) ? - UnityEngine.Object.Instantiate(controllerModel, playspace) : - UnityEngine.Object.Instantiate(controllerModel); + GameObject controllerObject = UnityEngine.Object.Instantiate(controllerModel); + MixedRealityPlayspace.AddChild(controllerObject.transform); return TryAddControllerModelToSceneHierarchy(controllerObject); } @@ -247,15 +262,6 @@ protected bool TryAddControllerModelToSceneHierarchy(GameObject controllerObject if (controllerObject != null) { controllerObject.name = $"{ControllerHandedness}_{controllerObject.name}"; - var playspace = GetPlayspace(); - if (playspace != null) - { - controllerObject.transform.parent = playspace.transform; - } - else - { - Debug.LogWarning("Playspace was not found. No parent transform was applied to the controller object"); - } Visualizer = controllerObject.GetComponent(); @@ -275,21 +281,11 @@ protected bool TryAddControllerModelToSceneHierarchy(GameObject controllerObject } #region MRTK instance helpers - protected Transform GetPlayspace() - { - if (MixedRealityToolkit.Instance != null) - return MixedRealityToolkit.Instance.MixedRealityPlayspace; - - return null; - } - protected MixedRealityControllerVisualizationProfile GetControllerVisualizationProfile() { - if (MixedRealityToolkit.Instance != null && - MixedRealityToolkit.Instance.ActiveProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null) + if (InputSystem?.InputSystemProfile != null) { - return MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerVisualizationProfile; + return InputSystem.InputSystemProfile.ControllerVisualizationProfile; } return null; @@ -297,11 +293,9 @@ protected MixedRealityControllerVisualizationProfile GetControllerVisualizationP protected bool IsControllerMappingEnabled() { - if (MixedRealityToolkit.Instance != null && - MixedRealityToolkit.Instance.ActiveProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null) + if (InputSystem?.InputSystemProfile != null) { - return MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.IsControllerMappingEnabled; + return InputSystem.InputSystemProfile.IsControllerMappingEnabled; } return false; @@ -309,12 +303,9 @@ protected bool IsControllerMappingEnabled() protected MixedRealityControllerMapping[] GetControllerMappings() { - if (MixedRealityToolkit.Instance != null && - MixedRealityToolkit.Instance.ActiveProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerMappingProfile != null) + if (InputSystem?.InputSystemProfile?.ControllerMappingProfile != null) { - return MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerMappingProfile.MixedRealityControllerMappingProfiles; + return InputSystem.InputSystemProfile.ControllerMappingProfile.MixedRealityControllerMappingProfiles; } return null; diff --git a/Assets/MixedRealityToolkit/Providers/BaseGenericInputSource.cs b/Assets/MixedRealityToolkit/Providers/BaseGenericInputSource.cs index eaa02581a64..fc75620e10a 100644 --- a/Assets/MixedRealityToolkit/Providers/BaseGenericInputSource.cs +++ b/Assets/MixedRealityToolkit/Providers/BaseGenericInputSource.cs @@ -8,9 +8,9 @@ namespace Microsoft.MixedReality.Toolkit.Input { /// /// Base class for input sources that don't inherit from MonoBehaviour. + /// /// This base class does not support adding or removing pointers, because many will never /// pass pointers in their constructors and will fall back to either the Gaze or Mouse Pointer. - /// public class BaseGenericInputSource : IMixedRealityInputSource, IDisposable { /// @@ -20,12 +20,29 @@ public class BaseGenericInputSource : IMixedRealityInputSource, IDisposable /// public BaseGenericInputSource(string name, IMixedRealityPointer[] pointers = null, InputSourceType sourceType = InputSourceType.Other) { - SourceId = MixedRealityToolkit.InputSystem.GenerateNewSourceId(); + SourceId = (InputSystem != null) ? InputSystem.GenerateNewSourceId() : 0; SourceName = name; - Pointers = pointers ?? new[] { MixedRealityToolkit.InputSystem.GazeProvider.GazePointer }; + Pointers = pointers ?? new[] { InputSystem?.GazeProvider.GazePointer }; SourceType = sourceType; } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + /// public uint SourceId { get; } diff --git a/Assets/MixedRealityToolkit/Providers/BaseInputDeviceManager.cs b/Assets/MixedRealityToolkit/Providers/BaseInputDeviceManager.cs index f4d8cef746e..863459643a6 100644 --- a/Assets/MixedRealityToolkit/Providers/BaseInputDeviceManager.cs +++ b/Assets/MixedRealityToolkit/Providers/BaseInputDeviceManager.cs @@ -17,16 +17,12 @@ public abstract class BaseInputDeviceManager : BaseDataProvider, IMixedRealityIn /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public BaseInputDeviceManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name, uint priority, BaseMixedRealityProfile profile): base(registrar, inputSystem, name, priority, profile) @@ -35,29 +31,19 @@ public abstract class BaseInputDeviceManager : BaseDataProvider, IMixedRealityIn { Debug.LogError($"{name} requires a valid input system instance."); } + InputSystem = inputSystem; - if (inputSystemProfile == null) - { - Debug.LogError($"{name} requires a valid input system profile."); - } - InputSystemProfile = inputSystemProfile; - - if (playspace == null) - { - Debug.LogError($"{name} requires a playspace Transform."); - } - Playspace = playspace; } /// - /// The input system configuration profile in use in the application. + /// The active instance of the input system. /// - protected MixedRealityInputSystemProfile InputSystemProfile = null; + protected IMixedRealityInputSystem InputSystem { get; private set; } /// - /// Transform used to parent controllers and pointers so that they move correctly with the user during teleportation. + /// The input system configuration profile in use in the application. /// - protected Transform Playspace = null; + protected MixedRealityInputSystemProfile InputSystemProfile => InputSystem?.InputSystemProfile; /// public virtual IMixedRealityController[] GetActiveControllers() => new IMixedRealityController[0]; @@ -84,9 +70,9 @@ protected virtual IMixedRealityPointer[] RequestPointers(SupportedControllerType if (((pointerProfile.ControllerType & controllerType) != 0) && (pointerProfile.Handedness == Handedness.Any || pointerProfile.Handedness == Handedness.Both || pointerProfile.Handedness == controllingHand)) { - var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab, Playspace); + var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab); + MixedRealityPlayspace.AddChild(pointerObject.transform); var pointer = pointerObject.GetComponent(); - pointerObject.transform.SetParent(Playspace); if (pointer != null) { diff --git a/Assets/MixedRealityToolkit/Providers/BaseSpatialObserver.cs b/Assets/MixedRealityToolkit/Providers/BaseSpatialObserver.cs index a8f4612d15c..1c7da30fdc8 100644 --- a/Assets/MixedRealityToolkit/Providers/BaseSpatialObserver.cs +++ b/Assets/MixedRealityToolkit/Providers/BaseSpatialObserver.cs @@ -24,18 +24,18 @@ public class BaseSpatialObserver : BaseDataProvider, IMixedRealitySpatialAwarene uint priority = DefaultPriority, BaseMixedRealityProfile profile = null) : base(registrar, spatialAwarenessSystem, name, priority, profile) { - if (MixedRealityToolkit.SpatialAwarenessSystem != null) - { - SourceId = MixedRealityToolkit.SpatialAwarenessSystem.GenerateNewSourceId(); - } - else - { - Debug.LogError($"A spatial observer is registered in your service providers profile, but the spatial awareness system is turned off. Please either turn on spatial awareness or remove {name}."); - } + SpatialAwarenessSystem = spatialAwarenessSystem; + SourceId = (SpatialAwarenessSystem != null) ? SpatialAwarenessSystem.GenerateNewSourceId() : 0; SourceName = name; + } + /// + /// The spatial awareness system that is associated with this observer. + /// + protected IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem { get; private set; } + #region IMixedRealityEventSource Implementation /// diff --git a/Assets/MixedRealityToolkit/Providers/GenericPointer.cs b/Assets/MixedRealityToolkit/Providers/GenericPointer.cs index 81b6e8af164..c6321c6acf0 100644 --- a/Assets/MixedRealityToolkit/Providers/GenericPointer.cs +++ b/Assets/MixedRealityToolkit/Providers/GenericPointer.cs @@ -20,11 +20,28 @@ public abstract class GenericPointer : IMixedRealityPointer /// public GenericPointer(string pointerName, IMixedRealityInputSource inputSourceParent) { - PointerId = MixedRealityToolkit.InputSystem.FocusProvider.GenerateNewPointerId(); + PointerId = (InputSystem?.FocusProvider != null) ? InputSystem.FocusProvider.GenerateNewPointerId() : 0; PointerName = pointerName; this.inputSourceParent = inputSourceParent; } + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + /// public virtual IMixedRealityController Controller { diff --git a/Assets/MixedRealityToolkit/Providers/Hands/BaseHandVisualizer.cs b/Assets/MixedRealityToolkit/Providers/Hands/BaseHandVisualizer.cs index 6cbe0df2f46..bb05d0349b9 100644 --- a/Assets/MixedRealityToolkit/Providers/Hands/BaseHandVisualizer.cs +++ b/Assets/MixedRealityToolkit/Providers/Hands/BaseHandVisualizer.cs @@ -18,14 +18,31 @@ public class BaseHandVisualizer : MonoBehaviour, IMixedRealityHandVisualizer, IM protected readonly Dictionary joints = new Dictionary(); protected MeshFilter handMeshFilter; + private IMixedRealityInputSystem inputSystem = null; + + /// + /// The active instance of the input system. + /// + protected IMixedRealityInputSystem InputSystem + { + get + { + if (inputSystem == null) + { + MixedRealityServiceRegistry.TryGetService(out inputSystem); + } + return inputSystem; + } + } + private void OnEnable() { - MixedRealityToolkit.InputSystem?.Register(gameObject); + InputSystem?.Register(gameObject); } private void OnDisable() { - MixedRealityToolkit.InputSystem?.Unregister(gameObject); + InputSystem?.Unregister(gameObject); } private void OnDestroy() @@ -75,7 +92,7 @@ void IMixedRealityHandJointHandler.OnHandJointsUpdated(InputEventData eventData) } if (handMeshFilter == null && - MixedRealityToolkit.Instance.HasActiveProfile && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile != null && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile.HandMeshPrefab != null) + InputSystem?.InputSystemProfile?.HandTrackingProfile?.HandMeshPrefab != null) { - handMeshFilter = Instantiate(MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile.HandMeshPrefab).GetComponent(); + handMeshFilter = Instantiate(InputSystem.InputSystemProfile.HandTrackingProfile.HandMeshPrefab).GetComponent(); } if (handMeshFilter != null) diff --git a/Assets/MixedRealityToolkit/Providers/Hands/HandJointService.cs b/Assets/MixedRealityToolkit/Providers/Hands/HandJointService.cs index 409f261e6c9..3229cc68b1e 100644 --- a/Assets/MixedRealityToolkit/Providers/Hands/HandJointService.cs +++ b/Assets/MixedRealityToolkit/Providers/Hands/HandJointService.cs @@ -11,6 +11,7 @@ namespace Microsoft.MixedReality.Toolkit.Input typeof(IMixedRealityInputSystem), (SupportedPlatforms)(-1), // All platforms supported by Unity "Hand Joint Service")] + [DocLink("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/InputSystem/HandTracking.html")] public class HandJointService : BaseInputDeviceManager, IMixedRealityHandJointService { private IMixedRealityHand leftHand; @@ -24,18 +25,17 @@ public class HandJointService : BaseInputDeviceManager, IMixedRealityHandJointSe public HandJointService( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name, uint priority, - BaseMixedRealityProfile profile) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile) : base(registrar, inputSystem, name, priority, profile) { } /// public override void LateUpdate() { leftHand = null; rightHand = null; - foreach (var detectedController in MixedRealityToolkit.InputSystem.DetectedControllers) + + foreach (var detectedController in InputSystem.DetectedControllers) { var hand = detectedController as IMixedRealityHand; if (hand != null) diff --git a/Assets/MixedRealityToolkit/Providers/Hands/HandJointUtils.cs b/Assets/MixedRealityToolkit/Providers/Hands/HandJointUtils.cs index e915e9ad407..03720c65448 100644 --- a/Assets/MixedRealityToolkit/Providers/Hands/HandJointUtils.cs +++ b/Assets/MixedRealityToolkit/Providers/Hands/HandJointUtils.cs @@ -8,11 +8,22 @@ namespace Microsoft.MixedReality.Toolkit.Input public static class HandJointUtils { /// - /// Try to find the first matching hand controller and return the pose of the requested joint for that hand. + /// Tries to get the the pose of the requested joint for the first controller with the specified handedness. /// + /// The requested joint + /// The specific hand of interest. This should be either Handedness.Left or Handedness.Right + /// The output pose data public static bool TryGetJointPose(TrackedHandJoint joint, Handedness handedness, out MixedRealityPose pose) { - IMixedRealityHand hand = FindHand(handedness); + return TryGetJointPose(joint, handedness, out pose); + } + + /// + /// Try to find the first matching hand controller of the given type and return the pose of the requested joint for that hand. + /// + public static bool TryGetJointPose(TrackedHandJoint joint, Handedness handedness, out MixedRealityPose pose) where T : class, IMixedRealityHand + { + T hand = FindHand(handedness); if (hand != null) { return hand.TryGetJoint(joint, out pose); @@ -25,14 +36,28 @@ public static bool TryGetJointPose(TrackedHandJoint joint, Handedness handedness /// /// Find the first detected hand controller with matching handedness. /// + /// + /// The given handeness should be either Handedness.Left or Handedness.Right. + /// public static IMixedRealityHand FindHand(Handedness handedness) { - foreach (var detectedController in MixedRealityToolkit.InputSystem.DetectedControllers) + return FindHand(handedness); + } + + /// + /// Find the first detected hand controller of the given type with matching handedness. + /// + public static T FindHand(Handedness handedness) where T : class, IMixedRealityHand + { + IMixedRealityInputSystem inputSystem = null; + if (!MixedRealityServiceRegistry.TryGetService(out inputSystem)) { return null; } + + foreach (var detectedController in inputSystem.DetectedControllers) { - var hand = detectedController as IMixedRealityHand; + var hand = detectedController as T; if (hand != null) { - if (detectedController.ControllerHandedness == handedness) + if ((detectedController.ControllerHandedness & handedness) != 0) { return hand; } diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/GenericJoystickController.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/GenericJoystickController.cs index aa36c2c0c25..72b43818887 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/GenericJoystickController.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/GenericJoystickController.cs @@ -96,11 +96,11 @@ protected void UpdateButtonData(MixedRealityInteractionMapping interactionMappin // Raise input system Event if it enabled if (interactionMapping.BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } } @@ -143,7 +143,7 @@ protected void UpdateSingleAxisData(MixedRealityInteractionMapping interactionMa if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaiseFloatInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.FloatData); + InputSystem?.RaiseFloatInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.FloatData); } return; default: @@ -157,11 +157,11 @@ protected void UpdateSingleAxisData(MixedRealityInteractionMapping interactionMa // Raise input system Event if it enabled if (interactionMapping.BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction); } } } @@ -184,7 +184,7 @@ protected void UpdateDualAxisData(MixedRealityInteractionMapping interactionMapp if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.Vector2Data); + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.Vector2Data); } } @@ -219,7 +219,7 @@ protected void UpdatePoseData(MixedRealityInteractionMapping interactionMapping) if (interactionMapping.Changed) { // Raise input system Event if it enabled - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.PoseData); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, interactionMapping.PoseData); } } } diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs new file mode 100644 index 00000000000..20314a7f6a5 --- /dev/null +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using UnityEngine; +using Microsoft.MixedReality.Toolkit.Input.UnityInput; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + [CreateAssetMenu(menuName = "Mixed Reality Toolkit/Mixed Reality Mouse Input Profile", fileName = "MixedRealityMouseInputProfile", order = (int)CreateProfileMenuItemIndices.MouseInput)] + [MixedRealityServiceProfile(typeof(MouseDeviceManager))] + public class MixedRealityMouseInputProfile : BaseMixedRealityProfile + { + [Header("Mouse Input Settings")] + [SerializeField] + [Range(0.1f, 10f)] + [Tooltip("Mouse cursor speed multiplier that gets applied to the mouse delta.")] + private float mouseSpeed = 0.25f; + /// + /// Defines the mouse cursor speed. + /// Multiplier that gets applied to the mouse delta before converting to world space. + /// + public float MouseSpeed => mouseSpeed; + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs.meta b/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs.meta new file mode 100644 index 00000000000..26c97c294b2 --- /dev/null +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/MixedRealityMouseInputProfile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55135ad05bc8df24b95e28584db89751 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/MouseController.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/MouseController.cs index 6451df515da..057340ab940 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/MouseController.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/MouseController.cs @@ -4,6 +4,7 @@ using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine; using UInput = UnityEngine.Input; +using Microsoft.MixedReality.Toolkit.Input; namespace Microsoft.MixedReality.Toolkit.Input.UnityInput { @@ -47,7 +48,9 @@ public override void SetupDefaultInteractions(Handedness controllerHandedness) } private MixedRealityPose controllerPose = MixedRealityPose.ZeroIdentity; - private Vector2 mouseDelta; + + private MixedRealityMouseInputProfile mouseInputProfile = null; + private MixedRealityMouseInputProfile MouseInputProfile => mouseInputProfile ?? (mouseInputProfile = MixedRealityToolkit.Instance.GetService()?.MouseInputProfile); /// /// Update controller. @@ -65,47 +68,44 @@ public void Update() return; } - if (InputSource.Pointers[0].BaseCursor != null) - { - controllerPose.Position = InputSource.Pointers[0].BaseCursor.Position; - controllerPose.Rotation = InputSource.Pointers[0].BaseCursor.Rotation; - } - - mouseDelta.x = -UInput.GetAxis("Mouse Y"); - mouseDelta.y = UInput.GetAxis("Mouse X"); - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, mouseDelta); - MixedRealityToolkit.InputSystem?.RaiseSourcePoseChanged(InputSource, this, controllerPose); - MixedRealityToolkit.InputSystem?.RaiseSourcePositionChanged(InputSource, this, UInput.mouseScrollDelta); - for (int i = 0; i < Interactions.Length; i++) { + + if (Interactions[i].InputType == DeviceInputType.SpatialPointer) { - Interactions[i].PoseData = controllerPose; - - if (Interactions[i].Changed) + // add mouse delta as rotation + var mouseDeltaRotation = Vector3.zero; + mouseDeltaRotation.x += -UInput.GetAxis("Mouse Y"); + mouseDeltaRotation.y += UInput.GetAxis("Mouse X"); + + if (MouseInputProfile != null) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].PoseData); + mouseDeltaRotation *= MouseInputProfile.MouseSpeed; } - } - if (Interactions[i].InputType == DeviceInputType.PointerPosition) - { - Interactions[i].Vector2Data = mouseDelta; + MixedRealityPose controllerPose = MixedRealityPose.ZeroIdentity; + controllerPose.Rotation = Quaternion.Euler(mouseDeltaRotation); + Interactions[i].PoseData = controllerPose; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].Vector2Data); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].PoseData); } + } - if (Interactions[i].InputType == DeviceInputType.Scroll) + + if (Interactions[i].InputType == DeviceInputType.PointerPosition) { - Interactions[i].Vector2Data = UInput.mouseScrollDelta; + Vector2 mouseDelta; + mouseDelta.x = -UInput.GetAxis("Mouse Y"); + mouseDelta.y = UInput.GetAxis("Mouse X"); + Interactions[i].Vector2Data = mouseDelta; if (Interactions[i].Changed) { - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].Vector2Data); + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].Vector2Data); } } @@ -122,14 +122,24 @@ public void Update() // Raise input system Event if it enabled if (Interactions[i].BoolData) { - MixedRealityToolkit.InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputDown(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } else { - MixedRealityToolkit.InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); + InputSystem?.RaiseOnInputUp(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction); } } } + + if (Interactions[i].InputType == DeviceInputType.Scroll) + { + Interactions[i].Vector2Data = UInput.mouseScrollDelta; + + if (Interactions[i].Changed) + { + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[i].MixedRealityInputAction, Interactions[i].Vector2Data); + } + } } } } diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/MouseDeviceManager.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/MouseDeviceManager.cs index 8dd9091dd2c..895a1165937 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/MouseDeviceManager.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/MouseDeviceManager.cs @@ -19,25 +19,37 @@ public class MouseDeviceManager : BaseInputDeviceManager /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public MouseDeviceManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } /// /// Current Mouse Controller. /// public MouseController Controller { get; private set; } + /// + /// Return the service profile and ensure that the type is correct + /// + public MixedRealityMouseInputProfile MouseInputProfile + { + get + { + var profile = ConfigurationProfile as MixedRealityMouseInputProfile; + if (!profile) + { + Debug.LogError("Profile for Mouse Input Service must be a MixedRealityMouseInputProfile"); + } + return profile; + } + } + /// public override void Enable() { @@ -47,6 +59,12 @@ public override void Enable() return; } + if (Controller != null) + { + // device manager has already been set up + return; + } + #if UNITY_EDITOR if (UnityEditor.EditorWindow.focusedWindow != null) { @@ -111,7 +129,9 @@ public override void Disable() if (Controller != null) { inputSystem?.RaiseSourceLost(Controller.InputSource, Controller); + Controller = null; } } + } } diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityJoystickManager.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityJoystickManager.cs index 5de81893c23..52348cf9e8a 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityJoystickManager.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityJoystickManager.cs @@ -24,19 +24,15 @@ public class UnityJoystickManager : BaseInputDeviceManager /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public UnityJoystickManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } private const float DeviceRefreshInterval = 3.0f; @@ -198,7 +194,7 @@ protected virtual SupportedControllerType GetCurrentControllerType(string joysti return 0; } - if (joystickName.Contains("Xbox")) + if (joystickName.ToLower().Contains("xbox")) { return SupportedControllerType.Xbox; } diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchController.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchController.cs index 51ad1f09ccb..75194a264c9 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchController.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchController.cs @@ -62,12 +62,11 @@ public UnityTouchController(TrackingState trackingState, Handedness controllerHa public override void SetupDefaultInteractions(Handedness controllerHandedness) { AssignControllerMappings(DefaultInteractions); - if (MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile != null) + if (InputSystem?.InputSystemProfile.GesturesProfile != null) { - for (int i = 0; i < MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile.Gestures.Length; i++) + for (int i = 0; i < InputSystem.InputSystemProfile.GesturesProfile.Gestures.Length; i++) { - var gesture = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile.Gestures[i]; + var gesture = InputSystem.InputSystemProfile.GesturesProfile.Gestures[i]; switch (gesture.GestureType) { @@ -87,9 +86,9 @@ public override void SetupDefaultInteractions(Handedness controllerHandedness) /// public void StartTouch() { - MixedRealityToolkit.InputSystem?.RaisePointerDown(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction); + InputSystem?.RaisePointerDown(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction); isTouched = true; - MixedRealityToolkit.InputSystem?.RaiseGestureStarted(this, holdingAction); + InputSystem?.RaiseGestureStarted(this, holdingAction); isHolding = true; } @@ -108,18 +107,18 @@ public void Update() if (Interactions[0].Changed) { - MixedRealityToolkit.InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[0].MixedRealityInputAction, TouchData.deltaPosition); + InputSystem?.RaisePositionInputChanged(InputSource, ControllerHandedness, Interactions[0].MixedRealityInputAction, TouchData.deltaPosition); } lastPose.Position = InputSource.Pointers[0].BaseCursor.Position; lastPose.Rotation = InputSource.Pointers[0].BaseCursor.Rotation; - MixedRealityToolkit.InputSystem?.RaiseSourcePoseChanged(InputSource, this, lastPose); + InputSystem?.RaiseSourcePoseChanged(InputSource, this, lastPose); Interactions[1].PoseData = lastPose; if (Interactions[1].Changed) { - MixedRealityToolkit.InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[1].MixedRealityInputAction, lastPose); + InputSystem?.RaisePoseInputChanged(InputSource, ControllerHandedness, Interactions[1].MixedRealityInputAction, lastPose); } if (!isManipulating) @@ -127,16 +126,16 @@ public void Update() if (Mathf.Abs(TouchData.deltaPosition.x) > ManipulationThreshold || Mathf.Abs(TouchData.deltaPosition.y) > ManipulationThreshold) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, holdingAction); + InputSystem?.RaiseGestureCanceled(this, holdingAction); isHolding = false; - MixedRealityToolkit.InputSystem?.RaiseGestureStarted(this, manipulationAction); + InputSystem?.RaiseGestureStarted(this, manipulationAction); isManipulating = true; } } else { - MixedRealityToolkit.InputSystem?.RaiseGestureUpdated(this, manipulationAction, TouchData.deltaPosition); + InputSystem?.RaiseGestureUpdated(this, manipulationAction, TouchData.deltaPosition); } } } @@ -152,13 +151,13 @@ public void EndTouch() { if (isHolding) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, holdingAction); + InputSystem?.RaiseGestureCanceled(this, holdingAction); isHolding = false; } if (isManipulating) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, manipulationAction); + InputSystem?.RaiseGestureCanceled(this, manipulationAction); isManipulating = false; } } @@ -166,35 +165,35 @@ public void EndTouch() { if (isHolding) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, holdingAction); + InputSystem?.RaiseGestureCanceled(this, holdingAction); isHolding = false; } if (isManipulating) { - MixedRealityToolkit.InputSystem?.RaiseGestureCanceled(this, manipulationAction); + InputSystem?.RaiseGestureCanceled(this, manipulationAction); isManipulating = false; } - MixedRealityToolkit.InputSystem?.RaisePointerClicked(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction, TouchData.tapCount); + InputSystem?.RaisePointerClicked(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction, TouchData.tapCount); } if (isHolding) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, holdingAction); + InputSystem?.RaiseGestureCompleted(this, holdingAction); isHolding = false; } if (isManipulating) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, manipulationAction, TouchData.deltaPosition); + InputSystem?.RaiseGestureCompleted(this, manipulationAction, TouchData.deltaPosition); isManipulating = false; } } if (isHolding) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, holdingAction); + InputSystem?.RaiseGestureCompleted(this, holdingAction); isHolding = false; } @@ -202,13 +201,13 @@ public void EndTouch() if (isManipulating) { - MixedRealityToolkit.InputSystem?.RaiseGestureCompleted(this, manipulationAction, TouchData.deltaPosition); + InputSystem?.RaiseGestureCompleted(this, manipulationAction, TouchData.deltaPosition); isManipulating = false; } Debug.Assert(!isManipulating); - MixedRealityToolkit.InputSystem?.RaisePointerUp(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction); + InputSystem?.RaisePointerUp(InputSource.Pointers[0], Interactions[2].MixedRealityInputAction); Lifetime = 0.0f; isTouched = false; diff --git a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchDeviceManager.cs b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchDeviceManager.cs index ec5ec6a0ed3..bc67c9b834e 100644 --- a/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchDeviceManager.cs +++ b/Assets/MixedRealityToolkit/Providers/UnityInput/UnityTouchDeviceManager.cs @@ -22,19 +22,15 @@ public class UnityTouchDeviceManager : BaseInputDeviceManager /// /// The instance that loaded the data provider. /// The instance that receives data from this provider. - /// The input system configuration profile. - /// The Transform of the playspace object. /// Friendly name of the service. /// Service priority. Used to determine order of instantiation. /// The service's configuration profile. public UnityTouchDeviceManager( IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, - MixedRealityInputSystemProfile inputSystemProfile, - Transform playspace, string name = null, uint priority = DefaultPriority, - BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, inputSystemProfile, playspace, name, priority, profile) { } + BaseMixedRealityProfile profile = null) : base(registrar, inputSystem, name, priority, profile) { } private static readonly Dictionary ActiveTouches = new Dictionary(); diff --git a/Assets/MixedRealityToolkit/Services/BaseCoreSystem.cs b/Assets/MixedRealityToolkit/Services/BaseCoreSystem.cs index 602ec0cc6c5..5eba4f60456 100644 --- a/Assets/MixedRealityToolkit/Services/BaseCoreSystem.cs +++ b/Assets/MixedRealityToolkit/Services/BaseCoreSystem.cs @@ -12,17 +12,12 @@ public abstract class BaseCoreSystem : BaseEventSystem { Registrar = registrar; ConfigurationProfile = profile; - Priority = 5; // Core systems have a higher default priority than other services + Priority = 5; // Core systems have a higher default priority than other services } /// /// The service registrar instance that registered this service. /// protected IMixedRealityServiceRegistrar Registrar { get; set; } = null; - - /// - /// Configuration Profile - /// - protected BaseMixedRealityProfile ConfigurationProfile { get; set; } = null; } } diff --git a/Assets/MixedRealityToolkit/Services/BaseDataProvider.cs b/Assets/MixedRealityToolkit/Services/BaseDataProvider.cs index 5bcde88b7ec..606949b8a4b 100644 --- a/Assets/MixedRealityToolkit/Services/BaseDataProvider.cs +++ b/Assets/MixedRealityToolkit/Services/BaseDataProvider.cs @@ -43,10 +43,5 @@ public abstract class BaseDataProvider : BaseService, IMixedRealityDataProvider /// The service instance to which this provider is providing data. /// protected IMixedRealityService Service { get; set; } = null; - - /// - /// Configuration Profile - /// - protected BaseMixedRealityProfile ConfigurationProfile { get; set; } = null; } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Services/BaseExtensionService.cs b/Assets/MixedRealityToolkit/Services/BaseExtensionService.cs index a89c9090a22..75cbcecb8ba 100644 --- a/Assets/MixedRealityToolkit/Services/BaseExtensionService.cs +++ b/Assets/MixedRealityToolkit/Services/BaseExtensionService.cs @@ -35,10 +35,5 @@ public abstract class BaseExtensionService : BaseService, IMixedRealityExtension /// The service registrar instance that registered this service. /// protected IMixedRealityServiceRegistrar Registrar { get; set; } = null; - - /// - /// Configuration Profile - /// - protected BaseMixedRealityProfile ConfigurationProfile { get; set; } = null; } } diff --git a/Assets/MixedRealityToolkit/Services/BaseService.cs b/Assets/MixedRealityToolkit/Services/BaseService.cs index d39ce07b0f6..225ef5f4b94 100644 --- a/Assets/MixedRealityToolkit/Services/BaseService.cs +++ b/Assets/MixedRealityToolkit/Services/BaseService.cs @@ -20,6 +20,9 @@ public abstract class BaseService : IMixedRealityService /// public virtual uint Priority { get; protected set; } = DefaultPriority; + /// + public virtual BaseMixedRealityProfile ConfigurationProfile { get; protected set; } = null; + /// public virtual void Initialize() { } diff --git a/Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs b/Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs index 6e20244748b..16a555f3a9a 100644 --- a/Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs +++ b/Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs @@ -12,6 +12,7 @@ using System.Linq; using UnityEngine; using UnityEngine.EventSystems; +using Microsoft.MixedReality.Toolkit.CameraSystem; #if UNITY_EDITOR using Microsoft.MixedReality.Toolkit.Input.Editor; @@ -29,7 +30,9 @@ public class MixedRealityToolkit : MonoBehaviour, IMixedRealityServiceRegistrar { #region Mixed Reality Toolkit Profile configuration - private const string MixedRealityPlayspaceName = "MixedRealityPlayspace"; + private const string ActiveInstanceGameObjectName = "MixedRealityToolkit"; + + private const string InactiveInstanceGameObjectName = "MixedRealityToolkit (Inactive)"; private static bool isInitializing = false; @@ -47,15 +50,21 @@ public bool HasActiveProfile return false; } - if (!ConfirmInitialized()) - { - return false; - } - return ActiveProfile != null; } } + /// + /// Returns true if this is the active instance. + /// + public bool IsActiveInstance + { + get + { + return activeInstance == this; + } + } + private bool HasProfileAndIsInitialized => activeProfile != null && IsInitialized; /// @@ -73,13 +82,6 @@ public MixedRealityToolkitConfigurationProfile ActiveProfile { get { -#if UNITY_EDITOR - if (!Application.isPlaying && activeProfile == null) - { - UnityEditor.Selection.activeObject = Instance; - UnityEditor.EditorGUIUtility.PingObject(Instance); - } -#endif // UNITY_EDITOR return activeProfile; } set @@ -123,10 +125,11 @@ public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile) } } -#endregion Mixed Reality Toolkit Profile configuration + #endregion Mixed Reality Toolkit Profile configuration -#region Mixed Reality runtime service registry + #region Mixed Reality runtime service registry + private static HashSet toolkitInstances = new HashSet(); private static readonly Dictionary activeSystems = new Dictionary(); /// @@ -151,13 +154,13 @@ public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile) /// public bool RegisterService(T serviceInstance) where T : IMixedRealityService { - return RegisterServiceInternal(serviceInstance); + return RegisterServiceInternal(serviceInstance); } /// public bool RegisterService( - Type concreteType, - SupportedPlatforms supportedPlatforms = (SupportedPlatforms)(-1), + Type concreteType, + SupportedPlatforms supportedPlatforms = (SupportedPlatforms)(-1), params object[] args) where T : IMixedRealityService { if (isApplicationQuitting) @@ -205,7 +208,7 @@ public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile) public bool UnregisterService(string name = null) where T : IMixedRealityService { T serviceInstance = GetServiceByName(name); - + if (serviceInstance == null) { return false; } return UnregisterService(serviceInstance); @@ -225,6 +228,8 @@ public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile) if (IsCoreSystem(interfaceType)) { activeSystems.Remove(interfaceType); + // Core services are always removable + MixedRealityServiceRegistry.RemoveService(serviceInstance, this); return true; } @@ -233,6 +238,11 @@ public void ResetConfiguration(MixedRealityToolkitConfigurationProfile profile) if (registeredMixedRealityServices.Contains(registryInstance)) { registeredMixedRealityServices.Remove(registryInstance); + if (!(serviceInstance is IMixedRealityDataProvider)) + { + // Only remove IMixedRealityService or IMixedRealityExtensionService (not IMixedRealityDataProvider) + MixedRealityServiceRegistry.RemoveService(serviceInstance, this); + } return true; } @@ -350,23 +360,6 @@ private void InitializeServiceLocator() ClearCoreSystemCache(); EnsureMixedRealityRequirements(); - if (ActiveProfile.IsCameraProfileEnabled) - { - if (ActiveProfile.CameraProfile.IsCameraPersistent) - { - CameraCache.Main.transform.root.DontDestroyOnLoad(); - } - - if (ActiveProfile.CameraProfile.IsOpaque) - { - ActiveProfile.CameraProfile.ApplySettingsForOpaqueDisplay(); - } - else - { - ActiveProfile.CameraProfile.ApplySettingsForTransparentDisplay(); - } - } - #region Services Registration // If the Input system has been selected for initialization in the Active profile, enable it in the project @@ -377,12 +370,12 @@ private void InitializeServiceLocator() InputMappingAxisUtility.CheckUnityInputManagerMappings(ControllerMappingLibrary.UnityInputManagerAxes); #endif - object[] args = { this, ActiveProfile.InputSystemProfile, Instance.MixedRealityPlayspace }; + object[] args = { this, ActiveProfile.InputSystemProfile }; if (!RegisterService(ActiveProfile.InputSystemType, args: args) || InputSystem == null) { Debug.LogError("Failed to start the Input System!"); } - + args = new object[] { this, InputSystem, ActiveProfile.InputSystemProfile }; if (!RegisterDataProvider(ActiveProfile.InputSystemProfile.FocusProviderType, args: args)) { @@ -400,13 +393,23 @@ private void InitializeServiceLocator() // If the Boundary system has been selected for initialization in the Active profile, enable it in the project if (ActiveProfile.IsBoundarySystemEnabled) { - object[] args = { this, ActiveProfile.BoundaryVisualizationProfile, Instance.MixedRealityPlayspace, ActiveProfile.TargetExperienceScale }; + object[] args = { this, ActiveProfile.BoundaryVisualizationProfile, ActiveProfile.TargetExperienceScale }; if (!RegisterService(ActiveProfile.BoundarySystemSystemType, args: args) || BoundarySystem == null) { Debug.LogError("Failed to start the Boundary System!"); } } + // If the Camera system has been selected for initialization in the Active profile, enable it in the project + if (ActiveProfile.IsCameraSystemEnabled) + { + object[] args = { this, ActiveProfile.CameraProfile }; + if (!RegisterService(ActiveProfile.CameraSystemType, args: args) || CameraSystem == null) + { + Debug.LogError("Failed to start the Camera System!"); + } + } + // If the Spatial Awareness system has been selected for initialization in the Active profile, enable it in the project if (ActiveProfile.IsSpatialAwarenessSystemEnabled) { @@ -423,7 +426,7 @@ private void InitializeServiceLocator() // If the Teleport system has been selected for initialization in the Active profile, enable it in the project if (ActiveProfile.IsTeleportSystemEnabled) { - object[] args = { this, Instance.MixedRealityPlayspace }; + object[] args = { this }; if (!RegisterService(ActiveProfile.TeleportSystemSystemType, args: args) || TeleportSystem == null) { Debug.LogError("Failed to start the Teleport System!"); @@ -432,7 +435,7 @@ private void InitializeServiceLocator() if (ActiveProfile.IsDiagnosticsSystemEnabled) { - object[] args = { this, ActiveProfile.DiagnosticsSystemProfile, Instance.MixedRealityPlayspace }; + object[] args = { this, ActiveProfile.DiagnosticsSystemProfile }; if (!RegisterService(ActiveProfile.DiagnosticsSystemSystemType, args: args) || DiagnosticsSystem == null) { Debug.LogError("Failed to start the Diagnostics System!"); @@ -489,6 +492,9 @@ private void EnsureMixedRealityRequirements() // We'll enforce that here, then tracking can update it to the appropriate position later. CameraCache.Main.transform.position = Vector3.zero; + // This will create the playspace + Transform playspace = MixedRealityPlayspace.Transform; + bool addedComponents = false; if (!Application.isPlaying) { @@ -527,147 +533,64 @@ private void EnsureMixedRealityRequirements() #region MonoBehaviour Implementation - private static MixedRealityToolkit instance; + private static MixedRealityToolkit activeInstance; private static bool newInstanceBeingInitialized = false; /// /// Returns the Singleton instance of the classes type. - /// If no instance is found, then we search for an instance in the scene. - /// If more than one instance is found, we log an error and no instance is returned. /// - public static MixedRealityToolkit Instance + public static MixedRealityToolkit Instance => activeInstance; + + private void InitializeInstance() { - get + if (newInstanceBeingInitialized) { - if (IsInitialized) - { - return instance; - } + return; + } - if (Application.isPlaying && !searchForInstance) - { - return null; - } + newInstanceBeingInitialized = true; + gameObject.SetActive(true); - var objects = FindObjectsOfType(); - searchForInstance = false; - MixedRealityToolkit newInstance; + Application.quitting += () => + { + isApplicationQuitting = true; + }; - switch (objects.Length) - { - case 0: #if UNITY_EDITOR - // Generating a new instance during app shutdown in the editor allows instances to persist into edit mode, which may cause unwanted behavior - if (isApplicationQuitting) - { - Debug.LogWarning("Trying to find instance during application shutdown."); - return null; - } -#endif - Debug.Assert(!newInstanceBeingInitialized, "We shouldn't be initializing another MixedRealityToolkit unless we errored on the previous."); - newInstanceBeingInitialized = true; - newInstance = new GameObject(nameof(MixedRealityToolkit)).AddComponent(); - break; - case 1: - newInstanceBeingInitialized = false; - newInstance = objects[0]; - break; - default: - newInstanceBeingInitialized = false; - Debug.LogError($"Expected exactly 1 {nameof(MixedRealityToolkit)} but found {objects.Length}."); - return null; - } - - Debug.Assert(newInstance != null); - - if (!isApplicationQuitting) - { - // Setup any additional things the instance needs. - newInstance.InitializeInstance(); - } - else - { - // Don't do any additional setup because the app is quitting. - instance = newInstance; - newInstanceBeingInitialized = false; - } - - Debug.Assert(instance != null); - - return instance; - } - } - - /// - /// Lock property for the Mixed Reality Toolkit to prevent reinitialization - /// - private static readonly object initializedLock = new object(); - - private void InitializeInstance() - { - lock (initializedLock) + UnityEditor.EditorApplication.playModeStateChanged += playModeState => { - if (IsInitialized) + if (playModeState == UnityEditor.PlayModeStateChange.ExitingEditMode || + playModeState == UnityEditor.PlayModeStateChange.EnteredEditMode) { - newInstanceBeingInitialized = false; - return; + isApplicationQuitting = false; } - instance = this; - - if (Application.isPlaying) + if (playModeState == UnityEditor.PlayModeStateChange.ExitingEditMode && activeProfile == null) { - DontDestroyOnLoad(instance.transform.root); + Debug.Log("Stopping playmode"); + UnityEditor.EditorApplication.isPlaying = false; + UnityEditor.Selection.activeObject = Instance; + UnityEditor.EditorGUIUtility.PingObject(Instance); } + }; - Application.quitting += () => - { - isApplicationQuitting = true; - }; - -#if UNITY_EDITOR - UnityEditor.EditorApplication.playModeStateChanged += playModeState => - { - if (playModeState == UnityEditor.PlayModeStateChange.ExitingEditMode || - playModeState == UnityEditor.PlayModeStateChange.EnteredEditMode) - { - isApplicationQuitting = false; - } - - if (playModeState == UnityEditor.PlayModeStateChange.ExitingEditMode && activeProfile == null) - { - UnityEditor.EditorApplication.isPlaying = false; - UnityEditor.Selection.activeObject = Instance; - UnityEditor.EditorGUIUtility.PingObject(Instance); - } - }; - - UnityEditor.EditorApplication.hierarchyChanged += () => - { - if (instance != null) - { - Debug.Assert(instance.transform.parent == null, "The MixedRealityToolkit should not be parented under any other GameObject!"); - Debug.Assert(instance.transform.childCount == 0, "The MixedRealityToolkit should not have GameObject children!"); - } - }; -#endif // UNITY_EDITOR - - if (HasActiveProfile) + UnityEditor.EditorApplication.hierarchyChanged += () => + { + if (activeInstance != null) { - InitializeServiceLocator(); + Debug.Assert(activeInstance.transform.parent == null, "The MixedRealityToolkit should not be parented under any other GameObject!"); } + }; +#endif // UNITY_EDITOR - newInstanceBeingInitialized = false; + if (HasActiveProfile) + { + InitializeServiceLocator(); } - } - /// - /// Flag to search for instance the first time Instance property is called. - /// Subsequent attempts will generally switch this flag false, unless the instance was destroyed. - /// - // ReSharper disable once StaticMemberInGenericType - private static bool searchForInstance = true; + newInstanceBeingInitialized = false; + } /// /// Expose an assertion whether the MixedRealityToolkit class is initialized. @@ -680,7 +603,7 @@ public static void AssertIsInitialized() /// /// Returns whether the instance has been initialized or not. /// - public static bool IsInitialized => instance != null; + public static bool IsInitialized => activeInstance != null; /// /// Static function to determine if the MixedRealityToolkit class has been initialized or not. @@ -694,126 +617,141 @@ public static bool ConfirmInitialized() return IsInitialized; } - private Transform mixedRealityPlayspace; - - /// - /// Returns the MixedRealityPlayspace for the local player - /// - public Transform MixedRealityPlayspace + private void Awake() { - get - { - AssertIsInitialized(); - - if (mixedRealityPlayspace) - { - return mixedRealityPlayspace; - } - - if (CameraCache.Main.transform.parent == null) - { - mixedRealityPlayspace = new GameObject(MixedRealityPlayspaceName).transform; - CameraCache.Main.transform.SetParent(mixedRealityPlayspace); - } - else - { - if (CameraCache.Main.transform.parent.name != MixedRealityPlayspaceName) - { - // Since the scene is set up with a different camera parent, its likely - // that there's an expectation that that parent is going to be used for - // something else. We print a warning to call out the fact that we're - // co-opting this object for use with teleporting and such, since that - // might cause conflicts with the parent's intended purpose. - Debug.LogWarning($"The Mixed Reality Toolkit expected the camera\'s parent to be named {MixedRealityPlayspaceName}. The existing parent will be renamed and used instead."); - // If we rename it, we make it clearer that why it's being teleported around at runtime. - CameraCache.Main.transform.parent.name = MixedRealityPlayspaceName; - } + RegisterInstance(this); + } - mixedRealityPlayspace = CameraCache.Main.transform.parent; - } + private void OnEnable() + { + RegisterInstance(this); - // It's very important that the MixedRealityPlayspace align with the tracked space, - // otherwise reality-locked things like playspace boundaries won't be aligned properly. - // For now, we'll just assume that when the playspace is first initialized, the - // tracked space origin overlaps with the world space origin. If a platform ever does - // something else (i.e, placing the lower left hand corner of the tracked space at world - // space 0,0,0), we should compensate for that here. - return mixedRealityPlayspace; + if (IsActiveInstance && Application.isPlaying) + { + EnableAllServices(); } } -#if UNITY_EDITOR - private void OnValidate() + private void Update() { - if (!newInstanceBeingInitialized && !IsInitialized && !UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode) + if (IsActiveInstance && Application.isPlaying) { - ConfirmInitialized(); + UpdateAllServices(); } } -#endif // UNITY_EDITOR - private void Awake() + private void LateUpdate() { - if (IsInitialized && instance != this) - { - if (Application.isEditor) - { - DestroyImmediate(this); - } - else - { - Destroy(this); - } - - Debug.LogWarning("Trying to instantiate a second instance of the Mixed Reality Toolkit. Additional Instance was destroyed"); - } - else if (!IsInitialized) + if (IsActiveInstance && Application.isPlaying) { - InitializeInstance(); + LateUpdateAllServices(); } - else + } + + private void OnDisable() + { + if (IsActiveInstance && Application.isPlaying) { - Debug.LogError("Failed to properly initialize the MixedRealityToolkit"); + DisableAllServices(); } } - private void OnEnable() + private void OnDestroy() { - EnableAllServices(); + UnregisterInstance(this); } - private void Update() + #endregion MonoBehaviour Implementation + + #region Instance Registration + + public static void SetActiveInstance(MixedRealityToolkit toolkitInstance) { - UpdateAllServices(); + // Disable the old instance + SetInstanceInactive(activeInstance); + // Immediately register the new instance + RegisterInstance(toolkitInstance); } - private void LateUpdate() + private static void RegisterInstance(MixedRealityToolkit toolkitInstance) { - LateUpdateAllServices(); + if (MixedRealityToolkit.isApplicationQuitting) + { // Don't register instances while application is quitting + return; + } + + if (MixedRealityToolkit.activeInstance == null) + { // If we don't have an instance, set it here + // Set the instance to active + MixedRealityToolkit.activeInstance = toolkitInstance; + toolkitInstances.Add(toolkitInstance); + toolkitInstance.name = ActiveInstanceGameObjectName; + toolkitInstance.InitializeInstance(); + return; + } + + if (!toolkitInstances.Add(toolkitInstance)) + { // If we're already registered, no need to proceed + return; + } + + // If we do, then it's not this instance, so deactivate this instance + toolkitInstance.name = InactiveInstanceGameObjectName; + // Move to the bottom of the heirarchy so it stays out of the way + toolkitInstance.transform.SetSiblingIndex(int.MaxValue); } - private void OnDisable() + private static void UnregisterInstance(MixedRealityToolkit toolkitInstance) { - DisableAllServices(); + toolkitInstances.Remove(toolkitInstance); + + if (MixedRealityToolkit.activeInstance == toolkitInstance) + { // If this is the active instance, we need to break it down + toolkitInstance.DestroyAllServices(); + toolkitInstance.ClearCoreSystemCache(); + // If this was the active instance, un-register the active instance + MixedRealityToolkit.activeInstance = null; + if (MixedRealityToolkit.isApplicationQuitting) + { // Don't search for additional instances if we're quitting + return; + } + + foreach (MixedRealityToolkit instance in toolkitInstances) + { + if (instance == null) + { // This may have been a mass-deletion - be wary of soon-to-be-unregistered instances + continue; + } + // Select the first available instance and register it immediately + RegisterInstance(instance); + break; + } + } } - private void OnDestroy() + private static void SetInstanceInactive(MixedRealityToolkit toolkitInstance) { - DestroyAllServices(); - ClearCoreSystemCache(); + if (toolkitInstance == null) + { // Don't do anything. + return; + } - if (instance == this) - { - instance = null; - searchForInstance = true; + if (toolkitInstance == activeInstance) + { // If this is the active instance, we need to break it down + toolkitInstance.DestroyAllServices(); + toolkitInstance.ClearCoreSystemCache(); + // If this was the active instance, un-register the active instance + MixedRealityToolkit.activeInstance = null; } + toolkitInstance.name = InactiveInstanceGameObjectName; } -#endregion MonoBehaviour Implementation + #endregion Instance Registration -#region Service Container Management + #region Service Container Management -#region Registration + #region Registration + // NOTE: This method intentionally does not add to the registry. This is actually mostly a helper function for RegisterServiceInternal. private bool RegisterServiceInternal(Type interfaceType, IMixedRealityService serviceInstance) { if (serviceInstance == null) @@ -865,7 +803,13 @@ private bool RegisterServiceInternal(Type interfaceType, IMixedRealityService se private bool RegisterServiceInternal(T serviceInstance) where T : IMixedRealityService { Type interfaceType = typeof(T); - return RegisterServiceInternal(interfaceType, serviceInstance); + if (RegisterServiceInternal(interfaceType, serviceInstance)) + { + MixedRealityServiceRegistry.AddService(serviceInstance, this); + return true; + } + + return false; } #endregion Registration @@ -886,7 +830,7 @@ public void EnableAllServicesByType(Type interfaceType) /// /// The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem /// Name of the specific service - public void EnableAllServicesByTypeAndName(Type interfaceType, string serviceName) + public void EnableAllServicesByTypeAndName(Type interfaceType, string serviceName) { if (interfaceType == null) { @@ -1035,6 +979,7 @@ private static bool IsCoreSystem(Type type) } return typeof(IMixedRealityInputSystem).IsAssignableFrom(type) || + typeof(IMixedRealityCameraSystem).IsAssignableFrom(type) || typeof(IMixedRealityFocusProvider).IsAssignableFrom(type) || typeof(IMixedRealityTeleportSystem).IsAssignableFrom(type) || typeof(IMixedRealityBoundarySystem).IsAssignableFrom(type) || @@ -1045,6 +990,7 @@ private static bool IsCoreSystem(Type type) private void ClearCoreSystemCache() { inputSystem = null; + cameraSystem = null; teleportSystem = null; boundarySystem = null; spatialAwarenessSystem = null; @@ -1252,6 +1198,35 @@ public static IMixedRealityBoundarySystem BoundarySystem private static bool logBoundarySystem = true; + private static IMixedRealityCameraSystem cameraSystem = null; + + /// + /// The current Camera System registered with the Mixed Reality Toolkit. + /// + public static IMixedRealityCameraSystem CameraSystem + { + get + { + if (isApplicationQuitting) + { + return null; + } + + if (cameraSystem != null) + { + return cameraSystem; + } + + cameraSystem = Instance.GetService(showLogs: logCameraSystem); + // If we found a valid system, then we turn logging back on for the next time we need to search. + // If we didn't find a valid system, then we stop logging so we don't spam the debug window. + logCameraSystem = cameraSystem != null; + return cameraSystem; + } + } + + private static bool logCameraSystem = true; + private static IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem = null; /// diff --git a/Assets/MixedRealityToolkit/StandardAssets/Shaders/MixedRealityStandard.shader b/Assets/MixedRealityToolkit/StandardAssets/Shaders/MixedRealityStandard.shader index e1b8f0c017a..3121f5e6ea0 100644 --- a/Assets/MixedRealityToolkit/StandardAssets/Shaders/MixedRealityStandard.shader +++ b/Assets/MixedRealityToolkit/StandardAssets/Shaders/MixedRealityStandard.shader @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. Shader "Mixed Reality Toolkit/Standard" @@ -35,6 +35,8 @@ Shader "Mixed Reality Toolkit/Standard" _RimColor("Rim Color", Color) = (0.5, 0.5, 0.5, 1.0) _RimPower("Rim Power", Range(0.0, 8.0)) = 0.25 [Toggle(_VERTEX_COLORS)] _VertexColors("Vertex Colors", Float) = 0.0 + [Toggle(_VERTEX_EXTRUSION)] _VertexExtrusion("Vertex Extrusion", Float) = 0.0 + _VertexExtrusionValue("Vertex Extrusion Value", Float) = 0.0 [Toggle(_CLIPPING_PLANE)] _ClippingPlane("Clipping Plane", Float) = 0.0 [Toggle(_CLIPPING_SPHERE)] _ClippingSphere("Clipping Sphere", Float) = 0.0 [Toggle(_CLIPPING_BOX)] _ClippingBox("Clipping Box", Float) = 0.0 @@ -45,6 +47,7 @@ Shader "Mixed Reality Toolkit/Standard" [Toggle(_NEAR_LIGHT_FADE)] _NearLightFade("Near Light Fade", Float) = 0.0 _FadeBeginDistance("Fade Begin Distance", Range(0.01, 10.0)) = 0.85 _FadeCompleteDistance("Fade Complete Distance", Range(0.01, 10.0)) = 0.5 + _FadeMinValue("Fade Min Value", Range(0.0, 1.0)) = 0.0 // Fluent options. [Toggle(_HOVER_LIGHT)] _HoverLight("Hover Light", Float) = 1.0 @@ -86,6 +89,8 @@ Shader "Mixed Reality Toolkit/Standard" [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp("Blend Operation", Float) = 0 // "Add" [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("Depth Test", Float) = 4 // "LessEqual" [Enum(DepthWrite)] _ZWrite("Depth Write", Float) = 1 // "On" + _ZOffsetFactor("Depth Offset Factor", Float) = 0 // "Zero" + _ZOffsetUnits("Depth Offset Units", Float) = 0 // "Zero" [Enum(UnityEngine.Rendering.ColorWriteMask)] _ColorWriteMask("Color Write Mask", Float) = 15 // "All" [Enum(UnityEngine.Rendering.CullMode)] _CullMode("Cull Mode", Float) = 2 // "Back" _RenderQueueOverride("Render Queue Override", Range(-1.0, 5000)) = -1 @@ -116,6 +121,9 @@ Shader "Mixed Reality Toolkit/Standard" #include "UnityCG.cginc" #include "UnityMetaPass.cginc" + // This define will get commented in by the UpgradeShaderForLightweightRenderPipeline method. + //#define _LIGHTWEIGHT_RENDER_PIPELINE + struct v2f { float4 vertex : SV_POSITION; @@ -138,7 +146,15 @@ Shader "Mixed Reality Toolkit/Standard" fixed4 _Color; fixed4 _EmissiveColor; + +#if defined(_LIGHTWEIGHT_RENDER_PIPELINE) + CBUFFER_START(_LightBuffer) + float4 _MainLightPosition; + half4 _MainLightColor; + CBUFFER_END +#else fixed4 _LightColor0; +#endif half4 frag(v2f i) : SV_Target { @@ -153,7 +169,11 @@ Shader "Mixed Reality Toolkit/Standard" output.Emission += _EmissiveColor; #endif #endif +#if defined(_LIGHTWEIGHT_RENDER_PIPELINE) + output.SpecularColor = _MainLightColor.rgb; +#else output.SpecularColor = _LightColor0.rgb; +#endif return UnityMetaFragment(output); } @@ -163,13 +183,14 @@ Shader "Mixed Reality Toolkit/Standard" Pass { Name "Main" - Tags{ "RenderType" = "Opaque" "LightMode" = "ForwardBase" "PerformanceChecks" = "False" } + Tags{ "RenderType" = "Opaque" "LightMode" = "ForwardBase" } LOD 100 Blend[_SrcBlend][_DstBlend] BlendOp[_BlendOp] ZTest[_ZTest] ZWrite[_ZWrite] Cull[_CullMode] + Offset[_ZOffsetFactor],[_ZOffsetUnits] ColorMask[_ColorWriteMask] Stencil @@ -207,6 +228,7 @@ Shader "Mixed Reality Toolkit/Standard" #pragma shader_feature _REFRACTION #pragma shader_feature _RIM_LIGHT #pragma shader_feature _VERTEX_COLORS + #pragma shader_feature _VERTEX_EXTRUSION #pragma shader_feature _CLIPPING_PLANE #pragma shader_feature _CLIPPING_SPHERE #pragma shader_feature _CLIPPING_BOX @@ -233,6 +255,9 @@ Shader "Mixed Reality Toolkit/Standard" #include "UnityStandardConfig.cginc" #include "UnityStandardUtils.cginc" + // This define will get commented in by the UpgradeShaderForLightweightRenderPipeline method. + //#define _LIGHTWEIGHT_RENDER_PIPELINE + #if defined(_TRIPLANAR_MAPPING) || defined(_DIRECTIONAL_LIGHT) || defined(_SPHERICAL_HARMONICS) || defined(_REFLECTIONS) || defined(_RIM_LIGHT) || defined(_PROXIMITY_LIGHT) || defined(_ENVIRONMENT_COLORING) #define _NORMAL #else @@ -319,8 +344,11 @@ Shader "Mixed Reality Toolkit/Standard" #if defined(_VERTEX_COLORS) fixed4 color : COLOR0; #endif +#if defined(_SPHERICAL_HARMONICS) + fixed3 ambient : COLOR1; +#endif #if defined(_IRIDESCENCE) - fixed3 iridescentColor : COLOR1; + fixed3 iridescentColor : COLOR2; #endif #if defined(_WORLD_POSITION) #if defined(_NEAR_PLANE_FADE) @@ -334,15 +362,15 @@ Shader "Mixed Reality Toolkit/Standard" #endif #if defined(_NORMAL) #if defined(_TRIPLANAR_MAPPING) - fixed3 worldNormal : COLOR2; - fixed3 triplanarNormal : COLOR3; + fixed3 worldNormal : COLOR3; + fixed3 triplanarNormal : COLOR4; float3 triplanarPosition : TEXCOORD6; #elif defined(_NORMAL_MAP) - fixed3 tangentX : COLOR2; - fixed3 tangentY : COLOR3; - fixed3 tangentZ : COLOR4; + fixed3 tangentX : COLOR3; + fixed3 tangentY : COLOR4; + fixed3 tangentZ : COLOR5; #else - fixed3 worldNormal : COLOR2; + fixed3 worldNormal : COLOR3; #endif #endif UNITY_VERTEX_OUTPUT_STEREO @@ -386,8 +414,15 @@ Shader "Mixed Reality Toolkit/Standard" #endif #if defined(_DIRECTIONAL_LIGHT) +#if defined(_LIGHTWEIGHT_RENDER_PIPELINE) + CBUFFER_START(_LightBuffer) + float4 _MainLightPosition; + half4 _MainLightColor; + CBUFFER_END +#else fixed4 _LightColor0; #endif +#endif #if defined(_REFRACTION) fixed _RefractiveIndex; @@ -398,6 +433,10 @@ Shader "Mixed Reality Toolkit/Standard" fixed _RimPower; #endif +#if defined(_VERTEX_EXTRUSION) + float _VertexExtrusionValue; +#endif + #if defined(_CLIPPING_PLANE) fixed _ClipPlaneSide; float4 _ClipPlane; @@ -422,6 +461,7 @@ Shader "Mixed Reality Toolkit/Standard" #if defined(_NEAR_PLANE_FADE) float _FadeBeginDistance; float _FadeCompleteDistance; + fixed _FadeMinValue; #endif #if defined(_HOVER_LIGHT) || defined(_NEAR_LIGHT_FADE) @@ -600,10 +640,25 @@ Shader "Mixed Reality Toolkit/Standard" #if defined(_INSTANCED_COLOR) UNITY_TRANSFER_INSTANCE_ID(v, o); #endif - o.position = UnityObjectToClipPos(v.vertex); + float4 vertexPosition = v.vertex; + +#if defined(_WORLD_POSITION) || defined(_VERTEX_EXTRUSION) + float3 worldVertexPosition = mul(unity_ObjectToWorld, vertexPosition).xyz; +#endif + +#if defined(_NORMAL) || defined(_VERTEX_EXTRUSION) + fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); +#endif + +#if defined(_VERTEX_EXTRUSION) + worldVertexPosition += worldNormal * _VertexExtrusionValue; + vertexPosition = mul(unity_WorldToObject, float4(worldVertexPosition, 1.0)); +#endif + + o.position = UnityObjectToClipPos(vertexPosition); #if defined(_WORLD_POSITION) - o.worldPosition.xyz = mul(unity_ObjectToWorld, v.vertex).xyz; + o.worldPosition.xyz = worldVertexPosition; #endif #if defined(_NEAR_PLANE_FADE) @@ -625,9 +680,9 @@ Shader "Mixed Reality Toolkit/Standard" fadeDistance = min(fadeDistance, NearLightDistance(_ProximityLightData[dataIndex], o.worldPosition)); } #else - float fadeDistance = -UnityObjectToViewPos(v.vertex.xyz).z; + float fadeDistance = -UnityObjectToViewPos(vertexPosition).z; #endif - o.worldPosition.w = saturate(mad(fadeDistance, rangeInverse, -_FadeCompleteDistance * rangeInverse)); + o.worldPosition.w = max(saturate(mad(fadeDistance, rangeInverse, -_FadeCompleteDistance * rangeInverse)), _FadeMinValue); #endif #if defined(_SCALE) @@ -708,6 +763,10 @@ Shader "Mixed Reality Toolkit/Standard" o.color = v.color; #endif +#if defined(_SPHERICAL_HARMONICS) + o.ambient = ShadeSH9(float4(worldNormal, 1.0)); +#endif + #if defined(_IRIDESCENCE) float3 rightTangent = normalize(mul((float3x3)unity_ObjectToWorld, float3(1.0, 0.0, 0.0))); float3 incidentWithCenter = normalize(mul(unity_ObjectToWorld, float4(0.0, 0.0, 0.0, 1.0)) - _WorldSpaceCameraPos); @@ -716,13 +775,11 @@ Shader "Mixed Reality Toolkit/Standard" #endif #if defined(_NORMAL) - fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); - #if defined(_TRIPLANAR_MAPPING) o.worldNormal = worldNormal; #if defined(_LOCAL_SPACE_TRIPLANAR_MAPPING) o.triplanarNormal = v.normal; - o.triplanarPosition = v.vertex; + o.triplanarPosition = vertexPosition; #else o.triplanarNormal = worldNormal; o.triplanarPosition = o.worldPosition; @@ -975,10 +1032,14 @@ Shader "Mixed Reality Toolkit/Standard" // Blinn phong lighting. #if defined(_DIRECTIONAL_LIGHT) - fixed diffuse = max(0.0, dot(worldNormal, _WorldSpaceLightPos0)); - +#if defined(_LIGHTWEIGHT_RENDER_PIPELINE) + float4 directionalLightDirection = _MainLightPosition; +#else + float4 directionalLightDirection = _WorldSpaceLightPos0; +#endif + fixed diffuse = max(0.0, dot(worldNormal, directionalLightDirection)); #if defined(_SPECULAR_HIGHLIGHTS) - fixed halfVector = max(0.0, dot(worldNormal, normalize(_WorldSpaceLightPos0 + worldViewDir))); + fixed halfVector = max(0.0, dot(worldNormal, normalize(directionalLightDirection + worldViewDir))); fixed specular = saturate(pow(halfVector, _Shininess * pow(_Smoothness, 4.0)) * _Smoothness * 0.5); #else fixed specular = 0.0; @@ -1010,7 +1071,7 @@ Shader "Mixed Reality Toolkit/Standard" // Final lighting mix. fixed4 output = albedo; #if defined(_SPHERICAL_HARMONICS) - fixed3 ambient = ShadeSH9(float4(worldNormal, 1.0)); + fixed3 ambient = i.ambient; #else fixed3 ambient = glstate_lightmodel_ambient + fixed3(0.25, 0.25, 0.25); #endif @@ -1018,8 +1079,13 @@ Shader "Mixed Reality Toolkit/Standard" #if defined(_DIRECTIONAL_LIGHT) fixed oneMinusMetallic = (1.0 - _Metallic); output.rgb = lerp(output.rgb, ibl, minProperty); - output.rgb *= lerp((ambient + _LightColor0.rgb * diffuse + _LightColor0.rgb * specular) * max(oneMinusMetallic, _MinMetallicLightContribution), albedo, minProperty); - output.rgb += (_LightColor0.rgb * albedo * specular) + (_LightColor0.rgb * specular * _Smoothness); +#if defined(_LIGHTWEIGHT_RENDER_PIPELINE) + fixed3 directionalLightColor = _MainLightColor.rgb; +#else + fixed3 directionalLightColor = _LightColor0.rgb; +#endif + output.rgb *= lerp((ambient + directionalLightColor * diffuse + directionalLightColor * specular) * max(oneMinusMetallic, _MinMetallicLightContribution), albedo, minProperty); + output.rgb += (directionalLightColor * albedo * specular) + (directionalLightColor * specular * _Smoothness); output.rgb += ibl * oneMinusMetallic * _IblContribution; #elif defined(_REFLECTIONS) output.rgb = lerp(output.rgb, ibl, minProperty); @@ -1074,6 +1140,6 @@ Shader "Mixed Reality Toolkit/Standard" } } - FallBack "VertexLit" + Fallback "Hidden/InternalErrorShader" CustomEditor "Microsoft.MixedReality.Toolkit.Editor.MixedRealityStandardShaderGUI" } diff --git a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs index 9ef7376eb18..e39b3a8d85a 100644 --- a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs +++ b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs @@ -87,6 +87,15 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo) if (buildInfo.ScriptingBackend.HasValue) { PlayerSettings.SetScriptingBackend(buildTargetGroup, buildInfo.ScriptingBackend.Value); + + // When building the .NET backend, also build the C# projects, as the + // intent of this build process is to prove that it's possible build + // a solution where the local dev loop can be accomplished in the + // generated C# projects. + if (buildInfo.ScriptingBackend == ScriptingImplementation.WinRTDotNET) + { + EditorUserBuildSettings.wsaGenerateReferenceProjects = true; + } } BuildTarget oldBuildTarget = EditorUserBuildSettings.activeBuildTarget; diff --git a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs index 4776d73dd86..7c90750099f 100644 --- a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs +++ b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs @@ -86,17 +86,38 @@ public static async Task BuildAppxAsync(UwpBuildInfo buildInfo, Cancellati string storagePath = Path.GetFullPath(Path.Combine(Path.Combine(Application.dataPath, ".."), buildInfo.OutputDirectory)); string solutionProjectPath = Path.GetFullPath(Path.Combine(storagePath, $@"{PlayerSettings.productName}.sln")); - // Now do the actual appx build - var processResult = await new Process().StartProcessAsync( - msBuildPath, + // Building the solution requires first restoring NuGet packages - when built through + // Visual Studio, VS does this automatically - when building via msbuild like we're doing here, + // we have to do that step manually. + int exitCode = await Run(msBuildPath, $"\"{solutionProjectPath}\" /t:restore", !Application.isBatchMode, cancellationToken); + if (exitCode != 0) + { + IsBuilding = false; + return false; + } + + // Now that NuGet packages have been restored, we can run the actual build process. + exitCode = await Run(msBuildPath, $"\"{solutionProjectPath}\" /t:{(buildInfo.RebuildAppx ? "Rebuild" : "Build")} /p:Configuration={buildInfo.Configuration} /p:Platform={buildInfo.BuildPlatform} /verbosity:m", !Application.isBatchMode, cancellationToken); + AssetDatabase.SaveAssets(); + + IsBuilding = false; + return exitCode == 0; + } + + private static async Task Run(string fileName, string args, bool showDebug, CancellationToken cancellationToken) + { + Debug.Log($"Running command: {fileName} {args}"); + + var processResult = await new Process().StartProcessAsync( + fileName, args, !Application.isBatchMode, cancellationToken); switch (processResult.ExitCode) { case 0: - Debug.Log("Appx Build Successful!"); + Debug.Log($"Command successful"); if (Application.isBatchMode) { @@ -110,36 +131,31 @@ public static async Task BuildAppxAsync(UwpBuildInfo buildInfo, Cancellati { if (processResult.ExitCode != 0) { - Debug.LogError($"{PlayerSettings.productName} appx build Failed! (ErrorCode: {processResult.ExitCode})"); + Debug.Log($"Command failed, errorCode: {processResult.ExitCode}"); if (Application.isBatchMode) { - var buildOutput = "Appx Build Output:\n"; + var output = "Command output:\n"; foreach (var message in processResult.Output) { - buildOutput += $"{message}\n"; + output += $"{message}\n"; } - buildOutput += "Appx Build Errors:"; + output += "Command errors:"; foreach (var error in processResult.Errors) { - buildOutput += $"{error}\n"; + output += $"{error}\n"; } - Debug.LogError(buildOutput); + Debug.LogError(output); } } - break; } } - - AssetDatabase.SaveAssets(); - - IsBuilding = false; - return processResult.ExitCode == 0; + return processResult.ExitCode; } private static async Task FindMsBuildPathAsync() diff --git a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpBuildDeployPreferences.cs b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpBuildDeployPreferences.cs index 8e35e5bde01..d8ccad6f2e1 100644 --- a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpBuildDeployPreferences.cs +++ b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpBuildDeployPreferences.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Build.Editor { public static class UwpBuildDeployPreferences { - public static Version MIN_SDK_VERSION = new Version("10.0.17134.0"); + public static Version MIN_SDK_VERSION = new Version("10.0.18362.0"); private const string EDITOR_PREF_BUILD_CONFIG = "BuildDeployWindow_BuildConfig"; private const string EDITOR_PREF_FORCE_REBUILD = "BuildDeployWindow_ForceRebuild"; private const string EDITOR_PREF_CONNECT_INFOS = "BuildDeployWindow_DeviceConnections"; diff --git a/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs b/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs deleted file mode 100644 index b2eedb357b0..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Utilities -{ - /// - /// Sets global shader variables relating to calibration space transforms - /// - public class CalibrationSpace : MonoBehaviour - { - private void Update() - { - Shader.SetGlobalMatrix("CalibrationSpaceWorldToLocal", transform.worldToLocalMatrix); - Shader.SetGlobalMatrix("CalibrationSpaceLocalToWorld", transform.localToWorldMatrix); - } - } -} diff --git a/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs.meta b/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs.meta deleted file mode 100644 index bb78bf386ca..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/CalibrationSpace.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1937db2f18e14b46a234eab899075b24 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/CameraCache.cs b/Assets/MixedRealityToolkit/Utilities/CameraCache.cs index 54101c25cf9..8c7fbb79641 100644 --- a/Assets/MixedRealityToolkit/Utilities/CameraCache.cs +++ b/Assets/MixedRealityToolkit/Utilities/CameraCache.cs @@ -20,57 +20,25 @@ public static Camera Main { get { - var mainCamera = cachedCamera == null ? Refresh(Camera.main) : cachedCamera; - - if (mainCamera == null) + if (cachedCamera != null) { - // No camera in the scene tagged as main. Let's search the scene for a GameObject named Main Camera - var cameras = Object.FindObjectsOfType(); - - switch (cameras.Length) - { - case 0: - return null; - case 1: - mainCamera = Refresh(cameras[0]); - break; - default: - // Search for main camera by name. - for (int i = 0; i < cameras.Length; i++) - { - if (cameras[i].name == "Main Camera") - { - mainCamera = Refresh(cameras[i]); - break; - } - } + return cachedCamera; + } - // If we still didn't find it, just set the first camera. - if (mainCamera == null) - { - Debug.LogWarning($"No main camera found. The Mixed Reality Toolkit used {cameras[0].name} as your main."); - mainCamera = Refresh(cameras[0]); - } + // If the cached camera is null, search for main + var mainCamera = Camera.main; - break; - } + if (mainCamera == null) + { // If no main camera was found, create it now + Debug.LogWarning("No main camera found. The Mixed Reality Toolkit requires at least one camera in the scene. One will be generated now."); + mainCamera = new GameObject("Main Camera", typeof(Camera)) { tag = "MainCamera" }.GetComponent(); } - return mainCamera; - } - } + // Cache the main camera + cachedCamera = mainCamera; - /// - /// Set the cached camera to a new reference and return it - /// - /// New main camera to cache - public static Camera Refresh(Camera newMain) - { - if (newMain == null) - { - Debug.LogWarning("A null camera was passed into CameraCache.Refresh()"); + return cachedCamera; } - return cachedCamera = newMain; } } } diff --git a/Assets/MixedRealityToolkit/Utilities/ClippingPrimitive.cs b/Assets/MixedRealityToolkit/Utilities/ClippingPrimitive.cs index 0e3baa1cc31..5f10bdc2ff8 100644 --- a/Assets/MixedRealityToolkit/Utilities/ClippingPrimitive.cs +++ b/Assets/MixedRealityToolkit/Utilities/ClippingPrimitive.cs @@ -124,6 +124,12 @@ protected void OnEnable() Initialize(); UpdateRenderers(); ToggleClippingFeature(true); + + if (useOnPreRender) + { + cameraMethods = CameraCache.Main.gameObject.EnsureComponent(); + cameraMethods.OnCameraPreRender += OnCameraPreRender; + } } protected void OnDisable() diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/EditorAssemblyReloadManager.cs b/Assets/MixedRealityToolkit/Utilities/Editor/EditorAssemblyReloadManager.cs index fc1b92fdba6..881d1af4e74 100644 --- a/Assets/MixedRealityToolkit/Utilities/Editor/EditorAssemblyReloadManager.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/EditorAssemblyReloadManager.cs @@ -12,11 +12,11 @@ public static class EditorAssemblyReloadManager /// /// Locks the Editor's ability to reload assemblies. + /// /// /// This is useful for ensuring async tasks complete in the editor without having to worry if any script /// changes that happen during the running task will cancel it when the editor re-compiles the assemblies. /// - /// public static bool LockReloadAssemblies { set diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs index eeb5ebfc360..d007fa103cc 100644 --- a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs @@ -32,7 +32,7 @@ public static string MixedRealityToolkit_AbsoluteFolderPath if (MixedRealityToolkitFiles.AreFoldersAvailable) { #if UNITY_EDITOR - if (MixedRealityToolkitFiles.MRTKDirectories.Count() > 1) + if (MixedRealityToolkitFiles.GetDirectories(MixedRealityToolkitModuleType.Core).Count() > 1) { Debug.LogError($"A deprecated API '{nameof(MixedRealityEditorSettings)}.{nameof(MixedRealityToolkit_AbsoluteFolderPath)}' " + "is being used, and there are more than one MRTK directory in the project; most likely due to ingestion as NuGet. " + @@ -40,7 +40,7 @@ public static string MixedRealityToolkit_AbsoluteFolderPath } #endif - return MixedRealityToolkitFiles.MRTKDirectories.First(); + return MixedRealityToolkitFiles.GetDirectories(MixedRealityToolkitModuleType.Core).First(); } Debug.LogError("Unable to find the Mixed Reality Toolkit's directory!"); @@ -132,8 +132,8 @@ static MixedRealityEditorSettings() /// /// Returns true the first time it is called within this editor session, and false for all subsequent calls. - /// A new session is also true if the editor build target group is changed. /// + /// A new session is also true if the editor build target group is changed. private static bool IsNewSession { get diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs new file mode 100644 index 00000000000..e7545def972 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Utilities.Editor +{ + public class MixedRealityOptimizeUtils + { + public static void SetDepthBufferSharing(bool enableDepthBuffer) + { + PlayerSettings.VROculus.sharedDepthBuffer = enableDepthBuffer; + +#if UNITY_2019 + PlayerSettings.VRWindowsMixedReality.depthBufferSharingEnabled = enableDepthBuffer; +#else + var playerSettings = GetSettingsObject("PlayerSettings"); + ChangeProperty(playerSettings, + "vrSettings.hololens.depthBufferSharingEnabled", + property => property.boolValue = enableDepthBuffer); +#endif + } + + public static void SetDepthBufferFormat(bool set16BitDepthBuffer) + { + int depthFormat = set16BitDepthBuffer ? 0 : 1; + + PlayerSettings.VRCardboard.depthFormat = depthFormat; + PlayerSettings.VRDaydream.depthFormat = depthFormat; + + var playerSettings = GetSettingsObject("PlayerSettings"); +#if UNITY_2019 + PlayerSettings.VRWindowsMixedReality.depthBufferFormat = set16BitDepthBuffer ? + PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat16Bit : + PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat24Bit; + + ChangeProperty(playerSettings, + "vrSettings.lumin.depthFormat", + property => property.intValue = depthFormat); +#else + ChangeProperty(playerSettings, + "vrSettings.hololens.depthFormat", + property => property.intValue = depthFormat); +#endif + } + + public static void ChangeProperty(SerializedObject target, string name, Action changer) + { + var prop = target.FindProperty(name); + if (prop != null) + { + changer(prop); + target.ApplyModifiedProperties(); + } + else Debug.LogError("property not found: " + name); + } + + public static SerializedObject GetSettingsObject(string className) + { + var settings = Unsupported.GetSerializedAssetInterfaceSingleton(className); + return new SerializedObject(settings); + } + + public static SerializedObject GetLighmapSettings() + { + var getLightmapSettingsMethod = typeof(LightmapEditorSettings).GetMethod("GetLightmapSettings", BindingFlags.Static | BindingFlags.NonPublic); + var lightmapSettings = getLightmapSettingsMethod.Invoke(null, null) as UnityEngine.Object; + return new SerializedObject(lightmapSettings); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs.meta b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs.meta new file mode 100644 index 00000000000..d58374ec052 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c796b99d4988f874f9a54def75101868 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs new file mode 100644 index 00000000000..c91fbc455f0 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Editor +{ + /// + /// Build window - Utility for developers to automate optimization of their Unity scene/project + /// + public class MixedRealityOptimizeWindow : EditorWindow + { + private int selectedToolbarIndex = 0; + private readonly string[] ToolbarTitles = { "Project Optimizations", "Scene Optimizations", "Shader Optimizations" }; + private enum ToolbarSection + { + Project = 0, + Scene, + Shader + }; + + private Vector2 windowScrollPosition = new Vector2(); + + // Project Optimizations + private bool singlePassInstanced = true; + private bool enableDepthBufferSharing = true; + //private bool enable16BitDepthBuffer = true; + + // Scene Optimizations + private bool disableRealtimeGlobalIllumination = true; + private bool disableBakedGlobalIllumination = true; + private static DateTime? lastAnalyzedTime = null; + private Light[] sceneLights; + private const uint TopListSize = 5; + private long totalActivePolyCount, totalInActivePolyCount = 0; + private long totalPolyCount + { + get + { + return totalActivePolyCount + totalInActivePolyCount; + } + } + private string TotalPolyCountStr, TotalActivePolyCountStr, TotalInactivePolyCountStr; + private GameObject[] LargestMeshes = new GameObject[TopListSize]; + private int[] LargestMeshSizes = new int[TopListSize]; + + // Shader Optimizations + private bool showDiscoveredMaterials = true; + private bool onlyUnityShader = true; + private Shader replacementShader; + private Shader unityStandardShader; + private Shader errorShader; + private List discoveredMaterials = new List(); + + // Internal structure to easily search mesh polycounts in scene + private struct MeshNode + { + public int polycount; + public MeshFilter filter; + } + + protected enum PerformanceTarget + { + AR_Headsets, + VR_Standalone, + VR_Tethered, + }; + + // NOTE: These array must match the number of enums in PerformanceTarget + private readonly string[] PerformanceTargetEnums = { "AR Headsets", "VR Standalone", "VR Tethered" }; + private readonly string[] PerformanceTargetDescriptions = { + "Suggest performance optimizations for AR devices with mobile class specifications", + "Suggest performance optimizations for mobile VR devices with mobile class specifications", + "Suggest performance optimizations for VR devices tethered to a PC" }; + + private readonly int[] SceneLightCountMax = { 1, 2, 4 }; + + [SerializeField] + private PerformanceTarget PerfTarget = PerformanceTarget.AR_Headsets; + + [SerializeField] + private Texture2D logoLightTheme = null; + + [SerializeField] + private Texture2D logoDarkTheme = null; + + protected static GUIStyle HelpIconStyle; + protected static GUIStyle BoldLargeTitle; + + [MenuItem("Mixed Reality Toolkit/Utilities/Optimize Window", false, 0)] + public static void OpenWindow() + { + // Dock it next to the Scene View. + var window = GetWindow(typeof(SceneView)); + window.StartUp(); + window.Show(); + } + + public void StartUp() + { + FindShaders(); + + string assetPath = "StandardAssets/Textures"; + + if (logoLightTheme == null) + { + logoLightTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath($"{assetPath}/MRTK_Logo_Black.png"), typeof(Texture2D)); + } + + if (logoDarkTheme == null) + { + logoDarkTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath($"{assetPath}/MRTK_Logo_White.png"), typeof(Texture2D)); + } + } + + private void OnEnable() + { + // Weird Unity bug where GUIStyle properties do not serialize property on window refreshes + CreateStyles(); + + this.titleContent = new GUIContent("Optimize Window", EditorGUIUtility.IconContent("d_PreMatCube").image); + } + + private void OnGUI() + { + windowScrollPosition = EditorGUILayout.BeginScrollView(windowScrollPosition); + + // Render MRTK Logo + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.Label(EditorGUIUtility.isProSkin ? logoDarkTheme : logoLightTheme, GUILayout.MaxHeight(128f)); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + // Render Title + EditorGUILayout.LabelField("Mixed Reality Toolkit Optimize Window", BoldLargeTitle); + EditorGUILayout.LabelField("This tool automates the process of updating your project, currently open scene, and material assets to recommended settings for Mixed Reality", EditorStyles.wordWrappedLabel); + EditorGUILayout.Space(); + + PerfTarget = (PerformanceTarget)EditorGUILayout.Popup("Performance Target", (int)this.PerfTarget, PerformanceTargetEnums); + EditorGUILayout.HelpBox(PerformanceTargetDescriptions[(int)PerfTarget], MessageType.Info); + EditorGUILayout.Space(); + + if (!PlayerSettings.virtualRealitySupported) + { + EditorGUILayout.HelpBox("Current build target does not have virtual reality support enabled", MessageType.Warning); + } + + selectedToolbarIndex = GUILayout.Toolbar(selectedToolbarIndex, ToolbarTitles); + if (selectedToolbarIndex == 0) + { + RenderProjectOptimizations(); + } + else if (selectedToolbarIndex == 1) + { + RenderSceneOptimizations(); + } + else + { + RenderShaderOptimizations(); + } + + EditorGUILayout.EndScrollView(); + } + + private void RenderShaderOptimizations() + { + GUILayout.BeginVertical("Box"); + EditorGUILayout.LabelField(this.ToolbarTitles[(int)ToolbarSection.Shader], BoldLargeTitle); + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.LabelField("The Unity standard shader is generally not performant or optimized for Mixed Reality development. The MRTK Standard shader can be a more performant option. " + + "This tool allows developers to discover and automatically convert materials in their project to the replacement shader option below. It is recommended to utilize the MRTK Standard Shader." + , EditorStyles.wordWrappedLabel); + EditorGUILayout.Space(); + + replacementShader = (Shader)EditorGUILayout.ObjectField("Replacement Shader", replacementShader, typeof(Shader), false); + if (replacementShader == null) + { + EditorGUILayout.HelpBox("Please set a replacement shader to utilize this tool", MessageType.Error); + if (GUILayout.Button(new GUIContent("Use MRTK Standard Shader", "Set Replacement Shader to MRKT Standard Shader"), EditorStyles.miniButton, GUILayout.Width(200f))) + { + FindShaders(); + } + } + else + { + onlyUnityShader = EditorGUILayout.ToggleLeft("Only Discover Materials with Unity Standard Shader", onlyUnityShader); + EditorGUILayout.Space(); + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Discover Materials in Assets")) + { + DiscoverMaterials(); + } + + bool wasGUIEnabled = GUI.enabled; + GUI.enabled = wasGUIEnabled && discoveredMaterials.Count > 0; + if (GUILayout.Button("Convert All Discovered Materials")) + { + ConvertMaterials(); + } + GUI.enabled = wasGUIEnabled; + EditorGUILayout.EndHorizontal(); + + if (discoveredMaterials.Count > 0) + { + showDiscoveredMaterials = EditorGUILayout.Foldout(showDiscoveredMaterials, "Discovered Materials", true); + if (showDiscoveredMaterials) + { + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.LabelField("Discovered " + discoveredMaterials.Count + " materials to convert"); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Current Shader", EditorStyles.boldLabel); + EditorGUILayout.LabelField("Material Asset", EditorStyles.boldLabel); + EditorGUILayout.EndHorizontal(); + + for (int i = 0; i < discoveredMaterials.Count; i++) + { + if (discoveredMaterials[i] != null) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(discoveredMaterials[i].shader.name); + discoveredMaterials[i] = (Material)EditorGUILayout.ObjectField(discoveredMaterials[i], typeof(Material), false); + if (GUILayout.Button(new GUIContent("View", "Selects & views this asset in inspector"), EditorStyles.miniButton, GUILayout.Width(42f))) + { + Selection.activeObject = this.discoveredMaterials[i]; + } + if (GUILayout.Button(new GUIContent("Convert", "Converts this material's shader to the replacement shader"), EditorStyles.miniButton, GUILayout.Width(64f))) + { + Undo.RecordObject(this.discoveredMaterials[i], "Convert to MRTK Standard shader"); + ConvertMaterial(this.discoveredMaterials[i]); + } + EditorGUILayout.EndHorizontal(); + } + } + } + } + } + } + } + GUILayout.EndVertical(); + EditorGUILayout.Space(); + } + + private void RenderSceneOptimizations() + { + GUILayout.BeginVertical("Box"); + EditorGUILayout.LabelField(this.ToolbarTitles[(int)ToolbarSection.Scene], BoldLargeTitle); + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.LabelField("This section provides controls and performance information for the currently opened scene. Any optimizations performed are only for the active scene at any moment. Also be aware that changes made while in editor Play mode will not be saved.", EditorStyles.wordWrappedLabel); + + BuildSection("Lighting Settings", "https://docs.unity3d.com/Manual/GlobalIllumination.html", () => + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Global Illumination can produce great visual results but sometimes at great expense.", EditorStyles.wordWrappedLabel); + if (GUILayout.Button(new GUIContent("View Lighting Settings", "Open Lighting Settings"), EditorStyles.miniButton, GUILayout.Width(160f))) + { + EditorApplication.ExecuteMenuItem("Window/Rendering/Lighting Settings"); + } + EditorGUILayout.EndHorizontal(); + + disableRealtimeGlobalIllumination = EditorGUILayout.ToggleLeft("Disable Realtime Global Illumination", disableRealtimeGlobalIllumination); + + if (this.PerfTarget == PerformanceTarget.AR_Headsets) + { + disableBakedGlobalIllumination = EditorGUILayout.ToggleLeft("Disable Baked Global Illumination", disableBakedGlobalIllumination); + } + + if (GUILayout.Button("Optimize Lighting")) + { + OptimizeScene(); + } + }); + + BuildSection("Live Scene Analysis", null, () => + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(lastAnalyzedTime == null ? "Click analysis button for MRTK to scan your currently opened scene" : "Scanned " + GetRelativeTime(lastAnalyzedTime)); + + if (GUILayout.Button("Analyze Scene", GUILayout.Width(160f))) + { + AnalyzeScene(); + lastAnalyzedTime = DateTime.UtcNow; + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.Space(); + + if (lastAnalyzedTime != null) + { + // Lighting analysis + bool showNumOfSceneLights = this.sceneLights != null && this.sceneLights.Length > SceneLightCountMax[(int)PerfTarget]; + bool showDisableShadows = this.PerfTarget == PerformanceTarget.AR_Headsets; + if (showNumOfSceneLights || showDisableShadows) + { + EditorGUILayout.LabelField("Lighting Analysis", EditorStyles.boldLabel); + if (showNumOfSceneLights) + { + EditorGUILayout.LabelField(this.sceneLights.Length + " lights in the scene. Consider reducing the number of lights."); + } + + if (showDisableShadows) + { + foreach (var l in this.sceneLights) + { + if (l.shadows != LightShadows.None) + { + EditorGUILayout.ObjectField("Disable shadows", l, typeof(Light), true); + } + } + } + EditorGUILayout.Space(); + } + + // Mesh Analysis + EditorGUILayout.LabelField("Polygon Count Analysis", EditorStyles.boldLabel); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(TotalPolyCountStr); + EditorGUILayout.LabelField(TotalActivePolyCountStr); + EditorGUILayout.LabelField(TotalInactivePolyCountStr); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.LabelField("Top " + TopListSize + " GameObjects in scene with highest polygon count"); + for (int i = 0; i < LargestMeshes.Length; i++) + { + if (LargestMeshes[i] != null) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Num of Polygons: " + this.LargestMeshSizes[i].ToString("N0")); + EditorGUILayout.ObjectField(this.LargestMeshes[i], typeof(GameObject), true); + if (GUILayout.Button(new GUIContent("View", "Selects & view this asset in inspector"), EditorStyles.miniButton, GUILayout.Width(42f))) + { + Selection.activeObject = this.LargestMeshes[i]; + } + EditorGUILayout.EndHorizontal(); + } + } + } + }); + } + + GUILayout.EndVertical(); + } + + private void RenderProjectOptimizations() + { + GUILayout.BeginVertical("Box"); + EditorGUILayout.LabelField(this.ToolbarTitles[(int)ToolbarSection.Project], BoldLargeTitle); + using (new EditorGUI.IndentLevelScope()) + { + BuildSection("Single Pass Instanced Rendering", "https://docs.unity3d.com/Manual/SinglePassStereoRendering.html", () => + { + EditorGUILayout.LabelField("Single Pass Instanced Rendering is an option in the Unity render pipline to more efficiently render your scene and optimize CPU & GPU work. This path requires shaders though to be written to support instancing which is automatic in all Unity & MRTK shaders. Click the \"Learn More\" button to learn how to update your custom shaders to support instancing.", EditorStyles.wordWrappedLabel); + + EditorGUILayout.BeginHorizontal(); + singlePassInstanced = EditorGUILayout.ToggleLeft("Set Single Pass Instanced Rendering", singlePassInstanced); + if (GUILayout.Button(new GUIContent("Learn More", "Learn more about Single Pass Instanced Rendering"), EditorStyles.miniButton, GUILayout.Width(120f))) + { + Application.OpenURL("https://docs.unity3d.com/Manual/SinglePassInstancing.html"); + } + EditorGUILayout.EndHorizontal(); + }); + + // TODO: Put in Quality settings section + + BuildSection("Depth Buffer Sharing", null, () => + { + EditorGUILayout.LabelField("This option shares the application's depth buffer with the running platform which allows the platform to more accurately stabilize holograms and content.", EditorStyles.wordWrappedLabel); + EditorGUILayout.LabelField("Note: Depth buffer sharing & format is a platform dependant feature.", EditorStyles.wordWrappedLabel); + enableDepthBufferSharing = EditorGUILayout.ToggleLeft("Enable Depth Buffer Sharing", enableDepthBufferSharing); + + /* + * TODO: Finish rationalizing this section per platform + EditorGUILayout.LabelField("The depth format determines the level of precision for the depth texture (i.e 16-bit vs 24-bit etc). Using a lower precision format (i.e 16-bit) will generally result in performance gains however this also results in lower precision to resolve one object being farther than another. Thus, particularly for AR devices, it is recommended to lower the camera's far plane value so there is a reduced range of possible values.", EditorStyles.wordWrappedLabel); + enableDepthBufferSharing = EditorGUILayout.BeginToggleGroup("Enable Depth Buffer Sharing", enableDepthBufferSharing); + + if (this.PerfTarget == PerformanceTarget.AR_Headsets) + { + enable16BitDepthBuffer = EditorGUILayout.ToggleLeft("Set Depth Buffer to 16-bit", enable16BitDepthBuffer); + enable16BitDepthBuffer = EditorGUILayout.ToggleLeft("Set MRTK Camera Far Plane to 50m", enable16BitDepthBuffer); + } + else if (this.PerfTarget == PerformanceTarget.VR_Standalone) + { + enable16BitDepthBuffer = EditorGUILayout.ToggleLeft("Set Depth Buffer to 16-bit", enable16BitDepthBuffer); + enable16BitDepthBuffer = EditorGUILayout.ToggleLeft("Set MRTK Camera Far Plane to 50m", enable16BitDepthBuffer); + } + EditorGUILayout.EndToggleGroup(); + */ + }); + + if (GUILayout.Button("Optimize Project")) + { + OptimizeProject(); + } + } + + GUILayout.EndVertical(); + } + + private void AnalyzeScene() + { + this.sceneLights = FindObjectsOfType(); + + // TODO: Consider searching for particle renderers count? + + totalActivePolyCount = totalInActivePolyCount = 0; + var filters = FindObjectsOfType(); + var meshes = new List(); + foreach(var f in filters) + { + int count = f.sharedMesh.triangles.Length / 3; + + meshes.Add(new MeshNode + { + polycount = count, + filter = f + }); + + if (f.gameObject.activeInHierarchy) + { + totalActivePolyCount += count; + } + else + { + totalInActivePolyCount += count; + } + } + + TotalPolyCountStr = "Total Scene PolyCount: " + totalPolyCount.ToString("N0") + " "; + TotalActivePolyCountStr = "Total PolyCount (Active): " + totalActivePolyCount.ToString("N0") + " "; + TotalInactivePolyCountStr = "Total PolyCount (Inactive): "+ totalInActivePolyCount.ToString("N0") + " "; + + var sortedMeshList = meshes.OrderByDescending(s => s.polycount).ToList(); + for(int i = 0; i < TopListSize; i++) + { + this.LargestMeshSizes[i] = 0; + this.LargestMeshes[i] = null; + if (i < meshes.Count) + { + this.LargestMeshSizes[i] = sortedMeshList[i].polycount; + this.LargestMeshes[i] = sortedMeshList[i].filter.gameObject; + } + } + } + + private void OptimizeProject() + { + if (singlePassInstanced) + { + PlayerSettings.stereoRenderingPath = StereoRenderingPath.Instancing; + } + + if (enableDepthBufferSharing) + { + MixedRealityOptimizeUtils.SetDepthBufferSharing(enableDepthBufferSharing); + // TODO: This value needs to be per-perf target + //MixedRealityOptimizeUtils.SetDepthBufferFormat(enable16BitDepthBuffer); + } + } + + private void OptimizeScene() + { + var lightmapSettings = MixedRealityOptimizeUtils.GetLighmapSettings(); + + if (disableRealtimeGlobalIllumination) + { + MixedRealityOptimizeUtils.ChangeProperty(lightmapSettings, "m_GISettings.m_EnableRealtimeLightmaps", property => property.boolValue = false); + } + + if (disableBakedGlobalIllumination) + { + MixedRealityOptimizeUtils.ChangeProperty(lightmapSettings, "m_GISettings.m_EnableBakedLightmaps", property => property.boolValue = false); + } + } + + private void DiscoverMaterials() + { + discoveredMaterials.Clear(); + + string[] guids = AssetDatabase.FindAssets("t:Material"); + for (int i = 0; i < guids.Length; i++) + { + string assetPath = AssetDatabase.GUIDToAssetPath(guids[i]); + if (assetPath.EndsWith(".mat")) + { + Material asset = AssetDatabase.LoadAssetAtPath(assetPath); + + if (CanConvertMaterial(asset)) + { + discoveredMaterials.Add(asset); + } + } + } + } + private void ConvertMaterials() + { + Undo.RecordObjects(this.discoveredMaterials.ToArray(), "Convert to MRTK Standard shader"); + + foreach (Material asset in this.discoveredMaterials) + { + ConvertMaterial(asset); + } + + discoveredMaterials.Clear(); + } + + private void ConvertMaterial(Material asset) + { + if (asset != null && CanConvertMaterial(asset)) + { + asset.shader = replacementShader; + } + } + + private bool CanConvertMaterial(Material asset) + { + return asset != null + && ((asset.shader != replacementShader && (!onlyUnityShader || asset.shader == unityStandardShader)) + || asset.shader == errorShader); + } + + private static void BuildTitle(string title, string url) + { + // Section Title + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(title, EditorStyles.boldLabel); + if (!string.IsNullOrEmpty(url)) + { + BuildHelpIconButton(() => Application.OpenURL(url)); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider); + } + + private static void BuildHelpIconButton(Action onClick) + { + if (GUILayout.Button(EditorGUIUtility.IconContent("_Help", "|Learn more"), HelpIconStyle)) + { + onClick(); + } + } + + private static void BuildSection(string title, string url, Action renderContent) + { + EditorGUILayout.BeginVertical(); + // Section Title + BuildTitle(title, url); + + renderContent(); + EditorGUILayout.EndVertical(); + EditorGUILayout.Space(); + } + + private void FindShaders() + { + replacementShader = Shader.Find("Mixed Reality Toolkit/Standard"); + unityStandardShader = Shader.Find("Standard"); + errorShader = Shader.Find("Hidden/InternalErrorShader"); + } + + private static void CreateStyles() + { + HelpIconStyle = new GUIStyle() + { + fixedWidth = 24, + border = new RectOffset(0, 0, 0, 0), + }; + + BoldLargeTitle = new GUIStyle() + { + fontSize = 12, + fontStyle = FontStyle.Bold, + }; + } + + private static string GetRelativeTime(DateTime? time) + { + if (time == null) return string.Empty; + + var delta = new TimeSpan(DateTime.UtcNow.Ticks - time.Value.Ticks); + + if (Math.Abs(delta.TotalDays) > 1.0) + { + return (int)Math.Abs(delta.TotalDays) + " days ago"; + } + else if (Math.Abs(delta.TotalHours) > 1.0) + { + return (int)Math.Abs(delta.TotalHours) + " hours ago"; + } + else if (Math.Abs(delta.TotalMinutes) > 1.0) + { + return (int)Math.Abs(delta.TotalMinutes) + " minutes ago"; + } + else + { + return (int)Math.Abs(delta.TotalSeconds) + " seconds ago"; + } + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs.meta b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs.meta new file mode 100644 index 00000000000..00df3ba8e7d --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f48199e5c14370478589742b9aea68a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs index 11a4d088812..bd93d276798 100644 --- a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -10,6 +11,19 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Editor { + /// + /// Base folder types for modules searched by the MixedRealityToolkitFiles utilty. + /// + public enum MixedRealityToolkitModuleType + { + Core, + Providers, + Services, + SDK, + Examples, + Tests, + } + /// /// API for working with MixedRealityToolkit folders contained in the project. /// @@ -29,42 +43,86 @@ public static void OnPostprocessAllAssets(string[] importedAssets, string[] dele foreach (string asset in importedAssets.Concat(movedAssets)) { string folder = asset.Replace("Assets", Application.dataPath); - if (folder.EndsWith(MixedRealityToolkitDirectory)) + foreach (MixedRealityToolkitModuleType module in Enum.GetValues(typeof(MixedRealityToolkitModuleType))) { - mrtkFolders.Add(NormalizeSeparators(folder)); + if (folder.EndsWith(MixedRealityToolkitDirectory(module))) + { + if (!mrtkFolders.TryGetValue(module, out HashSet modFolders)) + { + modFolders = new HashSet(); + mrtkFolders.Add(module, modFolders); + } + modFolders.Add(NormalizeSeparators(folder)); + } } } foreach (string asset in deletedAssets.Concat(movedFromAssetPaths)) { string folder = asset.Replace("Assets", Application.dataPath); - if (folder.EndsWith(MixedRealityToolkitDirectory)) + foreach (MixedRealityToolkitModuleType module in Enum.GetValues(typeof(MixedRealityToolkitModuleType))) { - folder = NormalizeSeparators(folder); - if (mrtkFolders.Contains(folder) && !Directory.Exists(folder)) + if (mrtkFolders.TryGetValue(module, out HashSet modFolders)) { - // The contains check in the if statement is faster than Directory.Exists so that's why it's used - // Otherwise, it isn't necessary, as the statement below doesn't throw if item wasn't found - mrtkFolders.Remove(folder); + if (folder.EndsWith(MixedRealityToolkitDirectory(module))) + { + folder = NormalizeSeparators(folder); + if (modFolders.Contains(folder) && !Directory.Exists(folder)) + { + // The contains check in the if statement is faster than Directory.Exists so that's why it's used + // Otherwise, it isn't necessary, as the statement below doesn't throw if item wasn't found + modFolders.Remove(folder); + if (modFolders.Count == 0) + { + mrtkFolders.Remove(module); + } + } + } } } } } } - private const string MixedRealityToolkitDirectory = "MixedRealityToolkit"; + private static string MixedRealityToolkitDirectory(MixedRealityToolkitModuleType module, string basePath="MixedRealityToolkit") + { + switch (module) + { + case MixedRealityToolkitModuleType.Core: return basePath; + case MixedRealityToolkitModuleType.Providers: return basePath + ".Providers"; + case MixedRealityToolkitModuleType.Services: return basePath + ".Services"; + case MixedRealityToolkitModuleType.SDK: return basePath + ".SDK"; + case MixedRealityToolkitModuleType.Examples: return basePath + ".Examples"; + case MixedRealityToolkitModuleType.Tests: return basePath + ".Tests"; + } + Debug.Assert(false); + return null; + } // This alternate path is used if above isn't found. This is to work around long paths issue with NuGetForUnity // https://github.com/GlitchEnzo/NuGetForUnity/issues/246 - private const string AlternateMixedRealityToolkitDirectory = "MRTK"; + private static string AlternateMixedRealityToolkitDirectory(MixedRealityToolkitModuleType module) + { + return MixedRealityToolkitDirectory(module, "MRTK"); + } - private readonly static HashSet mrtkFolders = new HashSet(); + private readonly static Dictionary> mrtkFolders = + new Dictionary>(); private readonly static Task searchForFoldersTask; /// /// Returns a collection of MRTK directories found in the project. /// - public static IEnumerable MRTKDirectories { get; } = mrtkFolders; + public static IEnumerable MRTKDirectories => GetDirectories(MixedRealityToolkitModuleType.Core); + + public static IEnumerable GetDirectories(MixedRealityToolkitModuleType module) + { + if (mrtkFolders.TryGetValue(module, out HashSet folders)) + { + return folders; + } + return null; + } /// /// Are any of the MRTK directories available? @@ -86,18 +144,26 @@ static MixedRealityToolkitFiles() private static void SearchForFoldersAsync(string rootPath) { - IEnumerable directories = Directory.GetDirectories(rootPath, MixedRealityToolkitDirectory, SearchOption.AllDirectories); - - if (directories.Count() == 0) + foreach (MixedRealityToolkitModuleType module in Enum.GetValues(typeof(MixedRealityToolkitModuleType))) { - directories = Directory.GetDirectories(rootPath, AlternateMixedRealityToolkitDirectory, SearchOption.AllDirectories); - } + IEnumerable directories = Directory.GetDirectories(rootPath, MixedRealityToolkitDirectory(module), SearchOption.AllDirectories); + + if (directories.Count() == 0) + { + directories = Directory.GetDirectories(rootPath, AlternateMixedRealityToolkitDirectory(module), SearchOption.AllDirectories); + } - directories = directories.Select(NormalizeSeparators); + directories = directories.Select(NormalizeSeparators); - foreach (string s in directories) - { - mrtkFolders.Add(s); + foreach (string s in directories) + { + if (!mrtkFolders.TryGetValue(module, out HashSet modFolders)) + { + modFolders = new HashSet(); + mrtkFolders.Add(module, modFolders); + } + modFolders.Add(s); + } } } @@ -119,6 +185,16 @@ private static void SearchForFoldersAsync(string rootPath) /// The MRTK folder relative path to the target folder. /// The array of files. public static string[] GetFiles(string mrtkRelativeFolder) + { + return GetFiles(MixedRealityToolkitModuleType.Core, mrtkRelativeFolder); + } + + /// + /// Returns files from all folder instances of the MRTK folder relative path. + /// + /// The MRTK folder relative path to the target folder. + /// The array of files. + public static string[] GetFiles(MixedRealityToolkitModuleType module, string mrtkRelativeFolder) { if (!AreFoldersAvailable) { @@ -126,12 +202,16 @@ public static string[] GetFiles(string mrtkRelativeFolder) return null; } - return mrtkFolders - .Select(t => Path.Combine(t, mrtkRelativeFolder)) - .Where(Directory.Exists) - .SelectMany(t => Directory.GetFiles(t)) - .Select(GetAssetDatabasePath) - .ToArray(); + if (mrtkFolders.TryGetValue(module, out HashSet modFolders)) + { + return modFolders + .Select(t => Path.Combine(t, mrtkRelativeFolder)) + .Where(Directory.Exists) + .SelectMany(t => Directory.GetFiles(t)) + .Select(GetAssetDatabasePath) + .ToArray(); + } + return null; } /// @@ -140,6 +220,16 @@ public static string[] GetFiles(string mrtkRelativeFolder) /// The MRTK folder relative path to the file. /// The project relative path to the file. public static string MapRelativeFilePath(string mrtkPathToFile) + { + return MapRelativeFilePath(MixedRealityToolkitModuleType.Core, mrtkPathToFile); + } + + /// + /// Maps a single relative path file to a concrete path from one of the MRTK folders, if found. Otherwise returns null. + /// + /// The MRTK folder relative path to the file. + /// The project relative path to the file. + public static string MapRelativeFilePath(MixedRealityToolkitModuleType module, string mrtkPathToFile) { if (!AreFoldersAvailable) { @@ -147,11 +237,14 @@ public static string MapRelativeFilePath(string mrtkPathToFile) return null; } - string path = mrtkFolders - .Select(t => Path.Combine(t, mrtkPathToFile)) - .FirstOrDefault(t => File.Exists(t)); - - return path != null ? GetAssetDatabasePath(path) : null; + if (mrtkFolders.TryGetValue(module, out HashSet modFolders)) + { + string path = modFolders + .Select(t => Path.Combine(t, mrtkPathToFile)) + .FirstOrDefault(t => File.Exists(t)); + return path != null ? GetAssetDatabasePath(path) : null; + } + return null; } } } diff --git a/Assets/MixedRealityToolkit/Utilities/Facades.meta b/Assets/MixedRealityToolkit/Utilities/Facades.meta new file mode 100644 index 00000000000..3fea57ad01a --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Facades.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f7e2be04a6f0d554a893cd9784f5f29d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs b/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs new file mode 100644 index 00000000000..9d37ee99e30 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Utilities.Facades +{ + /// + /// Lightweight MonoBehavior used to represent active services in scene. + /// + [ExecuteAlways] + public class ServiceFacade : MonoBehaviour + { + public static Dictionary FacadeServiceLookup = new Dictionary(); + public static List ActiveFacadeObjects = new List(); + + public IMixedRealityService Service { get { return service; } } + public Type ServiceType { get { return serviceType; } } + public bool Destroyed { get { return destroyed; } } + + private IMixedRealityService service = null; + private Type serviceType = null; + private bool destroyed = false; + private Transform facadeParent; + + public void SetService(IMixedRealityService service, Transform facadeParent) + { + this.service = service; + this.facadeParent = facadeParent; + + if (service == null) + { + serviceType = null; + name = "(Destroyed)"; + gameObject.SetActive(false); + return; + } + else + { + this.serviceType = service.GetType(); + + name = serviceType.Name; + gameObject.SetActive(true); + + if (!FacadeServiceLookup.ContainsKey(serviceType)) + { + FacadeServiceLookup.Add(serviceType, this); + } + else + { + FacadeServiceLookup[serviceType] = this; + } + + if (!ActiveFacadeObjects.Contains(this)) + { + ActiveFacadeObjects.Add(this); + } + } + } + + public void CheckIfStillValid() + { + if (service == null || transform.parent != facadeParent) + { + if (Application.isPlaying) + { + GameObject.Destroy(gameObject); + } + else + { + GameObject.DestroyImmediate(gameObject); + } + } + } + + private void OnDestroy() + { + destroyed = true; + + if (FacadeServiceLookup != null && serviceType != null) + { + FacadeServiceLookup.Remove(serviceType); + } + + ActiveFacadeObjects.Remove(this); + } + } +} diff --git a/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs.meta b/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs.meta new file mode 100644 index 00000000000..7649bbef743 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Facades/ServiceFacade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 09c04dafcb77c1e4195a36bd131cbdec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6eccdbd0228d47ab9ac6ca58258f9112, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectCreator.cs b/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectCreator.cs index ce130221ae5..b8dba7fcd83 100644 --- a/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectCreator.cs +++ b/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectCreator.cs @@ -19,7 +19,7 @@ public abstract class GameObjectCreator /// /// Called when the GameObject is about to be recycled by the GameObjectPool. This allows you to potentially free /// up any resources before it is deactivated by the GameObjectPool. If the GameObject has a component that implements - /// the IGameObjectCreatorHandler interface, it will call its PrepareForRecycle function; + /// the IGameObjectCreatorHandler interface, it will call its PrepareForRecycle function. /// /// The GameObject that is about to be recycled. public virtual void PrepareForRecycle(GameObject obj) @@ -37,7 +37,7 @@ public virtual void PrepareForRecycle(GameObject obj) /// /// Called before the GameObject's position and rotation are set (as well as it's active state) by the GameObjectPool /// when GetGameObject is called. If the GameObject has a component that implements - /// the IGameObjectCreatorHandler interface, it will call its PrepareForUse function; + /// the IGameObjectCreatorHandler interface, it will call its PrepareForUse function. /// /// The GameObject that is about to be used. public virtual void PrepareForUse(GameObject obj) diff --git a/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectPool.cs b/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectPool.cs index 79f2f276e6e..daec8a25dba 100644 --- a/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectPool.cs +++ b/Assets/MixedRealityToolkit/Utilities/GameObjectManagement/GameObjectPool.cs @@ -120,7 +120,6 @@ public GameObject GetGameObject(string objectIdentifier, Vector3 position, Quate /// Same as calling GetGameObject(objectIdentifier, Vector3.zero, Quaternion.identity) /// /// The identifier you want to use to identifiy the kind of game object you want to retrieve. - /// public GameObject GetGameObject(string objectIdentifier) { return GetGameObject(objectIdentifier, Vector3.zero, Quaternion.identity); @@ -130,7 +129,6 @@ public GameObject GetGameObject(string objectIdentifier) /// Gets the number of game objects in the pool for a specific identifier. /// /// - /// public int Count(string objectIdentifier) { EnsureListForObjectID(objectIdentifier); diff --git a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/BezierDataProvider.cs b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/BezierDataProvider.cs index 30f342c0742..b977be37d6c 100644 --- a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/BezierDataProvider.cs +++ b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/BezierDataProvider.cs @@ -66,7 +66,9 @@ protected override void SetPointInternal(int pointIndex, Vector3 point) localOffset = Vector3.zero; // If we're using local tangent points, apply this change to control point 2 if (useLocalTangentPoints) + { localOffset = point - controlPoints.Point1; + } controlPoints.Point1 = point; controlPoints.Point2 = controlPoints.Point2 + localOffset; @@ -83,7 +85,9 @@ protected override void SetPointInternal(int pointIndex, Vector3 point) case 3: localOffset = Vector3.zero; if (useLocalTangentPoints) + { localOffset = point - controlPoints.Point4; + } controlPoints.Point4 = point; controlPoints.Point3 = controlPoints.Point3 + localOffset; diff --git a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/ParabolaLineDataProvider.cs b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/ParabolaLineDataProvider.cs index 27fa4c79a6f..94ff0760fd4 100644 --- a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/ParabolaLineDataProvider.cs +++ b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/ParabolaLineDataProvider.cs @@ -35,13 +35,11 @@ protected override void OnValidate() /// protected override float GetUnClampedWorldLengthInternal() { - // Crude approximation - // TODO optimize float distance = 0f; Vector3 last = GetUnClampedPoint(0f); - for (int i = 1; i < 10; i++) + for (int i = 1; i < UnclampedWorldLengthSearchSteps; i++) { - Vector3 current = GetUnClampedPoint((float)i / 10); + Vector3 current = GetUnClampedPoint((float)i / UnclampedWorldLengthSearchSteps); distance += Vector3.Distance(last, current); } diff --git a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/RectangleLineDataProvider.cs b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/RectangleLineDataProvider.cs index de1c1e77531..c2feecbee73 100644 --- a/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/RectangleLineDataProvider.cs +++ b/Assets/MixedRealityToolkit/Utilities/Lines/DataProviders/RectangleLineDataProvider.cs @@ -111,7 +111,7 @@ protected override Vector3 GetPointInternal(float normalizedDistance) /// protected override void SetPointInternal(int pointIndex, Vector3 point) { - if (pointIndex <= 7 && pointIndex >= 0) + if (pointIndex < PointCount && pointIndex >= 0) { points[pointIndex] = point; } @@ -120,7 +120,7 @@ protected override void SetPointInternal(int pointIndex, Vector3 point) /// protected override Vector3 GetPointInternal(int pointIndex) { - return pointIndex <= 7 && pointIndex >= 0 ? points[pointIndex] : Vector3.zero; + return pointIndex < PointCount && pointIndex >= 0 ? points[pointIndex] : Vector3.zero; } /// diff --git a/Assets/MixedRealityToolkit/Utilities/Lines/Renderers/BaseMixedRealityLineRenderer.cs b/Assets/MixedRealityToolkit/Utilities/Lines/Renderers/BaseMixedRealityLineRenderer.cs index a0981f7dc03..ec735adf0fe 100644 --- a/Assets/MixedRealityToolkit/Utilities/Lines/Renderers/BaseMixedRealityLineRenderer.cs +++ b/Assets/MixedRealityToolkit/Utilities/Lines/Renderers/BaseMixedRealityLineRenderer.cs @@ -155,7 +155,7 @@ public PointDistributionMode PointDistributionMode [SerializeField] [Tooltip("Custom function for distribing points along curve.Used when DistanceCurveValue is set to Distance. Total points set by LineStepCount.")] - private AnimationCurve customPointDistributionCurve = AnimationCurve.Linear(0,0,1,1); + private AnimationCurve customPointDistributionCurve = AnimationCurve.Linear(0, 0, 1, 1); /// /// Number of steps to interpolate along line in Interpolated step mode diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs b/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs new file mode 100644 index 00000000000..8b55174f517 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using Microsoft.MixedReality.Toolkit.Utilities; +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit +{ + /// + /// A static class encapsulating the Mixed Reality playspace. + /// + public static class MixedRealityPlayspace + { + private const string Name = "MixedRealityPlayspace"; + + private static Transform mixedRealityPlayspace; + + /// + /// The transform of the playspace. + /// + public static Transform Transform + { + get + { + if (mixedRealityPlayspace) + { + return mixedRealityPlayspace; + } + + if (CameraCache.Main.transform.parent == null) + { + // Create a new mixed reality playspace + GameObject mixedRealityPlayspaceGo = new GameObject(Name); + mixedRealityPlayspace = mixedRealityPlayspaceGo.transform; + CameraCache.Main.transform.SetParent(mixedRealityPlayspace); + } + else + { + if (CameraCache.Main.transform.parent.name != Name) + { + // Since the scene is set up with a different camera parent, its likely + // that there's an expectation that that parent is going to be used for + // something else. We print a warning to call out the fact that we're + // co-opting this object for use with teleporting and such, since that + // might cause conflicts with the parent's intended purpose. + Debug.LogWarning($"The Mixed Reality Toolkit expected the camera\'s parent to be named {Name}. The existing parent will be renamed and used instead."); + // If we rename it, we make it clearer that why it's being teleported around at runtime. + CameraCache.Main.transform.parent.name = Name; + } + + mixedRealityPlayspace = CameraCache.Main.transform.parent; + } + + // It's very important that the Playspace align with the tracked space, + // otherwise reality-locked things like playspace boundaries won't be aligned properly. + // For now, we'll just assume that when the playspace is first initialized, the + // tracked space origin overlaps with the world space origin. If a platform ever does + // something else (i.e, placing the lower left hand corner of the tracked space at world + // space 0,0,0), we should compensate for that here. + return mixedRealityPlayspace; + } + } + + /// + /// The location of the playspace. + /// + public static Vector3 Position + { + get { return Transform.position; } + set { Transform.position = value; } + } + + /// + /// The playspace's rotation. + /// + public static Quaternion Rotation + { + get { return Transform.rotation; } + set { Transform.rotation = value; } + } + + /// + /// Adds a child object to the playspace's heirarchy. + /// + /// The child object's transform. + public static void AddChild(Transform transform) + { + transform.SetParent(Transform); + } + + /// + /// Transforms a position from local to world space. + /// + /// The position to be transformed. + /// + /// The position, in world space. + /// + public static Vector3 TransformPoint(Vector3 localPosition) + { + return Transform.TransformPoint(localPosition); + } + + /// + /// Transforms a position from world to local space. + /// + /// The position to be transformed. + /// + /// The position, in local space. + /// + public static Vector3 InverseTransformPoint(Vector3 worldPosition) + { + return Transform.InverseTransformPoint(worldPosition); + } + + /// + /// Transforms a direction from local to world space. + /// + /// The direction to be transformed. + /// + /// The direction, in world space. + /// + public static Vector3 TransformDirection(Vector3 localDirection) + { + return Transform.TransformDirection(localDirection); + } + + /// + /// Rotates the playspace around the specified axis. + /// + /// The point to pass through during rotation. + /// The axis about which to rotate. + /// The angle, in degrees, to rotate. + public static void RotateAround(Vector3 point, Vector3 axis, float angle) + { + Transform.RotateAround(point, axis, angle); + } + + /// + /// Performs a playspace transformation. + /// + /// The transformation to be applied to the playspace. + /// + /// This method takes a lambda function and may contribute to garbage collector pressure. + /// For best performance, avoid calling this method from an inner loop function. + /// + public static void PerformTransformation(Action transformation) + { + transformation?.Invoke(Transform); + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs.meta b/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs.meta new file mode 100644 index 00000000000..151e8ce990b --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/MixedRealityPlayspace.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b71d7f51382ebe4c8bb7e06d10b0cfc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6eccdbd0228d47ab9ac6ca58258f9112, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs b/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs new file mode 100644 index 00000000000..58c635a9821 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit +{ + /// + /// Static class that represents the Mixed Reality Toolkit service registry. + /// + /// + /// The service registry is used to enable discovery of and access to active Mixed Reality Toolkit services at + /// runtime without requiring direct code reference to a singleton style component. + /// + public static class MixedRealityServiceRegistry + { + /// + /// The service registry store where the key is the Type of the service interface and the value is + /// a pair in which they key is the service instance and the value is the registrar instance. + /// + private static Dictionary>> registry = + new Dictionary>>(); + + /// + /// Static constructor. + /// + static MixedRealityServiceRegistry() + { } + + /// + /// Adds an instance to the registry. + /// + /// The interface type of the service being added. + /// Instance of the service to add. + /// Instance of the registrar manages the service. + /// + /// True if the service was successfully added, false otherwise. + /// + public static bool AddService(T serviceInstance, IMixedRealityServiceRegistrar registrar) where T : IMixedRealityService + { + if (serviceInstance == null) + { + // Adding a null service instance is not supported. + return false; + } + + if (serviceInstance is IMixedRealityDataProvider) + { + // Data providers are generally not used by application code. Services that intend for clients to + // directly communicate with their data providers will expose a GetDataProvider or similarly named + // method. + return false; + } + + Type interfaceType = typeof(T); + T existingService; + + if (TryGetService(out existingService, serviceInstance.Name)) + { + return false; + } + + // Ensure we have a place to put our newly registered service. + if (!registry.ContainsKey(interfaceType)) + { + registry.Add(interfaceType, new List>()); + } + + List> services = registry[interfaceType]; + services.Add(new KeyValuePair(serviceInstance, registrar)); + return true; + } + + /// + /// Removes an instance from the registry. + /// + /// The interface type of the service being removed. + /// Instance of the service to remove. + /// Instance of the registrar manages the service. + /// + /// True if the service was successfully removed, false otherwise. + /// + public static bool RemoveService(T serviceInstance, IMixedRealityServiceRegistrar registrar) where T : IMixedRealityService + { + return RemoveServiceInternal(typeof(T), serviceInstance, registrar); + } + + /// + /// Removes an instance from the registry. + /// + /// The interface type of the service being removed. + /// Instance of the service to remove. + /// + /// True if the service was successfully removed, false otherwise. + /// + public static bool RemoveService(T serviceInstance) where T : IMixedRealityService + { + T tempService; + IMixedRealityServiceRegistrar registrar; + + if (!TryGetService(out tempService, out registrar)) + { + return false; + } + + if (!object.ReferenceEquals(serviceInstance, tempService)) + { + return false; + } + + return RemoveServiceInternal(typeof(T), serviceInstance, registrar); + } + + /// + /// Removes an instance from the registry. + /// + /// The interface type of the service being removed. + /// The friendly name of the service to remove. + /// + /// True if the service was successfully removed, false otherwise. + /// + public static bool RemoveService(string name) where T : IMixedRealityService + { + T tempService; + IMixedRealityServiceRegistrar registrar; + + if (!TryGetService(out tempService, out registrar, name)) + { + return false; + } + + return RemoveServiceInternal(typeof(T), tempService, registrar); + } + + /// + /// Removes an instance from the registry. + /// + /// The interface type of the service being removed. + /// Instance of the service to remove. + /// Instance of the registrar manages the service. + /// + /// True if the service was successfully removed, false otherwise. + /// + private static bool RemoveServiceInternal( + Type interfaceType, + IMixedRealityService serviceInstance, + IMixedRealityServiceRegistrar registrar) + { + if (!registry.ContainsKey(interfaceType)) { return false; } + + List> services = registry[interfaceType]; + + return services.Remove(new KeyValuePair(serviceInstance, registrar)); + } + + /// + /// Gets the instance of the requested service from the registry. + /// + /// The interface type of the service being requested. + /// Output parameter to receive the requested service instance. + /// Output parameter to receive the registrar that loaded the service instance. + /// Optional name of the service. + /// + /// True if the requested service is being returned, false otherwise. + /// + public static bool TryGetService( + out T serviceInstance, + out IMixedRealityServiceRegistrar registrar, + string name = null) + { + Type interfaceType = typeof(T); + + if (!registry.ContainsKey(interfaceType)) + { + serviceInstance = default(T); + registrar = null; + return false; + } + + List> services = registry[interfaceType]; + + int registryIndex = -1; + if (!string.IsNullOrWhiteSpace(name)) + { + // Find the desired service by it's name. + for (int i = 0; i < services.Count; i++) + { + if (services[i].Key.Name != name) { continue; } + + registryIndex = i; + break; + } + + if (registryIndex == -1) + { + // Failed to find the requested service. + serviceInstance = default(T); + registrar = null; + return false; + } + } + else + { + if (services.Count > 1) + { + Debug.LogWarning("Multiple instances of the requested service were found. Please re-call this method and provide a value for the name parameter."); + serviceInstance = default(T); + registrar = null; + return false; + } + registryIndex = 0; + } + + IMixedRealityService tempService = services[registryIndex].Key; + Debug.Assert(tempService is T, "The service in the registry does not match the expected type."); + + serviceInstance = (T)tempService; + registrar = services[registryIndex].Value; + return true; + } + + /// + /// Gets the instance of the requested service from the registry. + /// + /// The interface type of the service being requested. + /// Output parameter to receive the requested service instance. + /// Optional name of the service. + /// + /// True if the requested service is being returned, false otherwise. + /// + public static bool TryGetService( + out T serviceInstance, + string name = null) where T : IMixedRealityService + { + return TryGetService( + out serviceInstance, + out _, // The registrar out param is not used, it can be discarded. + name); + } + } +} diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs.meta b/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs.meta new file mode 100644 index 00000000000..275858bd205 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/MixedRealityServiceRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 152d000245e4f3a4fa849c565ecd8a89 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6eccdbd0228d47ab9ac6ca58258f9112, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs b/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs deleted file mode 100644 index d032419cfb3..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -#if UNITY_EDITOR - -using Microsoft.MixedReality.Toolkit; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEditor; -using UnityEditor.SceneManagement; - -namespace Microsoft.MixedReality.Toolkit.Utilities -{ - /// - /// Utility class for checking if a scene has been properly set up for use with MixedRealityToolkit - /// - [InitializeOnLoad] - public class MixedRealityToolkitSceneChecker - { - const string HideNoActiveToolkitWarningKey = "MRTK_HideNoActiveToolkitWarningKey"; - private static bool HideNoActiveToolkitWarning = true; - - static MixedRealityToolkitSceneChecker() - { - // Check for a valid MRTK instance when scenes are opened or created. - EditorSceneManager.sceneOpened += SceneOpened; - EditorSceneManager.newSceneCreated += NewSceneCreated; - } - - private static void SceneOpened(Scene scene, OpenSceneMode mode) - { - CheckMixedRealityToolkitScene(); - } - - private static void NewSceneCreated(Scene scene, NewSceneSetup setup, NewSceneMode mode) - { - switch (setup) - { - // Ignore the check when the scene is explicitly empty. - // This includes empty scenes in playmode tests. - case NewSceneSetup.EmptyScene: - break; - - case NewSceneSetup.DefaultGameObjects: - CheckMixedRealityToolkitScene(); - break; - } - } - - private static void CheckMixedRealityToolkitScene() - { - // If building, don't perform this check - if (BuildPipeline.isBuildingPlayer) - { - return; - } - - // Create The MR Manager if none exists. - if (!MixedRealityToolkit.IsInitialized) - { - // Search the scene for one, in case we've just hot reloaded the assembly. - var managerSearch = Object.FindObjectsOfType(); - - if (managerSearch.Length == 0) - { - HideNoActiveToolkitWarning = SessionState.GetBool(HideNoActiveToolkitWarningKey, false); - if (!HideNoActiveToolkitWarning) - { - NoActiveToolkitWarning.OpenWindow(null); - } - return; - } - } - } - - internal class NoActiveToolkitWarning : EditorWindow - { - private static NoActiveToolkitWarning activeWindow; - [SerializeField] - public MixedRealityToolkitConfigurationProfile configurationProfile; - private bool hideWarning = false; - - public static void OpenWindow(MixedRealityToolkitConfigurationProfile configurationProfile) - { - // If we already have an active window, bail - if (activeWindow != null) - { - return; - } - - activeWindow = EditorWindow.GetWindow(); - activeWindow.configurationProfile = configurationProfile; - activeWindow.maxSize = new Vector2(400, 140); - activeWindow.minSize = new Vector2(400, 140); - activeWindow.titleContent = new GUIContent("No Active Toolkit Found"); - - activeWindow.ShowPopup(); - } - - private void OnGUI() - { - EditorGUILayout.HelpBox("There is no active Mixed Reality Toolkit in your scene. Would you like to create one now?", MessageType.Warning); - - hideWarning = EditorGUILayout.Toggle("Don't show this again", hideWarning); - - configurationProfile = (MixedRealityToolkitConfigurationProfile)EditorGUILayout.ObjectField(configurationProfile, typeof(MixedRealityToolkitConfigurationProfile), false); - if (configurationProfile == null) - { - EditorGUILayout.HelpBox("Select a configuration profile.", MessageType.Info); - } - - EditorGUILayout.BeginHorizontal(); - GUI.enabled = (configurationProfile != null); - if (GUILayout.Button("Yes")) - { - var playspace = MixedRealityToolkit.Instance.MixedRealityPlayspace; - Debug.Assert(playspace != null); - MixedRealityToolkit.Instance.ActiveProfile = configurationProfile; - - SessionState.SetBool(HideNoActiveToolkitWarningKey, hideWarning); - Close(); - } - GUI.enabled = true; - - if (GUILayout.Button("No")) - { - SessionState.SetBool(HideNoActiveToolkitWarningKey, hideWarning); - Close(); - } - EditorGUILayout.EndHorizontal(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs.meta b/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs.meta deleted file mode 100644 index fc3a0e62793..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/MixedRealityToolkitSceneChecker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ebf862aba0d0da944ad46887e6f776b6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/Distorter.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/Distorter.cs index 631f7d3ea44..da77b36e85d 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/Distorter.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/Distorter.cs @@ -34,18 +34,7 @@ public int DistortOrder get { return distortOrder; } set { - if (value < 0) - { - distortOrder = 0; - } - else if (value > 10) - { - distortOrder = 10; - } - else - { - distortOrder = value; - } + distortOrder = Mathf.Clamp(value, 0, 10); } } diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterBulge.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterBulge.cs index 378277a5cbb..dcdb4a06f21 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterBulge.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterBulge.cs @@ -5,6 +5,14 @@ namespace Microsoft.MixedReality.Toolkit.Physics { + /// + /// A Distorter that distorts points based on their distance and direction from the center of the + /// bulge point. + /// + /// + /// The characteristics of the distortion are also heavily controlled by the BulgeFalloff + /// property, which should contain key frames that cover the [0, 1] time range. + /// public class DistorterBulge : Distorter { [SerializeField] diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterGravity.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterGravity.cs index 9aa5d7d6341..caa2c16f729 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterGravity.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterGravity.cs @@ -5,6 +5,10 @@ namespace Microsoft.MixedReality.Toolkit.Physics { + /// + /// A Distorter that distorts points based on their distance and direction to the world + /// center of gravity as defined by WorldCenterOfGravity. + /// public class DistorterGravity : Distorter { [SerializeField] @@ -46,18 +50,7 @@ public float Radius get { return radius; } set { - if (value < 0f) - { - radius = 0f; - } - else if (value > 10f) - { - radius = 10f; - } - else - { - radius = value; - } + radius = Mathf.Clamp(value, 0f, 10f); } } diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSimplex.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSimplex.cs index 6a05ada8c60..83e52210c6c 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSimplex.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSimplex.cs @@ -6,6 +6,9 @@ namespace Microsoft.MixedReality.Toolkit.Physics { + /// + /// A Distorter that randomly distorts points. + /// public class DistorterSimplex : Distorter { private readonly FastSimplexNoise noise = new FastSimplexNoise(); diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSphere.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSphere.cs index 7b5466e80c5..08c5a361b4f 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSphere.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterSphere.cs @@ -5,6 +5,10 @@ namespace Microsoft.MixedReality.Toolkit.Physics { + /// + /// A Distorter that distorts points based on their distance and direction from the + /// center of the sphere of size 2. + /// public class DistorterSphere : Distorter { public Vector3 SphereCenter diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterWiggly.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterWiggly.cs index f780836cea7..4cc08e340d7 100644 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterWiggly.cs +++ b/Assets/MixedRealityToolkit/Utilities/Physics/Distorters/DistorterWiggly.cs @@ -24,18 +24,7 @@ public float ScaleMultiplier get { return scaleMultiplier; } set { - if (value > MaxScaleMultiplier) - { - scaleMultiplier = MaxScaleMultiplier; - } - else if (value < MinScaleMultiplier) - { - scaleMultiplier = MinScaleMultiplier; - } - else - { - scaleMultiplier = value; - } + scaleMultiplier = Mathf.Clamp(value, MinScaleMultiplier, MinScaleMultiplier); } } @@ -48,18 +37,7 @@ public float SpeedMultiplier get { return speedMultiplier; } set { - if (value > MaxSpeedMultiplier) - { - speedMultiplier = MaxSpeedMultiplier; - } - else if (value < MinSpeedMultiplier) - { - speedMultiplier = MinSpeedMultiplier; - } - else - { - speedMultiplier = value; - } + speedMultiplier = Mathf.Clamp(value, MinSpeedMultiplier, MaxSpeedMultiplier); } } @@ -72,18 +50,7 @@ public float StrengthMultiplier get { return strengthMultiplier; } set { - if (value > MaxStrengthMultiplier) - { - strengthMultiplier = MaxStrengthMultiplier; - } - else if (value < MinStrengthMultiplier) - { - strengthMultiplier = MinStrengthMultiplier; - } - else - { - strengthMultiplier = value; - } + strengthMultiplier = Mathf.Clamp(value, MinStrengthMultiplier, MaxStrengthMultiplier); } } diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs b/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs deleted file mode 100644 index c40f715e2c4..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Physics -{ - /// - /// Static class containing interpolation-related utility functions. - /// - public static class InterpolationUtilities - { - #region Exponential Decay - - public static float ExpDecay(float from, float to, float hLife, float dTime) - { - return Mathf.Lerp(from, to, ExpCoefficient(hLife, dTime)); - } - - public static Vector2 ExpDecay(Vector2 from, Vector2 to, float hLife, float dTime) - { - return Vector2.Lerp(from, to, ExpCoefficient(hLife, dTime)); - } - - public static Vector3 ExpDecay(Vector3 from, Vector3 to, float hLife, float dTime) - { - return Vector3.Lerp(from, to, ExpCoefficient(hLife, dTime)); - } - - public static Quaternion ExpDecay(Quaternion from, Quaternion to, float hLife, float dTime) - { - return Quaternion.Slerp(from, to, ExpCoefficient(hLife, dTime)); - } - - public static Color ExpDecay(Color from, Color to, float hLife, float dTime) - { - return Color.Lerp(from, to, ExpCoefficient(hLife, dTime)); - } - - - public static float ExpCoefficient(float hLife, float dTime) - { - if (hLife == 0) - return 1; - - return 1.0f - Mathf.Pow(0.5f, dTime / hLife); - } - - #endregion - } -} diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs.meta b/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs.meta deleted file mode 100644 index c8b81b0ebf6..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/Physics/InterpolationUtilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2528cd8f0eb4d0e83245bbb4f8a34e1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs b/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs deleted file mode 100644 index 1eda0054317..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs +++ /dev/null @@ -1,454 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using System; -using UnityEngine; - -namespace Microsoft.MixedReality.Toolkit.Physics -{ - /// - /// A MonoBehaviour that interpolates a transform's position, rotation or scale. - /// - public class Interpolator : MonoBehaviour - { - /// - /// A very small number that is used in determining if the Interpolator needs to run at all. - /// - private const float Tolerance = 0.0000001f; - - /// - /// The event fired when an Interpolation is started. - /// - public event Action InterpolationStarted; - - /// - /// The event fired when an Interpolation is completed. - /// - public event Action InterpolationDone; - - [SerializeField] - [Tooltip("When interpolating, use unscaled time. This is useful for games that have a pause mechanism or otherwise adjust the game timescale.")] - private bool useUnscaledTime = true; - - [SerializeField] - [Tooltip("The movement speed in meters per second.")] - private float positionPerSecond = 30.0f; - - [SerializeField] - [Tooltip("The rotation speed, in degrees per second.")] - private float rotationDegreesPerSecond = 720.0f; - - [SerializeField] - [Tooltip("Adjusts rotation speed based on angular distance.")] - private float rotationSpeedScaler = 0.0f; - - [SerializeField] - [Tooltip("The amount to scale per second.")] - private float scalePerSecond = 5.0f; - - /// - /// Lerp the estimated targets towards the object each update, slowing and smoothing movement. - /// - public bool SmoothLerpToTarget { get; set; } = false; - public float SmoothPositionLerpRatio { get; set; } = 0.5f; - public float SmoothRotationLerpRatio { get; set; } = 0.5f; - public float SmoothScaleLerpRatio { get; set; } = 0.5f; - - /// - /// If animating position, specifies the target position as specified - /// by SetTargetPosition. Otherwise returns the current position of - /// the transform. - /// - public Vector3 TargetPosition => AnimatingPosition ? targetPosition : transform.position; - private Vector3 targetPosition; - - /// - /// If animating rotation, specifies the target rotation as specified - /// by SetTargetRotation. Otherwise returns the current rotation of - /// the transform. - /// - public Quaternion TargetRotation => AnimatingRotation ? targetRotation : transform.rotation; - private Quaternion targetRotation; - - /// - /// If animating local rotation, specifies the target local rotation as - /// specified by SetTargetLocalRotation. Otherwise returns the current - /// local rotation of the transform. - /// - public Quaternion TargetLocalRotation => AnimatingLocalRotation ? targetLocalRotation : transform.localRotation; - private Quaternion targetLocalRotation; - - /// - /// If animating local scale, specifies the target local scale as - /// specified by SetTargetLocalScale. Otherwise returns the current - /// local scale of the transform. - /// - public Vector3 TargetLocalScale => AnimatingLocalScale ? targetLocalScale : transform.localScale; - private Vector3 targetLocalScale; - - /// - /// True if the transform's position is animating; false otherwise. - /// - public bool AnimatingPosition { get; private set; } - - /// - /// True if the transform's rotation is animating; false otherwise. - /// - public bool AnimatingRotation { get; private set; } - - /// - /// True if the transform's local rotation is animating; false otherwise. - /// - public bool AnimatingLocalRotation { get; private set; } - - /// - /// True if the transform's scale is animating; false otherwise. - /// - public bool AnimatingLocalScale { get; private set; } - - /// - /// The velocity of a transform whose position is being interpolated. - /// - public Vector3 PositionVelocity { get; private set; } - - private Vector3 oldPosition = Vector3.zero; - - /// - /// True if position, rotation or scale are animating; false otherwise. - /// - public bool Running => AnimatingPosition || AnimatingRotation || AnimatingLocalRotation || AnimatingLocalScale; - - #region MonoBehaviour Implementation - - private void Awake() - { - targetPosition = transform.position; - targetRotation = transform.rotation; - targetLocalRotation = transform.localRotation; - targetLocalScale = transform.localScale; - - enabled = false; - } - - private void Update() - { - float deltaTime = useUnscaledTime - ? Time.unscaledDeltaTime - : Time.deltaTime; - - bool interpOccuredThisFrame = false; - - if (AnimatingPosition) - { - Vector3 lerpTargetPosition = targetPosition; - if (SmoothLerpToTarget) - { - lerpTargetPosition = Vector3.Lerp(transform.position, lerpTargetPosition, SmoothPositionLerpRatio); - } - - Vector3 newPosition = NonLinearInterpolateTo(transform.position, lerpTargetPosition, deltaTime, positionPerSecond); - if ((targetPosition - newPosition).sqrMagnitude <= Tolerance) - { - // Snap to final position - newPosition = targetPosition; - AnimatingPosition = false; - } - else - { - interpOccuredThisFrame = true; - } - - transform.position = newPosition; - - //calculate interpolatedVelocity and store position for next frame - PositionVelocity = oldPosition - newPosition; - oldPosition = newPosition; - } - - // Determine how far we need to rotate - if (AnimatingRotation) - { - Quaternion lerpTargetRotation = targetRotation; - if (SmoothLerpToTarget) - { - lerpTargetRotation = Quaternion.Lerp(transform.rotation, lerpTargetRotation, SmoothRotationLerpRatio); - } - - float angleDiff = Quaternion.Angle(transform.rotation, lerpTargetRotation); - float speedScale = 1.0f + (Mathf.Pow(angleDiff, rotationSpeedScaler) / 180.0f); - float ratio = Mathf.Clamp01((speedScale * rotationDegreesPerSecond * deltaTime) / angleDiff); - - if (angleDiff < Mathf.Epsilon) - { - AnimatingRotation = false; - transform.rotation = targetRotation; - } - else - { - // Only lerp rotation here, as ratio is NaN if angleDiff is 0.0f - transform.rotation = Quaternion.Slerp(transform.rotation, lerpTargetRotation, ratio); - interpOccuredThisFrame = true; - } - } - - // Determine how far we need to rotate - if (AnimatingLocalRotation) - { - Quaternion lerpTargetLocalRotation = targetLocalRotation; - if (SmoothLerpToTarget) - { - lerpTargetLocalRotation = Quaternion.Lerp(transform.localRotation, lerpTargetLocalRotation, SmoothRotationLerpRatio); - } - - float angleDiff = Quaternion.Angle(transform.localRotation, lerpTargetLocalRotation); - float speedScale = 1.0f + (Mathf.Pow(angleDiff, rotationSpeedScaler) / 180.0f); - float ratio = Mathf.Clamp01((speedScale * rotationDegreesPerSecond * deltaTime) / angleDiff); - - if (angleDiff < Mathf.Epsilon) - { - AnimatingLocalRotation = false; - transform.localRotation = targetLocalRotation; - } - else - { - // Only lerp rotation here, as ratio is NaN if angleDiff is 0.0f - transform.localRotation = Quaternion.Slerp(transform.localRotation, lerpTargetLocalRotation, ratio); - interpOccuredThisFrame = true; - } - } - - if (AnimatingLocalScale) - { - Vector3 lerpTargetLocalScale = targetLocalScale; - if (SmoothLerpToTarget) - { - lerpTargetLocalScale = Vector3.Lerp(transform.localScale, lerpTargetLocalScale, SmoothScaleLerpRatio); - } - - Vector3 newScale = NonLinearInterpolateTo(transform.localScale, lerpTargetLocalScale, deltaTime, scalePerSecond); - if ((targetLocalScale - newScale).sqrMagnitude <= Tolerance) - { - // Snap to final scale - newScale = targetLocalScale; - AnimatingLocalScale = false; - } - else - { - interpOccuredThisFrame = true; - } - - transform.localScale = newScale; - } - - // If all interpolations have completed, stop updating - if (!interpOccuredThisFrame) - { - InterpolationDone?.Invoke(); - enabled = false; - } - } - - /// - /// Stops the transform in place and terminates any animations. - /// Reset() is usually reserved as a MonoBehaviour API call in editor, but is used in this case as a convenience method. - /// - public void Reset() - { - targetPosition = transform.position; - targetRotation = transform.rotation; - targetLocalRotation = transform.localRotation; - targetLocalScale = transform.localScale; - - AnimatingPosition = false; - AnimatingRotation = false; - AnimatingLocalRotation = false; - AnimatingLocalScale = false; - - enabled = false; - } - - #endregion MonoBehaviour Implementation - - /// - /// Sets the target position for the transform and if position wasn't - /// already animating, fires the InterpolationStarted event. - /// - /// The new target position to for the transform. - public void SetTargetPosition(Vector3 target) - { - bool wasRunning = Running; - - targetPosition = target; - - float magsq = (targetPosition - transform.position).sqrMagnitude; - if (magsq > Tolerance) - { - AnimatingPosition = true; - enabled = true; - - if (InterpolationStarted != null && !wasRunning) - { - InterpolationStarted(); - } - } - else - { - // Set immediately to prevent accumulation of error. - transform.position = target; - AnimatingPosition = false; - } - } - - /// - /// Sets the target rotation for the transform and if rotation wasn't - /// already animating, fires the InterpolationStarted event. - /// - /// The new target rotation for the transform. - public void SetTargetRotation(Quaternion target) - { - bool wasRunning = Running; - - targetRotation = target; - - if (Quaternion.Dot(transform.rotation, target) < 1.0f) - { - AnimatingRotation = true; - enabled = true; - - if (InterpolationStarted != null && !wasRunning) - { - InterpolationStarted(); - } - } - else - { - // Set immediately to prevent accumulation of error. - transform.rotation = target; - AnimatingRotation = false; - } - } - - /// - /// Sets the target local rotation for the transform and if rotation - /// wasn't already animating, fires the InterpolationStarted event. - /// - /// The new target local rotation for the transform. - public void SetTargetLocalRotation(Quaternion target) - { - bool wasRunning = Running; - - targetLocalRotation = target; - - if (Quaternion.Dot(transform.localRotation, target) < 1.0f) - { - AnimatingLocalRotation = true; - enabled = true; - - if (InterpolationStarted != null && !wasRunning) - { - InterpolationStarted(); - } - } - else - { - // Set immediately to prevent accumulation of error. - transform.localRotation = target; - AnimatingLocalRotation = false; - } - } - - /// - /// Sets the target local scale for the transform and if scale - /// wasn't already animating, fires the InterpolationStarted event. - /// - /// The new target local rotation for the transform. - public void SetTargetLocalScale(Vector3 target) - { - bool wasRunning = Running; - - targetLocalScale = target; - - float magsq = (targetLocalScale - transform.localScale).sqrMagnitude; - if (magsq > Mathf.Epsilon) - { - AnimatingLocalScale = true; - enabled = true; - - if (InterpolationStarted != null && !wasRunning) - { - InterpolationStarted(); - } - } - else - { - // set immediately to prevent accumulation of error - transform.localScale = target; - AnimatingLocalScale = false; - } - } - - /// - /// Interpolates smoothly to a target position. - /// - /// The starting position. - /// The destination position. - /// Caller-provided Time.deltaTime. - /// The speed to apply to the interpolation. - /// New interpolated position closer to target - public static Vector3 NonLinearInterpolateTo(Vector3 start, Vector3 target, float deltaTime, float speed) - { - // If no interpolation speed, jump to target value. - if (speed <= 0.0f) - { - return target; - } - - Vector3 distance = (target - start); - - // When close enough, jump to the target - if (distance.sqrMagnitude <= Mathf.Epsilon) - { - return target; - } - - // Apply the delta, then clamp so we don't overshoot the target - Vector3 deltaMove = distance * Mathf.Clamp(deltaTime * speed, 0.0f, 1.0f); - - return start + deltaMove; - } - - /// - /// Snaps to the final target and stops interpolating - /// - public void SnapToTarget() - { - if (enabled) - { - transform.position = TargetPosition; - transform.rotation = TargetRotation; - transform.localRotation = TargetLocalRotation; - transform.localScale = TargetLocalScale; - - AnimatingPosition = false; - AnimatingLocalScale = false; - AnimatingRotation = false; - AnimatingLocalRotation = false; - enabled = false; - - InterpolationDone?.Invoke(); - } - } - - /// - /// Stops the interpolation regardless if it has reached the target - /// - public void StopInterpolating() - { - if (enabled) - { - Reset(); - InterpolationDone?.Invoke(); - } - } - } -} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs.meta b/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs.meta deleted file mode 100644 index e1c5ef91ae4..00000000000 --- a/Assets/MixedRealityToolkit/Utilities/Physics/Interpolator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49e053307151459ca2db5bdd9176a3b0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/PlatformUtility.cs b/Assets/MixedRealityToolkit/Utilities/PlatformUtility.cs index 4a0c10fe116..cd19e5e1fb6 100644 --- a/Assets/MixedRealityToolkit/Utilities/PlatformUtility.cs +++ b/Assets/MixedRealityToolkit/Utilities/PlatformUtility.cs @@ -37,6 +37,9 @@ private static SupportedPlatforms GetSupportedPlatformMask(RuntimePlatform runti case RuntimePlatform.LinuxEditor: supportedPlatforms |= SupportedPlatforms.LinuxStandalone; break; + case RuntimePlatform.Android: + supportedPlatforms |= SupportedPlatforms.Android; + break; } return supportedPlatforms; @@ -81,6 +84,9 @@ private static SupportedPlatforms GetSupportedPlatformMask(UnityEditor.BuildTarg case UnityEditor.BuildTarget.StandaloneLinuxUniversal: supportedPlatforms |= SupportedPlatforms.LinuxStandalone; break; + case UnityEditor.BuildTarget.Android: + supportedPlatforms |= SupportedPlatforms.Android; + break; } return supportedPlatforms; diff --git a/Assets/MixedRealityToolkit/Utilities/WindowsApiChecker.cs b/Assets/MixedRealityToolkit/Utilities/WindowsApiChecker.cs index 107eca99be0..ac4dd3c071d 100644 --- a/Assets/MixedRealityToolkit/Utilities/WindowsApiChecker.cs +++ b/Assets/MixedRealityToolkit/Utilities/WindowsApiChecker.cs @@ -11,9 +11,9 @@ namespace Microsoft.MixedReality.Toolkit.Windows.Utilities { /// /// Helper class for determining if a Windows API contract is available. + /// /// See https://docs.microsoft.com/en-us/uwp/extension-sdks/windows-universal-sdk /// for a full list of contracts. - /// public static class WindowsApiChecker { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] diff --git a/Assets/MixedRealityToolkit/Utilities/WindowsDevicePortal/DevicePortal.cs b/Assets/MixedRealityToolkit/Utilities/WindowsDevicePortal/DevicePortal.cs index c6d0ef1d356..d43f80bc36c 100644 --- a/Assets/MixedRealityToolkit/Utilities/WindowsDevicePortal/DevicePortal.cs +++ b/Assets/MixedRealityToolkit/Utilities/WindowsDevicePortal/DevicePortal.cs @@ -754,8 +754,8 @@ public static async Task GetWiFiNetworkInterfacesAsync(Device /// /// This Utility method finalizes the URL and formats the HTTPS string if needed. - /// Local Machine will be changed to 127.0.1:10080 for HoloLens connections. /// + /// Local Machine will be changed to 127.0.1:10080 for HoloLens connections. /// The target URL i.e. 128.128.128.128 /// The finalized URL with http/https prefix. public static string FinalizeUrl(string targetUrl) diff --git a/Assets/MixedRealityToolkit/Version.txt b/Assets/MixedRealityToolkit/Version.txt index ea875e8e757..c6731cb24db 100644 --- a/Assets/MixedRealityToolkit/Version.txt +++ b/Assets/MixedRealityToolkit/Version.txt @@ -1 +1 @@ -Mixed Reality Toolkit 2.0.0-RC1 \ No newline at end of file +Mixed Reality Toolkit 2.0.0-RC1-Refresh \ No newline at end of file diff --git a/Documentation/Authors.md b/Documentation/Authors.md index a953ffb11a9..512f150c0f9 100644 --- a/Documentation/Authors.md +++ b/Documentation/Authors.md @@ -2,7 +2,7 @@ The Mixed Reality Toolkit is a collaborative project containing contributions from individuals around the world. -## Special Thanks +## Special thanks The Mixed Reality Toolkit team would like to extend a special thank you to contributors **Stephen Hodgson** and **Simon Jackson** for contributions above and beyond the call of duty to bring MRTK v2 into reality! diff --git a/Documentation/Contributing/CONTRIBUTING.md b/Documentation/Contributing/CONTRIBUTING.md index 7b93cb1141e..d4c147e7e16 100644 --- a/Documentation/Contributing/CONTRIBUTING.md +++ b/Documentation/Contributing/CONTRIBUTING.md @@ -2,9 +2,9 @@ The Mixed Reality Toolkit (MRTK) welcomes contributions from the community. Whether it is for a minor change like fixing typos and small bug fixes, or a new feature or component. -For larger submissions, we have drafted contribution guidelines to ensure a smooth process and a good quality of code and documentation, so please be sure to review the [Feature Contribution guidelines / Process](Feature_Contribution_Process.md). +For larger submissions, please refer to the [feature contribution guidelines / process](Feature_Contribution_Process.md) to ensure a smooth process and a good quality of code and documentation. -All changes be they small or large, need to adhere to the [MRTK Coding Standards](CodingGuidelines.md), so please ensure you are familiar with these while developing to avoid delays when the change is being reviewed. +All changes be they small or large, need to adhere to the [MRTK coding standards](CodingGuidelines.md), so please ensure you are familiar with these while developing to avoid delays when the change is being reviewed. If you have any questions, please reach out on the [HoloLens forums](https://forums.hololens.com/) or the [HoloDevelopers slack](https://holodevelopers.slack.com/). You can easily be granted access to the Slack community via the [automatic invitation sender](https://holodevelopersslack.azurewebsites.net/). diff --git a/Documentation/Contributing/CodingGuidelines.md b/Documentation/Contributing/CodingGuidelines.md index d1eaa89ccb0..2c376b05ac2 100644 --- a/Documentation/Contributing/CodingGuidelines.md +++ b/Documentation/Contributing/CodingGuidelines.md @@ -420,7 +420,7 @@ public enum HandednessType ## Best Practices, including Unity recommendations -Some of the target platforms of this project require us to take performance into consideration. With this in mind we should always be careful of allocating memory in frequently called code in tight update loops or algorithms. +Some of the target platforms of this project require to take performance into consideration. With this in mind always be careful when allocating memory in frequently called code in tight update loops or algorithms. ## Encapsulation @@ -605,4 +605,4 @@ This chart can help you decide which `#if` to use, depending on your use cases a DateTime.UtcNow is faster than DateTime.Now. In previous performance investigations we've found that using DateTime.Now adds significant overhead especially when used in the Update() loop. [Others have hit the same issue](https://stackoverflow.com/questions/1561791/optimizing-alternatives-to-datetime-now). -Prefer using DateTime.UtcNow unless you actually need the localized times (a legitmate reason may be you wanting to show the current time in the user's time zone). If you are dealing with relative times (i.e. the delta between some last update and now), it's best to use DateTime.UtcNow to avoid the overhead of doing timezone conversions. \ No newline at end of file +Prefer using DateTime.UtcNow unless you actually need the localized times (a legitmate reason may be you wanting to show the current time in the user's time zone). If you are dealing with relative times (i.e. the delta between some last update and now), it's best to use DateTime.UtcNow to avoid the overhead of doing timezone conversions. diff --git a/Documentation/DownloadingTheMRTK.md b/Documentation/DownloadingTheMRTK.md index fa57e30d97c..81d28cdefc9 100644 --- a/Documentation/DownloadingTheMRTK.md +++ b/Documentation/DownloadingTheMRTK.md @@ -20,4 +20,4 @@ This is an optional package which contains example scenes and samples. This pack For those who would like to contribute to the MRTK or prefer to have the latest code in their project, there is another way to get access to the latest and greatest of the Mixed Reality Toolkit, be it the Release code or the in-progress development of the project. -[Stephen Hodgson has provided a full guide](https://www.rageagainstthepixel.com/expert-import-mrtk/) for how to use Git Submodules to download and synchronize the toolkit in to your project. \ No newline at end of file +[Stephen Hodgson has provided a full guide](https://www.rageagainstthepixel.com/expert-import-mrtk/) for how to use Git Submodules to download and synchronize the toolkit in to your project. diff --git a/Documentation/EyeTracking/EyeTracking_BasicSetup.md b/Documentation/EyeTracking/EyeTracking_BasicSetup.md index 2cadfc19004..ec18469093f 100644 --- a/Documentation/EyeTracking/EyeTracking_BasicSetup.md +++ b/Documentation/EyeTracking/EyeTracking_BasicSetup.md @@ -3,18 +3,32 @@ This page covers how to set up your Unity MRTK scene to use Eye Tracking in your The following assumes you are starting out with a fresh new scene. Alternatively, you can check out our already configured [MRTK Eye Tracking Examples](EyeTracking_ExamplesOverview.md). +### Eye tracking requirements +For Eye Tracking to work correctly, the following requirements must be met: + +1. An _'Eye Gaze Data Provider'_ must be added to the input system. This provides eye tracking data from the platform. +2. The GazeProvider must have its "Use Eye Tracking" property set to true. Note that true is the default value (so no special + action is required unless you have actively unchecked this property.) +3. The _'Gaze Input'_ capability must be enabled in the application manifest. **Currently this is only available in Visual Studio.** +4. The HoloLens **must** be calibrated for the current user under system settings. + + +**IMPORTANT:** If any of the above requirements are not met, the application will automatically fall back to head-based gaze tracking. + +Below are the steps required to enable eye tracking in an application. + ### Setting up the scene Set up the _MixedRealityToolkit_ by simply clicking _'Mixed Reality Toolkit -> Configure…'_ in the menu bar. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_configure.png) +![MRTK](../Images/EyeTracking/mrtk_setup_configure.png) ### Setting up the MRTK profiles required for Eye Tracking After setting up your MRTK scene, you will be asked to choose a profile for MRTK. You can simply select _DefaultMixedRealityToolkitConfigurationProfile_ and then select the _'Copy & Customize'_ option. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_configprofile.png) +![MRTK](../Images/EyeTracking/mrtk_setup_configprofile.png) ### Create an "Eye Gaze Data Provider" @@ -29,14 +43,16 @@ You can simply select _DefaultMixedRealityToolkitConfigurationProfile_ and then - For **Platform(s)** select _'Windows Universal'_. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_eyes_dataprovider.png) +![MRTK](../Images/EyeTracking/mrtk_setup_eyes_dataprovider.png) ### Enabling Eye Tracking in the GazeProvider In HoloLens v1, head gaze was used as primary pointing technique. -While head gaze is still available via the _GazeProvider_ in MRTK which is attached to your [Camera](https://docs.unity3d.com/ScriptReference/Camera.html), you can check to use eye gaze instead by ticking the _'Prefer Eye Tracking'_ checkbox as shown in the screenshot below. +While head gaze is still available via the _GazeProvider_ in MRTK which is attached to your [Camera](https://docs.unity3d.com/ScriptReference/Camera.html), you can check to use eye gaze instead by ticking the _'Use Eye Tracking'_ checkbox as shown in the screenshot below. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png) +![MRTK](../Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png) + +**NOTE:** Developers can toggle between eye tracking and head tracking in code by changing the _'UseEyeTracking'_ property of _'GazeProvider'_. ### Simulating Eye Tracking in the Unity Editor @@ -49,16 +65,16 @@ For this, it is better to ensure frequent tests of your eye-based interactions o - Navigate to your main _'MRTK Configuration Profile'_ -> _'Input System Profile'_ -> _'Data Providers'_ -> _'Input Simulation Service'_. - Check the _'Simulate Eye Position'_ checkbox. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_eyes_simulate.png) - +![MRTK](../Images/EyeTracking/mrtk_setup_eyes_simulate.png) + 2. **Disable default head gaze cursor**: -In general, we recommend to avoid showing an eye gaze cursor or if you insist on showing one to make it _very_ subtle. +In general, it is recommended to avoid showing an eye gaze cursor or if absolutely required to make it _very_ subtle. Check out our [eye gaze cursor tutorial](EyeTracking_Cursor.md) for more information on how to best handle it. We do recommend to hide the default head gaze cursor that is attached to the MRTK gaze pointer profile by default. - Navigate to your main _'MRTK Configuration Profile'_ -> _'Input System Profile'_ -> _'PointerSettings.PointerProfile'_ - At the bottom of the _'PointerProfile'_, you should assign an invisible cursor prefab to the _'GazeCursor'_. If you downloaded the MRTK Examples folder, you can simply reference the included -'EyeGazeCursor'_ prefab. -![MRTK](../../Documentation/Images/EyeTracking/mrtk_setup_eyes_gazesettings.png) +![MRTK](../Images/EyeTracking/mrtk_setup_eyes_gazesettings.png) ### Accessing eye gaze data Now that your scene is set up to use Eye Tracking, let's take a look at how to access it in your scripts: @@ -70,11 +86,14 @@ Building your app with Eye Tracking should be similar to how you would compile o The only difference is that the *'Gaze Input'* capability is unfortunately not yet supported by Unity under 'Player Settings -> Publishing Settings -> Capabilities'. To use Eye Tracking on your HoloLens 2 device, you need to manually edit the package manifest that is part of your build Visual Studio project. Follow these steps: + 1. Build your Unity project as you would normally do for _HoloLens 2_. 2. Open your compiled Visual Studio project and then open the _'Package.appxmanifest'_ in your solution. 3. Make sure to tick the _'Gaze Input'_ checkbox under _Capabilities_. -![Enabling Gaze Input in Visual Studio](../../Documentation/Images/EyeTracking/mrtk_et_gazeinput.jpg) +![Enabling Gaze Input in Visual Studio](../Images/EyeTracking/mrtk_et_gazeinput.jpg) + +**IMPORTANT:** Don't forget to calibrate HoloLens for the current user. Without calibration, eye tracking won't work. Calibration can be found under system settings. If everything is set up correctly, a prompt should pop up asking the user for permission to use Eye Tracking when you start your Unity app on a HoloLens 2 device for the first time. diff --git a/Documentation/EyeTracking/EyeTracking_ExamplesOverview.md b/Documentation/EyeTracking/EyeTracking_ExamplesOverview.md index 4d67b383aae..25c4702b9dd 100644 --- a/Documentation/EyeTracking/EyeTracking_ExamplesOverview.md +++ b/Documentation/EyeTracking/EyeTracking_ExamplesOverview.md @@ -10,38 +10,39 @@ Finally, an example is provided for recording and visualizing the user's visual ## Overview of MRTK Eye Tracking Samples ### Setting up the MRTK Eye Tracking Samples -The [Eye Tracking example package](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/) comes with a number of different Unity scenes that are described in more detail below: -- [mrtk_eyes_00_RootScene.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/): -This is the main (_root_) scene that has all the core MRTK components included. -It comes with a graphical scene menu that allows you to easily switch between the different Eye Tracking scenes which will be [loaded additively](href:https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.Additive.html). + +The [Eye Tracking example package](https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking) comes with a number of different Unity scenes that are described in more detail below: + +- EyeTrackingDemo-00-RootScene.unity: +This is the main (_root_) scene that has all the core MRTK components included. +It comes with a graphical scene menu that allows you to easily switch between the different Eye Tracking scenes which will be [loaded additively](https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.Additive.html). To try out the Eye Tracking demos in your Unity Player, all you have to do is to load this scene and hit play. Make sure that the _'OnLoad_StartScene'_ script is enabled for this so that the root scene knows which additive scene to load first. -![Example for the OnLoad_StartScene script](/Documentation/Images/EyeTracking/mrtk_et_rootscene_onload.png) +![Example for the OnLoad_StartScene script](../Images/EyeTracking/mrtk_et_rootscene_onload.png) - Individual Eye Tracking sample scenes - See [Demo Scenarios](#demo-scenarios) for a description of each: - - [mrtk_eyes_01_BasicSetup.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/) - - [mrtk_eyes_02_TargetSelection.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/) - - [mrtk_eyes_03_Navigation.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/) - - [mrtk_eyes_04_TargetPositioning.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/) - - [mrtk_eyes_05_Visualizer.unity](/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/) - -You may wonder: But how do I quickly change a scene and test it in the Unity Editor? -No problem! + - EyeTrackingDemo-01-BasicSetup.unity + - EyeTrackingDemo-02-TargetSelection.unity + - EyeTrackingDemo-03-Navigation.unity + - EyeTrackingDemo-04-TargetPositioning.unity + - EyeTrackingDemo-05-Visualizer.unity + +How to quickly change a scene and test it in the Unity editor: - Load the _root_ scene -- Disable the _'OnLoad_StartScene'_ script +- Disable the _'OnLoadStartScene'_ script - _Drag and drop_ one of the Eye Tracking test scenes that are described below (or any other scene) into your _Hierarchy_ view. -![Example for the OnLoad_StartScene script](/Documentation/Images/EyeTracking/mrtk_et_rootscene_onload2.png) +![Example for the OnLoad_StartScene script](../Images/EyeTracking/mrtk_et_rootscene_onload2.png) ### Demo Scenarios [**Eye-Supported Target Selection**](EyeTracking_TargetSelection.md) This tutorial showcases the ease of accessing eye gaze data to select targets. It includes an example for subtle yet powerful feedback to provide confidence to the user that a target is focused while not being overwhelming. -In addition, we showcase a simple example of smart notifications that automatically disappear after being read. +In addition, there is a simple example of smart notifications that automatically disappear after being read. -**Summary**: Fast and effortless target selections using a combination of Eyes, Voice and Hand input. +**Summary**: Fast and effortless target selections using a combination of eyes, voice and hand input.
@@ -51,16 +52,16 @@ In addition, we showcase a simple example of smart notifications that automatica Imagine you are reading some information on a distant display or your e-reader and when you reach the end of the displayed text, the text automatically scrolls up to reveal more content. Or how about magically zooming directly toward where you were looking at? These are some of the examples showcased in this tutorial about eye-supported navigation. -In addition, we added an example for hands-free rotation of 3D holograms by making them automatically rotate based on your current focus. +In addition, there is an example for hands-free rotation of 3D holograms by making them automatically rotate based on your current focus. -**Summary**: Scroll, Pan, Zoom, 3D Rotation using a combination of Eyes, Voice and Hand input. +**Summary**: Scroll, pan, zoom, 3D rotation using a combination of eyes, voice and hand input.
[**Eye-Supported Positioning**](EyeTracking_Positioning.md) -In this tutorial, we extend an input scenario called [Put that there](https://youtu.be/CbIn8p4_4CQ) dating back to research from the MIT Media Lab in the early 1980's with eye, hand and voice input. +This tutorial shows an input scenario called [Put-That-There](https://youtu.be/CbIn8p4_4CQ) dating back to research from the MIT Media Lab in the early 1980's with eye, hand and voice input. The idea is simple: Benefit from your eyes for fast target selection and positioning. Simply look at a hologram and say _'put this'_, look over where you want to place it and say _'there!'_. For more precisely positioning your hologram, you can use additional input from your hands, voice or controllers. @@ -73,7 +74,7 @@ For more precisely positioning your hologram, you can use additional input from [**Visualization of Visual Attention**](EyeTracking_Visualization.md) Information about where users look at is an immensely powerful tool to assess usability of a design and to identify problems in efficient work streams. -In this tutorial, we discuss different eye tracking visualizations and how they fit different needs. +This tutorial discusses different eye tracking visualizations and how they fit different needs. We provide basic examples for logging and loading Eye Tracking data and examples for how to visualize them. **Summary**: Two-dimensional attention map (heatmaps) on slates. Recording & replaying Eye Tracking data. diff --git a/Documentation/EyeTracking/EyeTracking_Navigation.md b/Documentation/EyeTracking/EyeTracking_Navigation.md index c10c880af4c..d611cdf6747 100644 --- a/Documentation/EyeTracking/EyeTracking_Navigation.md +++ b/Documentation/EyeTracking/EyeTracking_Navigation.md @@ -14,7 +14,7 @@ The following descriptions assume that you are already familiar with how to [EyeTrackingTarget](EyeTracking_TargetSelection.md#use-eye-gaze-specific-eyetrackingtarget) component. The examples discussed in the following are all part of the -[mrtk_eyes_03_Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity) +[EyeTrackingDemo-03-Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity) scene. **Summary:** Auto scroll of text, eye-gaze-supported pan and zoom of a virtual map, hands-free gaze-directed 3D rotation. @@ -23,14 +23,14 @@ scene. ## Auto Scroll Auto scroll enables the user to scroll through texts without lifting a finger. Simply continue reading and the text will automatically scroll up or down depending on where the user is looking. -You can start off from the example provided in [mrtk_eyes_03_Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity). +You can start off from the example provided in [EyeTrackingDemo-03-Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity). This example uses a [TextMesh](https://docs.unity3d.com/ScriptReference/TextMesh.html) component to allow for flexibly loading and formatting new text. To enable auto scroll, simply add the following two scripts to your collider component of the textbox: -### Scroll_RectTransf -To scroll through a [TextMesh](https://docs.unity3d.com/ScriptReference/TextMesh.html) or more generally speaking a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html) component you can use the *Scroll_RectTransf* script. -If you want to scroll through a texture instead of a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html), use _Scroll_Texture_ instead of _Scroll_RectTransf_. -In the following, the parameters of _Scroll_RectTransf_ that are available in the Unity Editor are explained in more detail: +### ScrollRectTransf +To scroll through a [TextMesh](https://docs.unity3d.com/ScriptReference/TextMesh.html) or more generally speaking a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html) component you can use the [ScrollRectTransf](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ScrollRectTransf) script. +If you want to scroll through a texture instead of a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html), use [ScrollTexture](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ScrollTexture) instead of [ScrollRectTransf](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ScrollRectTransf). +In the following, the parameters of [ScrollRectTransf](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ScrollRectTransf) that are available in the Unity Editor are explained in more detail: Parameters | Description :---- | :---- @@ -49,10 +49,10 @@ SkimProofUpdateSpeed | The lower the value, the slower the scrolling will speed ### EyeTrackingTarget Attaching the _EyeTrackingTarget_ component allows for flexibly handle eye-gaze-related events. -In our scroll sample, we use it to ensure that the text starts scrolling when the user *looks* at the panel and stops when the user is *looking away* from it. -Alternatively you can use the +The scroll sample demonstrates scrolling text that starts when the user *looks* at the panel and stops when the user is *looking away* from it. +Alternatively, please use the [BaseEyeFocusHandler](EyeTracking_TargetSelection.md#use-eye-gaze-specific-baseeyefocushandler) -to handle Eye Tracking events directly in your code to trigger the *StartFocusing* and *StopFocusing* methods in _Scroll_RectTransf_. +to handle Eye Tracking events directly in your code to trigger the *StartFocusing* and *StopFocusing* methods in [ScrollRectTransf](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ScrollRectTransf). ![Eye-supported scroll setup in Unity: EyeTrackingTarget](../../Documentation/Images/EyeTracking/mrtk_et_nav_scroll_ettarget.jpg) @@ -62,8 +62,8 @@ Who hasn't used a virtual map before to search for their home or to explore enti Eye Tracking allows you to directly dive into exactly the parts that you're interested in and once zoomed in, you can smoothly follow the course of a street to explore your neighborhood! This is not only useful for exploring geographical maps, but also to checking out details in photographs, data visualizations or even live-streamed medical imagery. To use this capability in your app is easy! -For content rendered to a [Texture]( https://docs.unity3d.com/ScriptReference/Texture.html) (e.g., a photo, streamed data), simply add the_PanZoom_Texture_ script. -For a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html) use _PanZoom_RectTransf_. +For content rendered to a [Texture]( https://docs.unity3d.com/ScriptReference/Texture.html) (e.g., a photo, streamed data), simply add the [PanZoomTexture](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.PanZoomTexture) script. +For a [RectTransform](https://docs.unity3d.com/ScriptReference/RectTransform.html) use [PanZoomRectTransf](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.PanZoomRectTransf). Extending the [Auto Scroll](#auto-scroll) capability, we essentially enable to scroll both vertically and horizontally at the same time and magnify content right around the user's current focus point. @@ -92,13 +92,14 @@ SkimProofUpdateSpeed | The lower the value, the slower the scrolling will speed ## Attention-based 3D Rotation Imagine looking at a 3D object and the parts you want to see more closely magically turn toward you - as if the system would read your mind and know to turn the item toward you! That is the idea for attention-based 3D rotations which enable you to investigate all side of a hologram without lifting a finger. -To enable this behavior, simply add the *OnLookAt_RotateByEyeGaze* script to the part of your GameObject with a [Collider](https://docs.unity3d.com/ScriptReference/Collider.html) component. +To enable this behavior, simply add the [OnLookAtRotateByEyeGaze](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.OnLookAtRotateByEyeGaze) script to the part of your GameObject with a [Collider](https://docs.unity3d.com/ScriptReference/Collider.html) component. You can tweak several parameters that are listed below to limit how fast and in which directions the hologram will turn. As you can imagine, having this behavior active at all times may quickly become pretty distracting in a crowded scene. This is why you may want to start out with this behavior disabled and then enable it quickly using voice commands. -Alternatively, we added an example in [mrtk_eyes_03_Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity) -to use _Target_MoveToCamera_ for which you can select a focused target and it flies in front of you - simply say *"Come to me"*. +Alternatively, we added an example in [EyeTrackingDemo-03-Navigation.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity) +to use [TargetMoveToCamera](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.TargetMoveToCamera) for which you can select a focused target and it flies in front of you - simply say *"Come to me"*. + Once in the near mode, the auto rotation mode is automatically enabled. In that mode, you can observe it from all sides either simply leaning back and looking at it, walking around it or reaching out to grab and rotate it with your hand! When you dismiss the target (look & pinch or say *"Send back"*), it will return to its original location and will stop reacting to you from afar. diff --git a/Documentation/EyeTracking/EyeTracking_Positioning.md b/Documentation/EyeTracking/EyeTracking_Positioning.md index 7a91c98eee4..112218d0eb1 100644 --- a/Documentation/EyeTracking/EyeTracking_Positioning.md +++ b/Documentation/EyeTracking/EyeTracking_Positioning.md @@ -1,4 +1,4 @@ -![MRTK](../../Documentation/Images/EyeTracking/mrtk_et_positioning.png ) +![MRTK](../Images/EyeTracking/mrtk_et_positioning.png) # Eye-Supported Target Positioning in MRTK @@ -7,8 +7,7 @@ _We're currently restructuring and improving the MRTK documentation. This content will be updated soon! If you have any questions regarding this section please post in our MRTK slack channel._ -![MRTK](../../Documentation/Images/EyeTracking/mrtk_et_positioning_slider.png) - +![MRTK](../Images/EyeTracking/mrtk_et_positioning_slider.png) --- [Back to "Eye Tracking in the MixedRealityToolkit"](EyeTracking_Main.md) diff --git a/Documentation/EyeTracking/EyeTracking_TargetSelection.md b/Documentation/EyeTracking/EyeTracking_TargetSelection.md index 35e71f269c5..bf119ff499b 100644 --- a/Documentation/EyeTracking/EyeTracking_TargetSelection.md +++ b/Documentation/EyeTracking/EyeTracking_TargetSelection.md @@ -1,4 +1,4 @@ -![MRTK](../../Documentation/Images/EyeTracking/mrtk_et_targetselect.png) +![MRTK](../Images/EyeTracking/mrtk_et_targetselect.png) # Eye-Supported Target Selection This page discusses different options for accessing eye gaze data and eye gaze specific events to select targets in MRTK. @@ -39,9 +39,9 @@ color when being looked at. ``` #### Selecting a Focused Hologram -To select focused holograms, we can use Input Event Listeners to confirm a selection. -For example, you can add the _IMixedRealityPointerHandler_ to react to simple pointer input. -The _IMixedRealityPointerHandler_ interface requires you to implement the following three interface members: +To select focused holograms, use input event listeners to confirm a selection. +For example, adding the _IMixedRealityPointerHandler_ will make them react to simple pointer input. +The _IMixedRealityPointerHandler_ interface requires implementing the following three interface members: _OnPointerUp_, _OnPointerDown_, and _OnPointerClicked_. The _MixedRealityInputAction_ is a configurable list of actions that you want to distinguish in your app and can be edited in the @@ -81,12 +81,12 @@ _MRTK Configuration Profile_ -> _Input System Profile_ -> _Input Actions Profile Given that eye gaze can be very different to other pointer inputs, you may want to make sure to only react to the focus if it is eye gaze. Similar to the _FocusHandler_, the _BaseEyeFocusHandler_ is specific Eye Tracking. -Here is an example from [mrtk_eyes_02_TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity +Here is an example from [EyeTrackingDemo-02-TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity ). -Having the [OnLookAt_Rotate.cs](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.OnLookAt_Rotate) attached, a GameObject will rotate while being looked at. +Having the [OnLookAtRotate.cs](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.OnLookAtRotate) attached, a GameObject will rotate while being looked at. ```csharp - public class OnLookAt_Rotate : BaseEyeFocusHandler + public class OnLookAtRotate : BaseEyeFocusHandler { ... @@ -141,12 +141,12 @@ This has two advantages: 2. Several Unity events have already been set up to make it fast and convenient to handle and reuse existing behaviors. #### Example: Attentive Notifications -For example, in [mrtk_eyes_02_TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity), +For example, in [EyeTrackingDemo-02-TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity), you can find an example for _'smart attentive notifications'_ that react to your eye gaze. These are 3D text boxes that can be placed in the scene and that will smoothly enlarge and turn toward the user when being looked at to ease legibility. While the user is reading the notification, the information keeps getting displayed crisp and clear. After reading it and looking away from the notification, the notification will automatically be dismissed and fades out. -To achieve all this, we created a few generic behavior scripts that are not specific to Eye Tracking at all such as: +To achieve all this, there are a few generic behavior scripts that are not specific to eye tracking at all such as: - [FaceUser.cs](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.FaceUser) - [ChangeSize.cs](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.ChangeSize) - [BlendOut.cs](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.BlendOut) @@ -179,14 +179,14 @@ One event provided by the [EyeTrackingTarget](xref:Microsoft.MixedReality.Toolki _'Attentive Notifications'_ is the _OnSelected()_ event. Using the _EyeTrackingTarget_, you can specify what triggers the selection which will invoke the _OnSelected()_ event. For example, the screenshot below is from -[mrtk_eyes_02_TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity). +[EyeTrackingDemo-02-TargetSelection.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity). It shows how the [EyeTrackingTarget](xref:Microsoft.MixedReality.Toolkit.Input.EyeTrackingTarget) is set up for one of the gems that explodes when you select it. MRTK The _OnSelected()_ event triggers the method _'TargetSelected'_ in the -[HitBehavior_DestroyOnSelect](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.HitBehavior_DestroyOnSelect) +[HitBehaviorDestroyOnSelect](xref:Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking.HitBehaviorDestroyOnSelect) script attached to the gem GameObject. The interesting part is _how_ the selection is triggered. The [EyeTrackingTarget](xref:Microsoft.MixedReality.Toolkit.Input.EyeTrackingTarget) diff --git a/Documentation/EyeTracking/EyeTracking_Visualization.md b/Documentation/EyeTracking/EyeTracking_Visualization.md index 07ac2eb9b5e..4e641a18472 100644 --- a/Documentation/EyeTracking/EyeTracking_Visualization.md +++ b/Documentation/EyeTracking/EyeTracking_Visualization.md @@ -1,4 +1,4 @@ -![MRTK](../../Documentation/Images/EyeTracking/mrtk_et_heatmaps.png) +![MRTK](../Images/EyeTracking/mrtk_et_heatmaps.png) # Visualizing Eye Tracking Data in MRTK diff --git a/Documentation/GettingStartedWithTheMRTK.md b/Documentation/GettingStartedWithTheMRTK.md index 10a63dc96cb..8847e69edfa 100644 --- a/Documentation/GettingStartedWithTheMRTK.md +++ b/Documentation/GettingStartedWithTheMRTK.md @@ -10,8 +10,11 @@ To get started with the Mixed Reality Toolkit you will need: * [Visual Studio 2017](http://dev.windows.com/downloads) * [Unity 2018.3.x](https://unity3d.com/get-unity/download/archive) + + MRTK supports both IL2CPP and .NET scripting backends on Unity 2018 + * [Latest MRTK release](https://github.com/Microsoft/MixedRealityToolkit-Unity/releases) -* You don't need this to simulate in Unity Editor or run in VR, but if you want to build your MRTK project as a UWP to run on HoloLens, you will need [Windows SDK 18362+](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK). +* You don't need this to simulate in Unity Editor or run in VR, but if you want to build your MRTK project as a UWP to run on HoloLens, you will need [Windows SDK 18362+](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk). ## Get the latest MRTK Unity packages @@ -20,6 +23,16 @@ To get started with the Mixed Reality Toolkit you will need: For additional delivery mechanisms, please see [Downloading the MRTK](DownloadingTheMRTK.md). +## Switch your Unity project to the target platform +The next step **Import MRTK packages into your Unity project** will apply changes to your project specifically for the platform that is selected in the project at that moment you import them. + +You should make sure that you select the correct platform before following the next step. + +For instance, if you want to create a HoloLens application, switch to Universal Windows Platform: +- Open menu : File > Build Settings +- Select **Universal Windows Platform** in the **Platform** list +- Click on the **Switch Platform** button + ## Import MRTK packages into your Unity project 1. Create a new Unity project, or open an existing project. When creating a project, make sure to select "3D" as the template type. We used 2018.3.9f1 for this tutorial, though any Unity 2018.3.x release should work. @@ -53,11 +66,11 @@ The [hand interaction examples scene](README_HandInteractionExamples.md) is a gr ![TMP Essentials](../Documentation/Images/getting_started/MRTK_GettingStarted_TMPro.png) -8. Select "Import TMP essentials" button. "TMP Essentials" refers to TextMeshPro plugin, which some of the MRTK examples use for improved text rendering. +4. Select "Import TMP essentials" button. "TMP Essentials" refers to TextMeshPro plugin, which some of the MRTK examples use for improved text rendering. -9. Close the TMPPro dialog. After this you need to reload the scene, so close and re-open your scene. +5. Close the TMPPro dialog. After this you need to reload the scene, so close and re-open your scene. -10. Press the play button. +6. Press the play button. Have fun exploring the scene! You can use simulated hands to interact in editor. You can: - Press WASD keys to fly / move. @@ -99,7 +112,7 @@ Which contains the following: * Mixed Reality Toolkit - The toolkit itself, providing the central configuration entry point for the entire framework. * MixedRealityPlayspace - The parent object for the headset, which ensures the headset / controllers and other required systems are managed correctly in the scene. -* The Main Camera is moved as a child to the Playspace - Which allows the playspace to manage the camera in conjunction with the SDK's +* The Main Camera is moved as a child to the Playspace - Which allows the playspace to manage the camera in conjunction with the SDKs **Note** While working in your scene, **DO NOT move the Main Camera** (or the playspace) from the scene origin (0,0,0). This is controlled by the MRTK and the active SDK. If you need to move the players start point, then **move the scene content and NOT the camera**! @@ -119,7 +132,7 @@ Here are some suggested next steps: * Read through [input simulation guide](InputSimulation/InputSimulationService.md) to learn how to simulate hand input in editor. * Learn how to work with the MRTK Configuration profile in the [mixed reality configuration guide](MixedRealityConfigurationGuide.md). -## Building blocks for UI and Interactions +## Building blocks for UI and interactions | [![Button](../Documentation/Images/Button/MRTK_Button_Main.png)](README_Button.md) [Button](README_Button.md) | [![Bounding Box](../Documentation/Images/BoundingBox/MRTK_BoundingBox_Main.png)](README_BoundingBox.md) [Bounding Box](README_BoundingBox.md) | [![Manipulation Handler](../Documentation/Images/ManipulationHandler/MRTK_Manipulation_Main.png)](README_ManipulationHandler.md) [Manipulation Handler](README_ManipulationHandler.md) | |:--- | :--- | :--- | | A button control which supports various input methods including HoloLens2's articulated hand | Standard UI for manipulating objects in 3D space | Script for manipulating objects with one or two hands | diff --git a/Documentation/HTKToMRTKPortingGuide.md b/Documentation/HTKToMRTKPortingGuide.md index 964eb3ab011..3679676a7b8 100644 --- a/Documentation/HTKToMRTKPortingGuide.md +++ b/Documentation/HTKToMRTKPortingGuide.md @@ -53,7 +53,7 @@ Some events no longer have unique events and now contain a MixedRealityInputActi ## Speech -### Keyword Recognition +### Keyword recognition | | HTK 2017 | MRTK v2 | |---------------------------|----------|-----------| @@ -68,7 +68,7 @@ Some events no longer have unique events and now contain a MixedRealityInputActi | Setup | Add a DictationInputManager to your scene. | Dictation support requires service (e.g., Windows Dictation Input Manager) to be added to the Input System's data providers. | | Event handlers | `IDictationHandler` | `IMixedRealityDictationHandler`[`IMixedRealitySpeechHandler`](xref:Microsoft.MixedReality.Toolkit.Input.IMixedRealitySpeechHandler) | -## Spatial Awareness / Mapping +## Spatial awareness / mapping ### Mesh @@ -83,7 +83,7 @@ Some events no longer have unique events and now contain a MixedRealityInputActi |---------------------------|----------|-----------| | Setup | Use the `SurfaceMeshesToPlanes` script. | Not yet implemented. | -### Spatial Understanding +### Spatial understanding | | HTK 2017 | MRTK v2 | |---------------------------|----------|-----------| diff --git a/Documentation/Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png b/Documentation/Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png index bc42e76483c..64c50b8b48c 100644 Binary files a/Documentation/Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png and b/Documentation/Images/EyeTracking/mrtk_setup_eyes_gazeprovider.png differ diff --git a/Documentation/Images/HandJointChaser/MRTK_HandJointChaser_Main.jpg b/Documentation/Images/HandJointChaser/MRTK_HandJointChaser_Main.jpg new file mode 100644 index 00000000000..dbaaf68a0f1 Binary files /dev/null and b/Documentation/Images/HandJointChaser/MRTK_HandJointChaser_Main.jpg differ diff --git a/Documentation/Images/HandJointChaser/MRTK_Solver_HandJoint.jpg b/Documentation/Images/HandJointChaser/MRTK_Solver_HandJoint.jpg new file mode 100644 index 00000000000..625e798d454 Binary files /dev/null and b/Documentation/Images/HandJointChaser/MRTK_Solver_HandJoint.jpg differ diff --git a/Documentation/Images/Interactable/InteractableToggleCollection.png b/Documentation/Images/Interactable/InteractableToggleCollection.png new file mode 100644 index 00000000000..ffd1fa997a8 Binary files /dev/null and b/Documentation/Images/Interactable/InteractableToggleCollection.png differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_AlbedoAssignment.jpg b/Documentation/Images/MRTKStandardShader/MRTK_AlbedoAssignment.jpg new file mode 100644 index 00000000000..e64db43f8f0 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_AlbedoAssignment.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_ChannelMap.gif b/Documentation/Images/MRTKStandardShader/MRTK_ChannelMap.gif new file mode 100644 index 00000000000..ea61e5d6b46 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_ChannelMap.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_InstancedProperties.gif b/Documentation/Images/MRTKStandardShader/MRTK_InstancedProperties.gif new file mode 100644 index 00000000000..82233e9793b Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_InstancedProperties.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_LWRPUpgrade.jpg b/Documentation/Images/MRTKStandardShader/MRTK_LWRPUpgrade.jpg new file mode 100644 index 00000000000..ddecf33505b Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_LWRPUpgrade.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_MaterialGallery.jpg b/Documentation/Images/MRTKStandardShader/MRTK_MaterialGallery.jpg new file mode 100644 index 00000000000..3c2f9279987 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_MaterialGallery.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_MaterialInspector.jpg b/Documentation/Images/MRTKStandardShader/MRTK_MaterialInspector.jpg new file mode 100644 index 00000000000..f4674d33dd7 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_MaterialInspector.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_NormalMapScale.gif b/Documentation/Images/MRTKStandardShader/MRTK_NormalMapScale.gif new file mode 100644 index 00000000000..0fb4c8dc7dc Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_NormalMapScale.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClipping.gif b/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClipping.gif new file mode 100644 index 00000000000..d95eae9b34d Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClipping.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClippingGizmos.gif b/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClippingGizmos.gif new file mode 100644 index 00000000000..d09d9d133ad Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClippingGizmos.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_StandardMaterialComparison.gif b/Documentation/Images/MRTKStandardShader/MRTK_StandardMaterialComparison.gif new file mode 100644 index 00000000000..4d151387ab3 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_StandardMaterialComparison.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_StandardShader.jpg b/Documentation/Images/MRTKStandardShader/MRTK_StandardShader.jpg new file mode 100644 index 00000000000..c8a3a9629d0 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_StandardShader.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_StencilTest.gif b/Documentation/Images/MRTKStandardShader/MRTK_StencilTest.gif new file mode 100644 index 00000000000..ee51270e04a Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_StencilTest.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_TextureCombiner.jpg b/Documentation/Images/MRTKStandardShader/MRTK_TextureCombiner.jpg new file mode 100644 index 00000000000..524a5e6a87e Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_TextureCombiner.jpg differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_TriplanarMapping.gif b/Documentation/Images/MRTKStandardShader/MRTK_TriplanarMapping.gif new file mode 100644 index 00000000000..c0e737e15b3 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_TriplanarMapping.gif differ diff --git a/Documentation/Images/MRTKStandardShader/MRTK_VertexExtrusion.gif b/Documentation/Images/MRTKStandardShader/MRTK_VertexExtrusion.gif new file mode 100644 index 00000000000..1eded087596 Binary files /dev/null and b/Documentation/Images/MRTKStandardShader/MRTK_VertexExtrusion.gif differ diff --git a/Documentation/Images/MRTK_Icon_ControllerVisualization.png b/Documentation/Images/MRTK_Icon_ControllerVisualization.png new file mode 100644 index 00000000000..d9d2db386c6 Binary files /dev/null and b/Documentation/Images/MRTK_Icon_ControllerVisualization.png differ diff --git a/Documentation/Images/MRTK_Icon_Diagnostics.png b/Documentation/Images/MRTK_Icon_Diagnostics.png new file mode 100644 index 00000000000..d4f3106871b Binary files /dev/null and b/Documentation/Images/MRTK_Icon_Diagnostics.png differ diff --git a/Documentation/Images/MRTK_Icon_EyeTracking.png b/Documentation/Images/MRTK_Icon_EyeTracking.png new file mode 100644 index 00000000000..6faef8e25d3 Binary files /dev/null and b/Documentation/Images/MRTK_Icon_EyeTracking.png differ diff --git a/Documentation/Images/MRTK_Icon_GazeSelect.png b/Documentation/Images/MRTK_Icon_GazeSelect.png new file mode 100644 index 00000000000..d36387f3f5d Binary files /dev/null and b/Documentation/Images/MRTK_Icon_GazeSelect.png differ diff --git a/Documentation/Images/MRTK_Icon_HandTracking.png b/Documentation/Images/MRTK_Icon_HandTracking.png new file mode 100644 index 00000000000..bdff3d8543a Binary files /dev/null and b/Documentation/Images/MRTK_Icon_HandTracking.png differ diff --git a/Documentation/Images/MRTK_Icon_InputSystem.png b/Documentation/Images/MRTK_Icon_InputSystem.png new file mode 100644 index 00000000000..243b5d6424b Binary files /dev/null and b/Documentation/Images/MRTK_Icon_InputSystem.png differ diff --git a/Documentation/Images/MRTK_Icon_Solver.png b/Documentation/Images/MRTK_Icon_Solver.png new file mode 100644 index 00000000000..36f7cd5ae9f Binary files /dev/null and b/Documentation/Images/MRTK_Icon_Solver.png differ diff --git a/Documentation/Images/MRTK_Icon_SpatialUnderstanding.png b/Documentation/Images/MRTK_Icon_SpatialUnderstanding.png new file mode 100644 index 00000000000..36642e09f10 Binary files /dev/null and b/Documentation/Images/MRTK_Icon_SpatialUnderstanding.png differ diff --git a/Documentation/Images/MRTK_Icon_StandardShader.png b/Documentation/Images/MRTK_Icon_StandardShader.png new file mode 100644 index 00000000000..33ac0cadb63 Binary files /dev/null and b/Documentation/Images/MRTK_Icon_StandardShader.png differ diff --git a/Documentation/Images/MRTK_Icon_Teleportation.png b/Documentation/Images/MRTK_Icon_Teleportation.png new file mode 100644 index 00000000000..ed22eb1259c Binary files /dev/null and b/Documentation/Images/MRTK_Icon_Teleportation.png differ diff --git a/Documentation/Images/MRTK_Icon_UIControls.png b/Documentation/Images/MRTK_Icon_UIControls.png new file mode 100644 index 00000000000..c3e80df551e Binary files /dev/null and b/Documentation/Images/MRTK_Icon_UIControls.png differ diff --git a/Documentation/Images/MRTK_Icon_VoiceCommand.png b/Documentation/Images/MRTK_Icon_VoiceCommand.png new file mode 100644 index 00000000000..daf2923ef51 Binary files /dev/null and b/Documentation/Images/MRTK_Icon_VoiceCommand.png differ diff --git a/Documentation/Images/MRTK_UnitySetupPrompt.png b/Documentation/Images/MRTK_UnitySetupPrompt.png index 927f0db9768..b1ed234e793 100644 Binary files a/Documentation/Images/MRTK_UnitySetupPrompt.png and b/Documentation/Images/MRTK_UnitySetupPrompt.png differ diff --git a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_CameraProfile.png b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_CameraProfile.png index de993cd1e8a..b65c96b8a23 100644 Binary files a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_CameraProfile.png and b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_CameraProfile.png differ diff --git a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_EnableServiceInspectors.PNG b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_EnableServiceInspectors.PNG new file mode 100644 index 00000000000..b7ac559bee3 Binary files /dev/null and b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_EnableServiceInspectors.PNG differ diff --git a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_MixedRealityToolkitConfigurationScreen.png b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_MixedRealityToolkitConfigurationScreen.png index 611e2133855..79bff621833 100644 Binary files a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_MixedRealityToolkitConfigurationScreen.png and b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_MixedRealityToolkitConfigurationScreen.png differ diff --git a/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ServiceInspectors.PNG b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ServiceInspectors.PNG new file mode 100644 index 00000000000..d81809e5b04 Binary files /dev/null and b/Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ServiceInspectors.PNG differ diff --git a/Documentation/Images/Slate/MRTK_Slate_PanZoom.png b/Documentation/Images/Slate/MRTK_Slate_PanZoom.png new file mode 100644 index 00000000000..adf8446bc23 Binary files /dev/null and b/Documentation/Images/Slate/MRTK_Slate_PanZoom.png differ diff --git a/Documentation/Images/Slate/MRTK_Slate_PanZoom_Examples.png b/Documentation/Images/Slate/MRTK_Slate_PanZoom_Examples.png new file mode 100644 index 00000000000..52f7d1d195d Binary files /dev/null and b/Documentation/Images/Slate/MRTK_Slate_PanZoom_Examples.png differ diff --git a/Documentation/Images/Slider/MRTK_UX_Slider_Main.jpg b/Documentation/Images/Slider/MRTK_UX_Slider_Main.jpg new file mode 100644 index 00000000000..9820d752e95 Binary files /dev/null and b/Documentation/Images/Slider/MRTK_UX_Slider_Main.jpg differ diff --git a/Documentation/Input/InputEvents.md b/Documentation/Input/InputEvents.md index 624f3935cab..c6992bcfd5d 100644 --- a/Documentation/Input/InputEvents.md +++ b/Documentation/Input/InputEvents.md @@ -15,4 +15,6 @@ Handler | Events | Description [`IMixedRealityHandJointHandler`](xref:Microsoft.MixedReality.Toolkit.Input.IMixedRealityHandJointHandler) | Hand Joints Updated | Raised by articulated hand controllers when hand joints are updated. [`IMixedRealityHandMeshHandler`](xref:Microsoft.MixedReality.Toolkit.Input.IMixedRealityHandMeshHandler) | Hand Mesh Updated | Raised by articulated hand controllers when a hand mesh is updated. -By default a script will receive events only while in focus by a pointer. To receive events while out of focus, register the script's game object as a global listener via [`MixedRealityToolkit.InputSystem.Register`](xref:Microsoft.MixedReality.Toolkit.IMixedRealityEventSystem) or derive the script from [`InputSystemGlobalListener`](xref:Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalListener). \ No newline at end of file +By default a script will receive events only while in focus by a pointer. To receive events while out of focus, in addition to implementing the desired handler interfaces, you have to do one of the following: +- Register the script's game object as a global listener via [`MixedRealityToolkit.InputSystem.Register`](xref:Microsoft.MixedReality.Toolkit.IMixedRealityEventSystem). +- Derive the script from [`InputSystemGlobalListener`](xref:Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalListener). \ No newline at end of file diff --git a/Documentation/InputSystem/HandTracking.md b/Documentation/InputSystem/HandTracking.md index 7a8193ef3a2..20a90599862 100644 --- a/Documentation/InputSystem/HandTracking.md +++ b/Documentation/InputSystem/HandTracking.md @@ -33,7 +33,7 @@ Hand mesh display can have a noticeable performance impact, for this reason it c Position and rotation can be requested from the input system for each individual hand joint as a [MixedRealityPose](xref:Microsoft.MixedReality.Toolkit.Utilities.MixedRealityPose). -Alternatively we also have access to [GameObjects](https://docs.unity3d.com/ScriptReference/GameObject.html) that follow the joints. This can be useful if another GameObject should track a joint continuously. +Alternatively the system allows access to [GameObjects](https://docs.unity3d.com/ScriptReference/GameObject.html) that follow the joints. This can be useful if another GameObject should track a joint continuously. | Note: Joint object are destroyed when hand tracking is lost! Make sure that any scripts using the joint object handle the `null` case gracefully to avoid errors! | | --- | diff --git a/Documentation/MixedRealityConfigurationGuide.md b/Documentation/MixedRealityConfigurationGuide.md index b37c85a7d47..53e29d7399d 100644 --- a/Documentation/MixedRealityConfigurationGuide.md +++ b/Documentation/MixedRealityConfigurationGuide.md @@ -1,4 +1,4 @@ -# Mixed Reality Toolkit Configuration Guide +# Mixed Reality Toolkit configuration guide ![](../Documentation/Images/MRTK_Logo_Rev.png) @@ -6,19 +6,19 @@ The Mixed Reality Toolkit centralizes as much of the configuration required to m **This guide is a simple walkthrough for each of the configuration screens currently available for the toolkit, more in-depth guides for each of the features is coming soon.** -Configuration profiles provide reusable blocks of configuration that can be used and swapped out at runtime (with the exception of the InputActions profile) to meet the demands for most Mixed Reality projects. This allows you to style your configuration for different input types (Driving vs Flying) or different behavior's your project needs. +Configuration profiles provide reusable blocks of configuration that can be used and swapped out at runtime (with the exception of the InputActions profile) to meet the demands for most Mixed Reality projects. This allows you to style your configuration for different input types (driving vs flying) or different behavior's your project needs. > For more details on profile use, please check the [Configuration Profile Usage Guide]() (Coming soon() -In some cases, we also allow you to swap out the underlying system that provides a capability with either your own service or an alternate implementation (e.g. swapping out the speech provider from an OS version to one on Azure) +In some cases, it might make sense to swap out the underlying system that provides a capability with either a custom developed service or an alternate 3rd party implementation (e.g. swapping out the speech provider from an OS version to one on Azure) > For more detail on writing your own compatible systems for use in the toolkit, please see the [Guide to building Registered Services]() (Coming soon) -## The main Mixed Reality Toolkit Configuration profile +## The main Mixed Reality Toolkit configuration profile The main configuration profile, which is attached to the *MixedRealityToolkit* GameObject in your Scene, provides the main entry point for the Toolkit in your project. -> The Mixed Reality Toolkit "locks" the default configuration screens to ensure you always have a common start point for your project and we encourage you to start defining your own settings as your project evolves. +> The Mixed Reality Toolkit "locks" the default configuration screens to ensure you always have a common start point for your project and it is encouraged to start defining your own settings as your project evolves. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ActiveConfiguration.png) @@ -30,29 +30,30 @@ When you open the main Mixed Reality Toolkit Configuration Profile, you will see ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_MixedRealityToolkitConfigurationScreen.png) -> If you select a MixedRealityToolkitConfigurationProfile asset without the MixedRealityToolkit in the scene, it will ask you if you want the MRTK to automatically setup the scene for you. This is optional, however, there must be an active MixedRealityToolkit object in the scene to access all the configuration screens. +> If you select a MixedRealityToolkitConfigurationProfile asset without the MixedRealityToolkit in the scene, it will ask you if you want the MRTK to automatically setup the scene for you. This is optional, however, there must be an active MixedRealityToolkit object in the scene to access all the configuration screens. This houses the current active runtime configuration for the project. -> Note, almost any profile can be swapped out at runtime, with the exception of the InputActions configuration (see later). The profiles with then automatically adapt to the new configuration / runtime environment automatically. +> Note, almost any profile can be swapped out at runtime, with the exception of the InputActions configuration (see later). The profiles with then automatically adapt to the new configuration / runtime environment automatically. From here you can navigate to all the configuration profiles for the MRTK, including: -* [Experience Settings](#experience) -* [Camera Settings](#camera) -* [Input System Settings](#input-system-settings) -* [Boundary Settings](#boundary) -* [Teleporting Settings](#teleportation) -* [Spatial Awareness Settings](#spatialawareness) -* [Diagnostics Settings](#diagnostic) -* [Additional Services Settings](#services) -* [Input Actions Settings](#inputactions) -* [Input Actions Rules](#inputactionrules) -* [Pointer Configuration](#pointer) -* [Gestures Configuration](#gestures) -* [Speech Commands](#speech) -* [Controller Mapping Configuration](#mapping) -* [Controller Visualization Settings](#visualization) +* [Experience settings](#experience) +* [Camera settings](#camera) +* [Input system settings](#input-system-settings) +* [Boundary settings](#boundary) +* [Teleporting settings](#teleportation) +* [Spatial awareness settings](#spatialawareness) +* [Diagnostics settings](#diagnostic) +* [Additional services settings](#services) +* [Input actions settings](#inputactions) +* [Input actions rules](#inputactionrules) +* [Pointer configuration](#pointer) +* [Gestures configuration](#gestures) +* [Speech commands](#speech) +* [Controller mapping configuration](#mapping) +* [Controller visualization settings](#visualization) +* [Service Inspectors](#inspectors) These configuration profiles are detailed below in their relevant sections: @@ -61,7 +62,7 @@ From here you can navigate to all the configuration profiles for the MRTK, inclu --- -## Experience Settings +## Experience settings Located on the main Mixed Reality Toolkit configuration page, this setting defines the default operation for the Mixed Reality environment for your project. @@ -71,22 +72,22 @@ Located on the main Mixed Reality Toolkit configuration page, this setting defin --- -## Camera Settings +## Camera settings The camera settings define how the camera will be setup for your Mixed Reality project, defining the generic clipping, quality and transparency settings. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_CameraProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit Configuration screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit configuration screen. --- -## Input System Settings +## Input system settings The Mixed Reality Project provides a robust and well-trained input system for routing all the input events around the project which is selected by default. -> The MRTK also allows you to write your own Input System and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) +> The MRTK also allows you to write your own input system and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_InputSystemSelection.png) @@ -97,22 +98,22 @@ Behind the Input System provided by the MRTK are several other systems, these he Each of the individual profiles are detailed below: * Focus Settings -* [Input Actions Settings](#input-actions-settings) -* [Input Actions Rules](#inputactionrules) -* [Pointer Configuration](#pointer) -* [Gestures Configuration](#gestures) -* [Speech Commands](#speech) -* [Controller Mapping Configuration](#mapping) -* [Controller Visualization Settings](#visualization) +* [Input actions settings](#input-actions-settings) +* [Input actions rules](#inputactionrules) +* [Pointer configuration](#pointer) +* [Gestures configuration](#gestures) +* [Speech commands](#speech) +* [Controller mapping configuration](#mapping) +* [Controller visualization settings](#visualization) -> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit Configuration screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit configuration screen. --- -## Boundary Visualization Settings +## Boundary visualization settings -The boundary system translates the perceived boundary reported by the underlying platforms boundary / guardian system. The Boundary visualizer configuration gives you the ability to automatically show the recorded boundary within your scene relative to the user's position. The boundary will also react / update based on where the user teleports within the scene. +The boundary system translates the perceived boundary reported by the underlying platforms boundary / guardian system. The Boundary visualizer configuration gives you the ability to automatically show the recorded boundary within your scene relative to the user's position.The boundary will also react / update based on where the user teleports within the scene. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_BoundaryVisualizationProfile.png) @@ -121,46 +122,46 @@ The boundary system translates the perceived boundary reported by the underlying --- -## Teleportation System Selection +## Teleportation system selection The Mixed Reality Project provides a full featured Teleportation system for managing teleportation events in the project which is selected by default. -> The MRTK also allows you to write your own Teleportation System and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) +> The MRTK also allows you to write your own Teleportation System and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_TeleportationSystemSelection.png) --- -## Spatial Awareness Settings +## Spatial awareness settings -The Mixed Reality Project provides a rebuilt Spatial Awareness system for working with spatial scanning systems in the project which is selected by default. -You can view the architecture behind the [MRTK Spatial Awareness system here](../Documentation/Architecture/SpatialAwareness/SpatialAwarenessSystemArchitecture.md). +The Mixed Reality Project provides a rebuilt spatial awareness system for working with spatial scanning systems in the project which is selected by default. +You can view the architecture behind the [MRTK Spatial awareness system here](../Documentation/Architecture/SpatialAwareness/SpatialAwarenessSystemArchitecture.md). -> The MRTK also allows you to write your own Spatial Awareness System and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) +> The MRTK also allows you to write your own spatial awareness system and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building registered services]() (Coming soon) ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_SpatialAwarenessSystemSelection.png) -The Mixed Reality Toolkit Spatial Awareness configuration lets you tailor how the system starts, whether it is automatically when the application starts or later programmatically as well as setting the extents for the Field of View. +The Mixed Reality Toolkit spatial awareness configuration lets you tailor how the system starts, whether it is automatically when the application starts or later programmatically as well as setting the extents for the field of view. -It also lets you configure the Mesh and surface settings, further customizing how your project understands the environment around you. +It also lets you configure the mesh and surface settings, further customizing how your project understands the environment around you. This is only applicable for devices that can provide a scanned environment, such as the HoloLens (and other devices in the future) -> Note, the Spatial Awareness system is still in active development, please report any issues or requests in the [MRTK Issues section on GitHub](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) +> Note, the spatial awareness system is still in active development, please report any issues or requests in the [MRTK Issues section on GitHub](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_SpatialAwarenessProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit Configuration screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit configuration screen. --- -## Diagnostics Settings +## Diagnostics settings -An optional but highly useful feature of the MRTK is the plugin Diagnostics functionality. This presents a style of debug log in to the scene +An optional but highly useful feature of the MRTK is the plugin diagnostics functionality. This presents a style of debug log in to the scene -> The MRTK also allows you to write your own Diagnostic System and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) +> The MRTK also allows you to write your own diagnostic system and you can use the selection below to switch the system used without rewriting the toolkit. For more information on writing your own systems, [please see this guide to building Registered Services]() (Coming soon) ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_DiagnosticsSystemSelection.png) @@ -168,33 +169,33 @@ The diagnostics profile provides several simple systems to monitor whilst the pr ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_DiagnosticsProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit Configuration screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit configuration screen. --- -## Additional Services Settings +## Additional services settings One of the more advanced areas of the Mixed Reality Toolkit is its [service locator pattern](https://en.wikipedia.org/wiki/Service_locator_pattern) implementation which allows the registering of any "Service" with the framework. This allows the framework to be both extended with new features / systems easily but also allows for projects to take advantage of these capabilities to register their own runtime components. > You can read more about the underlying framework and its implementation in [Stephen Hodgson's article on the Mixed Reality Framework](https://medium.com/@stephen_hodgson/the-mixed-reality-framework-6fdb5c11feb2) -Any registered service still gets the full advantage of all of the Unity events, without the overhead and cost of implementing a MonoBehaviour or clunky singleton patterns. This allows for pure C# components with no scene overhead for running both foreground and background processes, e.g. spawning systems, runtime gamelogic, or practically anything else. +Any registered service still gets the full advantage of all of the Unity events, without the overhead and cost of implementing a MonoBehaviour or clunky singleton patterns. This allows for pure C# components with no scene overhead for running both foreground and background processes, e.g. spawning systems, runtime gamelogic, or practically anything else. Check out the [Guide to building Registered Services]() (Coming Soon) for more details about creating your own services ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_RegisteredServiceProfidersProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit Configuration screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the main Mixed Reality Toolkit configuration screen. --- -## Input Actions Settings +## Input actions settings -Input Actions provide a way to abstract any physical interactions and input from a runtime project. All physical input (from Controllers / hands / mouse / etc) is translated in to a logical Input Action for use in your runtime project. This ensures no matter where the input comes from, your project simply implements these actions as "Things to do" or "Interact with" in your scenes. +Input actions provide a way to abstract any physical interactions and input from a runtime project. All physical input (from controllers / hands / mouse / etc) is translated in to a logical input action for use in your runtime project. This ensures no matter where the input comes from, your project simply implements these actions as "Things to do" or "Interact with" in your scenes. -To create a new Input Action, simply click the "Add a new Action" button and enter a friendly text name for what it represents. You then only need select an Axis (the type of data) the action is meant to convey, or in the case of physical controllers, the physical input type it can be attached to, for example: +To create a new input action, simply click the "Add a new Action" button and enter a friendly text name for what it represents. You then only need select an axis (the type of data) the action is meant to convey, or in the case of physical controllers, the physical input type it can be attached to, for example: | Axis Constraint | Data Type | Description | Example use | | :--- | :--- | :--- | :--- | @@ -207,45 +208,45 @@ To create a new Input Action, simply click the "Add a new Action" button and ent | Three Dof Rotation | Quaternion | Rotational only input with 4 float axis | A Three degrees style controller, e.g. Oculus Go controller | | Six Dof | Mixed Reality Pose (Vector3, Quaternion) | A position and rotation style input with both Vector3 and Quaternion components | A motion controller or Pointer | -Events utilizing Input Actions are not limited to physical controllers and can still be utilized within the project to have runtime effects generate new actions. +Events utilizing input actions are not limited to physical controllers and can still be utilized within the project to have runtime effects generate new actions. -> Input Actions are one of the few components which is not editable at runtime, they are a design time configuration only. This profile should not be swapped out whilst the project is running due to the framework (and your projects) dependency on the ID's generated for each action. +> Input actions are one of the few components which is not editable at runtime, they are a design time configuration only. This profile should not be swapped out whilst the project is running due to the framework (and your projects) dependency on the ID's generated for each action. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_InputActionsProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. --- -## Input Actions Rules +## Input actions rules -Input Action Rules provide a way to automatically translate an event raised for one Input Action in to different actions based on its data value. These are managed seamlessly within the framework and do not incur any performance costs. +Input action rules provide a way to automatically translate an event raised for one input action in to different actions based on its data value. These are managed seamlessly within the framework and do not incur any performance costs. -For example, converting the single Dual Axis input event from a DPad in to the 4 corresponding Dpad Up / DPad Down / Dpad Left / Dpad Right actions. (as shown in the image below) +For example, converting the single dual axis input event from a DPad in to the 4 corresponding "Dpad Up" / "DPad Down" / "Dpad Left" / "Dpad Right" actions (as shown in the image below). > This could also be done i your own code, but seeing as this was a very common patter, the framework provides a mechanism to do this "out of the box" -Input Action Rules can be configured for any of the available input axis. However, Input actions from one Axis type can be translated to another Input Action of the same Axis type. You can map a Dual Axis action to another Dual Axis action, but not to a Digital or None action. +Input action Rules can be configured for any of the available input axis. However, input actions from one axis type can be translated to another input action of the same axis type. You can map a dual axis action to another dual axis action, but not to a digital or none action. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_InputActionRulesProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. --- -## Pointer Configuration +## Pointer configuration -Pointers are used to drive interactivity in the scene from any input device, giving both a direction and hit test with any object in a scene (that has a collider attached, or is a UI component). Pointers are by default automatically configured for controllers, headsets (gaze/focus) and mouse/touch input. +Pointers are used to drive interactivity in the scene from any input device, giving both a direction and hit test with any object in a scene (that has a collider attached, or is a UI component). Pointers are by default automatically configured for controllers, headsets (gaze / focus) and mouse / touch input. -Pointers can also be visualized within the active scene using one of the many Line components provided by the Mixed Reality Toolkit, or any of your own if they implement the MRTK IMixedRealityPointer interface. +Pointers can also be visualized within the active scene using one of the many line components provided by the Mixed Reality Toolkit, or any of your own if they implement the MRTK IMixedRealityPointer interface. > See the [Guide to Pointers documentation]() **Coming Soon** for more information on creating your own pointers. ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_InputPointerProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. * Pointing Extent: Determines the global pointing extent for all pointers, including gaze. * Pointing Raycast Layer Masks: Determines which layers pointers will raycast against. @@ -258,33 +259,33 @@ There's an additional helper button to quickly jump to the Gaze Provider to over --- -## Gestures Configuration +## Gestures configuration -Gestures are a system specific implementation allowing you to assign Input Actions to the various "Gesture" input methods provided by various SDKs (e.g. HoloLens). +Gestures are a system specific implementation allowing you to assign input actions to the various "Gesture" input methods provided by various SDKs (e.g. HoloLens). > Note, the current implementation is for the HoloLens only and will be enhanced for other systems as they are added to the Toolkit in the future (no dates yet). ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_GesturesProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. --- ## Speech Commands -Like Gestures, some runtime platforms also provide intelligent Speech to Text functionality with the ability to generate "Commands" that can be received by a Unity project. This configuration profile allows you to configure registered "words" and translate them in to Input Actions that can be received by your project. (they can also be attached to keyboard actions if required) +Like gestures, some runtime platforms also provide intelligent "Speech to Text" functionality with the ability to generate commands that can be received by a Unity project. This configuration profile allows you to configure registered "words" and translate them in to input actions that can be received by your project. They can also be attached to keyboard actions if required. > The system currently only supports speech when running on Windows 10 platforms, e.g. HoloLens and Windows 10 desktop and will be enhanced for other systems as they are added to the Toolkit in the future (no dates yet). ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_SpeechCommandsProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. --- -## Controller Mapping Configuration +## Controller mapping configuration One of the core configuration screens for the Mixed Reality Toolkit is the ability to configure and map the various types of controllers that can be utilized by your project. @@ -304,27 +305,39 @@ The MRTK provides a default configuration for the following controllers / system * Oculus Remote controller * Generic OpenVR devices (advanced users only) -Clicking on the Image for any of the pre-built controller systems allows you to configure a single Input Action for all its corresponding inputs, for example, see the Oculus Touch controller configuration screen below: +Clicking on the Image for any of the pre-built controller systems allows you to configure a single input action for all its corresponding inputs, for example, see the Oculus Touch controller configuration screen below: ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_OculusTouchConfigScreen.png) There is also an advanced screen for configuring other OpenVR or Unity input controllers that are not identified above. -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit input system settings screen. --- -## Controller Visualization Settings +## Controller visualization settings -In addition to the Controller mapping, a separate configuration profile is provided to customize how your controllers are presented within your scenes. +In addition to the controller mapping, a separate configuration profile is provided to customize how your controllers are presented within your scenes. This can be configured at a "Global" (all instances of a controller for a specific hand) or specific to an individual controller type / hand. -> The MRTK does not currently support native SDK's controller models as Unity does not yet provide the capability to load / render gLTF models, which is the default type of models provided by most SDKs. This will be enhanced when this is available. +> The MRTK does not currently support native SDK's controller models as Unity does not yet provide the capability to load / render gLTF models, which is the default type of models provided by most SDKs. This will be enhanced when this is available. -If your controller representation in the scene needs to be offset from the physical controller position, then simply set that offset against the controller model's prefab. (e.g. setting the transform position of the controller prefab with an offset position) +If your controller representation in the scene needs to be offset from the physical controller position, then simply set that offset against the controller model's prefab (e.g. setting the transform position of the controller prefab with an offset position). ![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ControllerVisualizationProfile.png) -> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. \ No newline at end of file +> Clicking on the "Back to Configuration Profile" button will take you back to the Mixed Reality Toolkit Input System Settings screen. + + + +## Service Inspectors + +Service Inspectors are an editor-only feature that generates in-scene objects representing active services. Selecting these objects displays inspectors which offer documentation links, control over editor visualizations and insight into the state of the service. + +![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_ServiceInspectors.png) + +You can enable service inspectors by checking 'Use Service Inspectors' under Editor Settings in your Configuration Profile. + +![](../Documentation/Images/MixedRealityToolkitConfigurationProfileScreens/MRTK_EnableServiceInspectors.png) diff --git a/Documentation/MixedRealityServices.md b/Documentation/MixedRealityServices.md index 46cfb24a8be..f862c57bfec 100644 --- a/Documentation/MixedRealityServices.md +++ b/Documentation/MixedRealityServices.md @@ -1,25 +1,25 @@ -# What makes a Mixed Reality Feature +# What makes a mixed reality feature -To avoid the performance overheads of the `MonoBehaviour` class, all Services (Systems, Features, or Modules that require independent operation in a Mixed Reality Solution, e.g. Input, Boundary, SpatialAwareness) are required to be discrete plain old c# classes which implement `IMixedRealityService` and to register with the `MixedRealityToolkit`. +To avoid the performance overheads of the `MonoBehaviour` class, all *services* (systems, features, or modules that require independent operation in a mixed reality solution, e.g. input, boundary, spatial awareness) are required to be discrete plain old c# classes which implement `IMixedRealityService` and to register with the `MixedRealityToolkit`. -The `MixedRealityToolkit` then coordinates all referencing between services and ensures that they receive all appropriate events (E.g. Awake/initialize, Update, Destroy) as well as facilitating the finding of other services when needed. +The `MixedRealityToolkit` then coordinates all referencing between services and ensures that they receive all appropriate events (E.g. Awake/Initialize, Update, Destroy) as well as facilitating the finding of other services when needed. Additionally, the `MixedRealityToolkit` also maintains the active VR/XR/AR SDK in use in the running project, to initialize the active device based on attached hardware and instigate proper operation. -## A Service +## A service -An individual service can be any functionality that needs to be implemented in the project. Traditionally some projects use Singletons which need to be alive in the scene, but this pattern has its advantages and disadvantages. We've decided to break away from this pattern in favor of a hybrid approach that brings several benefits over the traditional Singleton implementations with MonoBehaviours, namely: +An individual service can be any functionality that needs to be implemented in the project. Traditionally some projects use *singletons* which need to be alive in the scene, but this pattern has its advantages and disadvantages. We've decided to break away from this pattern in favor of a hybrid approach that brings several benefits over the traditional singleton implementations with MonoBehaviours, namely: * Performance - without the overhead of a MonoBehaviour, [script updates are approximately 80% faster and don't require a `GameObject` to live in the scene](https://blogs.unity3d.com/2015/12/23/1k-update-calls/). -* Reference-ability - Services can be discovered from the `MixedRealityToolkit` a lot faster and easier than searching `GameObjects` in a scene or using `FindObjectsOfType`. -* No Type dependency - Though a method similar to Dependency Injection, services can be decoupled from their type, this means the concrete implementation can be swapped out at any time without adversely affecting code that consumes it (E.G. Replacing the default InputSystem with your custom one, so long as you've fully implemented each interface). -* Multi-scene usage - If a service does need to know about a `Transform` position in a scene, it can simply reference, or create, a `GameObject` _rather than be a component attached to it_. This makes it a lot easier to find and use the service when the project spans multiple scenes. +* Reference-ability - services can be discovered from the `MixedRealityToolkit` a lot faster and easier than searching `GameObjects` in a scene or using `FindObjectsOfType`. +* No type dependency - though a method similar to dependency injection, services can be decoupled from their type, this means the concrete implementation can be swapped out at any time without adversely affecting code that consumes it (e.g. replacing the default InputSystem with your custom one, so long as you've fully implemented each interface). +* Multi-scene usage - if a service does need to know about a `transform` position in a scene, it can simply reference, or create, a `GameObject` _rather than be a component attached to it_. This makes it a lot easier to find and use the service when the project spans multiple scenes. -## Service Interfaces +## Service interfaces -The Service container uses a predefined Interface type for storage and retrieval of any Service, this ensures there are no hard dependencies within the Mixed Reality Toolkit, so that each subsystem can easily be swapped out with another (so long as it conforms to the interface). +The *service* container uses a predefined *interface* type for storage and retrieval of any service, this ensures there are no hard dependencies within the Mixed Reality Toolkit, so that each subsystem can easily be swapped out with another (so long as it conforms to the interface). -Current System interfaces provided by the Mixed Reality Toolkit include: +Current system interfaces provided by the Mixed Reality Toolkit include: * IMixedRealityInputSystem * IMixedRealityBoundarySystem @@ -27,4 +27,4 @@ Current System interfaces provided by the Mixed Reality Toolkit include: When creating your own implementations of these systems, you must ensure each complies with the interfaces provided by the Mixed Reality Toolkit (e.g. if you replace the InputSystem with another of your own design). -> All Services must also inherit from the **BaseService** class or implement `IMixedRealityService`, to implement the functions required by the `MixedRealityToolkit` so their life-cycles are handled appropriately. (E.G. Initialize, Update, Destroy are called correctly.) \ No newline at end of file +> All services must also inherit from the **BaseService** class or implement `IMixedRealityService`, to implement the functions required by the `MixedRealityToolkit` so their life-cycles are handled appropriately. (E.G. Initialize, Update, Destroy are called correctly.) diff --git a/Documentation/Performance/PerfGettingStarted.md b/Documentation/Performance/PerfGettingStarted.md index 135e8e51524..39ea602dec6 100644 --- a/Documentation/Performance/PerfGettingStarted.md +++ b/Documentation/Performance/PerfGettingStarted.md @@ -10,6 +10,8 @@ typically identify a problematic scenario, measure the problem (using some sort dig into the hotspots (using that profiling tool), test out a fix to that hotspot, and then repeat until performance is within desired bounds. +**[Recommended Settings for Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/recommended-settings-for-unity)** + **[Introduction to Unity performance optimization for beginners](https://www.youtube.com/watch?v=1e5WY2qf600)** For people completely new to performance optimization, this is a great video to watch. @@ -36,16 +38,15 @@ that you can first try as you explore the WPA tools. As a platform built on Unity, all the other performance recommendations for building mixed reality experiences are relevant here: +* [Understanding Performance for Mixed Reality](https://docs.microsoft.com/en-us/windows/mixed-reality/understanding-performance-for-mixed-reality) * [Performance recommendations for Unity](https://docs.microsoft.com/en-us/windows/mixed-reality/performance-recommendations-for-unity) -* [Performance recommendations for immersive headset apps](https://docs.microsoft.com/en-us/windows/mixed-reality/performance-recommendations-for-immersive-headset-apps) -* [Performance recommendations for HoloLens apps](https://docs.microsoft.com/en-us/windows/mixed-reality/performance-recommendations-for-hololens-apps) ## Common Considerations ### Use Single Pass Instanced Rendering This recommendation is called out in -[other](https://docs.microsoft.com/en-us/windows/mixed-reality/performance-recommendations-for-immersive-headset-apps) +[other](https://docs.microsoft.com/en-us/windows/mixed-reality/recommended-settings-for-unity) resources, but is worth repeating here because enabling this is crucial for performant mixed reality applications. For more information on what Single Pass Instanced Rendering is, check out the Unity docs on [Single Pass Stereo rendering](https://docs.unity3d.com/Manual/SinglePassStereoRendering.html) diff --git a/Documentation/README_AppBar.md b/Documentation/README_AppBar.md index 88905644c7e..1428f80213b 100644 --- a/Documentation/README_AppBar.md +++ b/Documentation/README_AppBar.md @@ -1,10 +1,13 @@ -# App Bar -![App Bar](../Documentation/Images/AppBar/MRTK_AppBar_Main.png) +# App bar # -App Bar is a UI component used with Bounding Box. Using the 'Adjust' button, you can turn on/off the Bounding Box interface for manipulating object. +![App bar](../Documentation/Images/AppBar/MRTK_AppBar_Main.png) -## How to use App Bar -Drag and drop **AppBar** prefab into the scene hierarchy. In the inspector panel of the AppBar, you will see **Bounding Box** under **Target Bounding Box** section. Assign any objects that has Bounding Box. **Important: Target object's Bounding Box activation option should be 'Activate Manually'** +App bar is a UI component that is used together with the [bounding box](README_BoundingBox.md) script. It adds button controls to an object with the intent to manipulate it. Using the 'Adjust' button, the bounding box interface for an object can be de- / activated. The "Remove" button should remove the object from the scene. + +## How to use app bar ## +Drag and drop [AppBar.prefab](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/AppBar/AppBar.prefab) into the scene hierarchy. In the inspector panel of the component, assign any object with a bounding box as the *Target Bounding Box* to add the app bar to it. + +**Important:** The bounding box activation option for the target object should be 'Activate Manually'. diff --git a/Documentation/README_BoundingBox.md b/Documentation/README_BoundingBox.md index 4af7faead39..aa94918023f 100644 --- a/Documentation/README_BoundingBox.md +++ b/Documentation/README_BoundingBox.md @@ -1,64 +1,66 @@ -# Bounding Box # -![Bounding Box](../Documentation/Images/BoundingBox/MRTK_BoundingBox_Main.png) +# Bounding box # -The `BoundingBox` script provides basic functionality for transforming objects in Windows Mixed Reality. Using handles on the corners and edges, you can scale or rotate the object. On HoloLens 2, the bounding box responds to your finger's proximity. It shows visual feedback to help perceive the distance from the object. MRTK's bounding box provides various options which allow you to easily customize the interactions and visuals.  +![Bounding box](../Documentation/Images/BoundingBox/MRTK_BoundingBox_Main.png) + +The [`BoundingBox.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs) script provides basic functionality for transforming objects in mixed reality. A bounding box will show a cube around the hologramm to indicate that it can be interacted with. Handles on the corners and edges of the cube allow scaling or rotating the object. The bounding box also reacts to user input. On HoloLens 2 for example the bounding box responds to finger proximity, providing visual feedback to help perceive the distance from the object. All interactions and visuals can be easily customized.  For more information please see [App Bar and Bounding Box](https://docs.microsoft.com/en-us/windows/mixed-reality/app-bar-and-bounding-box) on Windows Dev Center. -### How to use Bounding Box ### -You can enable Bounding Box by simply assigning the `BoundingBox` script to any GameObject. Assign the object with Box Collider to 'Bounds Override' field in the Inspector. +## How to use a bounding box ## +To enable a bounding box around an object, simply assign the `BoundingBox` script to any GameObject. Note that the object will need a box collider, added in the *Bounds Override* field in the inspector. ![Bounding Box](../Documentation/Images/BoundingBox/MRTK_BoundingBox_Assign.png) -### Example Scene ### -You can find bounding box examples in the *HandInteractionExamples.unity* scene: +## Making an object movable with manipulation handler ## +A bounding box can be combined with [`ManipulationHandler.cs`](README_ManipulationHandler.md) to make the object movable using far interaction. The manipulation handler supports both one and two-handed interactions. [Hand tracking](InputSystem/HandTracking.md) can be used to interact with an object up close. + + + +In order for the bounding box edges to behave the same way when moving it using [`ManipulationHandler`](README_ManipulationHandler.md)'s far interaction, it is advised to connect its events for *On Manipulation Started* / *On Manipulation Ended* to `BoundingBox.HighlightWires` / `BoundingBox.UnhighlightWires` respectively, as shown in the screenshot above. + +## Example scene ## +You can find examples using bounding box in the [HandInteractionExample scene](README_HandInteractionExamples.md). -### Inspector Properties ### +## Inspector properties ## + ![Bounding Box](../Documentation/Images/BoundingBox/MRTK_BoundingBox_Structure.png) -#### Target Object #### -This specifies which object will get transformed by the bounding box manipulation. If no object is set, the bounding box defaults to the owner object. +**Target Object** +This property specifies which object will get transformed by the bounding box manipulation. If no object is set, the bounding box defaults to the owner object. -#### Bounds Override #### -Set a box collider from the object for bounds computation. +**Bounds Override** +Sets a box collider from the object for bounds computation. -#### Activation Behavior #### +**Activation Behavior** There are several options to activate the bounding box interface. -- **Activate On Start** : Bounding Box becomes visible once the scene is started. -- **Activate By Proximity** : Bounding Box becomes visible when an articulated hand is close to the object. -- **Activate By Pointer** : Bounding Box becomes visible when it is targeted by a hand-ray pointer. -- **Activate Manually** : Bounding Box does not become visible automatically. You can manually activate it through a script by accessing the boundingBox.Active property. +* *Activate On Start*: Bounding Box becomes visible once the scene is started. +* *Activate By Proximity*: Bounding Box becomes visible when an articulated hand is close to the object. +* *Activate By Pointer*: Bounding Box becomes visible when it is targeted by a hand-ray pointer. +* *Activate Manually*: Bounding Box does not become visible automatically. You can manually activate it through a script by accessing the boundingBox.Active property. -#### Scale Minimum #### +**Scale Minimum** The minimum allowed scale. -#### Scale Maximum #### +**Scale Maximum** The maximum allowed scale. -#### Box Display #### +**Box Display** Various bounding box visualization options. If Flatten Axis is set to *Flatten Auto*, the script will disallow manipulation along the axis with the smallest extent. This results in a 2D bounding box, which is usually used for thin objects. -#### Handles #### +**Handles** You can assign the material and prefab to override the handle style. If no handles are assigned, they will be displayed in the default style. -#### Events #### -Bounding Box provides the following events. The example uses these events to play audio feedback. +## Events ## +Bounding box provides the following events. The example uses these events to play audio feedback. -- **Rotate Started** -- **Rotate Ended** -- **Scale Started** -- **Scale Ended** +- **Rotate Started**: Fired when rotation starts. +- **Rotate Ended**: Fired when rotation ends. +- **Scale Started**: Fires when scaling ends. +- **Scale Ended**: Fires when scaling ends. - -### Make an object movable with Manipulation Handler ### -If you want to make the object movable using far interaction, you can combine [`ManipulationHandler.cs`](README_ManipulationHandler.md) with `BoundingBox.cs`. [ManipulationHandler](README_ManipulationHandler.md) supports both one and two-handed interactions. To make [`ManipulationHandler.cs`](README_ManipulationHandler.md) work with near interaction, you should add `NearInteractionGrabbable.cs` too. - - - -In order for the bounding box edges to be highlighted the same way when moving it using [`ManipulationHandler`](README_ManipulationHandler.md)'s far interaction, it is advised to connect its events for **On Manipulation Started** / **On Manipulation Ended** to `BoundingBox.HighlightWires` / `BoundingBox.UnhighlightWires` respectively, as shown in the screenshot above. diff --git a/Documentation/README_Button.md b/Documentation/README_Button.md index b3c088f163e..d57216124e3 100644 --- a/Documentation/README_Button.md +++ b/Documentation/README_Button.md @@ -1,84 +1,87 @@ # Button # + ![Button](../Documentation/Images/Button/MRTK_Button_Main.png) -The button supports all available input methods including articulated hand input for the near interactions and gaze + air-tap for the far interactions. You can also use voice command to trigger the button. -## How to use the Pressable Button prefab -Simply drag [PressableButton.prefab](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab) or [PressableButtonPlated.prefab](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab) into the scene. These button prefabs are already configured to have audio-visual feedback for the various types of inputs, including articulated hand input and gaze. The events exposed in the `PressableButton` and the [`Interactable`](README_Interactable.md) component can be used to trigger additional actions.  +The [`Button.prefab`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/Button.prefab) is based on the [Interactable](README_Interactable.md) concept to provide easy UI controls for buttons or other types of interactive surfaces. The baseline button supports all available input methods, including articulated hand input for the near interactions as well as gaze + air-tap for the far interactions. You can also use voice command to trigger the button. + +## How to use pressable buttons ## -The Pressable Buttons in the HandInteractionExamples scene use [`Interactable`](README_Interactable.md)'s *OnClick* event to trigger a change in the color of a cube. This event gets triggered for different types of input methods such as gaze, air-tap, hand-ray, as well as physical button presses through the `PressableButton` script. +Simply drag [`PressableButton.prefab`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButton.prefab) or [`PressableButtonPlated.prefab`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Prefabs/PressableButtonPlated.prefab) into the scene. These button prefabs are already configured to have audio-visual feedback for the various types of inputs, including articulated hand input and gaze. + +The events exposed in the prefab itself as well as the [Interactable](README_Interactable.md) component can be used to trigger additional actions. The pressable buttons in the [HandInteractionExample scene](README_HandInteractionExamples.md) use Interactable's *OnClick* event to trigger a change in the color of a cube. This event gets triggered for different types of input methods such as gaze, air-tap, hand-ray, as well as physical button presses through the pressable button script. -You can configure when the `PressableButton` fires the [`Interactable`](README_Interactable.md)'s *OnClick* event via the `PhysicalPressEventRouter` on the button. For example, you can set *OnClick* to fire when the button is first pressed, as opposed to be pressed, and then released, by setting *Interactable On Click* to *Event On Press*. +You can configure when the pressable button fires the *OnClick* event via the `PhysicalPressEventRouter` on the button. For example, you can set *OnClick* to fire when the button is first pressed, as opposed to be pressed and released, by setting *Interactable On Click* to *Event On Press*. -To leverage specific articulated hand input state information, you can use `PressableButton`'s events - *Touch Begin*, *Touch End*, *Button Pressed*, *Button Released*. These events will not fire in response to air-tap, hand-ray, or eye inputs, however. +To leverage specific articulated hand input state information, you can use pressable buttons events - *Touch Begin*, *Touch End*, *Button Pressed*, *Button Released*. These events will not fire in response to air-tap, hand-ray, or eye inputs, however. -## Interaction States +## Using PressableButton on other types of objects ## + +You can use the `PressableButton`s script to configure an object to react to finger pushes. + +In the [HandInteractionExample scene](README_HandInteractionExamples.md), you can take a look at the piano and round button examples which are both using `PressableButton`.  + + + + + +Each piano key has a `PressableButton` and a `NearInteractionTouchable` script assigned. It is important to verify that the *Local Forward* direction of `NearInteractionTouchable` is correct. It is represented by a white arrow in the editor. Make sure the arrow points away from the button's front face: + + + +## Interaction States ## + In the idle state, the button's front plate is not visible. As a finger approaches or a cursor from gaze input targets the surface, the front plate's glowing border becomes visible. There is additional highlighting of the fingertip position on the front plate surface. When pushed with a finger, the front plate moves with the fingertip. When the fingertip touches the surface of the front plate, it shows a subtle pulse effect to give visual feedback of the touch point. -The subtle pulse effect is triggered by the `PressableButton.` The `PressableButton` looks for `ProximityLight(s)` that live on the currently interacting pointer. If any `ProximityLight(s)` are found, the ProximityLight.Pulse method is called which automatically animates shader parameters to display a pulse. +The subtle pulse effect is triggered by the pressable button, which looks for *ProximityLight(s)* that live on the currently interacting pointer. If any proximity lights are found, the `ProximityLight.Pulse` method is called, which automatically animates shader parameters to display a pulse. -## Property Inspector of PressableButton -![Button](../Documentation/Images/Button/MRTK_Button_Structure.png) +## Inspector properties ## -The Pressable Button prefab is consists of the following elements: +![Button](../Documentation/Images/Button/MRTK_Button_Structure.png) -#### Box Collider +**Box Collider** `Box Collider` for the button's front plate. -#### Pressable Button +**Pressable Button** The logic for the button movement with hand press interaction. -#### Physical Press Event Router -This script sends events from hand press interaction to [`Interactable`](README_Interactable.md). +**Physical Press Event Router** +This script sends events from hand press interaction to [Interactable](README_Interactable.md). -#### Interactable -[`Interactable`](README_Interactable.md) handles various types of interaction states and events. HoloLens gaze, gesture, and voice input and immersive headset motion controller input are directly handled by this script. +**Interactable** +[Interactable](README_Interactable.md) handles various types of interaction states and events. HoloLens gaze, gesture, and voice input and immersive headset motion controller input are directly handled by this script. -#### Audio Source -Unity `Audio Source` for the audio feedback clips +**Audio Source** +Unity audio source for the audio feedback clips. -#### NearInteractionTouchable.cs +*NearInteractionTouchable.cs* Required to make any object touchable with articulated hand input. -### Prefab Layout -![Button](../Documentation/Images/Button/MRTK_Button_Layout.png) +**Prefab Layout** +The *ButtonContent* object contains front plate, text label and icon. The *FrontPlate* responds to the proximity of the index fingertip using the *Button_Box* shader. It shows glowing borders, proximity light, and a pulse effect on touch. The text label is made with TextMesh Pro. *SeeItSayItLabel*'s visibility is controlled by [Interactable](README_Interactable.md)'s theme. -The *ButtonContent* object contains front plate, text label and icon. The *FrontPlate* responds to the proximity of the index fingertip using the *Button_Box* shader. It shows glowing borders, proximity light, and a pulse effect on touch. The text label is made with TextMesh Pro. *SeeItSayItLabel*'s visibility is controlled by [`Interactable`](README_Interactable.md)'s theme. +![Button](../Documentation/Images/Button/MRTK_Button_Layout.png) -## Voice command ('See-it, Say-it') +## Voice command ('See-it, Say-it') ## -#### Speech Input Handler -The [`Interactable`](README_Interactable.md) script in Pressable Button already implements IMixedRealitySpeechHandler. A voice command keyword can be set here.  +**Speech Input Handler** +The [Interactable](README_Interactable.md) script in Pressable Button already implements `IMixedRealitySpeechHandler`. A voice command keyword can be set here.  -#### Speech Input Profile -Additionally, you need to register the voice command keyword in the global `Speech Commands Profile`.  +**Speech Input Profile** +Additionally, you need to register the voice command keyword in the global *Speech Commands Profile*.  -#### See-it, Say-it label -The Pressable Button prefab has a placeholder TextMesh Pro label under the *SeeItSayItLabel* object. You can use this label to communicate the voice command keyword for the button to the user. +**See-it, Say-it label** +The pressable button prefab has a placeholder TextMesh Pro label under the *SeeItSayItLabel* object. You can use this label to communicate the voice command keyword for the button to the user. - -## Using PressableButton on other types of objects - -You can use the `PressableButton`s script to configure an object to react to finger pushes. - -In the HandInteractionExamples scene, you can take a look at the piano and round button examples which are both using `PressableButton`.  - - - - - -Each piano key has a `PressableButton` and a `NearInteractionTouchable` script assigned. It is important to verify that the *Local Forward* direction of `NearInteractionTouchable` is correct. It is represented by a white arrow in the editor. Make sure the arrow points away from the button's front face: - - diff --git a/Documentation/README_FingertipVisualization.md b/Documentation/README_FingertipVisualization.md index f3ffcc334f9..b980ca36b1b 100644 --- a/Documentation/README_FingertipVisualization.md +++ b/Documentation/README_FingertipVisualization.md @@ -1,38 +1,34 @@ -# Fingertip Visualization -![Fingertip Visualization](../Documentation/Images/Fingertip/MRTK_FingertipVisualization_Main.png) +# Fingertip visualization # -The fingertip affordance helps the user recognize the distance from the target object. The ring shape visual adjusts its size based on the distance from the fingertip to the object. The fingertip visualization is primarily controlled by the `FingerCursor` prefab (and script) which is spawned as the cursor prefab of the `PokePointer`. Other components of the visualization include the `ProximityLight` script, and `MixedRealityStandard` shader. +![Fingertip visualization](../Documentation/Images/Fingertip/MRTK_FingertipVisualization_Main.png) -### How to use the Fingertip Visualization ### +The fingertip affordance helps the user recognize the distance from the target object. The ring shape visual adjusts its size based on the distance from the fingertip to the object. The fingertip visualization is primarily controlled by the [FingerCursor.prefab](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/FingerCursor.prefab) (and script) which is spawned as the cursor prefab of the *PokePointer*. Other components of the visualization include the *ProximityLight* script, and *MixedRealityStandard* shader. -By default the fingertip visualization will work in any Unity scene that is configured to spawn a FingerCursor. Spawning of the FingerCursor occurs in the `DefaultMixedRealityToolkitConfigurationProfile` under: +## How to use the fingertip visualization ## -- DefaultMixedRealityInputSystemProfile - - DefaultMixedRealityInputPointerProfile - - PokePointer - - FingerCursor +By default the fingertip visualization will work in any Unity scene that is configured to spawn a FingerCursor. Spawning of the FingerCursor occurs in the *DefaultMixedRealityToolkitConfigurationProfile* under: -At a high level the fingertip visualization works by using a proximity light to project a colored gradient on any nearby surfaces that accept proximity lights. The finger cursor then looks for any nearby interactable surfaces, which are determined by parent IMixedRealityNearPointer(s), to align the finger ring with a surface as the finger moves towards a surface. As a finger approaches a surface the finger ring is also dynamically animated using the round corner properties of the MixedRealityStandard shader. +*DefaultMixedRealityInputSystemProfile > DefaultMixedRealityInputPointerProfile > PokePointer > FingerCursor* -### Example Scene ### +At a high level the fingertip visualization works by using a proximity light to project a colored gradient on any nearby surfaces that accept proximity lights. The finger cursor then looks for any nearby interactable surfaces, which are determined by parent `IMixedRealityNearPointer(s)`, to align the finger ring with a surface as the finger moves towards a surface. As a finger approaches a surface the finger ring is also dynamically animated using the round corner properties of the MixedRealityStandard shader. -You can find fingertip visualization examples in almost any scene that works with articulated hands, but is prominent in the HandInteractionExamples.unity scene. +## Example scene ## -![Fingertip Visualization](../Documentation/Images/Fingertip/MRTK_FingertipVisualization_States.png) +You can find fingertip visualization examples in almost any scene that works with articulated hands, but is prominent in the [HandInteractionExample scene](README_HandInteractionExamples.md). -### Inspector Properties ### +![Fingertip visualization](../Documentation/Images/Fingertip/MRTK_FingertipVisualization_States.png) -#### FingerCursor #### - +## Inspector properties ## -Many of the FingerCursor properties are inherited from the BaseCursor class. Important properties include the far/near surface margins and widths which drive the finger ring animation in the MixedRealityStandard shader. For other properties please hover over the inspector tool tips. +**FingerCursor** +Many of the finger cursor properties are inherited from the base cursor class. Important properties include the far / near surface margins and widths which drive the finger ring animation in the MixedRealityStandard shader. For other properties please hover over the inspector tool tips. -#### ProximityLight #### -![Fingertip Visualization](../Documentation/Images/Fingertip/MRTK_FingertipVisualization_Proximity_Light_Inspector.png) + +**ProximityLight** The proximity light settings control how the light looks when near and far from a surface. The center, middle, and outer colors control the gradient look of the light and can be custom tailored for the color palette of your application. Note, the colors are HDR (High Dynamic Range) to allow users to brighten the proximity light to values above one. For other properties please hover over the inspector tool tips. -#### MixedRealityStandard Shader #### - +**MixedRealityStandard Shader** +The MixedRealityStandard shader is used for many effects in the MRTK. The two settings important for fingertip visualization are "Near Fade" and "Proximity Light." Near Fade allows objects to fade in / out as a camera or light nears them. Make sure to check "Light" to allow proximity lights to drive the fade (rather than the camera). You can reverse the values of "Fade Begin" and "Fade Complete" to reverse a fade. Check "Proximity Light" for any surface you would like the proximity light to brighten. For other properties please hover over the inspector tool tips. -The MixedRealityStandard shader is used for many effects in the MRTK. The two settings important for fingertip visualization are "Near Fade" and "Proximity Light." Near Fade allows objects to fade in/out as a camera or light nears them. Make sure to check "Light" to allow proximity lights to drive the fade (rather than the camera). You can reverse the values of "Fade Begin" and "Fade Complete" to reverse a fade. Check "Proximity Light" for any surface you would like the proximity light to brighten. For other properties please hover over the inspector tool tips. + diff --git a/Documentation/README_HandInteractionExamples.md b/Documentation/README_HandInteractionExamples.md index 68e6aba610e..27704bfedc7 100644 --- a/Documentation/README_HandInteractionExamples.md +++ b/Documentation/README_HandInteractionExamples.md @@ -1,34 +1,33 @@ -# Hand Interaction Examples scene +# Hand interaction examples scene # + ![Hand Interaction Examples](../Documentation/Images/MRTK_Examples.png) -In this example scene, you can find various types of interactions and UI controls that supports HoloLens2's articulated hand input. -You can find the **HandInteractionExamples.unity** scene under **Assets\MixedRealityToolkit.Examples\Demos\HandTracking\Scenes** +The [HandInteractionExamples.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity) example scene contains various types of interactions and UI controls that highlight articulated hand input. -*This example scene uses **TextMesh Pro**. Please click **'Import TMP Essentials'** button when you see this prompt. Unity will import TextMesh Pro packages* +**Please note:** This example scene uses *TextMesh Pro*. To open the scene, please click *'Import TMP Essentials'* when the respective prompt is shown during the import of the scene. Unity will then import TextMesh Pro packages. -*If you see big text after TextMesh Pro import, please open other Unity scene and open this scene again.* +If you see big text after the TextMesh Pro import, please open another Unity scene and then open the example scene again. - -## Pressable Button -See [Button](README_Button.md) page for the details. +## Pressable button ## +See [button](README_Button.md) page for the details. ![Hand Interaction Examples](../Documentation/Images/HandInteractionExamples/MRTK_Examples_PressTouch.png) -## Bounding Box -See [Bounding Box](README_BoundingBox.md) page for the details. +## Bounding box ## +See [bounding box](README_BoundingBox.md) page for the details. ![Hand Interaction Examples](../Documentation/Images/HandInteractionExamples/MRTK_Examples_BoundingBox.png) -## Manipulation Handler -See [Manipulation Handler](README_ManipulationHandler.md) page for the details. +## Manipulation handler ## +See [manipulation handler](README_ManipulationHandler.md) page for the details. ![Hand Interaction Examples](../Documentation/Images/HandInteractionExamples/MRTK_Examples_Manipulation.png) -## Slate -See [Slate](README_Slate.md) page for the details. +## Slate ## +See [slate](README_Slate.md) page for the details. ![Hand Interaction Examples](../Documentation/Images/HandInteractionExamples/MRTK_Examples_Slate.png) -## System Keyboard -See [System Keyboard](README_SystemKeyboard.md) page for the details. +## System keyboard ## +See [system keyboard](README_SystemKeyboard.md) page for the details. ![Hand Interaction Examples](../Documentation/Images/HandInteractionExamples/MRTK_Examples_Keyboard.png) diff --git a/Documentation/README_HandJointChaser.md b/Documentation/README_HandJointChaser.md new file mode 100644 index 00000000000..ba78c6f0149 --- /dev/null +++ b/Documentation/README_HandJointChaser.md @@ -0,0 +1,15 @@ +# Hand Joint Chaser Example +![](../Documentation/Images/HandJointChaser/MRTK_HandJointChaser_Main.jpg) +This example scene demonstrates how to use Solver to attach objects to the hand joints. + +## Example scene +You can find the example scene **HandJointChaserExample** scene under: +[MixedRealityToolkit.Examples/Demos/Input/Scenes/](/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes) + +## Solver Handler +Click **Tracked Object To Reference** and select **Hand Joint Left** or **Hand Joint Right**. You will be able to see **Tracked Hand Joint** drop down. From the drop down list, you can select specfic joint to track. +This example scene uses Radial View Solver to make an object follow the target object. See [Solver](README_Solver.md) page for more details. + + +![](../Documentation/Images/HandJointChaser/MRTK_Solver_HandJoint.jpg) + diff --git a/Documentation/README_Interactable.md b/Documentation/README_Interactable.md index d7ba612fb8f..a2bec645722 100644 --- a/Documentation/README_Interactable.md +++ b/Documentation/README_Interactable.md @@ -1,145 +1,149 @@ -# Interactable +# Interactable # + ![Interactable](../Documentation/Images/Interactable/InteractableExamples.png) -With Interactable script, you can make any object interactable with differentiated visual state. For example, you can change color of the object on focus or make it bigger on pressed state. Since you can have multiple themes that control different parts of the object, you can achieve sophisticated visual states including shader property changes. +With Interactable script, you can make any object interactable with differentiated visual state. For example, you can change color of the object on focus or make it bigger on pressed state. Since you can have multiple themes that control different parts of the object, you can achieve sophisticated visual states including shader property changes. In fact, most [interaction example scenes](README_HandInteractionExamples.md) revolve around interactions based on Interactables. + +## How to use interactables ## -## How to use Interactable -Add the Interactable Component to a GameObject +Simply add the [`Interactable.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Interactable.cs) component to a GameObject. ![Interactable](../Documentation/Images/Interactable/InteractableInspector_basicSteps.png) -1. A Collider must exist on the GameObject with the Interactable or the child of the Interactable for it to receive input. -2. Use the OnClick event to make something happen. -3. Add visual feedback by linking a Target to a Profile and assigning a Theme. +1. A collider must exist on the GameObject with the interactable or the child of the interactable for it to receive input. +2. Use the *OnClick* event to make something happen. +3. Add visual feedback by linking a target to a profile and assigning a theme. + +Interactable features can be extended using external components like `PhysicalPressEventRouter` which enables press events to drive some state changes in the interactable. +## Input settings ## -## Input Settings -The basic features allow for button style interactions, such as pointer focus and clicks, that maps to interaction states to drive themes which are setup through the Interactable profile. Controller or hand focus, down, up and click (both near and far) are handled. Functionality can be extended using external scripts that can set state manually. +The basic features allow for button style interactions, such as pointer focus and clicks, that maps to interaction states to drive themes which are setup through the interactable profile. Controller or hand focus, down, up and click (both near and far) are handled. Functionality can be extended using external scripts that can set state manually. -### Input Actions -Select the action, from the input configuration or controller mapping profile, that the Interactable should react to. -See the InputProfile or the DefaultMixedRealityInputActionsProfile for more on how Input Actions are setup and intended to be used in the application. +**Input Actions** +Select the action, from the input configuration or controller mapping profile, that the interactable should react to. +See [Overview of the input system in MRTK](./Input/Overview.md) for more on how input actions are setup and intended to be used in the application.   -### Enabled -Sets the Interactable's enabled state, which will disable some input handling and update the themes to reflect the current state which is disabled. -This is different from disabling input all together (using Enable Input) This means we have a button that would normally be interactive, but at this moment it is disabled (could be like a submit button waiting for all the required fields to be completed) and has a visual look and feel to denote it's disabled state. -  -### IsGlobal +**Enabled** +Sets the interactables enabled state, which will disable some input handling and update the themes to reflect the current state which is disabled. + +This is different from disabling input all together (using *Enable Input*). It means that a specific button that would normally be interactive will be disabled and has a visual look and feel to denote its disabled state. A typical example of this would be a submit button waiting for all the required input fields to be completed. + +**IsGlobal** Focus is not required to detect input actions, default behavior is false.   -### Voice Commands +**Voice Commands** A voice command to trigger an OnClick event. This will also trigger a quick state change to drive any themes visuals.   -Note: Make sure there is a unique voice command on each button. The Voice Recognizer is global (even if the Interactable isn't) and will not register the same voice command twice; in this case an error will be thrown. +Note: Make sure there is a unique voice command on each button. The voice recognizer is global (even if the interactable is not) and will not register the same voice command twice; in this case an error will be thrown.   -### Requires Gaze (Only available when the Voice Command field has a value) -The voice command requires the Interactable to have focus to listen for the voice command. -- There are several ways to use voice commands to trigger an interactable, be careful not to have multiple objects with the same voice command or there will be conflicts. -- Using the MRTK voice recognition profile or online speech service are other ways to enable voice commands. +**Requires Gaze (Only available when the voice command field has a value)** +The voice command requires the interactable to have focus to listen for the voice command. There are several ways to use voice commands to trigger an interactable, be careful not to have multiple objects with the same voice command or there will be conflicts. Using the MRTK voice recognition profile or online speech service are other ways to enable voice commands. -**Dev Tip**: Interactable Features can be extended using external components like PhysicalPressEventRouter which enables press events to drive some state changes in Interactable. - -## Example Scene -See demonstrations of Interactable in the InteractableExamples scene. -More examples can also be found in the HandInteractionExamples scene. - -## Profiles and Themes +## Profiles and Themes ## The profile will define how button content will be linked to and manipulated by themes, based on state changes. - - -Themes work a lot like Materials, they are ScriptableObjects that contain a list of data that will be assigned to an object based on the current state. Like Materials, they can be edited individually in the Project panel or through the Interactable profile. Editing a Theme through an Interactable will update its settings for all other Interactables using that theme. Themes can be extended to control any aspect of a GameObject with a few basic themes provided that can change color, scale, position or an combination of the three. +Themes work a lot like materials. They are scriptable objects that contain a list of data that will be assigned to an object based on the current state. Like materials, they can be edited individually in the project panel or through the interactable profile. Editing a theme through an interactable will update its settings for all other interactables using that theme. Themes can be extended to control any aspect of a GameObject with a few basic themes provided that can change color, scale, position or an combination of the three. - -### Default Themes -A default theme will be provided whenever an target object is added to a profile. It is not advised to edit the default theme, like in the case MRTK is updated, the theme could get overridden. A create Theme button is provided whenever the default theme is used to make it easier to create a new themes.  +A default theme will be provided whenever an target object is added to a profile. It is not advised to edit the default theme, like in the case MRTK is updated, the theme could get overridden. A "Create Theme" button is provided whenever the default theme is used to make it easier to create a new themes.  - -Example of the Default Theme. +*Example of the Default Theme* -Example of a Color Theme +*Example of a Color Theme* The best way to save a profile of a button, with all the themes and targets setup, is to create a prefab of your button. -_Note: Themes that effect mesh objects (Color or Shader Themes) are able to detect the shader properties in the material assigned to the target object. A drop down list of shader properties will define how the values of the theme are applied and is a convenience of this ability. Conflicts can arise if the same theme is used on objects that do not share the same material shader setting. Best practice is to create a separate theme for objects with different shaders; this is not an issue when using the same Color Theme on a text object and a mesh object, because all the shader properties are ignored on text objects._ +Note that themes that manipulate mesh objects (color or shader themes) are able to detect the shader properties in the material assigned to the target object. A drop down list of shader properties will define how the values of the theme are applied and is a convenience of this ability. Conflicts can arise if the same theme is used on objects that do not share the same material shader setting. Best practice is to create a separate theme for objects with different shaders; this is not an issue when using the same color theme on a text object and a mesh object, because all the shader properties are ignored on text objects. + ### Creating Toggles -Toggle or multi-step buttons can be created in the Profile using the Dimensions field. The idea is that each set of states can have multiple dimensions and in this case, when the Dimensions value is increased, slots for additional themes are provided for each item in the Profile. This allows for a Normal Theme and a Toggled Theme to be used depending if the Interactable is toggled or not.  +Toggle or multi-step buttons can be created in the Profile using the Dimensions field. The idea is that each set of states can have multiple dimensions and in this case, when the Dimensions value is increased, slots for additional themes are provided for each Target in the Profile. This allows for a Normal Theme and a Toggled Theme to be used depending if the Interactable is toggled or not.  +With dimensions being a numeric value, the options for adding themes or steps is endless. An example of a multi-step button with 3 dimensions is one that controls speed. We may only want to have the option for 3 values, Fast (1x), Faster (2x) or Fastest (3x). Dimensions are used to control the text or texture of the button for each individual speed setting, using 3 different themes for each of them. Developers can assess the *DimensionIndex* to determine which dimension is currently active. -With Dimensions being a numeric value, the options for adding themes or steps is endless. An example of a multi-step button with 3 dimensions is one that controls speed. We may only want to have the option for 3 values, Fast (1x), Faster (2x) or Fastest (3x). Using Dimensions we could control the text or texture of the button for each step using 3 different themes. **Developers can assess the DimensionIndex to determine which dimension is currently active.** +``` +//Access the current DimensionIndex +GetDimensionIndex(); +//Set the DimensionIndex - toggled +SetDimensionIndex(1); + +//Set the DimensinIndex - Untoggled +SetDimensionIndex(0); +``` + +Every click event will advance the DimensionIndex which will increase until the set Dimensions value is reached then cycle or reset to 0. A good example of working with Dimensions with code is the InteractiveToggleCollection found in the InteractableExamples demo scene on the RadialSet object. + + + +**See the Events section to learn about Toggle Events.** ## Events You can use Interactable to detect input events other than just OnClick. The Events feature provides a way to enable functionality to extend a button, but not really visual or needed to provide feedback based on state changes. - - -At the bottom of the Interactable component, click the Add Event button to reveal additional event options. A drop down menu contains the current list of supported events like toggle, hold or double tap. The idea of these events is to monitor Interactable state changes and define patterns to detect. When a pattern is detected, we can make something happen through the inspector or directly in code. +**At the bottom of the Interactable component, click the "Add Event" button to reveal additional event options.** A drop down menu contains the current list of supported events like toggle, hold or double tap. The idea of these events is to monitor Interactable state changes and define patterns to detect. When a pattern is detected, an action can be triggered through the inspector or directly in code. -Example of audio clip to play on click. There is an Audio Theme for playing audio clips for each state change, like focus. +*Example of audio clip to play on click. There is an audio theme for playing audio clips for each state change, like focus* - -Example of Toggle events +*Example of Toggle events* -Example of a hold event +*Example of a hold event* -Events can be placed on an object to monitor a separate Interactable. Use InteractableReceiver for a single event (from the list) or InteractableReceiverList for a list of events similar to the Interactable event list. +Events can be placed on an object to monitor a separate interactable. Use `InteractableReceiver` for a single event (from the list) or `InteractableReceiverList` for a list of events similar to the interactable event list. -Example of InteractableReceiver existing on a separate gameObject from the Interactable, referencing the Interactable for event and state updates. -Search Scope provides a preferred path to search for an Interactable if one is not explicitly assigned. +*Example of InteractableReceiver existing on a separate gameObject from the Interactable, referencing the Interactable for event and state updates* + +"Search Scope" provides a preferred path to search for an Interactable if one is not explicitly assigned. -## States +## States ## States are a list of terms that can be used to define interactions phases, like press or observed. -Interactable States provides two major roles. -- Establish a list of states that we care about. This list will be displayed in the themes and can also be referenced by the events. -- Controls how different interaction phases are ranked into states. For instance, a press state is also in a focused state, but the InteractableStates class will define it is a press state based on the ranking preferences setup in the State ScriptableObject. +Interactable states provide two major roles: +* Establish a list of states that are relevant for the Interactable. This list will be displayed in the themes and can also be referenced by the events. +* Controls how different interaction phases are ranked into states. For instance, a press state is also in a focused state, but the InteractableStates class will define it is a press state based on the ranking preferences setup in the State ScriptableObject. - The InteractableStates State Model will handle any state list with a layered ranking system, starting with the most isolated state and ending with the state that could contain all other states. -The DefaultInteractableStates list contains 4 states -- Default - nothing is happening, this is the most isolated base state. If anything does happen, it should over rule this state. -- Focus - the object is being pointed at. This is a single state, no other states are currently set, but it will out rank Default. -- Press - the object is being pointed at and a button or hand is pressing. The Press state out ranks Default and Focus. -- Disabled - the button should not be interactive and visual feedback will let the user know for some reason this button is not usable at this time. In theory, the disabled state could contain all other states, but when Enabled is turned off, the Disabled state trumps all other states. +The DefaultInteractableStates list contains 4 states: +**Default**: Nothing is happening, this is the most isolated base state. If anything does happen, it should over rule this state. +**Focus**: The object is being pointed at. This is a single state, no other states are currently set, but it will out rank Default. +**Press**: The object is being pointed at and a button or hand is pressing. The Press state out ranks Default and Focus. +**Disabled**: The button should not be interactive and visual feedback will let the user know for some reason this button is not usable at this time. In theory, the disabled state could contain all other states, but when Enabled is turned off, the Disabled state trumps all other states. A bit value (#) is assigned to the state depending on the order in the list. - -## Extending Themes -Extend InteractableThemeBase to create a new theme that will show up in the Theme Property drop-down list. Themes can be created to control anything based on state changes. We could have a custom component on a GameObject that is driven by a custom theme with the values for each state being set in the inspector. +## Extending themes ## +Extend `InteractableThemeBase` to create a new theme that will show up in the theme property drop-down list. Themes can be created to control anything based on state changes. We could have a custom component on a GameObject that is driven by a custom theme with the values for each state being set in the inspector. Setup the configuration of the theme settings in the constructor. -``` +``` csharp public NewCustomTheme() {     Types = new Type[] { typeof(Transform) }; @@ -155,17 +159,16 @@ public NewCustomTheme() } ``` -- Name -  the display name of the property, this will display next to the property field under each state title -- Types - allow filtering based on components on the object. In this case, this theme will show up in the list when assigned to an object with a Transform -- Name - the name that will show up in the inspector -- ThemeProperties - a list of properties that theme will store to be used when the state changes. +**Name**: The display name of the property, this will display next to the property field under each state title. +**Types**: Allow filtering based on components on the object. In this case, this theme will show up in the list when assigned to an object with a Transform. +**Name**: The name that will show up in the inspector. +**ThemeProperties**: A list of properties that theme will store to be used when the state changes. -Each Theme Property has a name, type (so we know what type of fields we want to display for each state), a set of values for each state and a default value for the fields. -We can also choose to hide the state fields in the inspector, if the theme does not need them. +Each Theme Property has a name, type (defining the fields to display for each state), a set of values for each state and a default value for the fields. The state fields can also be hidden in the inspector, if the theme does not require them to be visible. Override Init to run any startup code, that needs references to the Host GameObject. -``` +``` csharp public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property) { InteractableThemePropertyValue start = new InteractableThemePropertyValue(); @@ -174,10 +177,9 @@ public override InteractableThemePropertyValue GetProperty(InteractableThemeProp } ``` -GetProperty should grab the current property of the Host. This will be used for animation later. -Property is provided in case the current value depends on a cached property value. In this case we are grabbing the current scale. +GetProperty should grab the current property of the Host. This will be used for animation later. Property is provided in case the current value depends on a cached property value. In the example below on the current scale. -``` +``` csharp public override void SetValue(InteractableThemeProperty property, int index, float percentage) { Host.transform.localScale = Vector3.Lerp(property.StartValue.Vector3, property.Values[index].Vector3, percentage); @@ -185,26 +187,23 @@ public override void SetValue(InteractableThemeProperty property, int index, flo ``` The SetValue function is used to set the property value based on the current state. -- Property - a list of property values per state, set through the theme inspector. -- Index - correlates to the current state. -- Percentage - a float value between 0 and 1. It will be the eased value if an Animation curve is used. +**Property**: A list of property values per state, set through the theme inspector. +**Index**: Correlates to the current state. +**Percentage**: A float value between 0 and 1. It will be the eased value if an Animation curve is used. Custom Settings added to the new class will also be displayed in the inspector. If there are properties that need to be exposed in the inspector but do not need to be based on states, they should be added to the Custom Settings list. - -# Extending Events +## Extending events ## Like Themes, events can be extended to detect any state pattern or to expose functionality.  -Custom events can be created and used in two main ways -- Extend ReceiverBase to create a custom event that will show up in the dropdown list of event types. A Unity Event is provided by default, but additional Unity Events can be added or the event can be set to hide UnityEvents. -This functionality allows a designer to work with an engineer on a project to create a custom event that the designer or implementer to setup in the editor. -- Extend ReceiverBaseMonoBehavior to create a completely custom event component that can reside on the Interactable or another object. The ReceiverBaseMonoBehavior will reference the Interactable to detect state changes. -This approach is the most direct for engineers that do not want to work through the inspector. +Custom events can be created and used in two main ways: +* Extend `ReceiverBase` to create a custom event that will show up in the dropdown list of event types. A Unity event is provided by default, but additional Unity events can be added or the event can be set to hide Unity events. This functionality allows a designer to work with an engineer on a project to create a custom event that the designer or implementer to setup in the editor. +* Extend `ReceiverBaseMonoBehavior` to create a completely custom event component that can reside on the interactable or another object. The `ReceiverBaseMonoBehavior` will reference the interactable to detect state changes. This approach is the most direct for engineers that do not want to work through the inspector. -### Option 1: Extend ReceiverBase -MixedRealityToolkit.Examples contains an example extension of ReceiverBase to display status information about the Interactable. +### Example for extending `ReceiverBase` ### +`MixedRealityToolkit.Examples` contains an example extension of ReceiverBase to display status information about the interactable. -``` +``` csharp public CustomInteractablesReceiver(UnityEvent ev) : base(ev) { Name = "CustomEvent"; @@ -212,10 +211,9 @@ public CustomInteractablesReceiver(UnityEvent ev) : base(ev) } ``` -**OnUpdate** is an abstract method that can be used to detect patterns. Here is an example of accessing all the states of the Interactable. -Though there is a definite state that is defined with state.CurrentState(), the state object has a reference to all other states and their values. +*OnUpdate* is an abstract method that can be used to detect patterns. Here is an example of accessing all the states of the interactable. Though there is a definite state that is defined with `state.CurrentState()`, the state object has a reference to all other states and their values. -``` +``` csharp public override void OnUpdate(InteractableStates state, Interactable source) { if (state.CurrentState() != lastState) @@ -247,9 +245,9 @@ public override void OnUpdate(InteractableStates state, Interactable source) } ``` -Two Interactable event methods are also available if driving functionality from OnClick or OnVoiceCommand is needed. +Two interactable event methods are also available if driving functionality from *OnClick* or *OnVoiceCommand* is needed. -``` +``` csharp public virtual void OnVoiceCommand(InteractableStates state, Interactable source, string command, int index = 0, int length = 1) { // voice command called @@ -260,12 +258,10 @@ public virtual void OnClick(InteractableStates state, Interactable source, IMixe } ``` -## Extending States -The functionality of how states are ranked can be overridden by extending InteractableStates class. - -Override the CompareStates method to manually control the ranking. +## Extending states ## +The functionality of how states are ranked can be overridden by extending `InteractableStates` class. Override the `CompareStates` method to manually control the ranking. -``` +``` csharp public override State CompareStates() { int bit = GetBit(); @@ -280,8 +276,4 @@ public override State CompareStates() } return currentState; } -``` - - - - +``` \ No newline at end of file diff --git a/Documentation/README_MRTKStandardShader.md b/Documentation/README_MRTKStandardShader.md new file mode 100644 index 00000000000..256088f96d2 --- /dev/null +++ b/Documentation/README_MRTKStandardShader.md @@ -0,0 +1,114 @@ +# MRTK Standard Shader + +![Standard shader examples](../Documentation/Images/MRTKStandardShader/MRTK_StandardShader.jpg) + +MRTK Standard shading system utilizes a single, flexible shader that can achieve visuals similar to Unity's Standard Shader, implement [Fluent Design System](https://www.microsoft.com/design/fluent/) principles, and remain performant on mixed reality devices. + +## Example Scenes + +You can find the shader material examples in the **MaterialGallery** scene under: +[MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/](https://github.com/microsoft/MixedRealityToolkit-Unity/tree/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes) All materials in this scene are using the MRTK/Standard shader. + +![materialgallery](../Documentation/Images/MRTKStandardShader/MRTK_MaterialGallery.jpg) + +You can find a comparison scene to compare and test the MRTK/Standard shader against the Unity/Standard shader example in the **StandardMaterialComparison** scene under: [MixedRealityToolkit.Examples/Demos/StandardShader/Scenes/](https://github.com/microsoft/MixedRealityToolkit-Unity/tree/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/StandardShader/Scenes) + +![comparison](../Documentation/Images/MRTKStandardShader/MRTK_StandardMaterialComparison.gif) + +## Architecture + +The MRTK/Standard shading system is an "uber shader" that uses [Unity's shader program variant feature](https://docs.unity3d.com/Manual/SL-MultipleProgramVariants.html) to auto-generate optimal shader code based on material properties. When a user selects material properties in the material inspector they only incur performance cost for features they have enabled. + +A custom material inspector exists for the MRTK/Standard shader called **MixedRealityStandardShaderGUI.cs**. The inspector automatically enables/disables shader features based on user selection and aides in setting up render state. For more information about each feature please hover over each property in the Unity Editor for a tooltip. + +![materialinspector](../Documentation/Images/MRTKStandardShader/MRTK_MaterialInspector.jpg) + +## Lighting + +The MRTK/Standard uses a simple approximation for lighting. Because this shader does not calculate for physical correctness and energy conservation, it renders quickly and efficient. Blinn-Phong is the primary lighting technique which is blended with Fresnel and image based lighting to approximate physically based lighting. The shader supports the following lighting techniques: + +### Directional Light + +The shader will respect the direction, color, and intensity of the first Unity Directional Light in the scene (if enabled). Dynamic point lights, spot lights, or any other Unity light will not be considered in real time lighting. + +### Spherical Harmonics + +The shader will use Light Probes to approximate lights in the scene using [Spherical Harmonics](https://docs.unity3d.com/Manual/LightProbes-TechnicalInformation.html) if enabled. Spherical harmonics calculations are performed per vertex to reduce calculation cost. + +### Lightmapping + +For static lighting the shader will respect lightmaps built by Unity's [Lightmapping system](https://docs.unity3d.com/Manual/Lightmapping.html) simply mark the renderer as static (or lightmap static) to use lightmaps. + +### Hover Light + +A Hover Light is a Fluent Design System paradigm that mimics a "point light" hovering near the surface of an object. Often used for far away cursor lighting the application can control the properties of a Hover Light via the [**HoverLight.cs**](xref:Microsoft.MixedReality.Toolkit.Utilities.HoverLight). Up to 3 Hover Lights are supported at a time. + +### Proximity Light + +A Proximity Light is a Fluent Design System paradigm that mimics a "gradient inverse point light" hovering near the surface of an object. Often used for near cursor lighting the application can control the properties of a Proximity Light via the [**ProximityLight.cs**](xref:Microsoft.MixedReality.Toolkit.Utilities.ProximityLight). Up to 2 Proximity Lights are supported at a time. + +## Lightweight Scriptable Render Pipeline Support + +The MRTK contains an upgrade path to allow developers to utilize Unity's Lightweight Scriptable Render Pipeline (LWRP) with MRTK shaders. Tested in Unity 2019.1.1f1 and Lightweight RP 5.7.2 package. or instructions on getting started with the LWRP please see [this page](https://docs.unity3d.com/Packages/com.unity.render-pipelines.lightweight@5.10/manual/getting-started-with-lwrp.html). + +To perform the MRTK upgrade select: **Mixed Reality Toolkit -> Utilities -> Upgrade MRTK Standard Shader for Lightweight Render Pipeline** + +![lwrpupgrade](../Documentation/Images/MRTKStandardShader/MRTK_LWRPUpgrade.jpg) + +After the upgrade occurs the MRTK/Standard shader will be altered and any magenta (shader error) materials should be fixed. To verify the upgrade successfully occurred please check the console for: **Upgraded Assets/MixedRealityToolkit/StandardAssets/Shaders/MixedRealityStandard.shader for use with the Lightweight Render Pipeline.** + +## Texture Combiner + +To improve parity with the Unity Standard shader per pixel metallic, smoothness, emissive, and occlusion values can all be controlled via [channel packing](http://wiki.polycount.com/wiki/ChannelPacking). For example: + +![channelmap](../Documentation/Images/MRTKStandardShader/MRTK_ChannelMap.gif) + +When you use channel packing, you only have to sample and load one texture into memory instead of four separate ones. When you write your texture maps in a program like Substance or Photoshop, you can pack hand pack them like so: + +| Channel | Property | +|---------|----------------------| +| Red | Metallic | +| Green | Occlusion | +| Blue | Emission (Greyscale) | +| Alpha | Smoothness | + +Or, you can use the MRTK Texture Combiner Tool. To open the tool select: **Mixed Reality Toolkit -> Utilities -> Texture Combiner** which will open the below window: + +![texturecombiner](../Documentation/Images/MRTKStandardShader/MRTK_TextureCombiner.jpg) + +This windows can be automatically filled out by selecting a Unity Standard shader and clicking "Autopopulate from Standard Material." Or, you can manually specify a texture (or constant value) per red, green, blue, or alpha channel. The texture combination is GPU accelerated and does not require the input texture to be CPU accessible. + +## Additional Feature Documentation +Below are extra details on a handful of features details available with the MRTK/Standard shader. + +Performant plane, sphere, and box shape clipping with the ability to specify which side of the primitive to clip against (inside or outside). + +![primitiveclipping](../Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClipping.gif) + +[**ClippingPlane.cs**](xref:Microsoft.MixedReality.Toolkit.Utilities.ClippingPlane), [**ClippingSphere.cs**](xref:Microsoft.MixedReality.Toolkit.Utilities.ClippingSphere), and [**ClippingBox.cs**](xref:Microsoft.MixedReality.Toolkit.Utilities.ClippingBox) can be used to easily control clipping primitive properties. + +![primitiveclippinggizmos](../Documentation/Images/MRTKStandardShader/MRTK_PrimitiveClippingGizmos.gif) + +Built in configurable stencil test support to achieve a wide array of effects. Such as portals: + +![stenciltest](../Documentation/Images/MRTKStandardShader/MRTK_StencilTest.gif) + +Instanced color support to give thousands of GPU instanced meshes unique material properties: + +![instancedproperties](../Documentation/Images/MRTKStandardShader/MRTK_InstancedProperties.gif) + +Triplanar mapping is a technique to programmatically texture a mesh. Often used in terrain, meshes without UVs, or difficult to unwrap shapes. This implementation supports world or local space projection, the specification of blending smoothness, and normal map support. Note, each texture used requires 3 texture samples, so please use sparingly in performance critical situations. + +![triplanar](../Documentation/Images/MRTKStandardShader/MRTK_TriplanarMapping.gif) + +A checkbox to control albedo optimizations. As an optimization albedo operations are disabled when no albedo texture is specified. To control this (as requested by this blog post: http://dotnetbyexample.blogspot.com/2018/10/workaround-remote-texture-loading-does.html) Simply check this box: + +![albedoassignment](../Documentation/Images/MRTKStandardShader/MRTK_AlbedoAssignment.jpg) + +Per pixel clipping textures, local edge based anti aliasing, and normal map scaling are supported. + +![normalmapscale](../Documentation/Images/MRTKStandardShader/MRTK_NormalMapScale.gif) + +Vertex extrusion in world space. Useful for visualizing extruded bounding volumes or transitions in/out meshes. + +![normalmapscale](../Documentation/Images/MRTKStandardShader/MRTK_VertexExtrusion.gif) diff --git a/Documentation/README_ManipulationHandler.md b/Documentation/README_ManipulationHandler.md index 20866023fa9..312b3586972 100644 --- a/Documentation/README_ManipulationHandler.md +++ b/Documentation/README_ManipulationHandler.md @@ -1,83 +1,92 @@ -# Manipulation Handler -![Manipulation Handler](../Documentation/Images/ManipulationHandler/MRTK_Manipulation_Main.png) +# Manipulation handler # -The ManipulationHandler script allows for an object to be made movable, scalable, and rotatable using one or two hands. Manipulation can be restricted so that it only allows certain kinds of transformation. -The script works with various types of inputs including HoloLens 2 articulated hand input, hand-rays, HoloLens gesture input, and immersive headset motion controller input. +![Manipulation handler](../Documentation/Images/ManipulationHandler/MRTK_Manipulation_Main.png) +The *ManipulationHandler* script allows for an object to be made movable, scalable, and rotatable using one or two hands. Manipulation can be restricted so that it only allows certain kinds of transformation. The script works with various types of inputs including HoloLens 2 articulated hand input, hand-rays, HoloLens (1st gen) gesture input, and immersive headset motion controller input. -## How to use Manipulation Handler +## How to use the manipulation handler ## -In the inspector panel, you will be able to find various options that you can configure. Make sure to add a Collidable to your object -- the collidable should match the grabbable bounds of the object. To make it respond to near articulated hand input, you need to add the NearInteractionGrabbable.cs script as well.  +Add the [`ManipulationHandler.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs) component to a GameObject. + +Make sure to also add a collidable to the object, matching its grabbable bounds. To make the object respond to near articulated hand input, add the [`NearInteractionGrabbable.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Services/InputSystem/NearInteractionGrabbable.cs) script as well.  ![Manipulation Handler](../Documentation/Images/ManipulationHandler/MRTK_ManipulationHandler_Howto.png) +## Inspector properties ## -## Inspector Properties -### Host Transform +**Host Transform** Transform that will be dragged. Defaults to the object of the component. -### Manipulation Type +**Manipulation Type** Specifies whether the object can be manipulated using one hand, two hands, or both. -* One handed only -* Two handed only -* One and Two handed -### Two Handed Manipulation Type +* *One handed only* +* *Two handed only* +* *One and Two handed* -![Manipulation Handler](../Documentation/Images/ManipulationHandler/MRTK_ManipulationHandler_TwoHanded.jpg) +**Two Handed Manipulation Type** + +* *Scale*: Only scaling is allowed. +* *Rotate*: Only rotation is allowed. +* *Move Scale*: Moving and scaling is allowed. +* *Move Rotate*: Moving and rotating is allowed. +* *Rotate Scale*: Rotating and scaling is allowed. +* *Move Rotate Scale*: Moving, rotating and scaling is allowed. -* Scale -* Rotate -* Move Scale -* Move Rotate -* Rotate Scale -* Move Rotate Scale +![Manipulation Handler](../Documentation/Images/ManipulationHandler/MRTK_ManipulationHandler_TwoHanded.jpg) -### Allow Far Manipulation +**Allow Far Manipulation** Specifies whether manipulation can be done using far interaction with pointers.  -### One Hand Rotation Mode Near -Specifies how the object will behave when it is being grabbed with one hand/controller near. +**One Hand Rotation Mode Near** +Specifies how the object will behave when it is being grabbed with one hand / controller near. + +**One Hand Rotation Mode Far** +Specifies how the object will behave when it is being grabbed with one hand / controller at distance. -### One Hand Rotation Mode Far -Specifies how the object will behave when it is being grabbed with one hand/controller at distance. +**One Hand Rotation Mode Options** +Specifies how the object will rotate when it is being grabbed with one hand. -### One Hand Rotation Mode Options -* Maintain original rotation - does not rotate object as it is being moved -* Maintain rotation to user - maintains the object's original rotation to the user -* Gravity aligned maintain rotation to user - maintains object's original rotation to user, but makes the object vertical. Useful for bounding boxes. -* Face user - ensures object always faces the user. Useful for slates/panels. -* Face away from user - ensures object always faces away from user. Useful for slates/panels that are configured backwards. -* Rotate about object center - Only works for articulated hands/controllers. Rotate object using rotation of the hand/controller, but about the object center point. Useful for inspecting at a distance. -* Rotate about grab point - Only works for articulated hands/controllers. Rotate object as if it was being held by hand/controller. Useful for inspection. +* *Maintain original rotation*: Does not rotate object as it is being moved +* *Maintain rotation to user*: Maintains the object's original rotation to the user +* *Gravity aligned maintain rotation to user*: Maintains object's original rotation to user, but makes the object vertical. Useful for bounding boxes. +* *Face user*: Ensures object always faces the user. Useful for slates/panels. +* *Face away from user*: Ensures object always faces away from user. Useful for slates/panels that are configured backwards. +* *Rotate about object center*: Only works for articulated hands/controllers. Rotate object using rotation of the hand/controller, but about the object center point. Useful for inspecting at a distance. +* *Rotate about grab point*: Only works for articulated hands/controllers. Rotate object as if it was being held by hand/controller. Useful for inspection. -### Release Behavior +**Release Behavior** When an object is released, specify its physical movement behavior. Requires a rigidbody component to be on that object. -* Nothing -* Everything -* Keep Velocity -* Keep Angular Velocity - -### Constraints on Rotation -* None -* X-Axis Only -* Y-Axis Only -* Z-Axis Only - -### Constraints on Movement -* None -* Fix distance from head - -### Smoothing Active + +* *Nothing* +* *Everything* +* *Keep Velocity* +* *Keep Angular Velocity* + +**Constraints on Rotation** +Specifies on which axis the object will rotate when interacted with. + +* *None* +* *X-Axis Only* +* *Y-Axis Only* +* *Z-Axis Only* + +**Constraints on Movement** +* *None* +* *Fix distance from head* + +**Smoothing Active** Specifies whether smoothing is active. -### Smoothing Amount One Hand +**Smoothing Amount One Hand** Amount of smoothing to apply to the movement, scale, rotation. Smoothing of 0 means no smoothing. Max value means no change to value. -### Events -* OnManipulationStarted - Fired when manipulation starts -* OnManipulationEnded - Fires when the manipulation ends -* OnHoverStarted - Fires when a hand / controller hovers the manipulatable, near or far -* OnHoverEnded - Fires when a hand / controller un-hovers the manipulatable, near or far +## Events ## +Manipulation handler provides the following events: + +* *OnManipulationStarted*: Fired when manipulation starts. +* *OnManipulationEnded*: Fires when the manipulation ends. +* *OnHoverStarted*: Fires when a hand / controller hovers the manipulatable, near or far. +* *OnHoverEnded*: Fires when a hand / controller un-hovers the manipulatable, near or far. diff --git a/Documentation/README_ObjectCollection.md b/Documentation/README_ObjectCollection.md index 7a8d226268a..1f662aee629 100644 --- a/Documentation/README_ObjectCollection.md +++ b/Documentation/README_ObjectCollection.md @@ -1,33 +1,34 @@ -# Object Collection -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Main.png) +# Object collection # -Object collection is a script which helps you lay out an array of objects in predefined three-dimensional shapes. It supports five different surface styles - plane, cylinder, sphere, scatter, and radial. You can adjust the radius, size and the space between the items. Since it supports any object in Unity, you can use it to layout both 2D and 3D objects. +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Main.png) -## Object collection examples ## -Periodic Table of the Elements is an example app that demonstrates how Object collection works. It uses Object collection to layout the 3D element boxes in different shapes. +Object collection is a script to help lay out an array of objects in predefined three-dimensional shapes. It supports five different surface styles - plane, cylinder, sphere, scatter, and radial. Radius, size and the space between the items can be adjusted. Since it supports any object in Unity, it can be used to layout both 2D and 3D objects. + +## How to use an object collection ## + +To create a collection, create an empty GameObject and assign the [`BaseObjectCollection.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/BaseObjectCollection.cs) script to it. Any object(s) can be added as a child of the GameObject. Once finished adding child objects, click the *Update Collection* button in the inspector panel to generate the object collection. The objects will be laid out in the scene according to the selected surface type. -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Types.jpg) +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Unity.jpg) + +## Object collection examples ## -### 3D Objects ### +The [HandInteractionExamples.unity](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity) example scene contains various examples of object collection types. -You can use Object collection to layout imported 3D objects. The example below shows the plane and cylindrical layouts of 3D chair model objects using Object collection. +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_ExampleScene1.jpg) -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_3DObjects.jpg) +[Periodic table of the elements](https://github.com/Microsoft/MRDesignLabs_Unity_PeriodicTable) is an example app that demonstrates how object collections work. It uses object collection to layout the 3D element boxes in different shapes. -### 2D Objects ### +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Types.jpg) -You can also use 2D images with Object collection. For example, you can easily display multiple images in grid style using Object collection. +## Object collection types ## -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Layout_2DImages.jpg) +**3D objects** +An object collection can be used to layout imported 3D objects. The example below shows the plane and cylindrical layouts of 3D chair model objects using a collection. -## Ways to use Object collection ## -You can find the examples in the scene **ObjectCollection_Examples.unity**. In this scene, you can find the **ObjectCollection.cs** script under **MixedRealityToolkit.SDK\Features\UX\Scripts\Collections** +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_3DObjects.jpg) -1. To create a collection, simply create an empty GameObject and assign the ObjectCollection.cs script to it. -2. Then you can add any object(s) as a child of the GameObject. -3. Once you finished adding a child object, click the **Update Collection** button in the Inspector Panel. -4. You will then see the object(s) laid out in selected Surface Type. +**2D Objects** -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Unity.jpg) +An object collection can also be crated from 2D images. For example, multiple images can be placed in a grid style. -![Object Collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_ExampleScene1.jpg) \ No newline at end of file +![Object collection](../Documentation/Images/ObjectCollection/MRTK_ObjectCollection_Layout_2DImages.jpg) diff --git a/Documentation/README_Pointers.md b/Documentation/README_Pointers.md index fda07b74da9..cfd62e635b2 100644 --- a/Documentation/README_Pointers.md +++ b/Documentation/README_Pointers.md @@ -1,35 +1,34 @@ -# Pointers +# Pointers # + ![Pointer](../Documentation/Images/Pointers/MRTK_Pointer_Main.png) -A pointer is something attached to a controller that gives focus and dispatches inputs to the game object it is pointing to. Learn more about the MRTK input system [here](./Input/Overview.md), and a scripting/engineering overview of pointers [here](./Input/Pointers.md). +A [pointer](../Documentation/Input/Pointers.md) is something attached to a controller that gives focus and dispatches [inputs](../Documentation/Input/Overview.md) to the game object it is pointing to. -For a game object to be able to receive focus it must have a collider (so it can be hit by physics raycasts) and belong to one of the layers defined in the Pointer Raycast Layer Masks in the Pointer Profile. +For a game object to be able to receive focus it must have a collider (so it can be hit by physics raycasts) and belong to one of the layers defined in the pointer raycast layer masks in the pointer profile. -Pointers are instantiated automatically at runtime when a new controller is detected. The pointers that are created for each controller type are defined in the _Pointer Options_ in the _Pointer Profile_. You can have more than one pointer attached to a controller; for example, with the default pointer profile, WMR controllers get both a line and a parabolic pointer for normal selection and teleportation respectively. Pointers communicate with each other to decide which one is active. +Pointers are instantiated automatically at runtime when a new controller is detected. The pointers that are created for each controller type are defined in the *pointer options* in the *pointer profile*. You can have more than one pointer attached to a controller; for example, with the default pointer profile, WMR controllers get both a line and a parabolic pointer for normal selection and teleportation respectively. Pointers communicate with each other to decide which one is active. -MRTK provides a set of pointer prefabs in _Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers_. You can use your own prefabs as long as they contain one of the pointer scripts in _Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers_ or any other script implementing `IMixedRealityPointer`. +MRTK provides a set of pointer prefabs in *Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Pointers*. You can use your own prefabs as long as they contain one of the pointer scripts in *Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers* or any other script implementing `IMixedRealityPointer`. ![Pointer Profile](../Documentation/Images/Pointers/MRTK_PointerProfile.jpg) -## MRTK Pointer Prefabs - -### Line Pointer - - +## MRTK pointer prefabs ## +**Line pointer** A line pointer is a ray attached to a controller. The line starts at the controller's base, and its pointing direction matches the pointing direction of the controller. + + Line pointers are commonly used when you have two controllers which have a position, and a pointing direction. For motion controllers like in Oculus, Vive, Windows Mixed Reality, the rotation will match the rotation of the controller. For other controllers like HoloLens 2 articulated hands, the rotation matches the system-provided pointing pose of the hand. - -### GGV Pointer +**GGV pointer** GGV stands for "Gaze, Gesture, Voice"[2](https://docs.microsoft.com/en-us/windows/mixed-reality/gaze). The GGV pointer's position and direction is driven by the head's position and rotation. The pointer is used to provide input that matches the HoloLens V1 input style of head gaze + airtap[3](https://docs.microsoft.com/en-us/windows/mixed-reality/gestures). -In the pointer profile you can see that the V1 HoloLens input system is provided for you via the mapping of "GGVHand" (V1 HoloLens hand) to the GGVPointer. +In the pointer profile you can see that the HoloLens V1 input system is provided for you via the mapping of "GGVHand" (V1 HoloLens hand) to the GGVPointer. @@ -37,50 +36,41 @@ You can also simulate the V1 HoloLens GGV behavior on HoloLens 2 by mapping the - - -### Grab Pointer / Sphere Pointer - - +**Grab pointer / sphere pointer** Grab pointer is used for near interactions, specifically for grabbing items near the hand / controller. -**NOTE:** Only items with _Near Interaction Grabbable_ components will respond to the sphere pointer. + -#### Sphere Pointer Properties -Sphere Cast Radius - The radius for the sphere used to query for grabbable objects. -Debug Mode - If true, draw the sphere that is used to query for grabbable objects +**NOTE:** Only items with *Near Interaction Grabbable* components will respond to the sphere pointer. +Sphere pointer properties: +* *Sphere Cast Radius*: The radius for the sphere used to query for grabbable objects. +* *Debug Mode*: If true, draw the sphere that is used to query for grabbable objects. -### Poke Pointer - - +**Poke pointer** Poke pointer is for near interactions, specifically for touching objects via the hand / controller. -**NOTE:** Only items with _Near Interaction Touchable_ components will respond to the poke pointer. + -#### Poke Pointer Properties -- distBack - how far input point can go behind surface before release event occurs -- distFront - how far input point needs to be in front of surface before press event occurs -- debounceThreshold - once touching, the distance back hand needs to be pulled from surface before a touch release occurs. +Only items with *Near Interaction Touchable* components will respond to the poke pointer. When configuring your *Near Interaction Touchable*, make sure to configure the *localForward* parameter to point out of the front of the button or other object you wish to make touchable. Also make sure that the touchable's *bounds* matches the bounds of your touchable object. -#### Configuring NearInteractionTouchable -When configuring your _Near Interaction Touchable_, make sure to configure the _localForward_ parameter to point out of the front of the button or other object you wish to make touchable. Also make sure that the touchable's _bounds_ matches the bounds of your touchable object. +Poke pointer properties: +* *distBack*: How far input point can go behind surface before release event occurs. +* *distFront*: How far input point needs to be in front of surface before press event occurs. +* *debounceThreshold*: Once touching, the distance back hand needs to be pulled from surface before a touch release occurs. Other parameters: +* *eventsToReceive*: If set to touch, the object will receive _OnTouchDown_ _OnTouchUpdate_ and _OnTouchUp_ events. If set to pointer, the object will receive _OnPointerDown_ and _OnPointerUp_ events. +* *touchableSurface*: Use this to help compute the bounds of the surface. Bounds will automatically adjust to the attached box collider, Unity UI element, or can be set manually by adjusting _bounds_. +* *visuals*: Game object used to render finger tip visual (the ring on finger, by default). +* *line*: Optional line to draw from fingertip to the active input surface. -- eventsToReceive - if set to Touch, the object will receive _OnTouchDown_ _OnTouchUpdate_ and _OnTouchUp_ events. If set to pointer, the object will receive _OnPointerDown_ and _OnPointerUp_ events. -- touchableSurface - use this to help compute the bounds of the surface. Bounds will automatically adjust to the attached BoxCollider, UnityUI element, or can be set manually by adjusting _bounds_. -- visuals - Game Object used to render finger tip visual (the ring on finger, by default) -- line - optional line to draw from fingertip to the active input surface. +**Mouse pointer** +Mouse pointer is used for interacting with the mouse. This pointer will only be used if the active input is a mouse. By default, the MRTK profile does not provide a mouse as an input provider, as mouse input is instead used to simulate hand input. You may add a mouse in your MRTK profile by modifying the *Registered Service Providers* in your MRTK profile. +![Mouse pointer](../Documentation/Images/Pointers/MRTK_MousePointer.jpg) +**Teleport pointer** +Teleport pointer is used for teleportation. This pointer will only be active when using a controller that supports teleportation (such as a motion controller like in Oculus, Vive, Windows Mixed Reality). -### Mouse pointer -![Mouse Pointer](../Documentation/Images/Pointers/MRTK_MousePointer.jpg) - -Mouse pointer is used for interacting with the mouse. This pointer will only be used if the active input is a mouse. By default, the MRTK Profile does not provide a mouse as an input provider, as mouse input is instead used to simulate hand input. You may add a mouse in your MRTK profily by modifying the _Registered Service Providers_ in your MRTK profile. - -### Teleport pointer - -Teleport pointer is used for teleportation. This pointer will only be active when using a controller that supports teleportation (such as a motion controller like in Oculus, Vive, Windows Mixed Reality). diff --git a/Documentation/README_Slate.md b/Documentation/README_Slate.md index c63fa49ec0f..1988ec9400e 100644 --- a/Documentation/README_Slate.md +++ b/Documentation/README_Slate.md @@ -1,46 +1,46 @@ -# Slate -![Slate](../Documentation/Images/Slate/MRTK_Slate_Main.png) +# Slate # -Thin window style control for the 2D content with grabbable title bar and 'Follow Me' and 'Close' buttons. You can scroll 2D content with articulated hand. +![Slate](../Documentation/Images/Slate/MRTK_Slate_Main.png) -## Structure -Slate control is composed of these elements. +The [`Slate.prefab`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Prefabs/Slate.prefab) offers a thin window style control for displaying 2D content, for example plain text or articles including media. It offers a grabbable title bar as well as *Follow Me* and *Close* functionality. The content window can be scrolled via articulated hand input. - +## How to use a slate control ## +A slate control is composed of the following elements: -- TitleBar -- Title -- BackPlate -- ContentQuad: Content is assigned as material. The example uses a sample material 'PanContent' -- Buttons +* **TitleBar**: The entire title bar on top of the slate. +* **Title**: The title area on the left side of the title bar. +* **Buttons**: The button area on the right side of the title bar. +* **BackPlate**: The back side of the slate. +* **ContentQuad**: Content is assigned as material. The example uses a sample material 'PanContent'. -## Bounding Box + -Slate control contains Bounding Box script for scaling and rotating. For more information on Bounding Box, please see [Bounding Box](README_BoundingBox.md) page. +## Bounding Box ## +A slate control contains a bounding box script for scaling and rotating. For more information on bounding box, please see the [Bounding box](README_BoundingBox.md) page. -## Buttons +## Buttons ## +A standard slate offers two buttons as default on the top right of the title bar: - +* **Follow Me**: Toggles an orbital solver components to make the slate object follow the user. +* **Close**: Disables the slate object. -- Follow Me: Toggles 'Orbital' solver components to make the Slate object follow the user. -- Close: Disables the Slate object + -## Scripts +## Scripts ## +In general, the `NearInteractionTouchable.cs` script must be attached to any object that is intended to receive touch events from the `IMixedRealityTouchHandler`. -### HandInteractionPan.cs -This script handles articulated hand input for touching and moving the content on the slate's **ContentQuad** +* [`HandInteractionPan.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPan.cs): This script handles articulated hand input for touching and moving the content on the slate's *ContentQuad*. + +* [`HandInteractionPanZoom.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs): In addition to the panning interaction, this script supports two-handed zooming. -#### SlateEnabler.cs -This script is intended to be used with DragEnabler. These two scripts allow the Slate and another object - for instance a Title Bar - to toggle their active status so that the Touch action only affects one at a time. This prevents interacting with the Slate to accidentally trigger the Title Bar behavior and vice versa. The SlateEnabler script is put on the GameObject that is NOT the Slate. Once attached- it toggles interaction with the Slate when the GameObject is being dragged or touched. + -#### DragEnabler.cs -This script is intended to be used with SlateEnabler. These two scripts allow the Slate and another object - for instance a Title Bar - to toggle their active status so that the Touch action only affects one at a time. The DragEnabler script is put on the Slate. Once attached, it toggles interaction with an accompanying object such as a Title Bar while the Slate is being touched. +* [`SlateEnabler.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/SlateEnabler.cs): This script is intended to be used with DragEnabler. These two scripts allow the slate and another object - for instance a title bar - to toggle their active status so that the touch action only affects one at a time. This prevents interacting with the slate to accidentally trigger the title bar behavior and vice versa. The slate enabler script is put on the game object that is not the slate. Once attached it toggles interaction with the slate when the game object is being dragged or touched. -#### NearInteractionTouchable.cs -This script must be attached to any object that is intended to receive Touch events from implemented the `IMixedRealityTouchHandler`. +* [`DragEnabler.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/DragEnabler.cs): This script is intended to be used with SlateEnabler. These two scripts allow the slate and another object - for instance a title bar - to toggle their active status so that the touch action only affects one at a time. The drag enabler script is put on the slate. Once attached, it toggles interaction with an accompanying object such as a title bar while the slate is being touched. diff --git a/Documentation/README_Sliders.md b/Documentation/README_Sliders.md index 0ddebb5840e..a3830df9716 100644 --- a/Documentation/README_Sliders.md +++ b/Documentation/README_Sliders.md @@ -1,10 +1,11 @@ # Sliders -![Sliders](../Documentation/Images/Sliders/MRTK_Sliders_Main.png) +![](../Documentation/Images/Slider/MRTK_UX_Slider_Main.jpg) Sliders are UI components that allow you to continuously change a value by moving a slider on a track. Currently the Pinch Slider can be moved by directly grabbing the slider, either directly or at a distance. Sliders work on AR and VR, using motion controllers, hands, or Gesture + Voice. -## Sliders Example -You can see an example usage of sliders in the file `Assets\MixedRealityToolkit.Examples\Demos\UX\Slider\Scenes\SliderExample.unity`. +## Example scene +You can find examples in the **SliderExample** scene under: +[MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes/](/Assets/MixedRealityToolkit.Examples/Demos/UX/Slider/Scenes) ## How to use Sliders Drag and drop the **PinchSlider** prefab into the scene hierarchy. If you want to modify or create your own slider, remember to do the following: @@ -34,6 +35,6 @@ You can directly move the starting and end points of the slider by moving the ha You can also specify the axis (in local space) of the slider via the _Slider Axis_ field -If you cannot use the handles, you can instead specify the start and end points of the slider via the _Slider Start Distance_ and _Slider End Distance_ fields. These specify start / end position of slider as a distance from the slider's center, in local coordinates. This means that once you set the slider start and end distaces as you want them, you can scale the slider to be smaller or larger without needing to update the start and end distances. +If you cannot use the handles, you can instead specify the start and end points of the slider via the _Slider Start Distance_ and _Slider End Distance_ fields. These specify start / end position of slider as a distance from the slider's center, in local coordinates. This means that once you set the slider start and end distances as you want them, you can scale the slider to be smaller or larger without needing to update the start and end distances. diff --git a/Documentation/README_Solver.md b/Documentation/README_Solver.md index bff9f2f88b1..b3fcec8c82b 100644 --- a/Documentation/README_Solver.md +++ b/Documentation/README_Solver.md @@ -1,40 +1,39 @@ -# Solver +# Solver # + ![Solver](../Documentation/Images/Solver/MRTK_Solver_Main.png) At this time, there is no easy, reliable way to specify the update order for Unity components. This can make it difficult to implement deterministic compound transformations. The solver system addresses this issue. -Building on this, Solvers offer a range of follow behaviors (eg tag-along) which can be safely stacked (eg, tag-along + surface magnetism + momentum). +Building on this, solvers offer a range of behaviors to attach objects to other objects or systems. One example would be a tag-along object that hovers in front of the user (based on the camera). A solver could also be attached to a controller and an object to make the object tag-along the controller. All solvers can be safely stacked, for example a tag-along behavior + surface magnetism + momentum. -## Basic architecture +## How to use a solver ## +First, add the desired behavior to an object by using the respective solver type. All solvers are based on [`Solver.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/Solver.cs). -The Solver system consists of three categories of scripts: -- **SolverBase**, the base abstract class for all Solvers to derive from. It provides state tracking, smoothing parameters and implementation, automatic solver system integration, and update order. -- **SolverHandler**, sets the reference object (eg, the main camera transform) and handles gathering of solver components and executes them in order. +The Solver system consists of three categories of scripts: -The following Solvers provide the building blocks for basic behavior: -- **Orbital**, locks to a specified position * offset from the referenced object. -- **ConstantViewSize**, scales to maintain a constant size relative to the view of the referenced object. -- **RadialView**, keeps the object within a view cone cast by the referenced object. -- **SurfaceMagnetism**, casts rays to Surfaces in the world, and align the object to that surface. -- **Momentum**, applies acceleration/velocity/friction to simulate momentum and springiness for an object being moved by other solvers/components. -- **InBetween**, keeps an object in between two tracked objects. - -When **UpdateLinkedTransform** is *true*, the solver will calculate position & orientation, but will not apply it. This lets other components use the transform values. +* **SolverBase**: The base abstract class that all solvers to derive from. It provides state tracking, smoothing parameters and implementation, automatic solver system integration, and update order. +* **SolverHandler**: Sets the reference object (eg, the main camera transform) and handles gathering of solver components and executes them in order. +The third category is the solver itself. The following solvers provide the building blocks for basic behavior: -## How do I add a solver to my scene? -- Add the desired behavior to an object. **SolverHandler** will be added automatically. You can mix and match, their order will change how the object behaves at runtime. -- **SolverHandler** has two fields for setting the reference object. You can choose a tracked object (such as the user camera or L/R motion controllers), or instead use the **TransformTarget** field which overrides any set tracked object. This enables you to have solvers reference any scene object. Yes, that means objects can have tag alongs and cast surface magnetism as well as tracked objects. Very handy. -- Surface magnetism scripts rely on a *LayerMask* for raycasting. As a recommendation, create a custom *LayerMask* (the example uses *Surface*). Note that using *default* or *everything* will result in UI components or cursors contributing to the solver. This can produce weird and unexpected behavior. Objects lurching toward you etc... +* **Orbital**: Locks to a specified position * offset from the referenced object. +* **ConstantViewSize**: Scales to maintain a constant size relative to the view of the referenced object. +* **RadialView**: Keeps the object within a view cone cast by the referenced object. +* **SurfaceMagnetism**, casts rays to surfaces in the world, and align the object to that surface. +* **Momentum**: Applies acceleration/velocity/friction to simulate momentum and springiness for an object being moved by other solvers/components. +* **InBetween**: Keeps an object in between two tracked objects. - +When a solver is used, the [`SolverHandler.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/SolverHandler.cs) will be added automatically. It has two fields for setting the reference object. You can choose a tracked object (such as the user camera or L/R motion controllers), or instead use the **TransformTarget** field which overrides any set tracked object. This enables you to have solvers reference any scene object. That means objects can have tag alongs and cast surface magnetism as well as tracked objects. -Example of using Orbital solver in the [Slate](README_Slate.md) prefab. +The surface magnetism scripts rely on a *LayerMask* for raycasting. As a recommendation, create a custom layer mask (the example uses *Surface*). Note that using *default* or *everything* will result in UI components or cursors contributing to the solver. Note that this can produce weird and unexpected behavior, for example objects lurching toward the user and so on. -## Expectations for Extending or Adding to the Solver System -- To create a new solver script, you will want to extend from the abstract base class, *Solver*. This will ensure your new solver will tie into the state tracking and execution from both Solver and SolverHandler. -- The power with solvers comes from them being modular in nature, so as you extend Solver, keep this in mind. Its better to have many small solver scripts vs. one big one. +When *UpdateLinkedTransform* is true, the solver will calculate position & orientation, but will not apply it. This lets other components use the transform values. + + +*Example of using Orbital solver in the [Slate](README_Slate.md) prefab.* +## Expectations for extending or adding to the solver system ## +To create a new solver script, you will want to extend from the abstract base class, *Solver*. This will ensure your new solver will tie into the state tracking and execution from both Solver and SolverHandler. The power with solvers comes from them being modular in nature, so as you extend Solver, keep this in mind. Its better to have many small solver scripts vs. one big one. -## Known Issues -- Sometimes solvers behave differently than one may expect based on the order in which they're executed. Previous solvers can change or even neutralize the behavior of earlier solvers. Try re-arranging their execution order if the settings on a particular solver aren't having the desired effect. +## Known Issues ## +Sometimes solvers behave differently than one may expect based on the order in which they're executed. Previous solvers can change or even neutralize the behavior of earlier solvers. Try re-arranging their execution order if the settings on a particular solver aren't having the desired effect. diff --git a/Documentation/README_SystemKeyboard.md b/Documentation/README_SystemKeyboard.md index ebe08a49d48..c44c32265a6 100644 --- a/Documentation/README_SystemKeyboard.md +++ b/Documentation/README_SystemKeyboard.md @@ -1,24 +1,28 @@ -# System Keyboard -![System Keyboard](../Documentation/Images/SystemKeyboard/MRTK_SystemKeyboard_Main.png) +# System keyboard # -Inside Unity app, you can invoke the system keyboard. HoloLens2's system keyboard supports direct hand interactions. +![System keyboard](../Documentation/Images/SystemKeyboard/MRTK_SystemKeyboard_Main.png) -## System Keyboard Example -You can see simple example of how to bring up system keyboard in `Assets\MixedRealityToolkit.Examples\Demos\HandTracking\Script\OpenKeyboard.cs` +A Unity application can invoke the system keyboard at any time. Note that the system keyboard will behave according to the target platform's capabilities, for example the keyboard on HoloLens 2 would support direct hand interactions, while the keyboard on HoloLens (1st gen) would support GGV[1](https://docs.microsoft.com/en-us/windows/mixed-reality/gaze). -## How to Invoke System Keyboard +## How to invoke the system keyboard ## +``` csharp public TouchScreenKeyboard keyboard; + ... public void OpenSystemKeyboard() { keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false, false); } +``` + +## How to read the input ## -## How to read text typed +``` csharp public TouchScreenKeyboard keyboard; + ... private void Update() @@ -28,4 +32,9 @@ You can see simple example of how to bring up system keyboard in `Assets\MixedRe keyboardText = keyboard.text; // Do stuff with keyboardText } - } \ No newline at end of file + } +``` + +## System keyboard example ## +You can see simple example of how to bring up system keyboard in +[`OpenKeyboard.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Script/OpenKeyboard.cs) diff --git a/Documentation/README_Tooltip.md b/Documentation/README_Tooltip.md index 61d4d68b39d..450dc5a9dd7 100644 --- a/Documentation/README_Tooltip.md +++ b/Documentation/README_Tooltip.md @@ -1,39 +1,27 @@ -# Tooltip -![Tooltip](../Documentation/Images/Tooltip/MRTK_Tooltip_Main.png) -This example scene demonstrates an implementation of the ToolTip user interface element. Tooltips are usually used to convey a hint or extra information upon closer inspection of an object. ToolTip can be used to explain button inputs on the motion controllers or to label objects in the physical environment. - -## Demo Video -The [example scene](https://gfycat.com/WarmOblongBilby) demonstrates two ways to display a Tooltip on an object. - -## Script files -[/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips) - -## Prefabs -[/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips) +# Tooltip # -## Example Scene -[/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes) - - +![Tooltip](../Documentation/Images/Tooltip/MRTK_Tooltip_Main.png) -In the scene file, you will be able to find various examples of ToolTip. First group on the left demonstrates the static ToolTip examples that are always visible. In the center, you can see the example of using multiple ToolTips on a single object. Each tooltip has different child object as a target object which works as an anchor. The group on the right shows the examples of dynamically spawning ToolTips. +This example scene demonstrates an implementation of the tooltip user interface element. Tooltips are usually used to convey a hint or extra information upon closer inspection of an object. Tooltips can be used to explain button inputs on the motion controllers or to label objects in the physical environment. +## Demo video ## -## Directly adding to the scene and attaching to an object -A ToolTip can be added directly to the Hierarchy and targeted to an object. To use this method: +The [example scene](https://gfycat.com/WarmOblongBilby) demonstrates two ways to display a tooltip on an object. -- Add a GameObject and a **ToolTip prefab** object to the Scene Hierarchy. -- In the ToolTip prefab's Inspector panel, expand the Tool Tip (Script). Select a TipState and set other settings. -- Enter the ToolTip text in the Text field. -- Expand the ToolTipConnector (Script). Drag the object that is to have the ToolTip from the Hierarchy into the field labelled Target. This attaches the ToolToolTip connector to the object. +## How to use a tooltip ## +A tooltip can be added directly to the hierarchy and targeted to an object. -This use of ToolTip assumes a ToolTip that is always showing or that is shown/hid in script by changing the TipState property of the ToolTip component. +To use this method simply add a game object and one of the [tooltip prefabs](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Tooltips) to the scene hierarchy. In the prefab's inspector panel, expand the *Tool Tip* (script). Select a tip state and configure the tooltip. Enter the respective text for the tool tip in the text field. Expand the *ToolTipConnector* (Script) and drag the object that is to have the tooltip from the hierarchy into the field labelled *Target*. This attaches the tooltip to the object. +This use assumes a tooltip that is always showing or that is shown / hidden via script by changing the tooltip state property of the tooltip component. -## Dynamically spawning -A ToolTip can be dynamically added to an object at runtime as well as pre-set to show and hide on a Tap or focus. Simply add the **ToolTipSpawner** script to any GameObject. In the script's Inspector, you can set delays for appearing and disappearing. You can also set a lifetime so that the ToolTip when spawned, will disappear after a duration. You can also set style properties such as Background in the ToolTipSpawner script. By default the ToolTip will be anchored to the object with the ToolTipSpawner script. You can override this by assigning a GameObject to the Anchor field. +## Dynamically spawning tooltips ## +A tooltip can be dynamically added to an object at runtime as well as pre-set to show and hide on a tap or focus. Simply add the [`ToolTipSpawner`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Tooltips/ToolTipSpawner.cs) script to any game object. Delays for appearing and disappearing can be set in the scripts inspector as well as a lifetime so that the tooltip will disappear after a set duration. Tooltips also feature style properties such as background visuals in the spawner script. By default the tooltip will be anchored to the object with the spawner script. This can be changed by assigning a GameObject to the anchor field. +## Tooltips on motion controllers ## +Tooltips can also be assigned to motion controllers, for example to explain the assigned actions of buttons. The example scene below also includes two tooltip groups on the bottom. These are layed out to match position of the buttons on the motion controllers. When motion controllers are detected, these tooltips will be attached automatically to the controllers, using the [`AttachToController.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/AttachToController.cs) script. -## Motion controller Tooltips -The scene also includes two tooltip groups on the bottom. These ToolTips are layed out to match position of the buttons on the motion controllers. When motion controllers are detected, these ToolTips will be attached automatically to the controllers, using [`AttachToController`](xref:Microsoft.MixedReality.Toolkit.Utilities.Solvers.AttachToController) script. +## Example scene ## +In the [example scene files](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.Examples/Demos/UX/Tooltips/Scenes), you will be able to find various examples of tooltips. First group on the left demonstrates the static tooltips examples that are always visible. In the center, you can see the example of using multiple tooltips on a single object. Each tooltip has different child object as a target object which works as an anchor. The group on the right shows the examples of dynamically spawning tooltips. + diff --git a/Documentation/Utilities/ExtensionServiceCreationWizard.md b/Documentation/Utilities/ExtensionServiceCreationWizard.md new file mode 100644 index 00000000000..aa9c0d8fd18 --- /dev/null +++ b/Documentation/Utilities/ExtensionServiceCreationWizard.md @@ -0,0 +1,38 @@ + +# Extension Service Creation Wizard + +Making the transition from singletons to services can be difficult. This wizard can supplement our other documentation and sample code by enabling devs to create new services with (roughly) the same ease as creating a new Monobehaviour script. To learn about creating services from scratch, see our [Guide to building Registered Services](https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/MixedRealityConfigurationGuide.html) (Coming soon). + +### Launching the wizard +Launch the wizard from the main menu: **MixedRealityToolkit/Utilities/Create Extension Service** - the wizard will then take you through the process of generating your service script, interface and profile class. + +### Editing your service script +By default, your new script assets will be generated in the MixedRealityToolkit.Extensions folder. Once you've completed the wizard, navigate here and open your new service script. + +Generated service scripts include some prompts similar to new Monbehavior scripts. They will let you know where to initialize and update your service. + + namespace Microsoft.MixedReality.Toolkit.Extensions + { + [MixedRealityExtensionService(SupportedPlatforms.WindowsStandalone|SupportedPlatforms.MacStandalone|SupportedPlatforms.LinuxStandalone|SupportedPlatforms.WindowsUniversal)] + public class NewService : BaseExtensionService, INewService, IMixedRealityExtensionService + { + private NewServiceProfile newServiceProfile; + + public NewService(IMixedRealityServiceRegistrar registrar, string name, uint priority, BaseMixedRealityProfile profile) : base(registrar, name, priority, profile) + { + newServiceProfile = (NewServiceProfile)profile; + } + + public override void Initialize() + { + // Do service initialization here. + } + + public override void Update() + { + // Do service updates here. + } + } + } + +If you chose to register your service in the wizard, all you have to do is edit this script and your service will automatically be updated. Otherwise you can read about [registering your new service here](https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/MixedRealityConfigurationGuide.html). \ No newline at end of file diff --git a/Documentation/howto_migrate.md b/Documentation/howto_migrate.md deleted file mode 100644 index 96edd7e4ce1..00000000000 --- a/Documentation/howto_migrate.md +++ /dev/null @@ -1,7 +0,0 @@ -# How to ... -This readme is intended to document any questions developers might have around how to achieve certain things using the MixedRealityToolkit-vNext. - -## How to migrate from the old MixedRealityToolkit to the vNext? -For now, this should be treated like a completely different project and highly experimental while it's being constructed. -For the final version, there will be a migration back for basic and advanced users alike. - diff --git a/Documentation/toc.yml b/Documentation/toc.yml index 99102b01589..9e46387426c 100644 --- a/Documentation/toc.yml +++ b/Documentation/toc.yml @@ -1,21 +1,15 @@ - name: About MRTK items: - - name: MRTK v2 - href: MRTK-vNext.md - name: Authors href: Authors.md - - name: Mixed Reality Services - href: MixedRealityServices.md -- name: How-tos - href: howto_migrate.md +- name: Getting Started with MRTK + href: GettingStartedWithTheMRTK.md + items: + - name: Upgrading from the HoloToolkit (HTK) + href: HTKToMRTKPortingGuide.md +- name: Feature Overviews + href: MixedRealityServices.md items: - - name: Getting Started - href: GettingStartedWithTheMRTK.md - items: - - name: Downloading MRTK - href: DownloadingTheMRTK.md - - name: Upgrading from the HoloToolkit (HTK) - href: HTKToMRTKPortingGuide.md - name: Core Features items: - name: Packages @@ -23,13 +17,6 @@ items: - name: Mixed Reality Toolkit Componentization href: Packaging/MRTK_Modularization.md - - name: Service Provider - href: MixedRealityConfigurationGuide.md - - name: Boundary System - href: Boundary/BoundarySystemGettingStarted.md - items: - - name: Configuring the Boundary Visualization - href: Boundary/ConfiguringBoundaryVisualization.md - name: Input href: Input/Overview.md items: @@ -57,36 +44,48 @@ items: - name: Interactable href: README_Interactable.md - - name: Object Manipulation - href: README_ManipulationHandler.md + - name: Object Manipulation + href: README_ManipulationHandler.md - name: Fingertip Visualization - href: README_FingertipVisualization.md - - name: Hand Interaction Example - href: README_HandInteractionExamples.md - - name: Eye Tracking Interaction Example - href: EyeTracking/EyeTracking_ExamplesOverview.md + href: README_FingertipVisualization.md - name: App Bar href: README_AppBar.md - name: Bounding Box href: README_BoundingBox.md - name: Button href: README_Button.md + - name: Sliders + href: README_Sliders.md - name: Object Collection - href: README_ObjectCollection.md + href: README_ObjectCollection.md - name: Pointers href: README_Pointers.md - name: Slate - href: README_Slate.md + href: README_Slate.md - name: System Keyboard - href: README_SystemKeyboard.md + href: README_SystemKeyboard.md - name: Tooltips - href: README_Tooltip.md + href: README_Tooltip.md - name: Solvers - href: README_Solver.md + href: README_Solver.md + - name: Hand Interaction Example + href: README_HandInteractionExamples.md + - name: Eye Tracking Interaction Example + href: EyeTracking/EyeTracking_ExamplesOverview.md - name: Spatial Awareness href: SpatialAwareness/SpatialAwarenessGettingStarted.md items: - name: Configuring the Spatial Awareness Mesh Observer + href: SpatialAwareness/ConfiguringSpatialAwarenessMeshObserver.md + - name: Boundary System + href: Boundary/BoundarySystemGettingStarted.md + items: + - name: Configuring the Boundary Visualization + href: Boundary/ConfiguringBoundaryVisualization.md + - name: Performance + href: Performance/PerfGettingStarted.md + - name: Utility + items: - name: In-Editor Input Simulation href: InputSimulation/InputSimulationService.md - name: Diagnostics System @@ -96,7 +95,9 @@ href: Diagnostics/ConfiguringDiagnostics.md - name: Using the Visual Profiler href: Diagnostics/UsingVisualProfiler.md - - name: Other Features + - name: Extension Service Creation Wizard + href: Utilities/ExtensionServiceCreationWizard.md + - name: Experimental Features items: - name: QR Tracking href: TODO.md @@ -104,12 +105,8 @@ href: TODO.md - name: Advanced topics items: - - name: Performance - href: Performance/PerfGettingStarted.md - name: Shared Experiences href: TODO.md - - name: Moving your project from HTK to MRTK - href: HTKToMRTKPortingGuide.md - name: Contributing href: Contributing/CONTRIBUTING.md items: diff --git a/ExtensionTemplates/ExtensionInspectorTemplate.txt b/ExtensionTemplates/ExtensionInspectorTemplate.txt new file mode 100644 index 00000000000..b57fd6f9b77 --- /dev/null +++ b/ExtensionTemplates/ExtensionInspectorTemplate.txt @@ -0,0 +1,22 @@ +#if UNITY_EDITOR +using System; +using Microsoft.MixedReality.Toolkit.Editor; +using Microsoft.MixedReality.Toolkit.Extensions; +using UnityEngine; +using UnityEditor; + +namespace #NAMESPACE#.Editor +{ + [MixedRealityServiceInspector(typeof(#SERVICE_NAME#))] + public class #INSPECTOR_NAME# : BaseMixedRealityServiceInspector + { + public override void DrawInspectorGUI(object target) + { + #SERVICE_NAME# service = (#SERVICE_NAME#)target; + + // Draw inspector here + } + } +} + +#endif \ No newline at end of file diff --git a/ExtensionTemplates/ExtensionInterfaceTemplate.txt b/ExtensionTemplates/ExtensionInterfaceTemplate.txt new file mode 100644 index 00000000000..47de9d2920c --- /dev/null +++ b/ExtensionTemplates/ExtensionInterfaceTemplate.txt @@ -0,0 +1,10 @@ +using System; +using Microsoft.MixedReality.Toolkit.Extensions; + +namespace #NAMESPACE# +{ + public interface #INTERFACE_NAME# : IMixedRealityExtensionService + { + // Expose service features and abilities here + } +} \ No newline at end of file diff --git a/ExtensionTemplates/ExtensionProfileTemplate.txt b/ExtensionTemplates/ExtensionProfileTemplate.txt new file mode 100644 index 00000000000..c1f0c9bfc8a --- /dev/null +++ b/ExtensionTemplates/ExtensionProfileTemplate.txt @@ -0,0 +1,13 @@ +using System; +using UnityEngine; +using Microsoft.MixedReality.Toolkit.Extensions; + +namespace #NAMESPACE# +{ + [MixedRealityServiceProfile(typeof(#INTERFACE_NAME#))] + [CreateAssetMenu(fileName = "#PROFILE_NAME#", menuName = "MixedRealityToolkit/#SERVICE_NAME# Configuration Profile")] + public class #PROFILE_NAME# : BaseMixedRealityProfile + { + // Store config data in serialized fields + } +} \ No newline at end of file diff --git a/ExtensionTemplates/ExtensionScriptTemplate.txt b/ExtensionTemplates/ExtensionScriptTemplate.txt new file mode 100644 index 00000000000..ddaa4020229 --- /dev/null +++ b/ExtensionTemplates/ExtensionScriptTemplate.txt @@ -0,0 +1,27 @@ +using System; +using Microsoft.MixedReality.Toolkit.Utilities; +using Microsoft.MixedReality.Toolkit.Extensions; + +namespace #NAMESPACE# +{ + [MixedRealityExtensionService(#SUPPORTED_PLATFORMS_PARAM#)] + public class #SERVICE_NAME# : BaseExtensionService, #INTERFACE_NAME#, IMixedRealityExtensionService + { + private #PROFILE_NAME# #PROFILE_FIELD_NAME#; + + public #SERVICE_NAME#(IMixedRealityServiceRegistrar registrar, string name, uint priority, BaseMixedRealityProfile profile) : base(registrar, name, priority, profile) + { + #PROFILE_FIELD_NAME# = (#PROFILE_NAME#)profile; + } + + public override void Initialize() + { + // Do service initialization here. + } + + public override void Update() + { + // Do service updates here. + } + } +} \ No newline at end of file diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 18d2176f114..a25d11477a4 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -9,21 +9,21 @@ EditorBuildSettings: path: Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity guid: 3dd4a396b5225f8469b9a1eb608bfa57 - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_00_RootScene.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-00-RootScene.unity guid: 27c3fbe0128089f48994cdc6af8668fc - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_01_BasicSetup.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-01-BasicSetup.unity guid: 3ac2cf3aa0e281340babd2053d8b7d46 - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_02_TargetSelection.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-02-TargetSelection.unity guid: 55643f7e4eceb734784192b162f565e0 - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_03_Navigation.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-03-Navigation.unity guid: 5df475f0bf57b1f488d59e0e16040d9a - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_04_TargetPositioning.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-04-TargetPositioning.unity guid: 91ded1f5ef2ae854ba4ac94eca7a2494 - enabled: 1 - path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity + path: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/EyeTrackingDemo-05-Visualizer.unity guid: 2d6c43a82f3a88c4dbdc3b5e99a68d8a m_configObjects: {} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index ba0ba3d6b84..194159f7244 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -302,7 +302,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -318,7 +318,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -334,7 +334,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -350,7 +350,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -366,7 +366,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -382,7 +382,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -398,7 +398,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -414,7 +414,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -430,7 +430,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -446,7 +446,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -462,7 +462,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -478,7 +478,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -494,7 +494,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -510,7 +510,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -526,7 +526,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -542,7 +542,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -558,7 +558,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -574,7 +574,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -590,7 +590,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -606,7 +606,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -622,7 +622,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -638,7 +638,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -654,7 +654,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -670,7 +670,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -686,7 +686,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -702,7 +702,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 @@ -718,7 +718,7 @@ InputManager: altNegativeButton: altPositiveButton: gravity: 0 - dead: 0.001 + dead: 0.19 sensitivity: 1 snap: 0 invert: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8d1bbf1cd39..b221178f925 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -118,7 +118,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 2.0.0-Beta2 + bundleVersion: 2.0.0-RC1-Refresh preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -241,6 +241,7 @@ PlayerSettings: tvOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 appleEnableProMotion: 0 clonedFromGUID: 00000000000000000000000000000000 templatePackageId: @@ -591,7 +592,7 @@ PlayerSettings: metroCertificatePassword: metroCertificateSubject: Microsoft metroCertificateIssuer: Microsoft - metroCertificateNotAfter: 80ddccd29f8bd501 + metroCertificateNotAfter: 80b15b7b5218d601 metroApplicationDescription: Microsoft.MixedReality.Toolkit wsaImages: {} metroTileShortName: MixedRealityToolkit diff --git a/README.md b/README.md index dee6db3ae26..e952f98b5c6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ MRTK-Unity provides a set of foundational components and features to accelerate * **Supports a wide range of platforms**, including * Microsoft HoloLens * Microsoft HoloLens 2 - * Microsoft Immersive headsets (IHMD) * Windows Mixed Reality headsets * OpenVR headsets (HTC Vive / Oculus Rift) @@ -21,26 +20,19 @@ MRTK-Unity provides a set of foundational components and features to accelerate | Branch | CI Status | Docs Status | |---|---|---| -| `mrtk_development` |[![CI Status](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_apis/build/status/public/mrtk_development-CI)](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_build/latest?definitionId=1)|[![Docs Status](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_apis/build/status/public/mrtk_docs)](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_build/latest?definitionId=7) +| `mrtk_development` |[![CI Status](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_apis/build/status/public/mrtk_CI?branchName=mrtk_development)](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_build/latest?definitionId=15)|[![Docs Status](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_apis/build/status/public/mrtk_docs)](https://dev.azure.com/aipmr/MixedRealityToolkit-Unity-CI/_build/latest?definitionId=7) # Required Software - | [![Windows SDK 18362+](Documentation/Images/MRTK170802_Short_17.png)](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK) [Windows SDK 18362+](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK)| [![Unity](Documentation/Images/MRTK170802_Short_18.png)](https://unity3d.com/get-unity/download/archive) [Unity 2018.3.x](https://unity3d.com/get-unity/download/archive)| [![Visual Studio 2017](Documentation/Images/MRTK170802_Short_19.png)](http://dev.windows.com/downloads) [Visual Studio 2017](http://dev.windows.com/downloads)| [![Simulator (optional)](Documentation/Images/MRTK170802_Short_20.png)](https://go.microsoft.com/fwlink/?linkid=852626) [Simulator (optional)](https://go.microsoft.com/fwlink/?linkid=852626)| + | [![Windows SDK 18362+](Documentation/Images/MRTK170802_Short_17.png)](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk) [Windows SDK 18362+](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)| [![Unity](Documentation/Images/MRTK170802_Short_18.png)](https://unity3d.com/get-unity/download/archive) [Unity 2018.3.x](https://unity3d.com/get-unity/download/archive)| [![Visual Studio 2017](Documentation/Images/MRTK170802_Short_19.png)](http://dev.windows.com/downloads) [Visual Studio 2017](http://dev.windows.com/downloads)| [![Simulator (optional)](Documentation/Images/MRTK170802_Short_20.png)](https://go.microsoft.com/fwlink/?linkid=852626) [Simulator (optional)](https://go.microsoft.com/fwlink/?linkid=852626)| | :--- | :--- | :--- | :--- | | To develop apps for Windows Mixed Reality headsets, you need the Windows 10 Fall Creators Update | The Unity 3D engine provides support for building mixed reality projects in Windows 10 | Visual Studio is used for code editing, deploying and building UWP app packages | The Emulators allow you test your app without the device in a simulated environment | # Feature Areas +| ![](Documentation/Images/MRTK_Icon_InputSystem.png) Input System
  | ![](Documentation/Images/MRTK_Icon_HandTracking.png) Hand Tracking (HoloLens 2) | ![](Documentation/Images/MRTK_Icon_EyeTracking.png) Eye Tracking (HoloLens 2) | ![](Documentation/Images/MRTK_Icon_VoiceCommand.png) Voice Commanding | ![](Documentation/Images/MRTK_Icon_GazeSelect.png) Gaze + Select (HoloLens) | ![](Documentation/Images/MRTK_Icon_Teleportation.png) Teleportation
  | +| :--- | :--- | :--- | :--- | :--- | :--- | +| ![](Documentation/Images/MRTK_Icon_UIControls.png) UI Controls
  | ![](Documentation/Images/MRTK_Icon_Solver.png) Solver and Interactions | ![](Documentation/Images/MRTK_Icon_ControllerVisualization.png) Controller Visualization | ![](Documentation/Images/MRTK_Icon_SpatialUnderstanding.png) Spatial Understanding | ![](Documentation/Images/MRTK_Icon_Diagnostics.png) Diagnostic Tool
  | ![](Documentation/Images/MRTK_Icon_StandardShader.png) MRTK Standard Shader | + -- Input System -- Articulated Hands + Gestures (HoloLens 2) -- Eye Tracking (HoloLens 2) -- Voice Commanding -- Gaze + Select (HoloLens) -- Controller Visualization -- Teleportation -- UI Controls -- Solver and Interactions -- Spatial Understanding -- Diagnostic Tool # Getting Started with MRTK Please check out the [Getting Started Guide](https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/GettingStartedWithTheMRTK.html) @@ -58,6 +50,8 @@ Find this readme, other documentation articles and the MRTK api reference on our | Various object positioning behaviors such as tag-along, body-lock, constant view size and surface magnetism | Script for lay out an array of objects in a three-dimensional shape | Annotation UI with flexible anchor/pivot system which can be used for labeling motion controllers and object. | | [![App Bar](Documentation/Images/AppBar/MRTK_AppBar_Main.png)](Documentation/README_AppBar.md) [App Bar](Documentation/README_AppBar.md) | [![Pointers](Documentation/Images/Pointers/MRTK_Pointer_Main.png)](Documentation/README_Pointers.md) [Pointers](Documentation/README_Pointers.md) | [![Fingertip Visualization](Documentation/Images/Fingertip/MRTK_FingertipVisualization_Main.png)](Documentation/README_FingertipVisualization.md) [Fingertip Visualization](Documentation/README_FingertipVisualization.md) | | UI for Bounding Box's manual activation | Learn about various types of pointers | Visual affordance on the fingertip which improves the confidence for the direct interaction | +| [![Slider](Documentation/Images/Slider/MRTK_UX_Slider_Main.jpg)](Documentation/README_Sliders.md) [Slider](Documentation/README_Sliders.md) | [![MRTK Standard Shader](Documentation/Images/MRTKStandardShader/MRTK_StandardShader.jpg)](Documentation/README_MRTKStandardShader.md) [MRTK Standard Shader](Documentation/README_MRTKStandardShader.md) | [![Hand Joint Chaser](Documentation/Images/HandJointChaser/MRTK_HandJointChaser_Main.jpg)](Documentation/README_HandJointChaser.md) [Hand Joint Chaser](Documentation/README_HandJointChaser.md) | +| Slider UI for adjusting values supporting direct hand tracking interaction | MRTK's Standard shader supports various Fluent design elements with performance | Demonstrates how to use Solver to attach objects to the hand joints | | [![Eye Tracking: Target Selection](Documentation/Images/EyeTracking/mrtk_et_targetselect.png)](Documentation/EyeTracking/EyeTracking_TargetSelection.md) [Eye Tracking: Target Selection](Documentation/EyeTracking/EyeTracking_TargetSelection.md) | [![Eye Tracking: Navigation](Documentation/Images/EyeTracking/mrtk_et_navigation.png)](Documentation/EyeTracking/EyeTracking_Navigation.md) [Eye Tracking: Navigation](Documentation/EyeTracking/EyeTracking_Navigation.md) | [![Eye Tracking: Heat Map](Documentation/Images/EyeTracking/mrtk_et_heatmaps.png)](Documentation/EyeTracking/EyeTracking_Visualization.md) [Eye Tracking: Heat Map](Documentation/EyeTracking/EyeTracking_Visualization.md) | | Combine eyes, voice and hand input to quickly and effortlessly select holograms across your scene | Learn how to auto scroll text or fluently zoom into focused content based on what you are looking at| Examples for logging, loading and visualizing what users have been looking at in your app | @@ -70,17 +64,17 @@ You can find other example scenes under [**Assets/MixedRealityToolkit.Examples/ # Engage with the Community -Join the conversation around MRTK on [Slack](https://holodevelopers.slack.com/). +- Join the conversation around MRTK on [Slack](https://holodevelopers.slack.com/). -Ask questions about using MRTK on [Stack Overflow](https://stackoverflow.com/questions/tagged/mrtk) using the **MRTK** tag. +- Ask questions about using MRTK on [Stack Overflow](https://stackoverflow.com/questions/tagged/mrtk) using the **MRTK** tag. -Search for [known issues](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) or file a [new issue](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) if you find something broken in MRTK code. +- Search for [known issues](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) or file a [new issue](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) if you find something broken in MRTK code. -Join our weekly community shiproom to hear directly from the feature team. (link coming soon) +- Join our weekly community shiproom to hear directly from the feature team. (link coming soon) -Deep dive into project plan and learn how you can contribute to MRTK in our [wiki](https://github.com/Microsoft/MixedRealityToolkit-Unity/wiki). +- Deep dive into project plan and learn how you can contribute to MRTK in our [wiki](https://github.com/Microsoft/MixedRealityToolkit-Unity/wiki). -For issues related to Windows Mixed Reality that aren't directly related to the MRTK, check out the [Windows Mixed Reality Developer Forum](https://forums.hololens.com/). +- For issues related to Windows Mixed Reality that aren't directly related to the MRTK, check out the [Windows Mixed Reality Developer Forum](https://forums.hololens.com/). This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/build.ps1 b/build.ps1 index 98684da5ab9..cae4aebd090 100644 --- a/build.ps1 +++ b/build.ps1 @@ -24,7 +24,8 @@ param( [ValidatePattern("^\d+\.\d+\.\d+[fpb]\d+$")] [string]$UnityVersion, [switch]$Clean, - [switch]$Verbose + [switch]$Verbose, + [switch]$NoNuget ) Import-Module UnitySetup -MinimumVersion '4.0.97' -ErrorAction Stop @@ -129,5 +130,8 @@ $unityPackages | Foreach-Object { catch { Write-Error $_ } } -# Wait for, receive, and remove all the nuget jobs -$nugetJobs | Receive-Job -Wait -AutoRemoveJob +if (!$NoNuget) +{ + # Wait for, receive, and remove all the nuget jobs + $nugetJobs | Receive-Job -Wait -AutoRemoveJob +} \ No newline at end of file diff --git a/pipelines/ci-release.yml b/pipelines/ci-release.yml new file mode 100644 index 00000000000..354a7495bdf --- /dev/null +++ b/pipelines/ci-release.yml @@ -0,0 +1,16 @@ +# CI build for release packages. + +variables: + UnityVersion: Unity2018.3.7f1 + MRTKVersion: 2.0.0 + +pool: + name: Analog On-Prem + demands: + - Unity2018.3.7f1 # variable expansion not allowed here + +steps: +- template: templates/common.yml +- template: templates/package.yml +- template: templates/releasesigning.yml +- template: templates/end.yml diff --git a/pipelines/ci.yaml b/pipelines/ci.yaml new file mode 100644 index 00000000000..2d1e13c27b1 --- /dev/null +++ b/pipelines/ci.yaml @@ -0,0 +1,15 @@ +# CI build for developer builds. + +variables: + UnityVersion: Unity2018.3.7f1 + MRTKVersion: 2.0.0 + +pool: + name: On-Prem Unity + demands: + - Unity2018.3.7f1 + +steps: +- template: templates/common.yml +- template: templates/package.yml +- template: templates/end.yml diff --git a/pipelines/pr.yaml b/pipelines/pr.yaml new file mode 100644 index 00000000000..e91d4343099 --- /dev/null +++ b/pipelines/pr.yaml @@ -0,0 +1,14 @@ +# Build for PR validation. + +variables: + UnityVersion: Unity2018.3.7f1 + MRTKVersion: 2.0.0 + +pool: + name: On-Prem Unity + demands: + - Unity2018.3.7f1 + +steps: +- template: templates/common.yml +- template: templates/end.yml diff --git a/pipelines/templates/assetretargeting.yml b/pipelines/templates/assetretargeting.yml new file mode 100644 index 00000000000..8dd49a978c8 --- /dev/null +++ b/pipelines/templates/assetretargeting.yml @@ -0,0 +1,31 @@ +# [Template] Run Unity asset retargetting for NuGet packages. + +steps: +- powershell: | + # Find unity.exe as Start-UnityEditor currently doesn't support arbitrary parameters + $editor = Get-ChildItem ${Env:$(UnityVersion)} -Filter 'Unity.exe' -Recurse | Select-Object -First 1 -ExpandProperty FullName + + $outDir = "$(Build.ArtifactStagingDirectory)\build" + $logFile = New-Item -Path "$outDir\build\retargeting_log.log" -ItemType File -Force + + $proc = Start-Process -FilePath "$editor" -ArgumentList "-projectPath $(Get-Location) -batchmode -executeMethod Microsoft.MixedReality.Toolkit.Build.Editor.AssetScriptReferenceRetargeter.RetargetAssets -logFile $($logFile.FullName) -nographics -quit" -PassThru + $ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile.FullName + + while (-not $proc.HasExited -and $ljob.HasMoreData) + { + Receive-Job $ljob + Start-Sleep -Milliseconds 200 + } + Receive-Job $ljob + + Stop-Job $ljob + + Remove-Job $ljob + Stop-Process $proc + displayName: 'Run Asset Retargetting' + +- script: 'Type %Build_ArtifactStagingDirectory%\build\build\retargeting_log.log' + displayName: 'Print Unity Log' + +- script: 'dir /s/b NuGet' + displayName: 'Print Retargeted Directory' diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml new file mode 100644 index 00000000000..dbf8901a469 --- /dev/null +++ b/pipelines/templates/common.yml @@ -0,0 +1,47 @@ +# [Template] Common build tasks shared between CI builds and PR validation. + +steps: +# Build UWP x86 +- template: tasks/unitybuild.yml + parameters: + Arch: 'x86' + Platform: 'UWP' + PublishArtifacts: true + +# Build UWP ARM +- template: tasks/unitybuild.yml + parameters: + Arch: 'arm' + Platform: 'UWP' + UnityArgs: '-targetUwpSdk 10.0.18432.0' + PublishArtifacts: true + PackagingDir: 'ARM' + +- powershell: | + $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" + .\build.ps1 -Version $AutoMrtkVersion -NoNuget + displayName: 'Build Unity and NuGet packages' + +- powershell: | + Get-ChildItem "." -Filter Build-UnityPackage*.log | + Foreach-Object { + echo "=======================" "Contents of log file $_.FullName:" "=======================" + Get-Content $_.FullName + } + displayName: 'Echo packaging logs' + +# Build Standalone x86 +- template: tasks/unitybuild.yml + parameters: + Arch: 'x86' + Platform: 'Standalone' + +# Build Standalone x86 +- template: tasks/unitybuild.yml + parameters: + Arch: 'x86' + Platform: 'UWP' + ScriptingBackend: '.NET' + +- template: assetretargeting.yml +- template: tests.yml diff --git a/pipelines/templates/end.yml b/pipelines/templates/end.yml new file mode 100644 index 00000000000..d967969b953 --- /dev/null +++ b/pipelines/templates/end.yml @@ -0,0 +1,14 @@ +# [Template] Steps always executed at the end of each build. + +steps: +# Clean up after build: terminate Unity process if it is still running +- powershell: | + $unityProcess = Get-Process -Name Unity -ErrorAction SilentlyContinue + if ($unityProcess) + { + Write-Host "Closing Unity Process" + Stop-Process $unityProcess + } + + displayName: 'Close Unity' + condition: always() \ No newline at end of file diff --git a/pipelines/templates/package.yml b/pipelines/templates/package.yml new file mode 100644 index 00000000000..0af4b245ff1 --- /dev/null +++ b/pipelines/templates/package.yml @@ -0,0 +1,24 @@ +# [Template] Create NuGet packages. + +steps: +- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 # NuGetCommand + displayName: 'NuGet pack' + inputs: + command: pack + packagesToPack: 'NuGet/**/*.nuspec' + packDestination: '$(Build.SourcesDirectory)/artifacts' + buildProperties: 'version=$(MRTKVersion)-$(Build.BuildNumber)' + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Packages' + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts' + ArtifactName: 'mrtk-unity-packages' + +- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 # NuGetCommand + displayName: 'NuGet push' + inputs: + command: push + packagesToPush: '$(Build.SourcesDirectory)/artifacts/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/**/*.symbols.nupkg' + publishVstsFeed: '$(NuGetFeedId)' + buildProperties: 'version=$(MRTKVersion)-$(Build.BuildNumber)' diff --git a/pipelines/templates/releasesigning.yml b/pipelines/templates/releasesigning.yml new file mode 100644 index 00000000000..6d72f6109d0 --- /dev/null +++ b/pipelines/templates/releasesigning.yml @@ -0,0 +1,8 @@ +# [Template] Tasks needed for release signing + +steps: +- task: ComponentGovernanceComponentDetection@0 + inputs: + scanType: 'Register' + verbosity: 'Verbose' + alertWarningLevel: 'High' \ No newline at end of file diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml new file mode 100644 index 00000000000..9f076fcf216 --- /dev/null +++ b/pipelines/templates/tasks/unitybuild.yml @@ -0,0 +1,62 @@ +# [Template] Compile MRTK inside Unity. + +parameters: + Arch: '' # x86|arm + Platform: '' # UWP|Standalone + UnityArgs: 'none' # [optional] additional args passed to Unity + ScriptingBackend: 'default' # [optional] default|.NET + PublishArtifacts: false + PackagingDir: 'Win32' + +steps: +- powershell: | + # Find unity.exe as Start-UnityEditor currently doesn't support arbitrary parameters + $editor = Get-ChildItem ${Env:$(UnityVersion)} -Filter 'Unity.exe' -Recurse | Select-Object -First 1 -ExpandProperty FullName + + $outDir = "$(Build.ArtifactStagingDirectory)\build" + $logFile = New-Item -Path "$outDir\build\build_${{ parameters.Platform }}_${{ parameters.Arch }}.log" -ItemType File -Force + + $sceneList = "Assets\MixedRealityToolkit.Examples\Demos\HandTracking\Scenes\HandInteractionExamples.unity" + + $extraArgs = '' + If ("${{ parameters.Platform }}" -eq "UWP") + { + $extraArgs += '-buildTarget WSAPlayer -buildAppx' + } + ElseIf ("${{ parameters.Platform }}" -eq "Standalone") + { + $extraArgs += "-buildTarget StandaloneWindows" + } + + If ("${{ parameters.UnityArgs }}" -ne "none") + { + $extraArgs += " ${{ parameters.UnityArgs }}" + } + + If ("${{ parameters.ScriptingBackend }}" -eq ".NET") + { + $extraArgs += " -scriptingBackend 2" + } + + $proc = Start-Process -FilePath "$editor" -ArgumentList "-projectPath $(Get-Location) -executeMethod Microsoft.MixedReality.Toolkit.Build.Editor.UnityPlayerBuildTools.StartCommandLineBuild -sceneList $sceneList -logFile $($logFile.FullName) -batchMode -${{ parameters.Arch }} -buildOutput $outDir $extraArgs" -PassThru + $ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile.FullName + + while (-not $proc.HasExited -and $ljob.HasMoreData) + { + Receive-Job $ljob + Start-Sleep -Milliseconds 200 + } + Receive-Job $ljob + + Stop-Job $ljob + + Remove-Job $ljob + Stop-Process $proc + displayName: "Build ${{ parameters.Platform }} ${{ parameters.Arch }} ${{ parameters.ScriptingBackend }}" + +- ${{ if parameters.PublishArtifacts }}: + - task: PublishBuildArtifacts@1 + displayName: 'Publish ${{ parameters.Platform }} ${{ parameters.Arch }} (${{ parameters.PackagingDir }}) ${{ parameters.ScriptingBackend }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' + ArtifactName: 'mrtk-build-${{ parameters.Arch }}' diff --git a/pipelines/templates/tests.yml b/pipelines/templates/tests.yml new file mode 100644 index 00000000000..d6a7350edf9 --- /dev/null +++ b/pipelines/templates/tests.yml @@ -0,0 +1,33 @@ +# [Template] Run MRTK tests. + +steps: +- powershell: | + $editor = Get-ChildItem ${Env:$(UnityVersion)} -Filter 'Unity.exe' -Recurse | Select-Object -First 1 -ExpandProperty FullName + + Write-Host "======================= EditMode Tests =======================" + + $logFile = New-Item -Path .\editmode-test-run.log -ItemType File -Force + + $proc = Start-Process -FilePath "$editor" -ArgumentList "-projectPath $(Get-Location) -runTests -testPlatform editmode -batchmode -logFile $($logFile.Name) -editorTestsResultFile .\test-editmode-default.xml" -PassThru + $ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile.FullName + + while (-not $proc.HasExited -and $ljob.HasMoreData) + { + Receive-Job $ljob + Start-Sleep -Milliseconds 200 + } + Receive-Job $ljob + + Stop-Job $ljob + + Remove-Job $ljob + Stop-Process $proc + + displayName: 'Run tests' + +- task: PublishTestResults@2 + displayName: 'Publish Test Results' + inputs: + testResultsFormat: NUnit + testResultsFiles: 'test*.xml' + failTaskOnFailedTests: true